Repository navigation
Conversation
Source-only pick of the six perf commits in #29596, to test whether several long streaming chats become usable in Safari: - keep mobile dropdown variables off the root on desktop - scroll markdown code blocks natively - avoid descendant :focus-within selectors - stop loading monaco on every page - re-lex only the tail of a streaming message - find the grapheme boundary without a full walk The compare route and the chatbench stack are left out. One import line in Response.tsx differs because this branch still uses ComponentPropsWithRef.
1540758 to
f6c1b3f
Compare
1e73a6f to
9a327e5
Compare
dbcf27b to
be95b4c
Compare
This comment has been minimized.
This comment has been minimized.
Codex Review SummaryThis 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. |
fb89841 to
199f727
Compare
This comment has been minimized.
This comment has been minimized.
a575160 to
215a10c
Compare
9a948d2 to
41ecbf8
Compare
--type-prefill and --type-chars fill the composer and then type filler text one key at a time, so it grows line by line. On main each growth changes the composer's mobile dropdown variables on <html>; the #29596 numbers for that case come from these flags.
…at caused them wrap-summary.mjs recomputes the #29596 wrapping table from results.json: the slowest keystroke before each growth, the other keystrokes' p50 and the <html> style mutation records, all within the typing window.
This comment has been minimized.
This comment has been minimized.
|
Chat: Review posted | View chat Review historydeep-review v0.13.0 | Round 3 | Last posted: Round 3, 24 findings (7 P2, 7 P3, 7 P4, 3 Nit), APPROVE. Review Finding inventoryFinding inventory: PR #29596Findings
Contested and acknowledgedCRF-4 (Note, AttachmentBlocks.tsx:190) - peer-focus-within selector cost unmeasured
CRF-6 (P3, vite.config.mts:79) - monaco focus-within CSS returns to /agents after a monaco page
CRF-14 (P2, Response.stories.tsx:107) - modified comment restates the waitFor lookup
CRF-26 (Note, SmoothText.ts:346) - segment(text) passes the whole text to ICU each frame
Round logRound 1Netero first pass: 1 P3, 1 P4, 1 Nit, 1 Note; no P0, panel proceeded. Full panel (round 1): ging-ts, ging-react, nami, killua (specialists), pariston, mafuuu (core), bisky (tests changed), gon, leorio (once-per-PR floor), razor (wildcard). Size 9 + wildcard exceeds the focused target of 6-8 because the four triggered specialists, two core, Bisky and the Gon/Leorio floor are all required. Panel: 1 P2 behavior, 6 P2 comment quality (Gon rubric), 6 P3, 6 P4, 2 Nit, 2 Note, 6 out of scope. CRF-5 fix proposals conflict: monaco-only (Pariston, Mafuuu) moves React into emoji-mart and preloads 559 KB on every page per Nami and Razor builds; posted the two variants Nami and Razor verified. CRF-6 rated P3 over Razor's Note (higher wins). Killua's SmoothText.ts:346 item reclassified from out of scope to Note (body) because the PR changes those lines. Reviewed against 5a1a059..be95b4c. Round 2PR split into a five-PR stack; this PR now changes only Round 3Fix round (one commit, d521894, test file only; no files added or moved, no signature or goal change). Churn guard PROCEED: CRF-35 addressed, CRF-4 deferred (CODAGT-1081). Netero: no findings. Panel: gon, bisky, leorio (raised CRF-35), ging-ts, ging-react, nami ( About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
This comment has been minimized.
This comment has been minimized.
|
@codex review
|
|
Codex Review: Didn't find any major issues. Hooray! 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". |
There was a problem hiding this comment.
This PR runs the AgentChatInput effect that writes the five --mobile-dropdown-* variables on <html> only below md. No new findings; the desktop test now stubs the below-md query itself and fails without the isBelowMd guard.
Out of scope (needs a ticket or explicit acceptance by a human), unchanged from the previous review:
site/src/pages/AgentsPage/components/AgentChatInput.tsx:924: below md, eachinput,keyupandselectionchangeevent still runsupdate()six times, each with twogetBoundingClientRectcalls.site/src/index.css:323: themobile-full-width-dropdown*utilities hard-code767pxseparately frombelowMdViewportMediaQueryinsite/src/utils/mobile.ts:19, and theisBelowMdguard is correct only while the two match.site/src/pages/AgentsPage/components/AgentChatInput.tsx:1634: the plus menu readsisBelowMdViewport()without subscribing, so it does not switch layout when the viewport crosses md until something else re-renders it.
Notes:
- Commit 9a0799b: its body still says the variables are written only when the value on
<html>differs, which b063958 removed. This matters only if the branch is merged without squashing.
🤖 This review was automatically generated with Coder Agents.
d521894 to
4302e8a
Compare
--type-prefill and --type-chars fill the composer and then type filler text one key at a time, so it grows line by line. On main each growth changes the composer's mobile dropdown variables on <html>; the #29596 numbers for that case come from these flags.
…at caused them wrap-summary.mjs recomputes the #29596 wrapping table from results.json: the slowest keystroke before each growth, the other keystrokes' p50 and the <html> style mutation records, all within the typing window.
4302e8a to
931f7d7
Compare
--type-prefill and --type-chars fill the composer and then type filler text one key at a time, so it grows line by line. On main each growth changes the composer's mobile dropdown variables on <html>; the #29596 numbers for that case come from these flags.
…at caused them wrap-summary.mjs recomputes the #29596 wrapping table from results.json: the slowest keystroke before each growth, the other keystrokes' p50 and the <html> style mutation records, all within the typing window.
931f7d7 to
1a186e9
Compare
--type-prefill and --type-chars fill the composer and then type filler text one key at a time, so it grows line by line. On main each growth changes the composer's mobile dropdown variables on <html>; the #29596 numbers for that case come from these flags.
…at caused them wrap-summary.mjs recomputes the #29596 wrapping table from results.json: the slowest keystroke before each growth, the other keystrokes' p50 and the <html> style mutation records, all within the typing window.
1a186e9 to
c39457b
Compare
AgentChatInput wrote the --mobile-dropdown-* custom properties on <html> on every focus and keystroke at every viewport width, and a custom property change on the root restyles every element. Only the below-md dropdown utilities read them, so write them only below md, and only when the value on <html> differs.
…n test for what it checks
… of a changed dropdown variable
…check Chromium, WebKit and Firefox already skip a setProperty that sets the value an element's style holds: on a 60k-element page it queued no mutation record and took 0 ms, against 25 to 141 ms for a changed value. The check and its test covered behavior the browser provides.
… one helper The below-md stub was a copy of stubViewport with another query and one caller, and stubViewport already takes the query, so the caller uses it.
…the root variable test The test relied on the matchMedia stub in site/test/setup/polyfills.ts, which matches no query, and its comment credited jsdom with it. It now stubs the below-md query to false, as the below-md test stubs it to true.
c39457b to
841242b
Compare
--type-prefill and --type-chars fill the composer and then type filler text one key at a time, so it grows line by line. On main each growth changes the composer's mobile dropdown variables on <html>; the #29596 numbers for that case come from these flags.
…at caused them wrap-summary.mjs recomputes the #29596 wrapping table from results.json: the slowest keystroke before each growth, the other keystrokes' p50 and the <html> style mutation records, all within the typing window.
Base:
main. First of a stack; #31365, #31366, #31367 and #31572 follow.useChatDropdownPosition, which both chat composers use, sets five--mobile-dropdown-*properties on<html>from an effect that re-reads the composer's position on focus, input, selection, scroll and resize, at every width. Only below-mdutilities read them, and a changed custom property on the root restyles every element. Browsers skip a write of an equal value, so onmainthe root restyles each time a value changes, for example when the composer grows by a line.This PR runs the effect only below
md, where dropdown positioning is unchanged.#31278 bench (a tool, not for merging) on production builds of
f348cd66d7(this PR's base onmainthen) and the pre-rebase version ofaf7b2c7b4a(this PR; later commits change only tests), one chat with 72k nodes at 1800 px, 3 alternating runs per side:mainOther keystrokes and focusing the composer did not change beyond noise.
Run details
Each run types 560 characters after 340 prefilled ones, so the composer grows by a line 6 times in Chromium and 5 in WebKit. Each wrap cell gives min to max over the wrapping keystrokes of all 3 runs.
main