Skip to content

Task Workspaces UI + migrate done/notes to API - #36

Merged
sandervonk merged 2 commits into
mainfrom
cursor/task-workspaces-ui-6ffc
Sep 8, 2026
Merged

sandervonk merged 2 commits into
mainfrom
cursor/task-workspaces-ui-6ffc

Conversation

@sandervonk

Copy link
Copy Markdown
Member

Summary

Vue Portal changes for task workspaces and migrating personal done / notes off client Firestore writes.

API migration (no more Firestore finished[] / notes writes for these actions)

  • set_finished → PATCH /api/v1/me/tasks/:taskPath with { completed } (falls back to POST …/done / …/undo, then local stub on 404)
  • set_note → same route with { note }
  • Board hydrate ingests completed, note, workspace_id, completed_at, note_updated_at from GET /api/v1/me/board
  • New task_states map + is_task_completed() — calendar/study/upcoming read API state first, legacy finished[] read-only fallback

Workspace UI (View Task)

  • TaskWorkspace.vue in task detail: Enable workspace, Link existing (shareable workspace_id across project steps), Destroy (confirm modal)
  • Drop zone uses Portal tokens: idle var(--color-overlay-input), drag-over translucent var(--color-action) with centered action-colored label, Add file + file list
  • Connect Drive button → POST /api/v1/oauth/drive/start (best-effort; warns when route not live)
  • Teachers who can manage the class see Teacher workspace (shared) via /api/v1/me/classes/:classId/teacher-workspace routes

Server contract notes (mvtt-server sibling)

Assumed routes (client stubs when 404 mid-dev):

Area Routes
Task state PATCH /api/v1/me/tasks/:taskPath, POST …/done, POST …/undo
Task workspace GET/POST/DELETE /api/v1/me/tasks/:taskPath/workspace, POST …/link
Teacher workspace GET/POST/DELETE /api/v1/me/classes/:classId/teacher-workspace, POST …/link
Files GET /api/v1/workspaces/:id, POST …/files, DELETE …/files/:fileId
Drive POST /api/v1/oauth/drive/start → { url }

Screenshots (drop zone states)

Workspace drop zone — idle

Workspace drop zone — drag over

Workspace drop zone — with files

Tests

  • npm run test:me-tasks — task state map helpers
  • npm run test:me-board — unchanged, still passes

Files

  • src/common/meTasks.ts, meTaskState.ts, workspace.ts — API clients + 404 stubs
  • src/components/Portal/TaskWorkspace.vue — workspace panel
  • src/store/index.ts — API-backed set_finished / set_note, board ingest
  • src/views/Portal/ViewTask.vue — embed workspace section
  • CalendarBlock.vue, StudyBlock.vue — is_task_completed

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 8, 2026 17:41
- Route set_finished and set_note through PATCH /api/v1/me/tasks (done/undo shims, 404 shims)
- Hydrate task_states from GET /api/v1/me/board (completed, note, workspace_id)
- Add TaskWorkspace panel in ViewTask (enable/link/destroy, drop zone, Drive connect)
- Teacher workspace uses class teacher-workspace routes when caller can manage class
- Calendar and study views read completion via is_task_completed from API state

Co-authored-by: Sander Vonk <sandervonk@users.noreply.github.com>
- Drop .ts extension from meTaskState paths import
- Use finished_tasks in upcoming_todo getter (avoid action call from getter)
- Narrow MeTaskState lookup in note_for before reading .note

Co-authored-by: Sander Vonk <sandervonk@users.noreply.github.com>
@sandervonk
sandervonk marked this pull request as ready for review September 8, 2026 17:47
@sandervonk
sandervonk merged commit a18c8de into main Sep 8, 2026
1 check passed
@sandervonk
sandervonk deleted the cursor/task-workspaces-ui-6ffc branch September 8, 2026 17:50
sandervonk added a commit to cmu-tt/cmu-tt.github.io that referenced this pull request Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants