Skip to content

feat(ui): open sessions in real browser tabs and keep sidebar visibility per-tab - #128474

Merged
steipete merged 5 commits into
mainfrom
steipete/openclaw-miguel-improvements-6fbff3
Aug 24, 2026
Merged

steipete merged 5 commits into
mainfrom
steipete/openclaw-miguel-improvements-6fbff3

Conversation

@steipete

@steipete steipete commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Operators who want one conversation per browser tab or window could not get there. Cmd-clicking a session in the sidebar did not open a new tab — the click was captured for multi-selection — so the browser's own tab, window, and virtual-desktop workflow was unreachable even though every session already has a stable deep-linkable URL.

Sidebar visibility also leaked between tabs. It was stored in localStorage, which is shared origin-wide, so collapsing the sidebar in one tab silently collapsed it in every other tab and window on their next load.

Why This Change Was Made

Three coupled changes.

Cmd/Ctrl-click reaches the browser. The sidebar row's real <a href> now handles the click, so a session opens in a native tab or window. Multi-selection moves to Alt/Option-click, which previously fell through to the browser's link-download behavior; Shift-click range selection is unchanged.

Sidebar visibility is per-tab and no longer persisted. Visibility is view state, not a preference, so it lives in the tab-local navigation snapshot. Width stays persisted — persist the size, not the visibility, since re-dragging a sidebar is expensive while re-showing it is one keystroke.

A tab opened on a conversation from the sidebar starts collapsed. This is gated on explicit new-tab intent, not on the URL alone: the row href carries a marker (SIDEBAR_SESSION_NAV_COLLAPSE_QUERY, defined once in ui/src/app-session-route-paths.ts and read by bootstrap), which only the browser's own new-tab paths use verbatim — ordinary left-clicks are already intercepted for SPA routing and never see it. Bootstrap seeds the collapse once, then strips the marker with replaceState so the address bar, copied links, and bookmarks stay canonical and a reload does not re-collapse.

An earlier revision of this PR collapsed on any first load of a session URL. That was too broad: direct session-URL loads are a common entry path (deep links, notifications, bookmarks), and combined with non-persistence a user whose habitual entry is a bookmarked session would have been collapsed on every visit with no way to make it stick. The E2E lane caught it, and the trigger was narrowed to explicit intent.

Non-goals: no in-app tab strip, and no macOS app changes. Cmd-T cannot be bound on the web at all — browsers reserve it — so native window/tab work is tracked separately.

User Impact

Cmd-click a session in the sidebar and it opens in a real browser tab; drag it to another window or desktop and it behaves like any other page. Those tabs start with the sidebar collapsed for full width, and Cmd-B brings it back. Ordinary session links and bookmarks are unaffected and keep the sidebar visible. Collapsing the sidebar in one tab no longer affects your other tabs or windows.

Multi-select in the sidebar is now Alt/Option-click instead of Cmd-click. Shift-click still extends a range, and the right-click menu still exposes the batch actions.

Evidence

Production diff stays small: production +46/-20 across the branch, with growth in tests (+281/-49) and docs (+4/-2).

  • Exact-head CI green on f249f7d49c6 (run 32691071503).
  • node scripts/check-changed.mjs green across coreTests, ui, and docs lanes (format, typecheck, lint, Knip dead-code).
  • 382 unit tests across bootstrap.test.ts, settings.node.test.ts, settings.sidebar-prefs.node.test.ts, app-sidebar.test.ts.
  • 52 tests across the six sidebar/device E2E files that the over-broad revision had failed, now passing.
  • Regression guards, each of which failed against the revision it was written for: keeps the sidebar expanded for an unmarked chat-session deep link (the narrowing) and the bare-/chat seeding case (the main-surface default path).
  • Codex autoreview clean on the final diff, no actionable findings.
  • Visual proof attached below, inspected before posting.

Two tests were updated rather than preserved because they asserted behavior this PR intentionally removes: the reload segment of sidebar-customization.e2e.test.ts asserted persisted visibility (its capture is renamed 04-visibility-not-persisted.png and now proves the opposite), and device-scope-upgrade.e2e.test.ts now reaches its collapsed layout through the shared marker constant.

@clawsweeper

clawsweeper Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 24, 2026
@steipete
steipete marked this pull request as ready for review August 24, 2026 03:31
@steipete

Copy link
Copy Markdown
Contributor Author

Visual proof

Captured from the mocked-gateway Control UI E2E lane at 1280x900 via the repo's own captureUiProof helper, and inspected before attaching. The committed test ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts regenerates all three.

1. Bare /chat first load — sidebar unchanged. The general chat surface is the app's main view, so it must not collapse. This is the regression guard for the mistake of keying off the route id instead of the session URL.

2. Tab opened directly on one conversation — sidebar collapsed, conversation full-width. This is the Cmd-click-into-a-new-tab result: title, transcript area, and composer span the full window, with the expand control top-left.

3. Same tab after Cmd-B — sidebar restored. Visibility is recoverable at any time and stays local to this tab; it is no longer written to localStorage, so it cannot leak into your other tabs or windows.

Worth noting how the first capture attempt failed, since it is the reason the test asserts what it does: the initial version waited only for the sidebar to disappear and captured a completely blank pane, because the collapsed chrome paints before the chat pane does. The test now waits on the composer, so it cannot pass against an empty page.

per-tab-01-chat-root-sidebar-visible

per-tab-02-session-tab-collapsed

per-tab-03-session-tab-after-cmd-b

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 24, 2026
@clawsweeper

clawsweeper Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 24, 2026, 3:29 AM ET / 07:29 UTC.

ClawSweeper review

What this changes

This PR enables native browser tabs for sidebar sessions, remaps multi-selection to Alt/Option-click, and keeps sidebar visibility only in each tab’s in-memory navigation state.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: the prior P2 remains unresolved because Home’s Cmd/Ctrl-click opens an unmarked main-session URL, so that browser tab stays expanded despite the stated sidebar-tab contract.

Priority: P2
Reviewed head: 9fbbed82f78409c2308247c4924c0ebc8a4ab51d

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation and focused coverage are substantial, but the primary Home session still misses the promised native-tab initialization path.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; the discussion also supplies mocked Control UI visual evidence for the changed surface.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; the discussion also supplies mocked Control UI visual evidence for the changed surface.
Evidence reviewed 8 items Unresolved Home path: Home emits the main-session href directly, while ordinary session rows use the collapse-intent wrapper; a modified click therefore opens Home without the marker.
Bootstrap decision: Bootstrap strips and consumes the marker, then initializes collapsed navigation only for marked chat session paths.
Native-click boundary: Cmd/Ctrl clicks deliberately bypass SPA navigation, so Home’s bare anchor is handed to the browser unchanged.
Findings 1 actionable finding [P2] Mark the Home session link with collapse intent
Security None None.

Live Verification

Command: pnpm test ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts

Result: FAIL (partial) — step 2 expect_output sidebar-per-tab-visibility.capture.e2e.test.ts: expected terminal output was not visible within 30 seconds: "sidebar-per-tab-visibility.capture.e2e.test.ts"

pnpm test ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-128474-r5k7Tt/target$ pnpm test ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts
$ node --import tsx scripts/test-projects.mts ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
pnpm test ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-128474-r5k7Tt/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-128474-r5k7Tt/target





























Assertions:

  • FAIL expect_output: sidebar-per-tab-visibility.capture.e2e.test.ts

How this fits together

The Control UI sidebar produces session links that the browser may open in a new tab; application bootstrap consumes a one-time URL marker to initialize that tab’s sidebar state. The resulting tab-local navigation state controls whether the chat session renders full width or alongside the sidebar.

flowchart LR
  A[Sidebar session links] --> B[Browser click handling]
  B --> C[Native new browser tab]
  C --> D[Marked session URL]
  D --> E[Control UI bootstrap]
  E --> F[Tab-local sidebar state]
  F --> G[Full-width chat or visible sidebar]
Loading

Before merge

  • Mark the Home session link with collapse intent (P2) - The prior finding is still unresolved: Home’s bare main-session href is allowed through on Cmd/Ctrl-click, but bootstrap collapses only marked chat-session URLs. Regular and catalog session rows are marked, so native-tab Home opens expanded despite the documented sidebar-tab behavior. Wrap this href with the shared helper and add a Home native-tab assertion.
  • Resolve merge risk (P1) - Merging as-is makes ordinary and catalog sidebar sessions open collapsed in native tabs but leaves Home’s rolling main session expanded, creating an inconsistent documented interaction for existing operators.
  • Complete next step (P2) - The remaining P2 is a narrow mechanical repair, but this maintainer-labeled PR should stay with its current owner for the follow-up.

Findings

  • [P2] Mark the Home session link with collapse intent — ui/src/components/app-sidebar-render.ts:198-206
Agent review details

Security

None.

PR surface

Source +72, Tests +309, Docs +2. Total +383 across 21 files.

View PR surface stats
Area Files Added Removed Net
Source 13 123 51 +72
Tests 7 327 18 +309
Docs 1 4 2 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 21 454 71 +383

Review metrics

Metric Value Why it matters
Production versus test delta production +62/-21, tests and test support +388/-48, docs +4/-2 The production growth implements a new browser-navigation behavior; most of the change is focused coverage and proof support.

Stored data model

Persistent data-model change detected: serialized state: ui/src/app/settings.sidebar-prefs.node.test.ts, serialized state: ui/src/app/settings.ts, serialized state: ui/src/e2e/device-scope-upgrade.e2e.test.ts, serialized state: ui/src/e2e/sidebar-customization.e2e.test.ts, serialized state: ui/src/test-helpers/app-sidebar-cases/session-mutations.ts, vector/embedding metadata: ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete the Home native-tab path (recommended)
    Wrap Home’s href with the shared intent helper and add a focused Home marker/native-tab assertion before merge.

Technical review

Best possible solution:

Use the existing collapse-intent helper for Home’s main-session href and prove the native modified-click path collapses once while ordinary Home navigation remains unchanged.

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

Yes—source-reproducible with high confidence: Cmd/Ctrl-click Home, then observe that its unmarked main-session URL bypasses the collapse initialization path.

Is this the best way to solve the issue?

No. The shared helper is the right mechanism, but the Home anchor must also use it and receive browser-boundary coverage.

Full review comments:

  • [P2] Mark the Home session link with collapse intent — ui/src/components/app-sidebar-render.ts:198-206
    The prior finding is still unresolved: Home’s bare main-session href is allowed through on Cmd/Ctrl-click, but bootstrap collapses only marked chat-session URLs. Regular and catalog session rows are marked, so native-tab Home opens expanded despite the documented sidebar-tab behavior. Wrap this href with the shared helper and add a Home native-tab assertion.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against e6915d099adb.

Labels

Label justifications:

  • P2: The user-visible sidebar-tab feature is incomplete on the primary Home/main-session path but has a narrow repair.
  • merge-risk: 🚨 compatibility: The PR changes established sidebar modifier-click behavior and leaves one sidebar entry point with inconsistent new-tab behavior.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This MEMBER-authored PR is exempt from the external-contributor proof gate; the discussion also supplies mocked Control UI visual evidence for the changed surface.

Evidence

What I checked:

Likely related people:

  • steipete: Merged Home/sidebar history includes the Home attention change, and the current branch’s UI navigation work is in the same owner boundary. (role: recent Control UI and Home-path contributor; confidence: high; commits: da7a18e60088, 5bff9eac55d2; files: ui/src/components/app-sidebar-render.ts, ui/src/components/app-sidebar-session-row-render.ts, ui/src/app/bootstrap.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wrap Home’s href with the shared collapse-intent helper.
  • Add a Home Cmd/Ctrl-click or href-level assertion and rerun the focused Control UI browser proof.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (4 earlier review cycles)
  • reviewed 2026-08-24T03:49:06.017Z sha bf37efe :: needs maintainer review before merge. :: none
  • reviewed 2026-08-24T04:50:03.900Z sha f249f7d49c651d049c08275b9ca2ef33c00c9deb :: found issues before merge. :: [P2] Mark catalog session links with the collapse intent
  • reviewed 2026-08-24T05:55:04.883Z sha f249f7d49c651d049c08275b9ca2ef33c00c9deb :: found issues before merge. :: [P2] Mark catalog session links with the collapse intent
  • reviewed 2026-08-24T06:35:11.748Z sha f30ec214c9074abe97cb57c702dfcfd10059ed95 :: needs changes before merge. :: [P2] Mark the Home main-session link with collapse intent

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 24, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Visual proof (updated for the narrowed trigger)

Captured from the mocked-gateway Control UI E2E lane via the repo's own captureUiProof helper, and inspected before attaching. ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts and sidebar-customization.e2e.test.ts regenerate these.

1. Bare /chat first load — sidebar unchanged. The general chat surface is the app's main view and must not collapse.

2. Session opened in a new tab from the sidebar — collapsed, conversation full-width. This is the Cmd-click result: title, transcript area, and composer span the full window, expand control top-left. Reached via the explicit marker; an unmarked deep link to the same session keeps the sidebar.

3. Same tab after Cmd-B — sidebar restored. Recoverable at any time, and local to this tab.

4. After a reload — visibility not persisted, width preserved. The single most useful frame: the sidebar is back (visibility did not survive the reload) and noticeably wider than default, because navWidth is still persisted. "Persist the size, not the visibility" in one shot.

Note on how these were verified: the first capture attempt asserted only that the sidebar had disappeared, and passed against a completely blank pane — the collapsed chrome paints before the chat pane does. The test now waits on the composer, so it cannot pass against an empty page.

per-tab-01-chat-root-sidebar-visible

per-tab-02-session-tab-collapsed

per-tab-03-session-tab-after-cmd-b

04-visibility-not-persisted

…tabs

Sidebar visibility was persisted in localStorage, which is shared origin-wide,
so collapsing it in one tab leaked into every other tab and window on reload.
Visibility is view state, not a preference: stop persisting it and keep it in
the tab-local navigation snapshot. Width stays persisted.

A tab whose first load targets one specific conversation now starts collapsed,
seeded once at bootstrap from the canonical session-URL contract so bare /chat
and dashboards are unaffected and SPA navigation never re-collapses. Cmd-B,
the toggle, hover-peek, and the remote UiCommand path all still work.

Cmd/Ctrl-click on a sidebar session row now falls through to the browser so
sessions open in a real new tab or window; multi-select moves to Alt/Option-
click, which previously fell through to the browser's link-download behavior.
Shift-click range selection is unchanged.
Covers the two states that matter: a bare /chat first load keeps the sidebar,
and a tab opened directly on one conversation renders that conversation
full-width with the sidebar collapsed and Cmd-B restoring it. Waits on the
composer, not just the missing sidebar, so the capture cannot pass against a
blank pane.
@clawsweeper clawsweeper Bot removed proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 24, 2026
@steipete
steipete force-pushed the steipete/openclaw-miguel-improvements-6fbff3 branch from f30ec21 to 9fbbed8 Compare August 24, 2026 07:23
@steipete

Copy link
Copy Markdown
Contributor Author

Rank-up moves: both applied

1. Apply the URL intent to catalog-backed sidebar rows. Done — the finding was real. Catalog rows built their chat href through sessionNavigationTarget(...) and never got the marker, so Cmd-clicking a Codex/Claude CLI catalog session opened a tab that did not collapse while an ordinary session did.

Rather than copy the ordinary row's inline ?/& concatenation into a second place, the marker assembly is now one helper, withSidebarNavCollapseIntent in ui/src/app-session-route-paths.ts, used by both app-sidebar-session-row-render.ts and app-sidebar-session-catalog-render.ts. It preserves existing query strings and fragments and will not double-append. The duplication that would have produced the next instance of this bug is gone with it.

Three sidebar surfaces stay deliberately unmarked, since the question of why siblings are unaffected deserves an answer rather than silence: the Home link (app-sidebar-render.ts), generic page-navigation links (sidebar-menus-controller.ts), and approval-panel session links (sidebar-issue-item.ts). Those are page and attention-navigation surfaces rather than session-list rows, so applying the session-row collapse policy there would change existing behavior beyond this PR's scope.

2. Add browser coverage for a catalog session opened in a native tab. Done — collapses a native catalog-session tab while rendering its conversation in ui/src/e2e/sidebar-per-tab-visibility.capture.e2e.test.ts. It failed before the fix with expected null to be 'collapsed'. It asserts the real catalog-row URL, a visible composer, a loaded transcript, the collapsed sidebar, and that the temporary marker was stripped — and it waits on the composer rather than merely on the sidebar's absence, so it cannot pass against a blank pane. Capture attached above as per-tab-04-catalog-session-tab-collapsed.png.

Also since the last review

The branch was rebased onto latest main (78 commits of drift) because check-lint-core-5 failed on the merge ref while passing locally: main had independently grown ui/src/app/bootstrap.test.ts to 1015 lines while this branch added seeding tests to it, so only the merged file crossed the 1000-line max-lines cap. Fixed by splitting the navigation-visibility coverage into ui/src/app/bootstrap.nav-visibility.test.ts (927/1000 and 83/1000 counted lines, 53 tests before and after). No suppression comment and no config/max-lines-baseline.txt entry were added.

Unrelated but adjacent: ui/src/app/settings.node.test.ts now sits at 999/1000 counted lines, so the next counted line added to it will fail the same shard in the same confusing merge-ref-only way. Tracked separately rather than widened into this PR.

Exact-head CI is green on 9fbbed8 (run 32701278397).

@steipete
steipete merged commit e4b36f2 into main Aug 24, 2026
148 checks passed
@steipete
steipete deleted the steipete/openclaw-miguel-improvements-6fbff3 branch August 24, 2026 07:49
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

steipete added a commit that referenced this pull request Aug 24, 2026
* test(ui): split settings node suite by concern

ui/src/app/settings.node.test.ts sat at 999 oxlint-counted lines against
the 1000-line max-lines cap, so any added assertion failed the core lint
shard — and, as in #128474, could pass locally while only the merge ref
tripped the cap.

Split the 42-test monolith along the surfaces it actually covers: the
base file keeps gateway URL derivation, tab-local token handling, and
per-gateway session scoping; preference persistence and layout
persistence move to dotted siblings, matching the existing
settings.sidebar-prefs.node.test.ts precedent. Test names and count are
unchanged (47 across the settings node suites, before and after).

The location/base-path/settings-fixture helpers and the storage
lifecycle hooks are now shared from ui/src/test-helpers/settings-node.ts
instead of being copy-pasted per file; sidebar-prefs drops its duplicate
copies too.

* test(node-host): write fake container-engine state atomically

checks-node-compact-large-3 failed twice on this branch in different
tests of node-worker-supervisor.container.test.ts, most recently with
"SyntaxError: Unexpected end of JSON input" raised from the fake engine's
load() while the supervisor ran `docker rm --force`.

The shim saved container state with a truncating fs.writeFileSync while
sibling shim invocations (rm, inspect, wait, ps) read the same path, so a
reader could observe the zero-length window and exit 1. Write to a
".pending" sibling and rename over the target instead; rename is atomic,
so readers always see a complete previous or next state. The ps handler
filters on the ".container.json" suffix, so pending files are ignored.

A concurrent write/read probe over the old pattern produced 2014 partial
reads in 212900; the same probe over write-then-rename produced 0 in
203468. Not reproducible end-to-end on macOS, where the truncation
window is far narrower than on the loaded Linux shard.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 25, 2026
…ity per-tab (openclaw#128474)

* feat(ui): make sidebar visibility per-tab and free Cmd-click for new tabs

Sidebar visibility was persisted in localStorage, which is shared origin-wide,
so collapsing it in one tab leaked into every other tab and window on reload.
Visibility is view state, not a preference: stop persisting it and keep it in
the tab-local navigation snapshot. Width stays persisted.

A tab whose first load targets one specific conversation now starts collapsed,
seeded once at bootstrap from the canonical session-URL contract so bare /chat
and dashboards are unaffected and SPA navigation never re-collapses. Cmd-B,
the toggle, hover-peek, and the remote UiCommand path all still work.

Cmd/Ctrl-click on a sidebar session row now falls through to the browser so
sessions open in a real new tab or window; multi-select moves to Alt/Option-
click, which previously fell through to the browser's link-download behavior.
Shift-click range selection is unchanged.

* test(ui): prove per-tab sidebar visibility at the browser boundary

Covers the two states that matter: a bare /chat first load keeps the sidebar,
and a tab opened directly on one conversation renders that conversation
full-width with the sidebar collapsed and Cmd-B restoring it. Waits on the
composer, not just the missing sidebar, so the capture cannot pass against a
blank pane.

* fix(ui): narrow new-tab sidebar collapse intent

* fix(ui): collapse sidebar for catalog sessions opened in new tabs

* test(ui): split bootstrap navigation visibility coverage
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 25, 2026
* test(ui): split settings node suite by concern

ui/src/app/settings.node.test.ts sat at 999 oxlint-counted lines against
the 1000-line max-lines cap, so any added assertion failed the core lint
shard — and, as in openclaw#128474, could pass locally while only the merge ref
tripped the cap.

Split the 42-test monolith along the surfaces it actually covers: the
base file keeps gateway URL derivation, tab-local token handling, and
per-gateway session scoping; preference persistence and layout
persistence move to dotted siblings, matching the existing
settings.sidebar-prefs.node.test.ts precedent. Test names and count are
unchanged (47 across the settings node suites, before and after).

The location/base-path/settings-fixture helpers and the storage
lifecycle hooks are now shared from ui/src/test-helpers/settings-node.ts
instead of being copy-pasted per file; sidebar-prefs drops its duplicate
copies too.

* test(node-host): write fake container-engine state atomically

checks-node-compact-large-3 failed twice on this branch in different
tests of node-worker-supervisor.container.test.ts, most recently with
"SyntaxError: Unexpected end of JSON input" raised from the fake engine's
load() while the supervisor ran `docker rm --force`.

The shim saved container state with a truncating fs.writeFileSync while
sibling shim invocations (rm, inspect, wait, ps) read the same path, so a
reader could observe the zero-length window and exit 1. Write to a
".pending" sibling and rename over the target instead; rename is atomic,
so readers always see a complete previous or next state. The ps handler
filters on the ".container.json" suffix, so pending files are ignored.

A concurrent write/read probe over the old pattern produced 2014 partial
reads in 212900; the same probe over write-then-rename produced 0 in
203468. Not reproducible end-to-end on macOS, where the truncation
window is far narrower than on the loaded Linux shard.
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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