# handoff-bar ## Intent The user-facing control for the **graceful project handoff** (AGENT.md §8.3). It lets the user ask Claude to switch to the active project, shows the "waiting for a good stopping point" state while the request is pending, and announces completion (with Claude's summary of where it left off) when Claude calls `ack_switch`. The switch is Claude-completed at a checkpoint, never app-forced (§1.4-class rule). ## Public surface - **Tag:** `` - **Attributes/properties:** none. - **Fetches (initial):** `GET /api/switch` (pending request), `GET /api/active-project`. - **Writes:** `POST /api/switch {target}` to request a handoff to the active project (actor=user); `DELETE /api/switch` to cancel. - **Subscribes:** `EventSource('/events')` — reacts to `switch-requested`, `switch-completed` (shows Claude's summary), `switch-cancelled`, and `active-project-changed`. Closed on disconnect. ## History - 2026-09-20: created — slice 4; request/pending/completed UI over the `/api/switch` endpoints and SSE. ## Notes / gotchas - All server-derived text is escaped before insertion (targets, summaries). - The request targets the current **active project**; select a repo first (that sets the active project via ``). - The completion message persists until the next request; it is informational.