Summary
Define a "t3code instance" as a Thread with an active Agent Session, and allow the user to move it between Projects within the same Client by dragging it in the sidebar.
Definition
A t3code instance is a Thread where `session.status` is not in `{stopped, null}`. The sidebar differentiates these from inactive Threads with a visual activity indicator.
Scope
- Add new command: `thread.project.reassign` with `{threadId, targetProjectId}`
- Add new event: `thread.project.reassigned` with `{threadId, previousProjectId, targetProjectId}`
- Decider validates:
- Source and target Projects belong to the same Client
- Source and target Projects share the same `workspaceRoot` (agent context is workspace-bound)
- Projector updates Thread's `projectId`
- All associated Terminals move with the Thread (they reference threadId, not projectId directly)
Sidebar UI
- Thread items with active agent sessions show an activity indicator (pulsing dot or similar)
- Thread items are draggable within the sidebar
- Valid drop zones: Projects within the same Client that share the same `workspaceRoot`
- Invalid drops (different Client, different workspaceRoot): show rejection feedback with explanation
Edge cases
- Thread with active turn during drag: move permitted, turn continues
- Thread with no agent session: move still permitted (regular Thread move)
- Drop onto Project in a different Client: rejected ("Move Projects between Clients, not Threads")
Key files to modify
- `packages/contracts/src/orchestration.ts` — new command/event schemas
- `apps/server/src/orchestration/decider.ts` — validation logic
- `apps/server/src/orchestration/projector.ts` — update Thread's projectId
- `apps/web/src/components/Sidebar.tsx` — Thread drag + validation + drop zones
Dependencies
- F2 (Client-Project binding — need to know which Client a Project belongs to)
Acceptance criteria
Summary
Define a "t3code instance" as a Thread with an active Agent Session, and allow the user to move it between Projects within the same Client by dragging it in the sidebar.
Definition
A t3code instance is a Thread where `session.status` is not in `{stopped, null}`. The sidebar differentiates these from inactive Threads with a visual activity indicator.
Scope
Sidebar UI
Edge cases
Key files to modify
Dependencies
Acceptance criteria