feat(web): breakdown toolbar + open-in-chat on /specs/$specName #1120

Open
opened 2026-05-11 23:39:02 +00:00 by claude-desktop · 0 comments
Collaborator

As an operator,
I want to launch breakdown preview and jump into a fresh chat session about the open spec from the spec editor toolbar,
so that I do not have to switch routes mid-flow to act on the spec I just wrote.

Keeps the legacy in-chat /breakdown slash command alive too — that path lives on /workspace and is unchanged by this story.

Acceptance criteria

Breakdown toolbar

  • routes/specs.$specName.tsx toolbar has "Breakdown" button (lucide ListTodo or similar) that opens <BreakdownPreview> inside a right-side <Drawer>.
  • BreakdownPreview is invoked with the current spec body — even if dirty, uses the in-memory draft (warns operator if unsaved).
  • "Create issues" inside the drawer behaves identically to its current /workspace invocation.
  • Drawer is dismissable via Esc / backdrop click.

Open-in-chat

  • Toolbar "Open in chat" button (lucide MessageSquare) navigates to /workspace?session=new.
  • Spec is pre-inlined as @specs/<name>.md mention in the composer's initial draft, passed through a transient Zustand key (e.g. useComposerHandoff) — not a URL param.
  • On /workspace mount, if the handoff key holds a value, the composer draft is seeded and the key cleared.

Tests

  • Breakdown drawer opens, calls fetchBreakdownPreview with the spec body, renders preview rows.
  • Open-in-chat navigates with session=new; handoff store holds the expected mention.
  • Workspace mount drains the handoff store on first render.

Out of scope

  • AI drawer integration (story wsplit-3).
  • Removing breakdown from /workspace (it stays — operator decision "both").

Dependencies

  • Blocked by wsplit-2 (editor route must exist).

References

  • Spec: docs/specs/workspace-split.md § Editor toolbar.
**As an** operator, **I want** to launch breakdown preview and jump into a fresh chat session about the open spec from the spec editor toolbar, **so that** I do not have to switch routes mid-flow to act on the spec I just wrote. Keeps the legacy in-chat `/breakdown` slash command alive too — that path lives on /workspace and is unchanged by this story. ## Acceptance criteria ### Breakdown toolbar - [ ] `routes/specs.$specName.tsx` toolbar has "Breakdown" button (lucide `ListTodo` or similar) that opens `<BreakdownPreview>` inside a right-side `<Drawer>`. - [ ] `BreakdownPreview` is invoked with the current spec body — even if dirty, uses the in-memory draft (warns operator if unsaved). - [ ] "Create issues" inside the drawer behaves identically to its current /workspace invocation. - [ ] Drawer is dismissable via Esc / backdrop click. ### Open-in-chat - [ ] Toolbar "Open in chat" button (lucide `MessageSquare`) navigates to `/workspace?session=new`. - [ ] Spec is pre-inlined as `@specs/<name>.md` mention in the composer's initial draft, passed through a transient Zustand key (e.g. `useComposerHandoff`) — not a URL param. - [ ] On `/workspace` mount, if the handoff key holds a value, the composer draft is seeded and the key cleared. ### Tests - [ ] Breakdown drawer opens, calls `fetchBreakdownPreview` with the spec body, renders preview rows. - [ ] Open-in-chat navigates with `session=new`; handoff store holds the expected mention. - [ ] Workspace mount drains the handoff store on first render. ## Out of scope - AI drawer integration (story wsplit-3). - Removing breakdown from /workspace (it stays — operator decision "both"). ## Dependencies - Blocked by wsplit-2 (editor route must exist). ## References - Spec: `docs/specs/workspace-split.md` § Editor toolbar.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#1120
No description provided.