Repository navigation
perf(web-ui): blur the transcript only near the viewport in wallpaper mode - #1109
Conversation
… mode With a wallpaper set, every message bubble carries backdrop-filter. WebKit keeps the backing stores of backdrop-filter layers that were composited during fast scrolling or streaming, so the page's graphics memory grew with the rows scrolled past: about 420 MB after a fast pass over a 1650-seat Thread, against about 255 MB with the blur removed. Each conversation scrollport now shares one IntersectionObserver (rootMargin 100% 0px) that marks top-level rows within one scrollport height of the visible transcript. The blur rules for bubbles, expanded reasoning headers and the pinned compaction toggle drop the filter on unmarked rows. Rows mount marked, so a row that appears in view is blurred on its first paint, and a transcript outside a shared scrollport keeps every row marked.
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. |
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40db7a9bc1
ℹ️ 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".
| { root: scrollport, rootMargin: "100% 0px" }, | ||
| ); | ||
| observers.set(scrollport, observer); | ||
| } |
There was a problem hiding this comment.
Size the vertical observer margin from scrollport height
IntersectionObserver resolves percentage rootMargin values against the root's width, not the corresponding axis, so "100% 0px" is not one scrollport height. On a portrait phone, for example, rows lose their blur only one screen-width away and can enter the viewport during a fast screen-height scroll before being remarked; on a wide desktop it retains blur much farther than intended. Use a pixel margin derived from scrollport.clientHeight and refresh it when the scrollport resizes.
Useful? React with 👍 / 👎.
|
已在隔离 Web 环境下完成 Chrome 与 Playwright WebKit 双端 36 轮长对话壁纸模式实测:实证实测截断线精准贴合容器高度(0.99×H–1.06×H,非宽度),视口内与近区气泡/展开过程分组/吸顶思考行在滚动与瞬时远跳后均正常保持毛玻璃,远处行已降至 backdrop-filter: none,全程 0 业务报错,已合入 main。 |
Summary
backdrop-filter. WebKit keeps the backing stores of backdrop-filter layers that were composited during fast scrolling or streaming, so the page process's graphics memory grows with the rows scrolled past instead of with what is on screen.IntersectionObserver(rootMargin: "100% 0px"). It marks top-level transcript rows within one scrollport height of the visible area withdata-chat-near-viewport. The blur rules for bubbles, expanded reasoning headers and the pinned compaction toggle drop the filter on unmarked rows, which are at least one screen away from view.docs/product/standalone-web.mddescribes the rule.Measurements
Real page, on an isolated instance, with one native Codex Thread: 1650 Seats, 619 top-level rows, 86 user bubbles, about 50,000 px tall. Each reading comes from a fresh WebKit process: wallpaper on, full history loaded, then one fast pass (30 ms per screen, bottom to top to bottom), parked mid-page, 10 s settle. "Runs" counts such fresh runs.
footprintfigures in MB.totalis noisy: WebKit malloc briefly spikes above 1.3 GB after scrolling and falls back within 30 s, before and after. Graphics is the reliable column.Known limits
Related issues
N/A
UI Demo
No visual changes: bubbles, reasoning headers and the compaction toggle in or within one screen of the viewport keep exactly the same blur, and only rows at least one screen out of view lose it.
backdrop-filter; blur on and off snapshots were byte-identical.Test plan
prettier --checkon the changed files and the doc: passed.ui-chat, and the logic depends on the DOM andIntersectionObserver, so no test was added. The roottsc -band ESLint do not coverapps/web-ui.main; the rebase was clean and nothing was re-measured.