Skip to content

fix(ui): let each page decide its sidebar - #199831

Merged
vyctorbrzezowski merged 14 commits into
mainfrom
brzezowski/side-rail-11-page-sidebar
Nov 17, 2026
Merged

vyctorbrzezowski merged 14 commits into
mainfrom
brzezowski/side-rail-11-page-sidebar

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Pages without a list of their own (Usage, Knowledge and other plugin pages) still show a sidebar, the ⋯ item reads as current when it is not, and opening Automations flashes its old list page for a frame.

User Impact

Each page decides its sidebar: pages without one show only the rail and hide it at once; clicking the current section returns to its start; ⋯ is active only while its menu is open; Automations and Dashboards open without the flash.

Why This Change Was Made

Moves the which-sidebar decision to the page's route and makes the shell the owner of whether a section's sidebar stands beside its page, so the page knows before its first frame. The saved collapse preference is never changed by navigation.

Evidence

Screenshots come from the Control UI mock at the end of the series, so the after image can show later parts too.

Usage before and after: only the rail beside it (left: main, right: after):

Usage before and after: only the rail beside it

  • pnpm tsgo:ui passes at this PR's head.
  • The unit tests of the files this PR touches pass at its head; the full UI unit suite passes at the end of the series (one failure also on main: a Workboard German relative-time string, "vor 1min", from the local ICU).
  • Local autoreview (Codex) over the whole series; its three findings are fixed in this series.
  • The full UI e2e suite was not run locally.

Update: Dashboards stays a gallery

Dashboards is now a page without a sidebar, like Usage, so the rule that kept the Dashboards list beside a dashboard opened from it is gone.

Side rail series, part 10 of 16. Stacked on #199830; review only this PR's commits.

Update: e2e repair

The full Control UI e2e run on the stack found tests this PR broke or product gaps it introduced; this PR now carries their fixes:

  • fix(ui): list automations and dashboards in the native embed
  • fix(ui): keep the Sessions sidebar beside a terminal
  • fix(ui): drop the floating-chrome gap above web pages without a sidebar
  • test(ui): return to the Sessions page with Back in the roster request-rate e2e
  • test(ui): follow page-decided sidebars in rail, Systems and Team e2e tests
  • test(ui): read the People list on Activity in the people card e2e
  • test(ui): check reconnect on the rail of a plugin page without a sidebar
  • fix(ui): keep the Sessions list beside the Sessions page

Update: no opening motion after a page without a sidebar

Going from a page without a sidebar (Dashboards, for example) to a page with one opened the sidebar with the collapse toggle's clip-path animation. It now appears at once, like closing already did; the explicit collapse/expand toggle keeps its motion.

  • fix(ui): open a page's sidebar at once after a page without one
  • sidebar-rail-peek e2e covers it: no .shell-nav clip-path transition on Dashboards → Automations, and one on the collapse toggle. It fails without the fix.

Approved navigation-stack JS budget

Vyctor approved the measured JavaScript byte cost for this navigation stack. These cumulative measurements compare this layer with paired main base 1d82bed0a7fef79012c38ea7e6184911aba27e63. Each cap equals the original main cap plus the measured delta, preserving existing headroom without adding another margin.

Metric Cumulative gzip delta Cap
Largest JS asset +3,478 B 575,918 B
Chat boot JS +3,811 B 1,329,391 B
New Session boot JS +3,921 B 820,553 B

CSS ceilings, request counts, startup ceilings and gate logic are unchanged. Byte measurements are delivery-size evidence, not latency measurements.

Maintainer validation

Reviewed and rebased this layer on predecessor 275ea70b300f5c5987ba34179f436a6b0fb86a2d; current head is 0b48f7d5a5ce46801b1890c7e72c9f002ccdb610. The own-layer tree, original human authors and signatures were checked. UI typechecking passed on this candidate. Previously verified functional and integrated visual proof was reused where inputs are unchanged; the maintainer also exercised the integrated stack on a real Gateway.

Route and plugin selection share the existing commit observer. Focused plugin-reconnect and real-Gateway roster/Back E2Es passed with assertions intact. An earlier CI timing failure was not reproduced; no guessed wait was added.

The maintainer authorized sequential CI bypass after repairing known PR-caused failures. Hosted CI may still be running; this is not a claim of full hosted CI success. The unrelated owner-approval timing failure is tracked separately in #200810.

@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 15, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 15, 2026
@clawsweeper

clawsweeper Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR derives sidebar visibility from the current page and moves section-sidebar presence reporting into the shell.

Example: Return to Usage through browser history after opening an automation with ?job=daily-summary.

  • Before: The previous Automations sidebar can remain beside Usage.
  • After: Usage shows only the rail without changing the saved collapse preference.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Useful ownership simplification, but two source-verifiable navigation defects remain and changed-behavior proof is explicitly pending.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Unrelated pages retain a sidebar, the Pages menu appears current when closed, and listing-page chrome flashes before its sidebar mounts.
Reason: The maintainer-authored direction addresses concrete navigation confusion while retaining the existing shell and saved preference owner.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this maintainer-authored draft open: the sidebar ownership change is useful, but two navigation defects need correction.

Priority: P2
Reviewed head: 18664102be87083a9aac3cacac2cbc7071ea1702

Before merge

  • Reset section memory only when its page is active (P2) - Open an automation with ?job=daily-summary, navigate to Usage, then click Automations. AppSidebarContent leaves navigationView as automations when Usage has no sidebar, so this comparison clears the remembered job even though the user is returning from another page. CronPageBody then opens the empty root instead of reopening daily-summary. Determine whether the section is current from the active page, including the supported dashboard detail case, rather than the retained or peeked sidebar view.
  • Let page hiding override responsive desktop expansion (P2) - With the saved desktop preference collapsed, open the mobile drawer and resize to desktop; handleWindowResize deliberately sets desktopNavigationExpanded to true, as the existing app-host test verifies. Navigating to Usage then sets navPageHidden, but this conjunction still returns false because desktopNavigationExpanded is true, leaving the unrelated sidebar expanded. Apply the responsive override only to the saved collapse preference so pages without a sidebar still hide it.

Findings

  • [P2] Reset section memory only when its page is active — ui/src/components/app-sidebar-rail.tsx:68-73
  • [P2] Let page hiding override responsive desktop expansion — ui/src/app/app-shell-view-state.ts:200-201

Tests

  • Missing end-to-end proof: Missing evidence covers page-driven hiding, section return versus reset, flash-free first paint, and responsive handoff in the browser, plus regressions shown failing before correction and passing afterward.
Agent review details

How this fits together

The Control UI shell combines route identity, desktop collapse preferences, and drawer state to lay out navigation; sidebar components render section lists, and listing pages consume their visibility.

flowchart LR
  A[Navigation input] --> B[Route state]
  B --> C[Application shell]
  D[Collapse preference and viewport] --> C
  C --> E[Rail and section sidebar]
  C --> F[Listing page presentation]
Loading

Technical review

Best possible solution:

Keep visibility in the existing shell, reset section memory only when reselecting the active section, and let page hiding override responsive desktop expansion.

Do we have a high-confidence way to reproduce the issue?

The pinned stack exposes the stale-view and responsive-handoff paths directly in source; no target code was executed and no current-main runtime reproduction is claimed.

Is this the best way to solve the issue?

Using the existing shell to derive visibility removes mount-order reporting and is an appropriate small fix once the two navigation conditions are corrected.

Full review comments:

  • [P2] Reset section memory only when its page is active — ui/src/components/app-sidebar-rail.tsx:68-73
    Open an automation with ?job=daily-summary, navigate to Usage, then click Automations. AppSidebarContent leaves navigationView as automations when Usage has no sidebar, so this comparison clears the remembered job even though the user is returning from another page. CronPageBody then opens the empty root instead of reopening daily-summary. Determine whether the section is current from the active page, including the supported dashboard detail case, rather than the retained or peeked sidebar view.
    Confidence: 0.98
  • [P2] Let page hiding override responsive desktop expansion — ui/src/app/app-shell-view-state.ts:200-201
    With the saved desktop preference collapsed, open the mobile drawer and resize to desktop; handleWindowResize deliberately sets desktopNavigationExpanded to true, as the existing app-host test verifies. Navigating to Usage then sets navPageHidden, but this conjunction still returns false because desktopNavigationExpanded is true, leaving the unrelated sidebar expanded. Apply the responsive override only to the saved collapse preference so pages without a sidebar still hide it.
    Confidence: 0.97

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e693b3323e90.

Provenance checked

  • Rail shortcut collapse and active-section behavior changes intended behavior with a stated reason (1fed8f3: The earlier rail design intentionally collapsed desktop shortcuts and toggled the active panel; this PR explicitly replaces that interaction with page-owned visibility and section-root navigation.)
  • Section sidebar presence changes intended behavior with a stated reason (8f65581: The shared section owner recorded sidebar presence so Automations and Dashboards could suppress duplicate page lists; this PR moves the source to the shell to avoid first-frame chrome.)
  • Desktop preference and responsive drawer layout keeps the original intent (7c06f39: The shell preserves one sidebar across desktop and drawer layouts while retaining the desktop collapse preference; the proposed ownership remains consistent with that purpose.)

Testing

Proof path: none.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/app/app-host.test.ts src/components/app-sidebar-rail.test.ts src/app-navigation.test.ts
  • pnpm check:changed --base cb98682

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 215c892 adds ui/src/app/app-shell-view-state.ts:166 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 215c89296cb6; files: ui/src/app/app-shell-view-state.ts)

PR surface

Source +36, Tests +15. Total +51 across 14 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 12 153 117 +36
Tests 2 18 3 +15
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 171 120 +51

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: The change addresses visible navigation inconsistencies with a limited UI blast radius.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 15, 2026, 6:06 PM ET / 23:06 UTC.

@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-10-people-section branch from cb98682 to d2106ec Compare November 16, 2026 07:06
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-11-page-sidebar branch from 1866410 to 07b8ade Compare November 16, 2026 07:06
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-10-people-section branch from d2106ec to 11c25f1 Compare November 16, 2026 16:08
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-11-page-sidebar branch from 07b8ade to e0a006e Compare November 16, 2026 16:08
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-10-people-section branch from 11c25f1 to c3d4c50 Compare November 16, 2026 16:34
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-11-page-sidebar branch from e0a006e to 0054f09 Compare November 16, 2026 16:34
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-10-people-section branch from c3d4c50 to da9382a Compare November 16, 2026 18:12
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-11-page-sidebar branch from 0054f09 to bd04a25 Compare November 16, 2026 18:12
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-10-people-section branch from da9382a to 4e8bfa3 Compare November 16, 2026 22:53
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-11-page-sidebar branch from bd04a25 to e510a5d Compare November 16, 2026 22:53
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-10-people-section branch from 4e8bfa3 to c9db02e Compare November 17, 2026 00:43
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-11-page-sidebar branch from e510a5d to a1bbb04 Compare November 17, 2026 00:43
vyctorbrzezowski and others added 11 commits November 17, 2026 15:13
A terminal opened from a Sessions row is a conversation, but the page-decides-its-sidebar change left the terminal route without a sidebar, so the row lost its current mark and the page reserved an empty collapsed-chrome band.
…tests

Each page now decides its sidebar and navigation never changes the saved collapse choice:

- A tapped rail pin navigates without closing the sidebar, so the touch pin test stops expecting a collapse.
- New session shows the Sessions drawer on a phone, where tapping the agent avatar opens the agent menu, so the Systems gutter test goes straight to the session row.
- A conversation always shows the Sessions sidebar, so the Team warm reload persists and restores the Sessions view and no longer drives the People list beside the chat.
- A page without a sidebar offers no expand control, so the legacy Mac app has no lowered controls on Memory import; that test is removed.
Letting each page decide its sidebar left the Sessions and Worktrees pages with only the rail, so the Sessions list, its owner filter and its rows were gone there. The Sessions page expands that list and sits beside it.
Leaving a page without a sidebar for one with a sidebar revealed the sidebar
with the collapse toggle's clip-path motion. The shell now marks that open
and drops the transition until the next collapse change, so only the
explicit toggle animates, as closing already did.
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/side-rail-11-page-sidebar branch from 334a514 to 0b48f7d Compare November 17, 2026 22:14
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review November 17, 2026 22:14
@vyctorbrzezowski
vyctorbrzezowski merged commit 3481cbc into main Nov 17, 2026
115 of 118 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/side-rail-11-page-sidebar branch November 17, 2026 22:15
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged as 3481cbc after reviewing the layer and its integration with main. Preserved the approved design and human credit. Known PR-caused failures were repaired and focused checks passed; CI bypass was explicitly authorized by the maintainer. The inherited owner-approval test timing issue is tracked separately in #200810.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
Preserve the approved navigation design. Reviewed the own-layer change, current main integration and applicable focused proof. Known PR-caused failures were repaired before landing; the maintainer explicitly authorized CI bypass. The unrelated owner-approval test timing issue is tracked separately in openclaw#200810.

Co-authored-by: Vyctor H. Brzezowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant