fix(macos): allow browser sidebar resizing with few tabs - #137992
Conversation
Keep the tab strip document independent of its clipping viewport so capped tab widths and hidden tabs cannot pin the native divider. Exercise AppKit drag tracking and saved widths in the smoke test, replacing callback-only test hooks.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 5:30 AM ET / 09:30 UTC. ClawSweeper reviewWhat this changesThe PR removes conflicting macOS tab-strip constraints so the dashboard link-browser sidebar can resize with one or two tabs, and replaces callback-only checks with native split-view geometry coverage. Merge readiness⛔ Blocked before merge - 3 items remain No introduced correctness finding. This PR remains necessary because current main retains the conflicting tab-strip constraints; the protected maintainer path requires a maintainer proof-sufficiency decision. Priority: P2 Review scores
Verification
How this fits togetherThe macOS dashboard opens web links in an embedded sidebar beside the main dashboard. The tab strip supplies layout constraints to the native split view, which controls user resizing and saved browser-width restoration. flowchart LR
A[Dashboard link] --> B[Embedded browser sidebar]
B --> C[Tab strip document layout]
C --> D[Native split view]
D --> E[Resizable browser width]
E --> F[Saved width on reopen]
Decision needed
Why: The author is identified as a MEMBER in Repository State and the PR has a protected maintainer label; the missing prepared attachments are a reviewer-side evidence gap rather than an introduced code defect. Before merge
Agent review detailsSecurityNone. PR surfaceOther +18. Total +18 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the owner-bound tab-document constraint repair after a macOS maintainer accepts the available native CI and source evidence, keeping the existing divider persistence path unchanged. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: the retained current-main constraint set and the native fixture’s one- and two-tab split positioning define a focused path, although AppKit cannot be executed in this Linux review environment. Is this the best way to solve the issue? Yes. The tab strip owns the conflicting document constraints; changing divider persistence or adding a downstream clamp would leave that owner conflict intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e0c230789b33. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Maintainer review completed for One evidence clarification: the two screenshots attached in this PR are fresh captures of this divider reproduction, not predecessor tab-feature media. They use the same signed synthetic AppKit fixture with the repository's actual browser view, changing only the pre-fix versus fixed tab-bar source. The same physical drag from position 779 to 550 stays at 779 before and reaches 550 after. Full installed-app drag and close/reopen persistence were also verified locally; private dashboard screenshots are not uploaded. CI attempt 1 completed its macOS support tests, security and native-localization checks, but its two Swift jobs never received Blacksmith runners. After verifying only queued jobs remained, those pending jobs were retried through the existing GitHub-hosted macOS fallback. Attempt 2 keeps the same source SHA and is now running the native checks. The shared-kit scan received the same targeted recovery. |
Use native split-view positioning after tabs are laid out, and test saved-width restoration separately. This avoids entering AppKit mouse tracking inside Swift Testing, which suppressed terminal test reporting in the signed reproduction. Physical drag and persistence were verified in the installed app.
|
Updated to A signed isolated Swift Testing fixture reproduced the missing completion report when entering AppKit's nested mouse-tracking loop. The regression now uses The revised isolated test fails with four recorded width assertions on the original tab bar and reports an explicit successful test/suite/run completion on the fixed tab bar, including one/two/eight-tab resizing and overflow. Production code is unchanged by this follow-up. Independent review is clean; final exact-head CI is running again, and the named test's terminal result will be verified before merge. |
|
Resolved the latest review's environment-dependent evidence gap for I directly inspected Apple's AppKit SDK I also re-inspected the full, freshly captured synthetic before and after images. They show this divider scenario: the same physical drag leaves the browser at 320 points before the change and widens it to 549 afterward. Physical dragging in both directions and actual preference saving were separately verified in the rebuilt, Developer-ID-signed installed app. Maintainer decision: retain the tab-document owner repair and the existing native divider/persistence flow. The review reports no introduced defect, and its unavailable-environment concern is covered by direct local SDK/visual inspection plus the independent final-patch review. No code change is needed for that concern. Final CI is still running; merge remains gated on the named resize test and full app-suite terminal results. |
|
Merged via squash.
|
…7992) * fix(macos): allow browser sidebar resizing with few tabs Keep the tab strip document independent of its clipping viewport so capped tab widths and hidden tabs cannot pin the native divider. Exercise AppKit drag tracking and saved widths in the smoke test, replacing callback-only test hooks. * test(macos): verify divider constraints without nested tracking Use native split-view positioning after tabs are laid out, and test saved-width restoration separately. This avoids entering AppKit mouse tracking inside Swift Testing, which suppressed terminal test reporting in the signed reproduction. Physical drag and persistence were verified in the installed app. * test(macos): wait for Config retry controls to render
Related: #136157, #136168
What Problem This Solves
Fixes an issue where users dragging the macOS dashboard's browser divider could not resize the sidebar when only one or two tabs were open. The browser could stay at its 320-point minimum even after the earlier dashboard minimum-width fix.
Why This Change Was Made
The tab strip constrained its scroll document to be at least as wide as the viewport, while AppKit's horizontal stack and capped tab widths constrained that same document in the opposite direction. The hidden single-tab viewport also forced its retained contents to zero height. Letting the document keep its natural width and canonical 30-point height removes those conflicting constraints at their owner.
The existing native divider and width persistence remain the canonical path. The smoke test now lays out one and two tabs, moves the real native divider through AppKit's constraint-aware positioning API, and checks actual pane widths plus saved-preference restoration. This replaces callback-only proof and removes its unused test hooks and stored split-view reference.
User Impact
Users can widen or narrow the browser with one or multiple tabs, including beyond half the dashboard window, and retain their chosen width after closing and reopening it. Overflowing tab strips still scroll. There are no new settings, dependencies, or storage changes.
Evidence
swiftformat --lintwithconfig/swiftformat, Swift parser validation, andgit diff --checkpassed. The full app package build and strict code-signature verification passed.DashboardWindowSmokeTestsregression runs in the disposable macOS CI lane; the repository's native test runner forbids executing the full application suite on an operator desktop. The isolated signed reproduction does not load OpenClaw startup, Gateway state, or saved credentials.c9bc811ab83: the sidebar regression, all four Config recovery cases, and the full default app suite explicitly passed (2,082 tests across 218 suites). The shared kit passed 1,627 tests across 124 suites; named-profile and isolated health-fixture checks passed. The release build and shared-kit code scans also passed.Automated layout checks use NSSplitView.setPosition, which applies the same constraints as user dragging. Actual drag persistence is covered by the separate installed-app proof. Synthetic nested mouse tracking inside Swift Testing was removed after a green preliminary job lacked test-completion evidence; the revised isolated fixture explicitly verifies completion.
Native CI also exposed an existing Config-settings test readiness race: after releasing a suspended Gateway acquisition, the test could press Reload while SwiftUI still rendered its loading view. The test now uses its existing bounded rendering helper to wait for the enabled retry control. It retains the stale-error assertions and real accessibility press; no timeout or app behavior changes. The sidebar regression and complete DashboardWindowSmokeTests suite already passed in that run.
Runtime production delta: +4/-6 (net -2). Removed DEBUG test support: -10. Test-file delta: +35/-5 (net +30), giving combined test/support growth of 20 lines and a total PR delta of +18. The two production source files shrink by 12 lines overall.
Before/after screenshots below show the same pointer drag from divider position 779 to 550 in an 1100-point synthetic AppKit window. Before: the browser stays at 320 points. After: the browser grows to 549 points. These captures contain only the synthetic fixture and
about:blank.Regression provenance: the parent-relative patch for 477b2860d5e (#103438) introduced these tab-document constraints; they remain unchanged on the pre-fix head. Git attributes that commit to Peter Steinberger, with GitHub as committer; the human merger was not established by the inspected Git evidence. The hidden-single-tab behavior arrived separately in #107798.