diff options
| author | Adam Malczewski <[email protected]> | 2026-06-30 01:30:06 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-30 01:30:06 +0900 |
| commit | bf74aeab143a49005c380706ae9847cf064fd2f2 (patch) | |
| tree | c9e93dc0ebe818e7c0d0aafeba8387afd161da3f /frontend-stop-generation-handoff.md | |
| parent | 6dd9ea9b935e5011c16faed6c869c976cf5ff172 (diff) | |
| download | dispatch-main.tar.gz dispatch-main.zip | |
Removed 40+ markdown files that were cluttering the repo root:
- frontend-*-handoff.md (28 files) — historical API contract handoffs, features all implemented
- backend-to-fe-handoff.md, backend-to-fe-handoff-2.md — old handoff docs
- broken-chat-repair-handoff.md — old repair handoff
- PLAN-mcp.md, PLAN-per-edit-diagnostics.md — old planning docs
- ai-review-report.md, crash-review-report.md — one-time review reports
- tasks.md, HANDOFF.md — outdated status docs (git log is the source of truth)
Kept: AGENTS.md, GLOSSARY.md, ORCHESTRATOR.md, README.md
Also: gitignored ai-review-report.md so future Gemini reviews don't commit it
Diffstat (limited to 'frontend-stop-generation-handoff.md')
| -rw-r--r-- | frontend-stop-generation-handoff.md | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/frontend-stop-generation-handoff.md b/frontend-stop-generation-handoff.md deleted file mode 100644 index 117b65e..0000000 --- a/frontend-stop-generation-handoff.md +++ /dev/null @@ -1,49 +0,0 @@ -# FE handoff — stop generation mid-turn - -Courier this to `../frontend`. All changes are ADDITIVE. - -## What shipped (backend) - -A "stop" button: aborts an in-flight generation without closing the conversation. -The conversation stays open — it transitions `active → idle` via the normal -turn-settle path. Partial messages are persisted. The turn seals with -`finishReason: "aborted"`. - -This is distinct from `POST /conversations/:id/close` which marks the -conversation as `closed` (tab dismiss). - -## `POST /conversations/:id/stop` — stop generation - -Aborts the in-flight turn's `AbortController`. The kernel finishes generation, -persists partial messages, and seals the turn normally. The conversation -transitions `active → idle` (not `closed`). - -- 200 response: `{ conversationId: string, abortedTurn: boolean }` -- `abortedTurn: true` — a turn was active and has been aborted. -- `abortedTurn: false` — no active turn (no-op, conversation was already idle). -- Idempotent — stopping an idle conversation is safe. - -## What the FE receives after stopping - -The existing event flow handles everything — no new WS message needed: - -1. The `done` event arrives with `reason: "aborted"` (the turn sealed normally). -2. The `conversation.statusChanged` WS message arrives with `status: "idle"`. -3. The FE should reload history via `GET /conversations/:id` to see the partial - messages that were persisted before the abort. - -## What the FE needs to do - -1. **Stop button** in the conversation toolbar (only visible when `status: "active"`). - On click → `POST /conversations/:id/stop`. Disable the button after clicking - (wait for the `done` event + `statusChanged: idle` before re-enabling). - -2. **Handle the response**: `abortedTurn: true` means the stop worked. - `abortedTurn: false` means there was nothing to stop (the turn may have - already finished between the click and the request). - -3. **Reload history** after receiving the `done` event to show partial output. - -## CLI - -`dispatch stop <conversationId>` — stops generation. Resolves short IDs. |
