Skip to content

fix: stop rubber-band bounce of the Control UI shell in the Mac app web view#99830

Merged
steipete merged 1 commit into
mainfrom
fix/control-ui-root-overscroll
Jul 4, 2026
Merged

fix: stop rubber-band bounce of the Control UI shell in the Mac app web view#99830
steipete merged 1 commit into
mainfrom
fix/control-ui-root-overscroll

Conversation

@steipete

@steipete steipete commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Opening the Control UI in the macOS app's dashboard window (a WKWebView) lets the whole page rubber-band vertically — even when the content fits the viewport with nothing to scroll. The entire shell shifts up and down on trackpad scroll, which feels broken for an app shell. Desktop Safari shows the same bounce.

Why This Change Was Made

The root scroller of the Control UI is never supposed to scroll — the shell is a fixed grid and inner panes (chat thread, lists) own scrolling. overscroll-behavior: none was only applied in @media (display-mode: standalone) (installed PWA), so plain browser contexts — which is what WKWebView is — kept WebKit's default elastic bounce. The fix applies the rule to html, body globally and removes the now-redundant standalone-mode declaration. Inner scrollers keep their native elasticity; only chaining/bouncing of the root is suppressed. Safari has supported overscroll-behavior since 16; the macOS app targets macOS 15 (Safari 18+ WebKit).

User Impact

The Mac app's dashboard window (and the Control UI in any browser) no longer bounces the whole UI when there is nothing to scroll. Inner panes scroll exactly as before.

Evidence

Computed-style probe (Playwright + the repo's mock-gateway e2e harness, non-standalone context, /chat):

  • main (before): {"html":"auto","body":"auto","standaloneMediaMatches":false} — root bounces
  • this branch (after): {"html":"none","body":"none","standaloneMediaMatches":false} — root bounce disabled

Diff is CSS-only (+4/−1 in ui/src/styles/base.css).

The Control UI is an app shell: inner panes scroll, the root never should.
macOS WKWebView (Mac app dashboard window) and desktop Safari still
rubber-band the root scroller, so the whole UI bounced up and down whenever
content fit the viewport. Apply overscroll-behavior: none to html/body
globally instead of only in standalone PWA mode, and drop the now-redundant
standalone-mode declaration.
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Jul 4, 2026
@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 4, 2026, 1:51 AM ET / 05:51 UTC.

Summary
This PR moves Control UI root overscroll suppression from the standalone-only CSS block to the global html, body rule.

PR surface: Source +3. Total +3 across 1 file.

Reproducibility: yes. for the CSS root-scroller condition: current main leaves non-standalone html, body at default overscroll behavior and the PR body reports a before/after computed-style probe. I did not see live WKWebView/Safari visual proof of the rubber-band path in this review.

Review metrics: 1 noteworthy metric.

  • Root overscroll axes: 2 axes changed in non-standalone contexts. The shorthand affects both x and y, so reviewers must consider horizontal browser navigation as well as the reported vertical bounce.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Change the global root rule to suppress only vertical overscroll.
  • [P1] Add real non-standalone Safari/WKWebView or browser diagnostic proof after the axis change, redacting private details.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body includes useful Playwright mock-gateway computed-style output, but external PR proof still needs a real non-standalone browser or Mac app demonstration after the axis narrowing, with private details redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
The visible browser/Mac app bounce behavior would benefit from a short real-window proof after the rule is narrowed to the vertical axis. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify the Control UI /chat root no longer rubber-bands vertically in a non-standalone browser or Mac app window while horizontal back/forward gestures and inner chat scrolling still work.

Risk before merge

  • [P1] Merging as written sets root overscroll-behavior-x: none in normal browser contexts even though the reported failure is vertical rubber-band bounce, which can change horizontal browser navigation gestures for existing users.
  • [P1] The PR body provides a mock-gateway computed-style probe, but it does not show the real Mac app/Safari visible bounce path or the safer vertical-only behavior after the needed change.

Maintainer options:

  1. Make root suppression vertical-only (recommended)
    Change the global root rule to overscroll-behavior-y: none or an equivalent y-axis-only rule, then refresh proof for vertical bounce suppression without horizontal behavior changes.
  2. Accept full-axis root locking
    Maintainers can intentionally accept disabling both root axes in browser contexts, but the PR should state that product choice and provide proof for the affected browser navigation behavior.

Next step before merge

  • [P1] The code repair is narrow, but the PR needs contributor-visible behavior proof and currently carries a protected maintainer label, so this should stay in human review/update rather than cleanup close or repair dispatch.

Security
Cleared: The diff is CSS-only and does not touch dependencies, workflows, secrets, install scripts, or code execution paths.

Review findings

  • [P2] Limit root overscroll suppression to Y — ui/src/styles/base.css:505
Review details

Best possible solution:

Keep the root app-shell fix, but suppress only vertical root overscroll globally and add real non-standalone browser or Mac app proof showing the root no longer bounces while inner scrollers and horizontal navigation remain intact.

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

Yes for the CSS root-scroller condition: current main leaves non-standalone html, body at default overscroll behavior and the PR body reports a before/after computed-style probe. I did not see live WKWebView/Safari visual proof of the rubber-band path in this review.

Is this the best way to solve the issue?

No as written. Moving the rule to the root is the right layer for the app shell, but the shorthand is broader than the vertical failure and should be narrowed to the y-axis.

Full review comments:

  • [P2] Limit root overscroll suppression to Y — ui/src/styles/base.css:505
    This global shorthand sets both overscroll-behavior-x and overscroll-behavior-y to none. The reported failure is vertical root rubber-band bounce, while this app still uses browser history routes; use overscroll-behavior-y: none or equivalent so horizontal browser navigation/default behavior is not changed for non-standalone users.
    Confidence: 0.84

Overall correctness: patch is incorrect
Overall confidence: 0.84

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded Control UI bugfix with a normal-priority merge-blocking browser-behavior risk.
  • merge-risk: 🚨 compatibility: Merging as written could change existing non-standalone browser root gesture/navigation behavior outside the reported vertical bounce path.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body includes useful Playwright mock-gateway computed-style output, but external PR proof still needs a real non-standalone browser or Mac app demonstration after the axis narrowing, with private details redacted. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +3. Total +3 across 1 file.

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

What I checked:

  • Repository policy read: Root AGENTS.md and scoped ui/AGENTS.md were read fully; the review applied OpenClaw's read-beyond-diff, PR proof, protected-label, and UI-scope guidance. (AGENTS.md:1, 1b84316a91dc)
  • Live PR state: Live GitHub data shows the PR is open, mergeable/clean, labeled maintainer, and changes only ui/src/styles/base.css at head 9e5dca3b03659007a0c93bbedad41f424c100ab5. (9e5dca3b0365)
  • Current main behavior: Current main gives global html, body only height: 100%; overscroll-behavior: none remains scoped to @media (display-mode: standalone), so non-standalone Safari/WKWebView contexts retain default root overscroll behavior. (ui/src/styles/base.css:499, 1b84316a91dc)
  • Proposed change: The PR head adds overscroll-behavior: none to global html, body and removes it from the standalone-only block, which applies the shorthand outside standalone mode. (ui/src/styles/base.css:505, 9e5dca3b0365)
  • Shell scroll ownership: The Control UI shell is a fixed viewport grid with overflow: hidden, while .chat-thread owns vertical scrolling via overflow-y: auto, supporting the root-scroller fix location. (ui/src/styles/layout.css:13, 1b84316a91dc)
  • Browser history surface: The Control UI registers popstate and updates routes with history.pushState, so changing horizontal root overscroll behavior can affect normal browser navigation gestures in non-standalone contexts. (ui/src/ui/app-settings.ts:698, 1b84316a91dc)

Likely related people:

  • steipete: GitHub history shows steipete introduced the expanded Control UI dashboard and recently changed base.css and shell/sidebar styling in the same area. (role: introduced app-shell behavior and recent area contributor; confidence: high; commits: 6ff837125475, bb724436150e; files: ui/src/styles/base.css, ui/src/styles/layout.css, ui/src/ui/app.ts)
  • BunsDev: GitHub path history shows substantial dashboard-v2, base-style, layout, and chat-scroll work across the Control UI shell and chat surfaces. (role: dashboard-v2 UI area contributor; confidence: high; commits: f76a3c5225bb, a710366e9ece, 098b72910dea; files: ui/src/styles/base.css, ui/src/styles/layout.css, ui/src/styles/chat/layout.css)
  • kvncrw: GitHub history shows kvncrw authored the iOS standalone viewport containment change that added the existing standalone-only overscroll-behavior rule in base.css. (role: introduced related standalone viewport containment; confidence: medium; commits: d22da8712662; files: ui/src/styles/base.css)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@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: 9e5dca3b03

ℹ️ 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/styles/base.css
/* App shell: inner panes scroll, the root never should. Without this the
macOS WKWebView (Mac app) and Safari rubber-band the whole window, even
when nothing overflows. */
overscroll-behavior: none;

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 Limit root overscroll suppression to the Y axis

In regular browser contexts, this shorthand sets both overscroll-behavior-x and overscroll-behavior-y to none; MDN documents that the shorthand applies to both axes and that non-default root overscroll handling disables native browser navigation such as horizontal swipe history. The Control UI does use browser history for tab routes (pushState/popstate), so users who open it in Safari/Chrome/Edge/Firefox and navigate between tabs can lose trackpad/swipe back-forward gestures even though the bug being fixed is only vertical rubber-band bounce. Use a Y-only rule such as overscroll-behavior-y: none to preserve horizontal history navigation.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 4, 2026
@steipete

steipete commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Landing note (process transparency): this went through scripts/pr review-init / review-artifacts-init / review-validate-artifacts (structured review: READY, no findings), but the local prepare-gates lane on this machine failed three times for reasons fully disjoint from this 4-line CSS diff:

  1. First full run: 12 shards red — mostly 120s timeouts and temp-file races while the host was under heavy parallel load (browser suites, screenshot rendering, a second review model). Classic load flakes.
  2. extensions/codex/src/app-server/session-history.test.ts fails 3/4 on pristine origin/main (cafbd745c1b, detached, Node 24.16 and 25.8, scratch HOME): the mirrored-history reader returns structured [{type:"text",...}] assistant content where the test expects a plain string. Main CI (Linux) is green, so this is a local/mac-environment red — tracked in the follow-up issue.
  3. Gate rerun then failed earlier still, in pnpm check, on TS2307: Cannot find module '@modelcontextprotocol/sdk/validation/types.js' in src/agents/agent-bundle-mcp-runtime.ts — untouched by this PR.

Per the gate's own baseline-noise protocol, documenting and landing on hosted evidence instead: all 52 CI checks are green on the exact head 9e5dca3, and the scoped proof for the change itself is in the PR body (computed-style probe: main = auto/auto bounces, head = none/none).

@steipete
steipete merged commit a07b4be into main Jul 4, 2026
134 of 146 checks passed
@steipete
steipete deleted the fix/control-ui-root-overscroll branch July 4, 2026 06:39
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 4, 2026
…eb view (openclaw#99830)

The Control UI is an app shell: inner panes scroll, the root never should. macOS WKWebView (Mac app dashboard window) and desktop Safari still rubber-band the root scroller, so the whole UI bounced up and down whenever content fit the viewport. Apply overscroll-behavior: none to html/body globally instead of only in standalone PWA mode, and drop the now-redundant standalone-mode declaration.
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 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: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant