Repository navigation
Conversation
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, 5 findings (3 P3, 2 P4), APPROVE. Review Finding inventoryFindings
Contested and acknowledgedCRF-10 (P4, site/vite.config.mts:76) - Comment omits why groups were deleted instead of using includeDependenciesRecursively: false
CRF-1 (P3, site/vite.config.mts:76) - No check fails when a lazy library returns to the up-front chunks
CRF-4 (P3, site/vite.config.mts:79) - Monaco stylesheet stays applied after any template editor visit
CRF-1 panel closure
Round logRound 1Netero: 1 P3, 1 Note. No P0, panel proceeds. Law not run (effective additions 4). Round 2Churn guard PROCEED: CRF-3, CRF-5 addressed; CRF-4 acknowledged; CRF-1 contested. Fix round (only the comment above Round 3No new commits (head d18c1b2). Churn guard PROCEED: CRF-10 contested. Fix round. Netero (new agent): no findings. Panel: leorio (reused R2 agent faafee21, dispute check-in on CRF-10), pariston, mafuuu (core, to reach 3), wildcard zoro (random). No files changed since the last panel round, so no domain specialists triggered. About deep-reviewCRF = Coder Review Finding (P0-P4, Nit, Note)
|
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. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
This PR deletes the monaco, xterm and emoji-mart codeSplitting groups so index.html no longer loads monaco's chunk and stylesheet up front. Findings: 3 P3, 1 P4. Production builds of the head reproduced the description's 2,794,832 bytes of up-front JS and found no static import cycle.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/pages/AgentsPage/AgentChatPage/AgentChatPageView.tsx:50:TerminalPanelis imported statically, so every agent chat page load downloads and parses the 539,398-byteWorkspaceTerminalAlerts-*.jschunk that contains xterm, even when no terminal tab opens. The base build had the same static edge.
Notes:
site/vite.config.mts:79: the remainingradix-uigroup also captures React (assets/radix-ui-*.jscontains React'sreact.forward_refandreact.lazysymbols). This is harmless because every page loads radix-ui, but the comment does not say why this group is allowed.site/vite.config.mts:79: without the monaco group, monaco's language modes (hcl,cpp,tsMode, and about 80 others) are separate chunks that load when a file of that language opens, instead of being part of one 4,200,212-byte chunk.
🤖 This review was automatically generated with Coder Agents.
| { name: "emoji-mart", test: /emoji-mart/ }, | ||
| { name: "radix-ui", test: /radix-ui/ }, | ||
| ], | ||
| // No groups for lazily loaded libraries (monaco, xterm, emoji-mart): a |
There was a problem hiding this comment.
P3 [CRF-1] No build check or test fails when monaco, xterm or emoji-mart goes back into the chunks index.html loads up front. (Netero)
The monaco group added in #23485 put 4.2 MB on every page and CI passed, and the only guard against a repeat is this comment. git grep finds no script or test that reads site/out/index.html or checks chunk contents. Add a post-build check that fails when a chunk index.html references contains monaco-editor, @xterm or emoji-mart code.
🤖
There was a problem hiding this comment.
I left this out: a check that reads site/out after the build is new CI tooling, and this PR only deletes the groups. The comment above groups states why a lazily loaded library must not get one.
🤖 Posted using
/amend-reviewskill via Coder Agents.
There was a problem hiding this comment.
Accepted: the repository has no check that reads build output, and this PR adds no code path a test could cover. Moved to the review body as out of scope for a human to file or accept.
🤖
| // No groups for lazily loaded libraries (monaco, xterm, emoji-mart): a | ||
| // group also takes every module they import, so a monaco group would | ||
| // take React and make every page load monaco. | ||
| groups: [{ name: "radix-ui", test: /radix-ui/ }], |
There was a problem hiding this comment.
P3 [CRF-4] After a user opens a template files, version or editor page, the tab keeps monaco's stylesheet until reload, so the WebKit focus cost may come back for the rest of that tab's life. (Killua)
The head's editor-Br_kD0ds.css has the same content hash as the base's monaco-Br_kD0ds.css (145,989 bytes, 4 :focus-within descendant rules), and the description states Vite does not remove it. The bench compared the whole monaco chunk, so how much of the 330 ms WebKit difference comes from these 4 rules is unverified. Run the #31278 WebKit bench after loading a template files page in the same tab; if the cost returns, either scope or remove those rules in this PR, or a human needs to file a ticket or accept the gap.
🤖
There was a problem hiding this comment.
The cost does return: on an earlier 60k-node page, deleting monaco's 4 rules after the 3 attachment rules cut WebKit idle focus from 145 to 12 ms. On main every tab pays it from the first page; this PR leaves it only in tabs that opened a monaco page, as the description states, and scoping monaco's rules is a separate change.
🤖 Posted using
/amend-reviewskill via Coder Agents.
There was a problem hiding this comment.
Accepted: this PR reduces which tabs pay the cost and adds none. The remaining cost comes from monaco's stylesheet, which this diff does not change, so it is in the review body as out of scope for a human to file or accept.
🤖
0481c20 to
c27ea03
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
The new comment above groups is accurate. Builds of the head with a narrowed monaco group placed after radix-ui still preload the 4,178,496-byte monaco-*.js, and an emoji-mart group after radix-ui stays lazy. Findings: 1 P4.
Addressed since round 1: the comment now names the preload helper and the radix-ui ordering condition, and the description cites 4f40017f24 and c27ea03f2c for every measurement. The build check and monaco's stylesheet are accepted for this PR and listed below.
Out of scope (needs a ticket or explicit acceptance by a human):
site/package.json:16: no script or CI job reads the build output, so a futurecodeSplittinggroup that puts a lazily loaded library into the chunksindex.htmlloads up front passes CI, as the monaco group from #23485 did.site/src/components/SyntaxHighlighter/SyntaxHighlighter.tsx:3: importingmonaco-editoradds its stylesheet with 4:focus-withindescendant rules that stay applied until reload, so after a tab opens a template files, version or editor page, WebKit chat focus changes in that tab cost about 130 ms more on a 60k-node page.
🤖 This review was automatically generated with Coder Agents.
| { name: "emoji-mart", test: /emoji-mart/ }, | ||
| { name: "radix-ui", test: /radix-ui/ }, | ||
| ], | ||
| // A group also takes the modules its matches import that no earlier group |
There was a problem hiding this comment.
P4 [CRF-10] Neither this comment nor the PR description says why the lazy groups were deleted instead of kept with includeDependenciesRecursively: false, which 8204a25ee0 tried first. (Leorio)
The reason is only in the body of 169c9cc545, which the squash merge drops. Rolldown 1.2.14 recommends setting strictExecutionOrder: true with that option "to avoid generating invalid chunks" (rolldown/dist/shared/define-config-BLptERXo.d.mts:1228-1233). A developer who wants a stable monaco-*.js name back will reach for that option first. Append one line, for example: // includeDependenciesRecursively: false avoids this, but Rolldown requires strictExecutionOrder with it to avoid invalid chunks.
🤖
There was a problem hiding this comment.
Not added: includeDependenciesRecursively: false also keeps monaco out of the up-front chunks (a build of 8204a25's config loads 2,794,844 bytes up front against this PR's 2,794,832, with no import cycles), so a developer who reaches for it does not bring the regression back. Rolldown's doc comment on that option states the strictExecutionOrder pairing where they would set it.
🤖 Posted using
/amend-reviewskill via Coder Agents.
There was a problem hiding this comment.
Accepted: with your measurement, includeDependenciesRecursively: false keeps monaco lazy, and Rolldown's doc comment on that option states the strictExecutionOrder requirement where a developer sets it.
🤖
|
@codex review
|
|
Codex Review: Didn't find any major issues. Keep it up! 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.
No new commits since round 2, and there are no open findings. The out-of-scope items from rounds 1 and 2 (the missing build-output check, monaco's stylesheet staying applied after a template editor visit, and the static TerminalPanel import on agent chat pages) still need a ticket or explicit acceptance by a human.
🤖 This review was automatically generated with Coder Agents.
6aee4a7 to
35d4a61
Compare
35d4a61 to
13c9108
Compare
158e5ab to
0771b38
Compare
0771b38 to
efb20b8
Compare
Vite 8 codeSplitting.groups include each matched module's imports by default, so the monaco group took React and Vite's preload helper, and every page preloaded the monaco chunk and its stylesheet. Turn that off for the lazily loaded monaco, xterm and emoji-mart groups. The radix-ui group keeps the default, which avoids a radix-ui and Command chunk import cycle.
Deleting the monaco, xterm and emoji-mart groups keeps monaco out of the entry chunk as turning off includeDependenciesRecursively did, with the same initial JS and no chunk import cycles, and without an option that Rolldown pairs with strictExecutionOrder. These libraries no longer get stable vendor chunk names.
A monaco group narrowed so it cannot match React still made index.html load the 4,178,496-byte monaco chunk: the entry imports Vite's preload helper from it.
An xterm group stays lazy: @XTerm imports neither React nor Vite's preload helper, and adding one changes the up-front JS by 17 bytes. An emoji-mart group takes React only when listed ahead of radix-ui; after it, React stays in the radix-ui chunk.
efb20b8 to
eff8991
Compare
Base: #31366 (
perf/chat-focus-within). Fourth of five stacked fixes.Every page imports and executes monaco's 4.5 MB chunk, its stylesheet with 18
A:focus-within Brules, and the 807 KBemoji-pickerchunk. Vite 8codeSplitting.groupsalso take the modules their matches import that no earlier group took: the monaco group, listed first, takes React and Vite's preload helper, which the entry imports, and theemoji-pickergroup (/frimousse|emojibase-data/), listed ahead of radix-ui, takes React's JSX runtime. This PR deletes the monaco, xterm andemoji-pickergroups, soindex.htmlloads neither chunk. The three libraries stay lazy but lose stable vendor chunk names; monaco now ships ineditor.api-*.jsandeditor-*.css.Builds below predate #31663 and have monaco 0.55.1, with 4 such rules. Production builds of the pre-rebase versions of
30d26d37dd(base) andeff8991039(this PR): the JSindex.htmlloads up front falls from 6,987,293 to 2,794,832 bytes without monaco's chunk and stylesheet, and neither build has a static import cycle between chunks.On the pre-rebase version of
eff8991039, the template files, version and editor pages rendered monaco without errors, loaded directly in Chromium and WebKit and after in-app navigation in Chromium. Vite never removes a lazy chunk's stylesheet, so after one of those pages loads, monaco's rules apply until reload.#31278 bench (a tool, not for merging) on the pre-rebase version of
c5a25907e6(base) and this PR on it, before later commits, which keep the selector kinds: 2 long chats, 140k nodes, 3 alternating runs; this measures the whole chunk, not its rules alone, and this PR does not explain the remaining 205 to 242 ms of WebKit focus time.