Skip to content

feat: make the workspace sidebar resizable - #2109

Merged
bkudiess merged 4 commits into
openclaw:mainfrom
bkudiess:bkudiess-resizable-sidebar
Nov 11, 2026
Merged

bkudiess merged 4 commits into
openclaw:mainfrom
bkudiess:bkudiess-resizable-sidebar

Conversation

@bkudiess

@bkudiess bkudiess commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The workspace sidebar has a fixed width, so users cannot trade sidebar space for more conversation space.

User Impact

User impact: drag the sidebar edge or focus it and use Left/Right to choose a width between 192 and 480 DIPs, while retaining the original control sizes.

The default remains 256 DIPs. Width is retained across collapse/reopen and restored after a temporary window-width constraint, but is not saved across app restarts.

The Gateway owner footer shows only the saved first name, without a shared-owner marker. An unnamed Gateway owner shows localized Owner, never email or profile id. Authentication and shared-profile classification are unchanged.

Why This Change Was Made

Use the existing native GridSplitter with a transparent 4-DIP hit area and no visible grip. Keep at least 480 DIPs for content, move embedded pinned pages with the pane, and leave full Settings navigation unchanged.

Remove the agent selector's duplicate chevron spacing and keep narrow footer status on one line. Accessible splitter labels are provided in all six supported locales.

The name-only owner presentation is integrated into the existing identity-label projection; obsolete shared-owner label resources are removed from all six locales.

CI follow-up uses the correct toggle/selection automation patterns, waits for dialog-template realization, and measures the Usage session header only after scrolling it into view. Fractional-DPI validation also exposed a real keyboard boundary bug: the Toolkit rejects a computed width of 191.99998 against the 192-DIP minimum. The preview handler normalizes only destinations that match the limit's rendered pixel, preserving ordinary Toolkit resizing and Alt+Left/Right navigation.

The latest main merge preserves its stronger client-clipped Usage viewport and measured-row discovery, alongside this PR's scroll-to-top reset before each capture.

Evidence

Full build passed. Shared tests: 5,760 passed and 28 ordinary opt-in skips. Tray tests: 6,275 passed, with one existing real-profile-reading test explicitly excluded.

Nine focused native cases now pass with no skips: the six sidebar/Systems/Usage cases plus three owner-footer cases covering the authenticated label, name-only Gateway owner, and avatar loading. This proves the combined tree retains exact sidebar boundaries at 175% scale, draft retention, collapse/reopen, window-width restoration, and Alt+Left navigation. Current-head CI and remaining proof-pool acceptance are still required before merging.

The preceding sidebar/CI-fix head ee007ad2 passed hosted CI. That is historical evidence, not a result for the new owner-name integration.

The earlier Hanselman dual-model review found four verified low/medium issues, which were addressed. Independent rubber-duck review covered the feature and CI repairs; its Alt-navigation and animated-detail visibility concerns were addressed. Reviews do not substitute for runtime proof.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: sidebar dragging, keyboard resizing, owner-footer presentation, accessible focus, embedded-page geometry and current-source Light/Dark visual behavior. Nine focused Debug cases passed; complete pool acceptance, High Contrast and production-shaped Release evidence remain outstanding.

Validation

Commands ran on native Windows ARM64 using isolated tray data, OPENCLAW_REPO_ROOT set to the worktree, and OPENCLAW_STATE_DIR and ordinary OPENCLAW_RUN_* opt-ins unset. A process-local PATH cleanup was needed for the existing GitVersion build step.

The native run opted into OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1 with an explicit current-build OPENCLAW_GATEWAY_FIXTURE_APP. A temporary short drive alias to the same checkout's parent avoided FileWorker copy paths exceeding 260 characters; it was removed after each run. App references were fully built before the focused test command.

Command Result
.\build.ps1 Passed: Shared, CLI, WinNode CLI, SetupEngine and WinUI.
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --logger 'trx;LogFileName=shared-main-merge.trx' --results-directory <session-results> Passed: 5,760; skipped: 28; failed: 0.
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName!~OpenClawTrayDataDirRedirectsSettingsAwayFromRealAppData' --logger 'trx;LogFileName=tray-main-merge.trx' --results-directory <session-results> Passed: 6,275; failed: 0. One test excluded because it deliberately reads the normal OS roaming profile. This is not an unfiltered Tray pass.
dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 --no-restore -p:BuildProjectReferences=false --filter 'FullyQualifiedName~SidebarResize_KeepsDraftAndWidthAcrossCollapseAndWindowResize|FullyQualifiedName~AddAndForgetDialogs_ExposeConsequencesAndSafeDefaults|FullyQualifiedName~UsageHero_RealShellCapturesCardAndRangeInLightAndDark|FullyQualifiedName~NarrowDialog_StacksFactsAndFooterWithoutChangingDestructiveFocus|FullyQualifiedName~OwnerFooter' --logger 'trx;LogFileName=sidebar-main-merge-native.trx' --results-directory <session-results> Passed: 9; skipped: 0; failed: 0. Runtime: approximately 68 seconds, excluding compilation.
.\scripts\validate-docs.ps1 Passed: 74 Markdown files and included proof-pool documentation checks.
git diff --check Passed.

Hosted classifier selects targeted tray/UI tests and the normal validation gates. A new hosted CI result and production-shaped Release UI proof are not implied by the local passes. Earlier CI failures and local diagnostic attempts are retained; they were not made green with assertion removal, widened timeouts, skips or whole-test retries.

Real Behavior Proof

  • Environment tested: native Windows ARM64, Debug WinUI app, 175% display scale, isolated app profile and synthetic loopback Gateway.

  • PR head or commit tested: source now committed as 8bed20524954dc8567cdae605d0a430ace1f86be. Checks ran against the identical uncommitted merge of main at 994539b8b6f51182841e62247357f31cac7ed6e4 into 42ff2e43ebeddf45e6c25bb083cf9b1d5bc596ce, before this commit was created. Candidate patch SHA-256 against that main tip was 751ae77b2193dec25568b4ed058e580f424f0481d1930b065788e7d0f5940ddb; correspondence is manually recorded, not an inventory-bound native freeze receipt.

  • Exact steps or command run: the nine-case dotnet test command above, using the explicitly selected current-build ARM64 Debug app and isolated synthetic fixture profiles.

  • Evidence after fix: copied current-source TRX outcomes:

    SidebarResize_KeepsDraftAndWidthAcrossCollapseAndWindowResize_AndLeavesRoomForContent (Light): Passed
    SidebarResize_KeepsDraftAndWidthAcrossCollapseAndWindowResize_AndLeavesRoomForContent (Dark): Passed
    AddAndForgetDialogs_ExposeConsequencesAndSafeDefaults (Light): Passed
    AddAndForgetDialogs_ExposeConsequencesAndSafeDefaults (Dark): Passed
    NarrowDialog_StacksFactsAndFooterWithoutChangingDestructiveFocus: Passed
    UsageHero_RealShellCapturesCardAndRangeInLightAndDark: Passed
    OwnerFooterUsesAuthenticatedProfileAndLiveConnectionStatus: Passed
    OwnerFooterRendersOnlyNameForGatewayOwnerProfile: Passed
    OwnerFooterLoadsAvatarForProfileWithoutEmailOrUploadMetadata: Passed
    
  • Observed result: real keyboard resizing reaches 192 DIPs and the display-attainable maximum, rejects further boundary keys, avoids button overlap, retains the draft and pane width across collapse/reopen, follows embedded pinned pages, preserves Alt+Left navigation, and restores width after narrowing then maximizing the window. Systems card-template, focus and centering assertions pass. Usage captures complete in both themes, including expanded session geometry and the narrower shell. The Gateway owner fixture with saved name "Fixture Shared Person" renders only "Fixture", retains Connected help text, and loads its authenticated avatar. Identity unit tests cover localized Owner fallback without shared-owner email/id. The earlier hidden-grip visual acceptance was on a previous head; current Usage captures remain local and are not public screenshot links.

  • Screenshot or artifact links verified? (Yes/No/N/A): N/A. No public media or local private paths are attached.

  • Not verified or blocked: hosted CI completion for the new head, High Contrast, production-shaped Release UI proof, additional desktop/DPI configurations, full proof-pool acceptance, and the excluded real-profile test on an isolated Windows user/host. The old local FileWorker path-length blocker was resolved for validation with the temporary short alias. Fixture evidence does not establish real Gateway pairing/provider or installer behavior; none of those contracts changes here.

Security Impact

  • New permissions or capabilities? (Yes/No) No.
  • Secrets or tokens handling changed? (Yes/No) No.
  • New or changed network calls? (Yes/No) No.
  • Command or tool execution surface changed? (Yes/No) No.
  • Data access scope changed? (Yes/No) No.
  • If any answer is Yes, explain the risk and mitigation: N/A.

Compatibility and Migration

  • Backward compatible? (Yes/No) Yes.
  • Config or environment changes? (Yes/No) No product configuration changes; validation uses isolated process-local overrides.
  • Migration needed? (Yes/No) No.
  • If yes, list the exact upgrade steps: N/A.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Preserve original control sizing while allowing a narrower pane, keyboard resizing, and temporary window-width constraints. Hide the visual grip and avoid button overlap.

Co-authored-by: Copilot App <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@bkudiess
bkudiess marked this pull request as ready for review November 11, 2026 01:15
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 11, 2026
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR makes the workspace sidebar resizable by dragging or keyboard input while preserving conversation drafts and embedded-page alignment.

Example: A user wants more conversation space in a 1280-DIP workspace window.

  • Before: The sidebar stays 256 DIPs wide.
  • After: The user can narrow it to 192 DIPs and retain that width across collapse and reopen.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The source change is focused and no actionable correctness or security defect was found, but supplied runtime evidence covers only part of the changed behavior.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users cannot trade sidebar width for conversation space.
Reason: The collaborator-authored direction adds direct pointer and keyboard control while preserving the existing default and avoiding a saved-setting migration.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it adds a useful capability absent from main, has collaborator-backed direction, and introduces no definite source defect found in this review.

Priority: P2
Reviewed head: 7a221ac68b81ecba1f226330c08ccb6a7c294fc7

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The final Light/Dark resize regression has not executed, and current-head pointer/keyboard resizing, collapse restoration, embedded-page alignment, and outer-window shrink/widen restoration lack completed runtime proof.
Agent review details

How this fits together

WorkspaceWindow owns native sidebar layout and applies its measured width to NavigationView and embedded Settings pages; chat retains its existing host and draft.

flowchart LR
  Input[Pointer or keyboard input] --> Splitter[Existing GridSplitter control]
  Splitter --> Column[Sidebar column width]
  Window[Available window width] --> Column
  Column --> Navigation[NavigationView pane]
  Column --> Embedded[Embedded page allocation]
Loading

Technical review

Best possible solution:

Keep the existing window-owned layout implementation and complete its focused native validation before landing.

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

This is a capability addition; current-main XAML directly confirms the fixed-width starting behavior, and no target code was executed during this read-only review.

Is this the best way to solve the issue?

The patch is a small implementation using the existing GridSplitter package and WorkspaceWindow layout owner, with no unnecessary wrapper, parallel policy owner, or persistence machinery.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against a6ff6a164b20.

Provenance checked

  • Workspace pane width and embedded-page allocation changes intended behavior with a stated reason (3a58bf3: The original workspace provided native navigation with retained conversations and drafts; embedded-page positioning was subsequently added by 7967d50.)
  • Agent selector padding changes intended behavior with a stated reason (3a58bf3: The original native selector reserved trailing chevron space; this PR explains that the native ComboBox already owns that space and removes the duplicate inset for narrow panes.)
  • Shared footer status keeps the original intent (3f6765e: One shared footer keeps Chat and Settings presentation aligned; explicitly preventing status wrapping preserves that owner while supporting narrower panes.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Introduced scope Production/resources +69/-4; tests +103/-2; design documentation +13/-1 Growth is justified by localized accessibility metadata and mounted native coverage of resizing, retained drafts, collapse, embedded pages, and window constraints.

Labels

Label changes:

  • add P2: A bounded workspace usability feature with clear value and no established urgent regression.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A bounded workspace usability feature with clear value and no established urgent regression.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Complete the final native resize regression and attach current-head interaction evidence for the documented width-retention behavior.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 10, 2026, 8:29 PM ET / November 11, 2026, 01:29 UTC.

bkudiess and others added 3 commits November 10, 2026 20:10
Integrate the tested main baseline. Use the correct UI Automation patterns, preserve keyboard limits at fractional DPI, wait for dialog realization, and measure visible Usage session geometry.

Co-authored-by: Copilot App <[email protected]>
Use localized Owner for unnamed gateway-owner profiles without displaying email, profile id or a shared-owner marker. Keep authentication, classification and sidebar sizing unchanged.

Co-authored-by: Copilot App <[email protected]>
Keep upstream client-clipped Usage sampling and measured row discovery alongside the per-capture scroll reset. Preserve sidebar resizing and the name-only owner footer.

Co-authored-by: Copilot App <[email protected]>
@shanselman

Copy link
Copy Markdown
Collaborator

Hi Barbara. I'm a Copilot triage agent helping the maintainers see which ready PRs can land (I'm not Scott). Here is where this PR stands on head 8bed2052. I did not push anything to your branch.

What looks good

  • The resize itself reads as solid. Two independent read-only reviews found no blockers in it: no feedback loop between the splitter and the width writers, collapse/reopen and window resize keep the width, Alt+Left/Right history is not shadowed, and the six locales stay in step.
  • On this head the UI, functional, and accessibility job is green, including the Light and Dark SidebarResize_... proofs and the ChatPage Axe scans.
  • I built the merge result locally: build.ps1 passed, Shared (5761) and Tray (6290) tests passed, and the real Companion profile was left untouched.

What is holding it back tonight

  1. The required CI Gate is red (Mock Gateway job): GatewayFixtureUiTests.Automations_ScopesToAgentsAndCoversMainStates, Light and Dark, with weekly-editor: Timed out waiting for editor scroll reaches computed position. This does not look caused by the sidebar. The same timeout also failed on #1864 (fix: gateway remove and switch fail after setup is closed) at 7bc14e3c, and on your Automations page branch at 05e9ae4d, and neither of those has the sidebar change. I have re-run the failed jobs.
  2. The footer commit 42ff2e43 ("improve: show only the saved first name in the owner footer") is bundled in this PR and was added after ClawSweeper's only review (it looked at 7a221ac6), so nobody has reviewed it yet. It changes WorkspaceIdentitySource.FooterLabel so a shared owner and a personal profile with the same first name look identical, to sighted users and to screen readers. The previous doc comment says the shared marker intentionally matched the web Control UI. If dropping the marker is intended, that sounds like a product call for a maintainer. If not, a localized, accessible indicator would keep the distinction.

Suggestion
If it is easy, could the footer change move to its own PR (or get the marker back)? Then the resize can land by itself once the Gate is green, and I am happy to look again then.

Optional and cosmetic. In OnSidebarPreviewKeyDown the keyboard snap only fires when ActualWidth + delta rounds to exactly the limit pixel. After a mouse drag to an off-grid width (say 196 or 476), the arrow keys can leave the pane a few DIPs short of 192 or 480. Snapping when next crosses the limit would cover that (untested sketch):

-        if (Math.Round(next * scale) != Math.Round(boundary * scale)) return;
+        var nextPx = Math.Round(next * scale);
+        var boundaryPx = Math.Round(boundary * scale);
+        if (delta < 0 ? nextPx > boundaryPx : nextPx < boundaryPx) return;

Thanks for the careful work on the layout and the accessibility proofs.

@bkudiess
bkudiess merged commit 4e3dd14 into openclaw:main Nov 11, 2026
85 of 93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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.

2 participants