Skip to content

refactor(ui): fold sidebar More section into a popup menu#105906

Merged
steipete merged 3 commits into
mainfrom
claude/simplify-pinned-items-75d66e
Jul 13, 2026
Merged

refactor(ui): fold sidebar More section into a popup menu#105906
steipete merged 3 commits into
mainfrom
claude/simplify-pinned-items-75d66e

Conversation

@steipete

@steipete steipete commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

The sidebar nav rendered a pinned set plus an expandable "MORE" section. The uppercase header + chevron cost a permanent row; expanded, the section (unpinned routes, plugin tabs, and a dedicated "Edit pinned items" row) pushed the sessions list — the sidebar's main content — half off-screen. The expansion state was a persisted pref (sidebarMoreExpanded) that existed only to remember a chevron.

Fixes #105905.

Why This Change Was Made

Collapse the whole section into a single trailing "More" nav row that opens a transient popup menu (the Claude.ai sidebar pattern):

  • The menu lists unpinned routes (click navigates, hover preloads) and dynamic plugin tabs, then a separator and an "Edit pinned items" entry that opens the existing pin-editor menu in place, with the durable More row as its focus-restore trigger.
  • The More row carries the active highlight when the current route lives inside the menu (including dynamic plugin tab pages), so navigation never looks "nowhere"; the active menu row itself gets an accent highlight plus aria-current="page".
  • The More menu follows the sidebar's existing transient-menu contract (outside-click, Escape/Tab focus restore, arrow-key roving focus, dismissTransientMenus).
  • Deleted: the expandable section, the MORE header/chevron CSS block, the dedicated edit row, and the sidebarMoreExpanded pref end-to-end (settings persistence, navigation snapshot, app-host wiring). Transient UI state gets no migration; a stale persisted key is simply ignored on load.

Net prod diff is +18 LOC: the menu plus its lifecycle wiring replaces the section, one persisted setting, and ~90 lines of section CSS.

User Impact

  • The nav is always exactly pinned rows + one "More" row; the sessions list gets the vertical space back.
  • Every route stays at most one extra click away: More → route. Pin editing moved from a permanent nav row into the More menu; right-clicking the nav still opens the pin editor directly.
  • One less persisted setting (sidebarMoreExpanded is dropped and ignored if present).

Evidence

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Jul 13, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 54e5e08a81

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/components/app-sidebar.ts Outdated
private renderMoreMenuRoute(routeId: SidebarNavRoute) {
const active = this.isRouteActive(routeId);
return html`
<button

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep More entries as links

When an unpinned route lives in More, this button removes the href/shouldHandleNavigationClick path that top-level nav items still use, so Ctrl/Cmd-click and middle-click no longer open the route in a new tab; plugin tabs in renderMoreMenuPluginTab have the same regression. The sidebar CSS still documents nav entries as anchors for middle-click/new-tab, so these popup navigation items should render as links with role="menuitem" and only intercept plain clicks.

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jul 13, 2026
steipete added 3 commits July 12, 2026 20:07
The expandable More section (uppercase header, chevron, persisted
sidebarMoreExpanded pref, dedicated Edit pinned items row) collapses
into a single More nav row that opens a transient menu with the
unpinned routes, dynamic plugin tabs, and the pin editor entry.
Sessions get the reclaimed vertical space.
More-menu route and plugin-tab rows render as real anchors again so
Cmd/middle-click opens a new tab; ordinary clicks still route through
onNavigate. Documents the popup More menu in docs/web/control-ui.md.
app-sidebar.ts grew past its ts-max-loc baseline with the More menu;
extract the nav rows, More menu, and pin-editor menu into
app-sidebar-nav-menus.ts (3116 -> 2949 lines) and ratchet the baseline
entries for app-sidebar.ts, settings.ts, and app-host.ts down to their
new sizes.
@steipete
steipete force-pushed the claude/simplify-pinned-items-75d66e branch from ba1b50d to c7b08f5 Compare July 13, 2026 03:28
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: L and removed size: M labels Jul 13, 2026
@steipete
steipete merged commit 156f4c8 into main Jul 13, 2026
114 of 118 checks passed
@steipete
steipete deleted the claude/simplify-pinned-items-75d66e branch July 13, 2026 03:33
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 13, 2026
…05906)

The sidebar's expandable "MORE" section (uppercase header, chevron, persisted
sidebarMoreExpanded pref, dedicated "Edit pinned items" row) collapses into a
single More nav row that opens a transient popup menu with the unpinned
routes, dynamic plugin tabs, and the pin editor entry. Menu rows are real
anchors, so Cmd/middle-click keeps native link behavior; the More row carries
the active highlight when the current route lives inside the menu. The
sessions list gets the reclaimed vertical space, and one persisted setting is
gone (stale keys are ignored on load). The nav rows and menus move to
app-sidebar-nav-menus.ts to keep app-sidebar.ts under the TS LOC ratchet.

Docs: docs/web/control-ui.md sidebar-navigation section updated.

Fixes openclaw#105905
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 docs Improvements or additions to documentation maintainer Maintainer-authored PR scripts Repository scripts size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: replace sidebar More section with an overflow menu

1 participant