feat(workspace): session rename / delete / export / search #604

Merged
code-lead merged 2 commits from feat/workspace-session-crud-567 into main 2026-04-30 21:50:35 +00:00
Collaborator

Session management UX additions for the workspace sidebar and toolbar.

Test plan

  • Rename: double-click a session row title (or pencil icon) → edit inline → Enter commits, Escape cancels; verify title persists after reload
  • Delete: trash icon → confirm dialog → session removed from list; active session redirects to empty state
  • Export (sidebar): hover a row → Download icon → .md file downloads with role headers + timestamps
  • Export (toolbar): open a persisted session → Export button → same markdown download
  • Search: type in the search box above sessions → list filters by title/preview; clear → full list returns; no-match shows hint
  • PATCH /foreman/sessions/:id with { title }: 200 + updated row; empty/long/newline titles → 400
  • GET /foreman/sessions/:id/export?format=json returns JSON file attachment
  • GET /foreman/sessions/:id/export?format=markdown returns Markdown file attachment

Closes #567

Session management UX additions for the workspace sidebar and toolbar. ## Test plan - **Rename**: double-click a session row title (or pencil icon) → edit inline → Enter commits, Escape cancels; verify title persists after reload - **Delete**: trash icon → confirm dialog → session removed from list; active session redirects to empty state - **Export (sidebar)**: hover a row → Download icon → `.md` file downloads with role headers + timestamps - **Export (toolbar)**: open a persisted session → Export button → same markdown download - **Search**: type in the search box above sessions → list filters by title/preview; clear → full list returns; no-match shows hint - `PATCH /foreman/sessions/:id` with `{ title }`: 200 + updated row; empty/long/newline titles → 400 - `GET /foreman/sessions/:id/export?format=json` returns JSON file attachment - `GET /foreman/sessions/:id/export?format=markdown` returns Markdown file attachment Closes #567
dev self-assigned this 2026-04-30 20:47:13 +00:00
feat(workspace): session rename / delete / export / search (#567)
All checks were successful
qa / dockerfile (pull_request) Successful in 9s
qa / qa (pull_request) Successful in 1m56s
fe1bf95784
- PATCH /foreman/sessions/:id now accepts `title` to rename sessions
  (≤ 200 chars, no newlines); server validates and persists via new
  `setSessionTitle` domain function
- GET /foreman/sessions/:id/export?format=markdown|json downloads the
  transcript as a file attachment; markdown includes role headers,
  timestamps, and attachment names
- Sidebar gains a fuzzy search input (client-side, over title + preview)
  with a "no matches" hint when the list is empty after filtering
- Session rows show Rename / Export (Markdown) / Delete action buttons on
  hover/focus; rename uses an inline input that commits on Enter or the ✓
  button and cancels on Escape or ✕
- Trash button opens a confirm dialog before calling the previously-wired
  `_deleteMutation` (now `deleteMutation`); active session redirects to
  the empty state on deletion
- Toolbar shows an Export button for persisted sessions (downloads as
  Markdown by default)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-04-30 20:49:13 +00:00
reviewer requested changes 2026-04-30 20:53:57 +00:00
Dismissed
reviewer left a comment
  • behavior: apps/web/src/routes/workspace.index.tsx — JSON export is never reachable from the UI. The AC (issue #567) explicitly says "Export menu → markdown or JSON". exportForemanSession and onExportSession both accept a format param, but every call site hardcodes "markdown": sidebar Download button (exportForemanSession(s.id, "markdown")), toolbar button (onExportSession("markdown")). Add a format selector (e.g. a split-button or short dropdown) so users can trigger JSON export from the UI without hitting the API directly.
- **behavior**: `apps/web/src/routes/workspace.index.tsx` — JSON export is never reachable from the UI. The AC (issue #567) explicitly says "Export menu → markdown or JSON". `exportForemanSession` and `onExportSession` both accept a `format` param, but every call site hardcodes `"markdown"`: sidebar Download button (`exportForemanSession(s.id, "markdown")`), toolbar button (`onExportSession("markdown")`). Add a format selector (e.g. a split-button or short dropdown) so users can trigger JSON export from the UI without hitting the API directly.
claude-desktop left a comment

Re-posting reviewer feedback to retrigger the address-review dispatch (the original pull_request_review event from #838 did not enqueue a follow-up task — see #610).

Same actionable point as before:

  • behavior: apps/web/src/routes/workspace.index.tsx — JSON export is never reachable from the UI. The AC (issue #567) explicitly says "Export menu → markdown or JSON". exportForemanSession and onExportSession both accept a format param, but every call site hardcodes "markdown": sidebar Download button (exportForemanSession(s.id, "markdown")), toolbar button (onExportSession("markdown")). Add a format selector (e.g. a split-button or short dropdown) so users can trigger JSON export from the UI without hitting the API directly.
Re-posting reviewer feedback to retrigger the address-review dispatch (the original `pull_request_review` event from #838 did not enqueue a follow-up task — see #610). Same actionable point as before: - **behavior**: `apps/web/src/routes/workspace.index.tsx` — JSON export is never reachable from the UI. The AC (issue #567) explicitly says "Export menu → markdown or JSON". `exportForemanSession` and `onExportSession` both accept a `format` param, but every call site hardcodes `"markdown"`: sidebar Download button (`exportForemanSession(s.id, "markdown")`), toolbar button (`onExportSession("markdown")`). Add a format selector (e.g. a split-button or short dropdown) so users can trigger JSON export from the UI without hitting the API directly.
fix(workspace): expose JSON export via dropdown menu
All checks were successful
qa / dockerfile (pull_request) Successful in 4s
qa / qa (pull_request) Successful in 1m52s
d9dfea90a8
Sidebar Download icon and toolbar Export button now open a Markdown / JSON menu instead of hard-coding markdown. Addresses #604 review (AC #567 requires both formats reachable from UI).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
dev requested review from reviewer 2026-04-30 21:47:36 +00:00
dev force-pushed feat/workspace-session-crud-567 from d9dfea90a8
All checks were successful
qa / dockerfile (pull_request) Successful in 4s
qa / qa (pull_request) Successful in 1m52s
to 484ff1c455
All checks were successful
qa / dockerfile (pull_request) Successful in 4s
qa / qa (pull_request) Successful in 1m53s
2026-04-30 21:48:36 +00:00
Compare
reviewer approved these changes 2026-04-30 21:49:22 +00:00
reviewer left a comment

Round-1 finding addressed: ExportSessionMenu now wraps both the sidebar Download button and the toolbar Export button with Markdown/JSON choices — JSON export is reachable from the UI. CI green.

Round-1 finding addressed: `ExportSessionMenu` now wraps both the sidebar Download button and the toolbar Export button with Markdown/JSON choices — JSON export is reachable from the UI. CI green.
code-lead deleted branch feat/workspace-session-crud-567 2026-04-30 21:50:36 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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!604
No description provided.