Repository navigation
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. Both menu states are shown, the blind reader saw them as the same menu, and the Workflows row itself is unchanged. Notes
[UX-REVIEWED] 87b2faa Description read[DESCRIPTION-READ] d8daccbbb3725ed2706bd18ea7258eea5c99a5286dcd490bc4293a376312b947 That sha256 names everything this verdict read: the PR description, plus the 5 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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the gate reuses an existing data source, is open when the run state is unknown, and the change can be reverted. Notes
[DESIGN-REVIEWED] 87b2faa Description read[DESCRIPTION-READ] d42e264f786462f078ced597d6d174a0953f958697d1d6968abd2adfa4275fa9 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. One aside: hiding Workflows changes what the "+" menu shows by default, and its only recorded basis is issue #21099. Notes
What this change shipsInventory (6 items) — 6 justifiedIntent: stop the "+" menu from leading every chat to an empty Workflows panel. FIX.
[FIRST-PRINCIPLES-REVIEWED] 87b2faa Description read[DESCRIPTION-READ] 89953bd2313f7b84ee863c339ce4777fc111513a9117edd390f44a73c96fdda0 That sha256 names the PR description this verdict read. 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: |
|
self-added: yes
|
|
self-added: yes
|
dc69c9b to
0d24a0f
Compare
|
|
self-added: yes
|
|
self-added: yes
|
0d24a0f to
9b729ad
Compare
|
|
|
|
self-added: yes
|
9b729ad to
df51655
Compare
66db882 to
f62cfbe
Compare
bolichen97
left a comment
There was a problem hiding this comment.
Requesting changes at f62cfbe. The rebase did not change the PR commit, but the Opus lane found a real problem that the earlier reviews missed.
useSlotHasWorkflowRuns.ts line 27 reads the query key ['command-center','workflows'] with retry set to false. useCommandCenter.ts line 162 reads the same key with the default retry policy. The two hooks share one cache entry, so the options of whichever observer mounts last apply to both. A short 503 or 429 can then show the command center runs source as failed with no retry.
Please either drop retry: false here, or read the cached value without subscribing, for example queryClient.getQueryData plus a cache subscription, so this hook does not change the command center query options. I will withdraw this if the shared options turn out not to apply in this React Query version.
The two tests for an already-open menu gaining the row and another chat's live run not counting are ported from #21178 by @atomsbaza. Co-authored-by: atomsbaza <22558327+atomsbaza@users.noreply.github.com>
f62cfbe to
87b2faa
Compare
|
Hi @adlio, this head (87b2faa) now conflicts with current main in |
|
[operator: bolichen97] Continuing this in #31427; thanks for the start. |
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.
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.
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.
…#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.
…#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 side panel's "+" menu offers Workflows only in a chat that has had a workflow run.
The Workflows panel has nothing to show until a chat runs a dynamic workflow, and most chats never do. The "+" menu offered it in every chat anyway, so picking it opened a panel that said "No workflow runs."
Why it matters
A menu entry that can only open an empty panel is a dead end. Most people who pick Workflows from the menu land on that empty state.
Trade-off
The Workflows empty state carries the hint "Ask me to use a dynamic workflow to …". Hiding the row until the first run hides that hint from the "+" menu too. That is the intended trade #21099 records: the menu lists Workflows once the chat has a run, and a menu row whose panel can only be empty costs more than the discovery it gives.
The gate and the Workflows panel both read
/api/workflows/runs, so they see the same set of runs. Its 200-run cap evicts only the oldest finished runs, so a chat whose runs were all evicted loses the row only when its panel would also be empty.Not a goal
What changed (motivation → approach → change)
This PR keeps Workflows out of the "+" menu until the chat's first run, the same way Summary stays out while session summaries are off. Once a chat has a run in any state, the row appears and stays after the run ends. Tabs already open are left alone, and "Open in the Workflows panel" on a run card works as before.
useSlotHasWorkflowRuns(a new hook inwebsite/src/hooks/) checks two sources: the run list from/api/workflows/runs, read through the command center's existing['command-center', 'workflows']entry, and the live run events in the store. The websocket already refreshes that entry when a run ends, and live events catch a run the moment it starts, so the hook needs no polling or re-read of its own.When the hook can't tell, it shows the row: before the first read, or after a read fails. A background refetch keeps the last answer, so the row doesn't come and go on every chat switch or window focus.
Backwards compatibility
Compatible: no API, stored state or prop contract changes;
newMenuSections()(now inSidePanelAddMenu.tsx) gains one option and its callers pass it. The command center's query freshness options move towebsite/src/utils/commandCenterSourceFreshness.tsso the gate spreads the same object instead of a copy, without loading the lazy command center chunk.Reader: website/src/pages/chat/SidePanelAddMenu.tsx:newMenuSections -- chat -- the "+" menu and the empty-strip launcher both read
menuSections; Workflows returns with the first run (sidePanelWorkflowsGate.test.tsx)Reader: website/src/pages/chat/WorkflowRunCard.tsx:openActivityToTab('workflows') -- chat -- opens the tab through
tabsCtl.openView, which does not read the menu (leaves an open Workflows tab alone in a chat with no runs)Reader: website/src/pages/chat/WorkflowCompletionCard.tsx:openActivityToTab('workflows') -- chat -- same path as the run card
Reader: website/src/pages/members/MembersPage.tsx:SidePanel -- crew page -- same menu;
MembersPage.sidePanel.test.tsxseeds a run before expecting WorkflowsReader: website/src/pages/chat/command-center/useCommandCenter.ts:sourceOptions -- command center -- spreads the same
COMMAND_CENTER_SOURCE_FRESHNESS; values unchangedTests
The new
sidePanelWorkflowsGate.test.tsxcovers the row with and without runs, an unread list, a failed read, a background refetch, a live run the list hasn't caught up to, the command center's shared entry, the Workflows app's separate cache entry, an open tab in a chat with no runs, an already-open menu gaining the row when the first run starts, and another chat's live run not counting. The last two are ported from #21178 by @atomsbaza (credited in the commit). Two existing tests changed:MembersPage.sidePanel.test.tsxgives the member's chat a run before expecting Workflows in the menu.playwright/session-summary.spec.tsused the Workflows row to confirm the menu had opened. It now uses Subagents.From
website/, on the head rebased onto main 3d6764b:npx vitest runon the gate, add-menu, ContextBreakdown, leading-tab and Members side-panel tests: 139 passed across 5 files; command center and workflow tests: 19 files passed.Earlier head:
npx vitest runon the side-panel, add-menu, Members, Summary, Command Center and workflow tests: 702 passed across 42 files.sidePanelAddMenu.test.tsx, five runs with--sequence.shuffleand random seeds: 37/37 each time.npx tsc -p tsconfig.app.json --noEmit: clean.npx eslinton the changed files: clean.Manual verification
Loaded this revision in an isolated pod and opened the "+" menu in a new chat: no Workflows row. Reloaded with
/api/workflows/runsstubbed to return one finished run for that chat: the row is back.The empty-strip launcher reads the same list, but a chat can't show it because Changes, Artifacts and Files are always in the strip.
Not run: the edited Playwright spec.
Screenshots / video
The "+" menu in a chat with no runs:
The same menu after the chat has a run (run list stubbed in the browser):
Related Issues
Closes #21099
Pattern harvest
Not generalizable: the dead end comes from one menu entry whose panel has data only after a rare event; the existing Summary gate already covers the general rule ("hide a row whose view can only be empty").
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)