feat(workspace): regenerate / edit prior message / fork session #584

Merged
code-lead merged 1 commit from dev/568 into main 2026-04-30 19:16:14 +00:00
Collaborator

Adds regenerate, edit, and fork actions to the foreman transcript, letting operators retry turns, fix prior messages, or branch sessions without losing the original thread.

Test plan

  • Hover an assistant bubble → Regenerate icon appears; click truncates the session to before that turn and re-sends the preceding user message.
  • Hover a user bubble → Edit icon; submitting the inline textarea truncates and re-runs with the edited text. Esc or Cancel reverts.
  • Hover any bubble → Fork icon; creates a new session up to that point, navigates to it.
  • All three icons are hidden while streaming (no mid-turn corruption).
  • POST /foreman/sessions/:id/truncate with message_index: N keeps messages 0..N and clears claude_session_id.
  • POST /foreman/sessions/:id/fork with message_index: N creates a new session with that slice.

Closes #568

Adds regenerate, edit, and fork actions to the foreman transcript, letting operators retry turns, fix prior messages, or branch sessions without losing the original thread. ## Test plan - Hover an assistant bubble → **Regenerate** icon appears; click truncates the session to before that turn and re-sends the preceding user message. - Hover a user bubble → **Edit** icon; submitting the inline textarea truncates and re-runs with the edited text. `Esc` or Cancel reverts. - Hover any bubble → **Fork** icon; creates a new session up to that point, navigates to it. - All three icons are hidden while streaming (no mid-turn corruption). - `POST /foreman/sessions/:id/truncate` with `message_index: N` keeps messages 0..N and clears `claude_session_id`. - `POST /foreman/sessions/:id/fork` with `message_index: N` creates a new session with that slice. Closes #568
dev self-assigned this 2026-04-30 19:04:47 +00:00
feat(workspace): regenerate / edit prior message / fork session (#568)
All checks were successful
qa / dockerfile (pull_request) Successful in 7s
qa / qa (pull_request) Successful in 1m47s
75437b0e2a
Add POST /foreman/sessions/:id/truncate and POST /foreman/sessions/:id/fork
server endpoints, and wire Regenerate / Edit / Fork hover actions into the
transcript UI so operators can retry failed turns, edit prior user messages,
or branch the conversation without losing the original thread.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-04-30 19:06:40 +00:00
reviewer approved these changes 2026-04-30 19:14:51 +00:00
reviewer left a comment

Implementation correct and complete. CI green on both qa and dockerfile jobs (75437b0).

Nit (non-blocking): canRegenerate prop on Bubble is redundant — it's already encoded by whether onRegenerate is defined — but causes no harm.

Implementation correct and complete. CI green on both `qa` and `dockerfile` jobs (`75437b0`). Nit (non-blocking): `canRegenerate` prop on `Bubble` is redundant — it's already encoded by whether `onRegenerate` is defined — but causes no harm.
code-lead deleted branch dev/568 2026-04-30 19:16:14 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!584
No description provided.