Repository navigation
perf(ui): bound model picker work and isolate Cron input painting - #184856
Conversation
|
🦞👀 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: needs changes before merge. What this changesThis PR bounds large model-picker rendering, reduces Chat search copying, and isolates Cron input and row painting. Example: Open Models settings with 1,000 available models.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this useful maintainer-authored performance PR open; fix the new lazy-import failure path before merging and retain the author's draft gate. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe Control UI turns model catalogs and Cron snapshots into searchable controls and tables; existing owners still validate selections, issue requests, and persist configuration. flowchart LR
Catalog[Model catalog] --> Picker[Shared picker]
Picker --> Window[Lazy virtual window]
Picker --> Menu[Menu navigation owner]
Menu --> Commit[Existing selection and config owners]
Cron[Cron state owner] --> Presentation[Cron presentation]
Presentation --> Paint[Search and table painting]
Technical reviewBest possible solution: Keep the bounded rendering design and give its lazy window a local recovery surface using the existing import and guarded-reload owners. Do we have a high-confidence way to reproduce the issue? Current-main source mounts the complete flat catalog, and the supplied production-renderer measurements exercise that cost; this read-only review ran no target code. Is this the best way to solve the issue? The design reuses existing selection, navigation, geometry, and persistence owners, but the added lazy rendering boundary needs the same visible recovery contract as other lazy UI surfaces. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e923309c2978. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +378, Tests +140, Other +127. Total +645 across 16 files. Added test files: 0. View PR surface stats
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 October 26, 2026, 2:05 PM ET / 18:05 UTC. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd2250e8fe
ℹ️ 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".
Install the shared preload observer before navigating every reconnect fixture page. The real reconnect smoke fails during warmup before this change and completes transport drop/recovery afterward, retaining the unsent draft.
Keep the strong provider-picker and Cron wins while preserving main’s existing lean chat search. Integrated chat task gains were about two percent, with an unresolved navigation tail in the candidate. Restoring the two chat files removes that low-value scope instead of expanding timing runs.
|
Merged via squash auto-merge.
|
…enclaw#184856) * perf(ui): bound model picker rendering and defer idle cron work * test(ui): settle background work before sidebar timing * test(ui): settle navigation preloads before interaction timing * style(ui): format integrated picker search helper * fix(ui): initialize reconnect benchmark preload observer Install the shared preload observer before navigating every reconnect fixture page. The real reconnect smoke fails during warmup before this change and completes transport drop/recovery afterward, retaining the unsent draft. * perf(ui): drop marginal chat search allocation change Keep the strong provider-picker and Cron wins while preserving main’s existing lean chat search. Integrated chat task gains were about two percent, with an unresolved navigation tail in the candidate. Restoring the two chat files removes that low-value scope instead of expanding timing runs.
What problem this solves
Large Model Providers catalogs render every option when opening/searching a picker, and Cron input edits repaint a large jobs table. This makes routine controls expensive on slower CPUs.
Result and implementation
Large flat Model Providers pickers use a lazy virtual window over matching rows. The existing menu machine still owns full-catalog keyboard selection; virtual-core owns geometry. An inert, bounded sizing layer preserves max-content width for offscreen labels/details. Catalogs above 32 distinct sizing groups retain ordinary rendering to preserve the actual label/detail layout.
Cron observes model suggestions only while the editor needs them and scopes row/search painting. Catalog, request and mutation owners stay unchanged. No new dependency, route, host tag, existing class rename or startup import boundary change.
The proposed chat property-copy optimization was removed: integrated task gains were about 2%, and its desktop-navigation script p95 remained uncertain. Both chat files now exactly match the pinned main base, preserving main's independently landed lean search presentation. The final diff contains no chat source changes.
Performance evidence
Twenty serial counterbalanced base/head/base triples per workload/viewport, actual renderer thread CPU and identical-build A/A controls. Host load 14.97–43.95. The table is the retained provider/Cron subset of the original 720/720 passing combined-candidate cells at base 91fa755. Those runtime owners are unchanged by the later integration and chat removal; no discarded chat improvement is claimed.
Exact-width sizing adds layout CPU (~14→27 ms combined) while reducing total provider open/search CPU (~300→100 ms). Cron pending desktop style CPU rises about 0.12 ms while total CPU improves. The ≤60 ms Cron native input-task target was already met by baseline: all 24 retained base/candidate/control typing traces stayed below 31.2 ms per renderer task. Candidate input-owning tasks peaked at 3.765 ms CPU / 3.825 ms elapsed, versus 30.529 / 30.606 ms across baseline traces. This is native task occupancy, not per-key async settlement or INP; the full 20-character query improvement is separate. These synthetic renderer workloads use 1,000 models, 1,000 sessions, 400-message transcripts and 500 Cron jobs; 20-character typing totals are not per-keystroke latency, INP, or live-provider timing.
Integration confirmation used exact clean base a4b60a5/head fd2250e bundles: 600/600 untraced cells plus 3/3 diagnostic profiles passed their behavior assertions. Desktop Cron task 121.740/146.134→103.082/112.761 ms and script 33.064/35.846→30.089/32.371 ms. Request-count outliers remain in all roles. Mobile sidebar returned within band; mobile 4× scroll/search/palette small tail shifts and A/A variation are retained in the task report, not flattened into a blanket no-regression claim.
The discarded chat candidate's desktop 4× navigation script median/p95 73.467/82.597→75.515/95.687 ms remains unresolved for that candidate. Profiles show the same 20 key handlers, 80 delegated events and 22 Solid flushes, with no execution in any retained changed owner. The two chat source changes were removed instead of adding timing runs. The prepared 30-cell extension never started. Full 26-scenario census coverage is 156/156 at 1× and 156/156 at 4×; those screening samples are not stable timing estimates.
Correctness and checks
--smokefailed before transport drop; registering the existing observer before navigation makes the same smoke complete restoration and preserve the unsent draft.ci:fullremains enabled; the final head's CI is pending. Prior e40994c CI is prior-head evidence. Earlier fd2250e CI failed only the exact PDF preview/download test also failing scheduled main 40380874869; no failed run is labeled green.Change size
16 files versus pinned integration base: total LOC 10,684→11,403 (+719); production TS/TSX 2,867→3,224 (+357). Growth implements the lazy window, exact sizing, complete keyboard navigation and proof. Effects 1→1; memos 50→53; signals 9→10; settled callbacks 6→7. Render effects, direct listeners, DOM queries, flush and owner APIs remain 0 in changed production code. One existing untrack remains.
Visual proof