Repository navigation
Studio: modal opens stop re-laying out long chats in WebKit - #17284
Conversation
…ed hub rule, preset lock overflow)
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ddf3a282e
ℹ️ 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".
| html, body and #root); print keeps document flow. */ | ||
| @media screen { | ||
| body { | ||
| overflow: hidden; |
There was a problem hiding this comment.
Preserve scrolling for browser authentication pages
In a browser viewport shorter than the authentication form (for example, a landscape phone or a zoomed-in window), this permanently disables the only scroll container for /login and /change-password. Those routes use the plain <main> branch in app/routes/__root.tsx, and their page wrappers have a minimum viewport height rather than a bounded height with internal scrolling; the non-Tauri branch of app/provider.tsx adds no scroll container either. Previously the document could scroll when these forms exceeded the viewport, but now their lower fields and submit buttons are clipped and cannot be reached by wheel or touch scrolling. Limit the preset to the internally scrolling app shell, or provide an explicit viewport-bounded scroller for the authentication routes.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in b547db4: at a 1280x360 window the login form is 448px tall and the Login button could not be scrolled to here, while the merge base scrolled the document. The login and change-password main is now its own viewport-height scroller, same as the desktop wrappers.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Problem
On macOS WebKit, opening or closing a menu or dialog still cost far more in a long chat than in a short one (Round 11 real runners: composer menu about 200 to 250 ms at 150 turns against 72 to 100 ms at 1 turn; Settings 390 to 560 ms against 232 to 306 ms). #16902 and #17006 removed the whole-thread restyles that Radix's body
pointer-eventslock caused in Chromium; WebKit still paid for the scroll lock.Cause
Every modal open and close sets or clears
body[data-scroll-locked], and WebKit re-ran style and layout over the whole page for it:hub.cssstill hadbody[data-scroll-locked] .hub-modal-pe-guard. A body attribute before a descendant combinator makes WebKit re-check every element under<body>, every message included. Studio: key the modal pointer-lock rules off attributes that never sit above the thread #17006 removed this pattern fromindex.css, but its test only scannedindex.css.<body>fromoverflow: visible; position: statictohidden; relative, which re-lays out the whole long page in WebKit.WebKit microbenchmark (Playwright WebKit, Mac UA, one lock on and off with a forced style and layout flush, median of 5): 3 ms at 1 turn; 77 to 121 ms at 150 turns on main; 22 to 33 ms with the hub rule removed; 0 ms with the hub rule removed and the body overflow and position preset.
Change
hub.css: the body-keyed rule is removed. Every.hub-modal-pe-guardelement also carriespointer-events-auto, which Studio: key the modal pointer-lock rules off attributes that never sit above the thread #17006's region-keyed rule already sets tononebehind a modal (and the lower-layer rule covers stacked dialogs). Checked in Chromium and WebKit: the guard readsautoat rest,nonewith Settings open andautoafter close, on main and here alike.index.css:@media screen { body { overflow: hidden; position: relative; } }, so the lock changes nothing on<body>. Print keeps document flow. Desktop already setshtml.tauri body { overflow: hidden }. No route scrolls the document itself: on main, every route at 1440x900 and 900x560 has the document's scroll height equal to the viewport (pages scroll their own containers).tests/modal-pointer-lock.test.tsnow scans everysrc/**/*.cssand fails ondata-scroll-locked,aria-hiddenordata-aria-hiddenbefore a combinator (it names the hub rule on main).tests/webkit-modal-page-restyle.test.tspins the screen preset.Results
Real macos-15 Safari WebKit (two runners, main twice as A/A, arms rotated, 3 cycles each), open / close ms at 150 turns, main / main (A/A) / this PR:
Closes improve on almost every surface beyond the A/A spread, and opens do for the composer menu and, with Glass, the model picker and search. Settings and shortcuts opens stay within noise: their cost is mostly the dialog mount. Long chats still cost more than short ones on macOS WebKit (composer menu about 200 ms against 72 to 100 ms at 1 turn); the remaining growth is not from the attribute toggles measured here.
No visible change. Frontend suite 15,326 pass,
tscclean, full long-chat gate passes.