Repository navigation
fix(dashboard): offer workflows in the + menu once the chat has a run - #31427
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The change fixes issue #21099 at the menu-filter level and adds one small helper that could be inlined. Notes
What this change shipsInventory (5 items) — 4 justifiedIntent: a chat's "+" menu stops offering a Workflows panel that can only be empty. FIX (closes #21099).
[FIRST-PRINCIPLES-REVIEWED] ba99380 Description read[DESCRIPTION-READ] 29bd532ec889eea7b31b99e8f905d57c9d1228cc1c9a7820033e4e4c1b889278 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a small, reversible menu gate that reuses the command center's shared query entry and the existing slot ownership rule, and it fails open. Notes
[DESIGN-REVIEWED] ba99380 Description read[DESCRIPTION-READ] 54256535f23a87b97e991bf35ec9da97aa30c7be798135508557a75d24aad079 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. Both menu states are shown in the screenshots, and the blind reader read the "Workflows" row correctly ("opens a panel showing those steps or their progress") and would click it. Notes
[UX-REVIEWED] ba99380 Description read[DESCRIPTION-READ] 7dbb767fe08096e34183ebf3b0221973b0bf35e1087e1637bc10cf3875bea83e That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
15c7caf to
bf68432
Compare
bf68432 to
a1ddce1
Compare
|
Rebased: main moved in website/src/pages/chat/SidePanel.tsx and website/src/test/sidePanelAddMenu.test.tsx, plus the line-budget test that failed Backend Tests (3.12, 2), Backend Tests (Windows) (2) and Coverage Gate on the old base (fixed on main by #31469), since this head went green (b3c17ad -> c0e9c2e); CI re-running. |
A chat that never ran a dynamic workflow still listed Workflows in the side panel's + menu, and picking it opened a panel that could only say there were no runs. The row now waits for the chat's first run, listed by the workflow-runs API or live in the chat's run rows, the way Summary waits for session summaries. It fails open while the list is unread, and an open Workflows tab and the run cards' panel link are unchanged. Builds on #21102 by @adlio.
a1ddce1 to
ba99380
Compare
|
Rebased: main moved in website/src/pages/chat/ and docs/system-specs/modules/ (files beside this diff), plus test/test_security_gate_liveness.py, whose line-budget test failed Backend Tests (3.12, 2), Backend Tests (Windows) (2) and Coverage Gate on the old base (fixed on main by #31625), since this head went green (c0e9c2e -> 10e0a06); CI re-running. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on ba99380, no conflict, no open change request.
…#31427) A chat that never ran a dynamic workflow still listed Workflows in the side panel's + menu, and picking it opened a panel that could only say there were no runs. The row now waits for the chat's first run, listed by the workflow-runs API or live in the chat's run rows, the way Summary waits for session summaries. It fails open while the list is unread, and an open Workflows tab and the run cards' panel link are unchanged. Builds on #21102 by @adlio. (cherry picked from commit 9929750)
…#31427) A chat that never ran a dynamic workflow still listed Workflows in the side panel's + menu, and picking it opened a panel that could only say there were no runs. The row now waits for the chat's first run, listed by the workflow-runs API or live in the chat's run rows, the way Summary waits for session summaries. It fails open while the list is unread, and an open Workflows tab and the run cards' panel link are unchanged. Builds on #21102 by @adlio. (cherry picked from commit 9929750)
Problem / Motivation
Goal: The chat side panel's "+" menu offers Workflows only once the chat has at least one workflow run.
In a chat that has never run a dynamic workflow, the "+" menu still lists Workflows. Picking it opens a panel that only says "No workflow runs" and suggests asking for one.
Why it matters
Most chats never run a workflow, so for most readers the menu offers a panel that can only be empty. That is a dead end in a menu people scan to find what a chat has, the same problem the Summary row had while session summaries are off.
Not a goal
What changed (motivation → approach → change)
The "+" menu and the empty-panel launcher take their rows from
newMenuSections, which already leaves out Terminal, Summary and Workers when they have nothing behind them, but always listed Workflows.newMenuSectionsnow takes ahasWorkflowRunsflag and drops the Workflows row while it is false.SidePanel.tsxsets it to true once this chat has a run: one thatGET /api/workflows/runslists for the slot, or a live run row for the slot, so the row appears the moment the first run starts. Both are matched to the chat byslotHasWorkflowRuninworkflowRunsPoll.ts, the same ownership rule the Workflows view filters its own list with. The list is read through the command center's['command-center', 'workflows']entry, which the socket already refreshes when a run ends and on reconnect. It sets no query-level option such asretry, because those apply to every reader of a shared entry and would change the command center's reads. Like the Summary gate it fails open: with no slot, or before the list answers, or when it cannot be read, the row stays.workflow-chat-cards.mdrecords the gate. The session-summary Playwright spec used the Workflows row as its proof that the menu opened; it now uses Subagents, which every chat offers.Builds on #21102 by @adlio.
Backwards compatibility
Compatible: only a menu row is hidden; no API, config or stored tab state changes.
newMenuSectionsgains a required option, and its one non-test caller,SidePanel.tsx, passes it.Reader: website/src/pages/chat/WorkflowRunCard.tsx:openActivityToTab -- chat -- opens the Workflows tab through the store, not the "+" menu, so it works in any chat; WorkflowRunCard.test.tsx
Reader: website/src/pages/chat/WorkflowCompletionCard.tsx:openActivityToTab -- chat -- same store path as the run card; WorkflowCompletionCard.test.tsx
Reader: website/src/pages/chat/SidePanel.tsx:menuItems -- chat -- the empty-panel launcher reads the same gated groups, so it never disagrees with the menu
Reader: website/src/pages/members/membersPageModel.ts:MEMBERS_WITHHELD_VIEWS -- crew page -- the crew page already withholds Workflows, so its menu is unchanged
Reader: website/playwright/session-summary.spec.ts:openAddMenu -- chat -- its open-menu witness is Subagents, offered in every chat
Tests
sidePanelAddMenu.test.tsx"offers Workflows once this chat has a run, listed or live": with the run list naming only another chat's run the row is absent while Subagents is offered; a listed finished run of this chat brings it back; a live run start for this chat brings it back with the list naming none. It fails on main (the row is always listed) and passes with this change.newMenuSectionsunit tests andContextBreakdownPanel.test.tsxpass the new flag as true, so they keep asserting what they did.Determinism: the new test passed 20 times alone on one worker, in its whole file under three shuffled orders (
--sequence.shuffle, seeds 11, 4242, 90210), and beside 55 other side-panel and chat-page test files at 4 workers (796 tests).Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
Ran the built SPA with the API answered from fixtures and opened the "+" menu: with
GET /api/workflows/runsanswering no runs the menu lists no Workflows row; with a finished run of this chat it lists Workflows between Subagents and Git (screenshots below).Screenshots / video
The "+" menu of a chat with no workflow run (built SPA, API answered from fixtures; dark and light), then the same chat once the run list names a finished run of it:
Related Issues
Closes #21099
Sibling sweep
Swept: git grep -n "item.kind !==" -- website/src/pages/chat/SidePanelAddMenu.tsx
Siblings: none -- the rows whose view needs a feature most chats never use are gated already (Terminal, Summary, Workers); Pins, Issues, Links, Subagents and Git fill from ordinary chat turns and the chat's workspace
Pattern harvest
Not generalizable: whether a view has content is specific to each view's data source, so there is no shared shape to lint for.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)