Repository navigation
fix(ui): list every agent's boards in the dashboards gallery - #188486
wangmiao0668000666 wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThe gallery lists dashboards across agents and stops replacing its query when sidebar agent selection changes. Example: core-router owns Morning Digest and finance-agent owns Financial digest.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this PR addresses a real dashboard-discovery problem, but changing the gallery’s established agent scope needs an owner decision. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI route loader and mounted gallery consume the shared session-list capability; its Gateway queries supply dashboard rows for filtering, pagination, previews, and navigation. flowchart LR
A[Sidebar agent selection] --> B[Sidebar dashboard catalog]
C[Gallery route and page] --> D[Shared session capability]
B --> D
D --> E[Gateway sessions list]
E --> F[Accessible dashboard rows]
F --> C
Technical reviewBest possible solution: Make gallery scope explicit using the existing agent selector, unless the feature owner approves an independent all-agent gallery. Do we have a high-confidence way to reproduce the issue? Current-main query construction and Gateway agent filtering explain the reported two-agent omission; the contributor also supplies focused red/green test output, but this review ran no reproduction. Is this the best way to solve the issue? For an approved independent gallery, removing agent scope in both query producers and deleting the obsolete subscription is the smallest complete implementation using existing owners; exposing the existing selector preserves the established scope contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 54def34074cc. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -8, Tests +34. Total +26 across 4 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 30, 2026, 11:56 AM ET / 15:56 UTC. |
Closing with a handoff summaryThe defect is real and the red/green evidence in the body stands, but the fix changes behavior that was deliberately designed, so it needs an owner decision this PR cannot supply. Closing rather than carrying an open product question. Root cause (so nobody has to re-derive it)
So the two-agent omission reported in #188449 is the established contract working as designed, not a broken contract. The only counter-evidence is page copy — Evidence that is still valid
Recommended directionThe review's recommendation is better than this PR and I agree with it: keep the existing query ownership and make the scope visible — expose the shared agent selector with an If a maintainer instead decides the gallery should always span agents, the minimal complete change is what this branch does — drop What is not settled
Branch |
Fixes #188449
What Problem This Solves
The
/dashboardsgallery scoped its listing request to whichever agent was selected in the sidebar. With two agents that each own a board, opening/dashboardsfromcore-routerlisted onlycore-router's board, and opening it fromfinance-agentlisted only that one — even though the page's own Author filter reads "All authors" and the docs describe it as a gallery of dashboard-enabled threads.User Impact
/dashboardslists every agent's boards again, matching the page's author filter and the documented "Find your dashboards" behaviour. Selecting an agent still scopes the sidebar's dashboard catalog exactly as before; only the gallery stopped narrowing itself. Search, author filter, sorting, pagination, archived rows (archivedFilter: "all"), stale-data retention and retry behaviour are unchanged.Why This Change Was Made
The gallery loader and the page's reactive list source both built their query with
dashboardSessionListQuery(context.agentSelection.state.scopeId), which addsagentIdto thesessions.listparams. The page also subscribed toagentSelectionand calledlist.replaceSourcewhenever the selected agent changed, re-scoping the gallery on every selection receipt.Both places now call
dashboardSessionListQuery()with no agent, which is the shapeui/src/components/sidebar-navigation-catalog.tsalready uses as the cross-agent baseline before narrowing it for the sidebar catalog (dashboardSessionListQuery(scope[1])there feeds the agent-scoped sidebar list, which keeps its behaviour). That removes the agent-scopedreplaceSourcesubscription from the page, so the listing source is created once.The sidebar catalog is a separate consumer and was left untouched; the docs already describe the gallery as cross-agent, so no doc change is needed.
Classification:
behavior-completing— the gallery regains the contract its author filter and docs already advertise. Runtime production delta is net −4 lines (route.ts+2/−1,dashboards-page.tsx+2/−11); the rest of the diff updates the two owner tests.git log -Sshows the scope has been in the gallery loader since the feature landed in #114262 and in the reactive page since #177950; this change removes it from both.Evidence
Evidence tier:
producer-chainfor the request params (every input is produced by the route loader/page against a stubsessionscapability) andowner-testfor the page's reactive source. The gallery is UI code; no model or channel boundary is involved.Environment: remote Linux docker (
lexiflow-all, Node 24.18.0), pnpm v12.15.0,test/vitest/vitest.ui.config.ts,OPENCLAW_VITEST_RUNTIME=node,FS_SAFE_NATIVE_MODE=off.RED — current main
4be8aab577aproduction files with only the two candidate test files copied in (same tree, samenode_modules, same command):Both failures are at the expected assertions: the gallery re-subscribed to the selected agent's list, and the loader forwarded
agentId: "finance-agent".GREEN — candidate
132d6202458, same command, same tree layout:Control group: the other 7 cases in these two files (held first read + error retry, late-page retirement, search/author filter/sort rendering, and the three configured-scope seeds) pass on both trees, so the change neither breaks the sidebar-scope contract nor the gallery's existing behaviour.
Touched-file typecheck (
tsc --noEmit -p ui/tsconfig.json) reports no diagnostics for the four changed files;oxlint ui/src/pages/dashboards/is clean.git diff --checkis clean.Not tested: no browser/E2E run against a real Gateway, so the visual gallery on a two-agent install was not re-inspected; the claim is limited to the
sessions.listparams the gallery issues and the page's list subscription. The sidebar catalog's own agent-scoped query was not exercised beyond its unchanged unit coverage./dashboardspagination and stale-data retention were covered by the passing existing cases, not by a live Gateway.Cleanup: all runs used isolated trees under
/data/openclaw-test/{base,cand}-188449with no access to any real Gateway, session, token or config; nothing was written to the local workstation's OpenClaw state.