Skip to content

fix(macos): let browser sidebar expand beyond half width - #136168

Merged
steipete merged 1 commit into
mainfrom
steipete/resizable-browser-sidebar-5df3c9
Sep 2, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/resizable-browser-sidebar-5df3c9

Conversation

@steipete

@steipete steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #136157 — macOS browser sidebar cannot expand much beyond half the default window.

What Problem This Solves

Resolves a problem where users widening the macOS dashboard's browser sidebar hit a hard stop almost immediately after its default half-width opening. In a 1240-point window, the browser opened at approximately 619.5 points but could grow only to 638 points; at the 922-point minimum window size, its available range was exactly 320 points.

Why This Change Was Made

The native split view already supports resizing and remembers the user's chosen browser width. Its dashboard minimum was held at 601 points to keep expanded navigation visible, even though the embedded dashboard already supports compact navigation below 600 points.

Lower that pane minimum to 400 points at the shared layout owner. Preserve the existing 922×620 minimum window, 320-point browser minimum, half-width default, native divider handling, tab lifecycle, and width persistence. There is no additional drag implementation, dependency, configuration option, migration, or protocol change.

User Impact

Users can give a web page more than half of the normal app window. The dashboard switches to its existing compact navigation when necessary instead of blocking the browser's expansion. Previous browser width preferences continue to work.

Evidence

  • Production-policy reproduction: compiling the actual DashboardWindow.swift and requesting an 800-point browser in a 1240-point split returned 638 before and 800 after; the before probe exited 1 and the after probe exited 0.
  • Added real AppKit window-layout coverage to the existing sidebar restoration test: an 800-point browser in the default window and a 500-point browser in the unchanged minimum window. These assert the resulting browser frame, not a computed expected value from the same clamp.
  • node scripts/prepare-apple-mermaid.mjs followed by xcrun swift build --package-path apps/macos --product OpenClaw -c debug --build-system native — passed. The initial build identified missing generated Mermaid resources; preparing them resolved it.
  • node scripts/check-changed.mjs -- apps/macos/Sources/OpenClaw/DashboardWindow.swift apps/macos/Tests/OpenClawIPCTests/DashboardWindowSmokeTests.swift docs/platforms/macos.md — passed, including Swift lint/format, all selected guards, and 1,067 tests.
  • git diff --check — passed.
  • Fresh Codex autoreview, P0 scope — clean.
  • Existing native-navigation responsive browser suite — 6/6 tests passed (node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/native-nav-responsive-layout.e2e.test.ts).
  • Supplemental isolated Chromium flow with mocked Gateway and native web chrome: resized the dashboard from 619×900 to 400×900, opened/closed navigation, preserved a draft, sent a message, and rendered the mocked reply. No horizontal document overflow at either width; the 400-point composer and send button remained visible and unobscured. No browser page errors.
  • Exact-head CI passed for 9ba01d6c7b1c308e7b41eac11ba6f43e0fd0393d: https://github.com/openclaw/openclaw/actions/runs/33609362744/attempts/2. Both native release and test phases and openclaw/ci-gate succeeded. The app's Swift Testing run passed 1,913 tests, with 2 additional named-profile isolation tests. The changed sidebar restoration test and sibling tab lifecycle test are explicitly present and passing in the native job log. Shared OpenClawKit's Swift Testing run also passed 1,576 tests; its separate XCTest portion reports one existing skip.
  • CI recovery: the first attempt finished all other work but left both native jobs unassigned, with runner ID 0 and no executed steps. After verifying that nothing was executing and the head was unchanged, only unfinished work was retried through the workflow's existing GitHub-hosted Mac route. No coverage, workflow configuration, or merge gate was weakened.

Production LOC: +4/-4 (net 0). Tests: +11/-0. Docs: +1/-1.

Visual and live-proof gap

A pristine macOS 26.6 VM was restored for full signed-app gesture proof. Its required Parallels Tools update to 27.0.0 broke guest command execution (PrlJob_GetRetCode: Invalid argument), including a trivial echo command; VM-scoped input also did not visibly take effect. A restart did not restore execution. The VM was restored again and left stopped, and the infrastructure failure was recorded separately. No operator Gateway or saved app state was modified.

Actual pointer dragging and full native-app before/after screenshots are therefore not verified. The source-executed policy probe and AppKit regression tests must not be read as live gesture proof.

The attached screenshots are supplemental mocked Gateway + native-web-chrome simulation in Chromium, showing the dashboard at 619 points, at 400 points, and with compact navigation open. They prove the narrower dashboard remains usable, not native splitter input, WKWebView behavior, or native titlebar geometry. The baseline simulation has overlapping titlebar/brand controls and is not evidence about actual native titlebar placement. Every attached image was inspected and contains synthetic data only.

Supplemental Chromium simulation: dashboard at 619 points, not native titlebar proof

Supplemental Chromium simulation: usable compact dashboard at 400 points

Supplemental Chromium simulation: navigation drawer opens at 400 points

Allow the dashboard to use its existing compact navigation when users widen the browser sidebar. Preserve native resizing, saved widths, the default half-width opening, and the existing minimum window size.

Fixes #136157
@clawsweeper

clawsweeper Bot commented Sep 2, 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: macos App: macos size: XS maintainer Maintainer-authored PR labels Sep 2, 2026
@steipete
steipete marked this pull request as ready for review September 2, 2026 08:31
@steipete steipete self-assigned this Sep 2, 2026
@steipete

steipete commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready verification for 9ba01d6 (fixes #136157, restrictive macOS browser-width range).

The shared layout minimum is the correct owner: lowering 601 to 400 points permits the existing compact dashboard, while keeping the 922×620 window minimum, 320-point browser minimum, half-width default, native splitter, saved widths and tab lifecycle. Personally rechecked the current main baseline, affected caller/restore/persist paths, AppKit SDK contracts and actual-frame regression assertions. Production +4/-4 (net 0); tests +11/-0; docs +1/-1.

Exact-head CI run 33609362744, attempt 2 is completed/success; required Actions-owned openclaw/ci-gate is SUCCESS. Both macOS phases passed. Retained native logs confirm the changed restoration test, sibling tab lifecycle, 1,913 app tests, two named-profile tests and 1,576 shared-kit tests passed. The existing shared-kit XCTest skip is unchanged.

Existing proof, unchanged since review: node scripts/prepare-apple-mermaid.mjs then xcrun swift build --package-path apps/macos --product OpenClaw -c debug --build-system native; node scripts/check-changed.mjs -- apps/macos/Sources/OpenClaw/DashboardWindow.swift apps/macos/Tests/OpenClawIPCTests/DashboardWindowSmokeTests.swift docs/platforms/macos.md (1,067 tests); node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/native-nav-responsive-layout.e2e.test.ts (6/6); source-executed 800-point request returned 638 before / 800 after. git diff --check and native review artifact validation passed. Existing Codex autoreview was P0 scoped-clean; no patch changes or redundant review.

Live rules were rechecked: linear history and the CI gate, no required PR approval. ClawSweeper completed review at 2026-09-02T15:17:06.105Z on this exact head: no blocking findings and no before-merge actions. It agrees with the shared layout-owner fix and explicitly accepts the documented native gesture proof gap. The separate synthetic-fixture admission policy fix is merged; no OpenClaw source changed and the scanner was not bypassed. No bypass or rebase requested.

Native proof gap remains: actual AppKit pointer dragging, full signed-app before/after screenshots and live WKWebView behavior are unverified because Parallels Tools 27 broke guest command execution and input in the pristine macOS 26.6 VM. Landing is authorized under the documented concrete-infeasibility exception. The three existing inspected synthetic Chromium screenshots and mocked send/reply flow are supplemental compact-dashboard evidence, not native proof. No operator app/Gateway state changed.

@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

The exact-head native CI and required merge gate are green, and native preparation has passed. The initial review acknowledgment has not progressed to a completed review; the native merge wrapper correctly stopped. Please review the current head. Scope, proof, and the explicit live-native gesture gap are documented in the PR and the land-ready comment above.

@clawsweeper

clawsweeper Bot commented Sep 2, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

steipete added a commit to openclaw/clawsweeper that referenced this pull request Sep 2, 2026
Bind the verified synthetic subframe rejection URI to its exact native hashes, complete source line, path, mode and observed PLAIN decoder. Preserve the scanner and classification boundary, with regression coverage and policy documentation.

Unblocks admission for openclaw/openclaw#136168 after policy deployment; no OpenClaw branch or reviewer workflow changed.
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The source-admission refusal is now corrected by the exact host fixture-policy repair in openclaw/clawsweeper#1355, merged as openclaw/clawsweeper@56ccb51. The approved policy entry is verified on ClawSweeper main.

This OpenClaw PR remains unchanged at head 9ba01d6c7b1c308e7b41eac11ba6f43e0fd0393d. This is recovery after a genuine input-policy correction, not a cosmetic source retry. The PR still requires its own successful review and normal native landing gates; no merge or rebase is requested here.

@clawsweeper

clawsweeper Bot commented Sep 2, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Sep 2, 2026
@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 11:17 AM ET / 15:17 UTC.

ClawSweeper review

What this changes

The PR lowers the dashboard pane’s minimum width so the macOS embedded browser sidebar can expand beyond half the window while retaining its saved-width behavior.

Merge readiness

✅ Ready for maintainer review

No blocking correctness findings. This focused, maintainer-owned macOS fix repairs the layout owner that clamps restored sidebar widths; the documented native-gesture infrastructure gap does not undermine the direct AppKit frame regression coverage.

Priority: P3
Reviewed head: 9ba01d6c7b1c308e7b41eac11ba6f43e0fd0393d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary fix with direct regression coverage and clean exact-head validation; the documented native gesture capture gap remains transparent.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer PR changes the native split-view layout owner; the supplied evidence includes direct AppKit frame assertions and exact-head native CI. Actual pointer dragging and WKWebView gesture proof remain infeasible because the recorded pristine VM could not execute guest commands after its Parallels Tools update, as disclosed in the PR.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer PR changes the native split-view layout owner; the supplied evidence includes direct AppKit frame assertions and exact-head native CI. Actual pointer dragging and WKWebView gesture proof remain infeasible because the recorded pristine VM could not execute guest commands after its Parallels Tools update, as disclosed in the PR.
Evidence reviewed 6 items Shipped and current-main defect: The v2026.8.2 tag and fetched current main retain a 601-point dashboard minimum; the width helper subtracts that value from available split width, producing the reported clamp.
Owner-boundary repair: The controller applies the shared layout minimum to the dashboard split-view item and restores persisted browser width through the same layout helper, so changing the shared constant repairs both constraints consistently.
Regression coverage: The existing native AppKit smoke test now opens persisted 800-point and 500-point sidebars at the default and minimum window sizes and asserts the actual resulting frame width.
Findings None None.
Security None None.

How this fits together

The macOS dashboard opens external links in a split browser sidebar. Its layout policy constrains both panes, while the split-view controller restores and persists the browser width for later links.

flowchart LR
  A[External dashboard link] --> B[Browser sidebar controller]
  B --> C[Saved sidebar width]
  C --> D[Layout width policy]
  D --> E[Compact dashboard navigation]
  D --> F[Browser sidebar frame]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Docs 0, Other +11. Total +11 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 15 4 +11
Total 3 16 5 +11

Review metrics

Metric Value Why it matters
Production versus regression coverage production +4/-4 (net 0); tests +11/-0; docs +1/-1 The bug fix is production-neutral and adds two direct persisted-width cases without expanding configuration or persisted-data surface.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #136157
Summary: This PR directly addresses the width-clamp behavior reported by the linked issue and remains its unmerged fix candidate.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Land the shared minimum-width adjustment with the persisted-width frame assertions, preserving the existing 320-point browser minimum, half-width default, and 922-point window minimum.

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

Yes, from source: v2026.8.2 and current main calculate browser maximum width as available split width minus the 601-point dashboard minimum, while the introduced AppKit test directly exercises the requested restored widths.

Is this the best way to solve the issue?

Yes. The shared layout constant is the canonical constraint consumed by both the split-view minimum and persisted-width restoration; changing only the default fraction or adding a controller-specific override would leave the clamp or duplicate policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a bounded macOS layout ergonomics fix with no data-loss, security, availability, or message-delivery impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer PR changes the native split-view layout owner; the supplied evidence includes direct AppKit frame assertions and exact-head native CI. Actual pointer dragging and WKWebView gesture proof remain infeasible because the recorded pristine VM could not execute guest commands after its Parallels Tools update, as disclosed in the PR.

Label justifications:

  • P3: This is a bounded macOS layout ergonomics fix with no data-loss, security, availability, or message-delivery impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer PR changes the native split-view layout owner; the supplied evidence includes direct AppKit frame assertions and exact-head native CI. Actual pointer dragging and WKWebView gesture proof remain infeasible because the recorded pristine VM could not execute guest commands after its Parallels Tools update, as disclosed in the PR.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • omarshahine: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit 8013397 into main Sep 2, 2026
158 of 161 checks passed
@steipete
steipete deleted the steipete/resizable-browser-sidebar-5df3c9 branch September 2, 2026 15:25
@steipete

steipete commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 3, 2026
…6168)

Allow the dashboard to use its existing compact navigation when users widen the browser sidebar. Preserve native resizing, saved widths, the default half-width opening, and the existing minimum window size.

Fixes openclaw#136157
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos docs Improvements or additions to documentation maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

macOS browser sidebar cannot expand much beyond half the default window

1 participant