Repository navigation
fix(ui): stop showing count errors on unloaded sidebar shortcuts - #169068
Conversation
Use Open session for a saved session outside the loaded sidebar window, and distinguish a missing session from a failed lookup. Preserve on-demand loading and stale-navigation guards.
|
🦞👀 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 maintainer review before merge. What this changesThis PR gives unloaded sidebar shortcuts accurate labels and distinguishes missing sessions from failed lookups. Example: Hover a saved shortcut for agent:research:unloaded outside the loaded session window.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes misleading sidebar feedback still present on main; no actionable correctness or security findings remain. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI sidebar resolves saved shortcut references against loaded session and plugin catalogs, then renders labels and looks up unloaded sessions when selected. flowchart LR
A[Saved shortcuts] --> B[Sidebar catalog reconciliation]
C[Loaded sessions and plugins] --> B
B --> D[Rail labels and controls]
D --> E[On demand session lookup]
E --> F[Navigation or toast]
Technical reviewBest possible solution: Keep the focused correction in the existing sidebar owners while preserving bounded loading and navigation guards. Do we have a high-confidence way to reproduce the issue? Current-main source deterministically uses the unrelated count-error label when a saved shortcut lacks a loaded row, matching the supplied before screenshot; no target code was executed during this review. Is this the best way to solve the issue? The patch corrects presentation at the existing owners, reuses established labels, and leaves lookup, authorization, loading bounds, and stale-navigation handling intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 30469f450063. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +4, Tests +46, Docs +2. Total +52 across 5 files. Added test files: 0. View PR surface stats
LabelsLabel changes: No label changes. Label justifications:
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 HistoryReview history (1 earlier review cycle)
Reviewed October 11, 2026, 6:57 AM ET / 10:57 UTC (Revision 2). |
|
Merged via squash.
|
What Problem This Solves
Fixes misleading “Session counts unavailable” labels on saved sidebar shortcuts when switching agents or opening a session outside the loaded sidebar window.
User Impact
Unloaded session shortcuts now say Open session, and unavailable plugin shortcuts say Plugin. Opening a missing session reports Session not found; a failed lookup asks the user to try again.
Why This Change Was Made
The shortcut fallback reused the Online view's session-count error. This changes the label at its existing owner and preserves bounded sidebar loading, on-demand session lookup, and suppression of stale errors after newer navigation.
Evidence
The mounted sidebar regression failed on the original label. The full sidebar suite passes 21/21 (
pnpm test ui/src/components/app-sidebar-rail.test.ts --maxWorkers=1, 5.226 seconds wall); existing dashboard navigation and stale-result coverage remain intact. A first green run exposed an invalid synthetic plugin key in the new test; correcting it to the documentedplugin/idformat resolved that fixture failure without changing production behavior.The full app with an isolated mock Gateway reproduces the before state and verifies the after state through real hover and click actions. Both captures passed (8.967 seconds before, 8.224 seconds after). Inspected screenshots contain synthetic data only.
Keyless i18n baseline/verification, formatting, conflict-marker, assertion-safety, and diff checks passed. Fresh managed review is clean through P2. UI production types (46.162 seconds), owning UI-components test types (43.716 seconds), and targeted lint passed. Hosted CI run 38132857359 passed on
fdc644664d355a690cafe46000e75dc2873fe4f3, including the CI gate. The three UI shard jobs took 262, 334, and 348 seconds end to end; these are shard costs, not the individual test runtime.