Repository navigation
perf(ui): load Cron without the transcript runtime - #194165
Conversation
Keep Chat history processing and the earlier-history renderer out of the first Cron visit. Load the shared transcript runtime on demand and recheck the active scope before applying its result. Move the Cron-only pagination helper into that runtime.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
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. |
|
Codex review: needs changes before merge. What this changesThis PR defers Cron transcript preparation and history controls until a run transcript is opened. Example: Open Automations before selecting View transcript.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 3 items remain Keep open: this maintainer-authored PR provides a useful, focused performance improvement, but two deterministic CI defects need repair before landing. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI loads Cron through its route bundle; selecting a recorded run requests cron.history, prepares its messages, and renders the shared Chat transcript components. flowchart LR
A[Automations route] --> B[Cron run owner]
B --> C[Gateway cron history]
C --> B
B --> D[Lazy transcript runtime]
D --> E[Prepared messages]
E --> F[Transcript view]
Technical reviewBest possible solution: Keep the existing Cron owner and lazy runtime, repair the focused CI defects, and complete the already-declared budget integration before landing. Do we have a high-confidence way to reproduce the issue? Current main's eager imports establish the unnecessary dependency path, and the supplied production-browser measurements quantify its cost; this read-only review ran no reproduction. Is this the best way to solve the issue? The invariant is that opening Automations must not require transcript processing; moving existing preparation and its sole-caller pagination helper behind one Cron-owned import is the smallest complete fix. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 53068bcab3a6. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +16, Tests +6, Other +2. Total +24 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 6, 2026, 9:31 AM ET / 14:31 UTC. |
…-perf-firefox-1106
|
Merged via squash auto-merge.
|
* perf(ui): defer cron transcript runtime until requested Keep Chat history processing and the earlier-history renderer out of the first Cron visit. Load the shared transcript runtime on demand and recheck the active scope before applying its result. Move the Cron-only pagination helper into that runtime. * test(ui): make cron transcript recovery proof deterministic * build(ui): ratchet Cron boot budgets after paydown
What Problem This Solves
Cron first visits loaded Chat's transcript runtime before any run transcript was opened.
User Impact
Cron becomes ready faster in all three engines, with the same controls, layout, pagination, and focus behavior. First visit removes three JavaScript requests, one stylesheet request, and 1,461,705 decoded JavaScript bytes.
Why This Change Was Made
Keep transcript preparation and the earlier-history renderer behind one Cron-owned lazy runtime. The existing run owner retains request and error state, and rechecks its scope after the import. Move the sole-caller pagination helper into that runtime and remove its eager chunk assignment.
This revises the earlier Cron conclusion from W-PERF-READINESS-REGRESSIONS and W-PERF-LATE-STYLESHEETS: the remaining first-visit cost was reducible through this accidental eager Chat dependency.
Evidence
Acceptance: at least 5% target median improvement; 20 rotated base/head/identical-base triplets in each engine and viewport, with no p95 regression. Production bundles and the committed synthetic Gateway workload, headless browsers, localhost. Application readiness is page-local, including WebKit. All 360 observations passed. Host load (1 minute): 7.51–12.78, median 9.75. Baseline for these timings:
5c31034348323a894bf0f50822459ae77e2dc003.Ready-window work: JavaScript requests 32 → 29; CSS requests 7 → 6; decoded JavaScript 2,056,639 → 594,934 B.
The campaign coordinator explicitly accepted the original 87 B normalized-gzip trade from the shorter Cron preload list and requested integration of #194135, then caps at the measured head plus 64 B. After that integration, the measured increase is only 4 B; no padding, arbitrary sorting, or third cap change was added. The two caps are now 1,287,916 B for Chat and 796,969 B for New Session, both lower than the landed paydown caps.
Final paired builds use main
73005a14b8c2c68565e7a8abfffa6834a160a5f2and this branch on the same Mac/Node 26.12.1 toolchain, with 13 byte-identical plugin input files. The cap-only edit does not change those runtime bundles.The strict paired check passes with zero violations. The base's standalone strict check reports total CSS raw above its 1,675,382 B cap; the head has exactly the same bytes. That cap stays unchanged. Startup and every other cap stay unchanged. Chat/New requests remain 20/15.
Checks completed: UI typecheck; UI-pages test type leaf; chunking tests 9/9; scoped lint/format and diff check; production Knip. Independent full-context Codex P0–P2 review and cap review found no actionable issue. Targeted browser proof covers opening, earlier-page loading, retaining the later message, close-to-trigger focus, and import failure regression coverage. The first selected CI run exposed an overstated test-line allocation and two test assumptions: concurrent loaders can show two statuses, and a shared chunk can retry within one document. The repair uses the existing first-document failure fixture and preserves the global recovery owner. The seven-case E2E file passed locally (20.03 s), and the persistent history-import failure case passed again with no extra production recovery code (13.11 s invocation; 1.58 s case). Independent review of the repair was clean. Full CI passed on the exact landed head
cc01d351ed1a0850cf3fd1b7e1b29f821fcac2b7: run 42246536847, 43 jobs passed and 25 skipped, with no failures or cancellations. Landed as21cd90050fb6b8389cc5c8b81a1ee40230aba901.Production LOC across changed files: 1,803 → 1,819 (+16), including the unchanged-length budget checker; behavioral/chunking tests +6; test-line allocation +2. No new effects, signals, cleanup hooks, subscriptions, DOM queries, or synchronized state. One new lazy boundary and one guarded import.
Both synthetic before/after screenshot pairs were inspected and are byte-identical.