Skip to content

refactor(ui): move sidebar menus into a reactive controller - #112940

Merged
steipete merged 1 commit into
mainfrom
sidebar-flatten-5-menus-controller
Jul 23, 2026
Merged

steipete merged 1 commit into
mainfrom
sidebar-flatten-5-menus-controller

Conversation

@steipete

Copy link
Copy Markdown
Contributor

PR 5 of the sidebar-flattening series. Prior work: #112753, #112809, #112817, #112853, and #112923.

What Problem This Solves

The Control UI sidebar still carried popup ownership and menu rendering in a dedicated inheritance layer, keeping the sidebar class tower deeper than necessary.

Why This Change Was Made

Moves menu state, lifecycle cleanup, and renderer wiring into SidebarMenusController, reparents session narration directly onto session navigation, and deletes the old menus element layer without compatibility shims. The controller owns the existing catalog-menu helper; organizer drag state is read directly from SessionOrganizerController instead of preserving forwarding getters.

User Impact

None. This is a behavior-neutral ownership refactor.

Evidence

  • State parity audit: all eight former @state fields update through the controller helper, which calls host.requestUpdate(); trigger anchors, preload timers, and sessionMenuWorkVersion remain non-reactive.
  • Focus restoration and context-menu behavior: covered by the full app-sidebar.test.ts DOM suite, including transient replacement guards, session/group/sort menus, footer agent menu, and pinned-item customization.
  • Focused tests: 198 passed across app-sidebar.test.ts, session-menu.test.ts, session-menu-work.test.ts, and catalog-session-menu.test.ts.
  • Hosted checks: UI tsgo and the exact touched-path check-changed plan passed on Blacksmith Testbox run 29983608676, including format, i18n, typechecks, and lint.
  • Production UI build and precompressed-asset verification passed. Startup JavaScript is 322,901 bytes gzip, 534 bytes below the 323,435-byte baseline; no budget update was made.
  • Autoreview: clean, no accepted/actionable findings (Codex, 0.94 confidence).

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Jul 23, 2026
@steipete steipete self-assigned this Jul 23, 2026
@steipete
steipete marked this pull request as ready for review July 23, 2026 06:18
@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Jul 23, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The prior exact-head review lease expired without replacing its started placeholder. Please run one fresh review for current head 0ee50ea.

@clawsweeper

clawsweeper Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer decision on the ClawSweeper rank-up moves generated by exact-head review run https://github.com/openclaw/clawsweeper/actions/runs/29987209854:

  • Rebase onto current main: skipped. Behind-main drift is advisory for this repository when the PR is mergeable and conflict-free. Exact-head CI run https://github.com/openclaw/openclaw/actions/runs/29984660492 passed all 67 jobs, and scripts/pr prepare-run verified that the remote PR tree matches prep head 0ee50ea98289aaf014056f4e5db23a7699b62168. Rebasing again would invalidate that exact-head evidence without changing this patch.
  • Live interaction recording: skipped for this behavior-neutral, non-visual refactor. The requested oracle is the full sidebar DOM suite: 161 sidebar cases plus 37 menu component cases passed, including menu opening, replacement guards, dismissal, context menus, and focus restoration. The production UI build, size guard, and Real behavior proof check also passed. There is no before/after visual change to capture.
  • Sidebar-owner review: satisfied. As the requesting sidebar owner, @steipete accepts the controller boundary and the current merge result. Repo-native review artifacts validated with zero findings, and final Codex autoreview was clean at 0.94 confidence.

The ClawSweeper generation artifact reports no review findings and clears security. Durable comment publication is delayed behind the current exact-review publication backlog; this records the response to every generated rank-up move before landing rather than merging past them silently.

@steipete
steipete merged commit 6a90ad0 into main Jul 23, 2026
150 of 152 checks passed
@steipete
steipete deleted the sidebar-flatten-5-menus-controller branch July 23, 2026 07:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant