1. 18 Jul, 2026 2 commits
    • Administrator's avatar
      chore(test): add vitest setup · d6452cf0
      Administrator authored
      
      
      Wires up vitest + @vue/test-utils + jsdom so the spec 0004 tests can run.
      
      - package.json: 3 npm scripts (test, test:run, test:ui) + vitest /
        @vue/test-utils / jsdom devDeps.
      - vitest.config.js: jsdom env, @ alias pointing at src/, setup file.
      - src/test-setup.js: shared jest-dom-style matchers.
      - src/__tests__/smoke.test.js: sanity check the harness resolves the @
        alias and that taskService imports cleanly.
      Co-Authored-By: default avatarClaude <noreply@anthropic.com>
      d6452cf0
    • Administrator's avatar
      feat(task): spec 0004 — task images migrated to stdt_task_images sub-resource · 8925331e
      Administrator authored
      
      
      Task images were stored as a JSON-ish field on stdt_tasks. Spec 0004 (see
      docs/task-images-migration.md) splits them into a dedicated sub-resource
      stdt_task_images so each image is its own row with mime_type / file_name /
      etag / size_bytes, accessed via /api/tasks/<id>/images/.
      
      Frontend changes:
      - new useTaskImages composable owning image state per edit dialog, with
        eager-load priming in load() so thumbnails render and are clickable in
        the grid (fixes v-if branch gated on populated imageCache).
      - taskService refactored: listTaskImages / createTaskImage / deleteTaskImage
        / getTaskImageContent (blob fetch with responseType: 'blob' to dodge 406s).
      - apiEndpoints.TASKS.IMAGES added for documentation purposes only — services
        still hardcode paths (CLAUDE.md flags apiEndpoints as stale).
      - TaskView.vue: switched from inline task.images to useTaskImages(); image
        upload / preview / delete / carousel wired to the new composable. Explicit
        taskId passed to load() and commit() since useTaskImages is instantiated
        without a taskIdRef at module scope.
      - locales en/zh-CN: new image keys (addImage, pendingUpload, clickToLoad,
        imagePartialFailure, imageLimitReached, etc.).
      
      Tests:
      - src/__tests__/api/taskService.test.js
      - src/__tests__/composables/useTaskImages.test.js
      - src/__tests__/composables/useTaskImages.network.test.js
      
      Also: .claude/ added to .gitignore (Claude Code local permissions, per-dev).
      Co-Authored-By: default avatarClaude <noreply@anthropic.com>
      8925331e