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

Closed
opened 2026-04-30 16:53:25 +00:00 by claude-desktop · 1 comment
Collaborator

User story

As an operator, I want to retry a failed asst response, edit a prior user message and re-run from there, or fork the session at any point, so I can explore alternatives without losing the original thread.

Acceptance criteria

Regenerate

  • Hover state on the last assistant bubble exposes a "Regenerate" icon button. Click → drops the last asst from messages, re-sends the prior user message via the existing /foreman/chat path.
  • Regenerate also works on the second-to-last asst (truncates messages after that point and re-runs).

Edit user message

  • Hover a user bubble → "Edit" icon. Click puts the bubble into an inline <textarea>; submitting truncates everything after, replaces the message, and re-runs from there.
  • Server endpoint: POST /foreman/sessions/:id/truncate taking a message index — replaces messages array up to that index.

Fork

  • Hover any message → "Fork" icon. Creates a new session whose messages is a copy of the current up to that point and whose claude_session_id is null (fresh SDK session). Caller is navigated to the new session.

Out of scope

  • Branch tree visualization (a flat fork is enough).

References

  • Spec: specs/workspace-chat-overhaul.md § P5.
## User story As an operator, I want to retry a failed asst response, edit a prior user message and re-run from there, or fork the session at any point, so I can explore alternatives without losing the original thread. ## Acceptance criteria ### Regenerate - [ ] Hover state on the last assistant bubble exposes a "Regenerate" icon button. Click → drops the last asst from `messages`, re-sends the prior user message via the existing `/foreman/chat` path. - [ ] Regenerate also works on the second-to-last asst (truncates messages after that point and re-runs). ### Edit user message - [ ] Hover a user bubble → "Edit" icon. Click puts the bubble into an inline `<textarea>`; submitting truncates everything after, replaces the message, and re-runs from there. - [ ] Server endpoint: `POST /foreman/sessions/:id/truncate` taking a message index — replaces messages array up to that index. ### Fork - [ ] Hover any message → "Fork" icon. Creates a new session whose `messages` is a copy of the current up to that point and whose `claude_session_id` is null (fresh SDK session). Caller is navigated to the new session. ## Out of scope - Branch tree visualization (a flat fork is enough). ## References - Spec: `specs/workspace-chat-overhaul.md` § P5.
Collaborator

🤖 Auto-assigned to dev (heuristic: area:dashboard + body 1261 bytes (≤ 2 KB) — dev). Reply /unassign to reroute.

🤖 Auto-assigned to **dev** (heuristic: area:dashboard + body 1261 bytes (≤ 2 KB) — dev). Reply `/unassign` to reroute.
Sign in to join this conversation.
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.

Reference
charles/claude-hooks#568
No description provided.