Repository navigation
perf(ui): load expanded tool details on demand - #174866
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 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 expanded chat tool details and full diff rendering until a tool card is expanded. Example: Open Chat with collapsed exec and file-edit tool rows.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 3 items remain Keep this useful, maintainer-authored performance PR open; repair the widget-menu regression, frozen diff-stat visibility, and affected asynchronous test assertions before merging. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI converts tool-call records into compact transcript rows and expanded details; this change separates eager summaries from dynamically imported detail rendering. flowchart TD
A[Tool call records] --> B[Chat tool rows]
B --> C[Eager summaries and diff counts]
B --> D[Expansion boundary]
D --> E[Lazy detail renderer]
E --> F[Output and full diffs]
Technical reviewBest possible solution: Retain the lazy renderer split while preserving reactive diff-stat visibility, synchronizing widget disclosure labels, and awaiting asynchronous content in affected tests. Do we have a high-confidence way to reproduce the issue? Source establishes both runtime regressions, and exact-head CI independently confirms the widget-label failure; no target code was executed during this read-only review. Is this the best way to solve the issue? Deferring the existing renderer at expansion is a focused performance improvement, but removing the reactive fragment and changing disclosure commit timing require corresponding contract repairs. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4a790aea80ae. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource -2, Tests +64. Total +62 across 10 files. Added test files: 1. View PR surface stats
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 16, 2026, 8:22 PM ET / October 17, 2026, 00:22 UTC. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77ad7551aa
ℹ️ 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".
| <Loading> | ||
| <ExpandedContent {...props} /> |
There was a problem hiding this comment.
Handle lazy detail loading within the tool card
When the detail chunk is slow or fails to load, expanding a card immediately reports it as open while this boundary renders no pending fallback; a rejection then escapes to the application-wide ShellLoader error boundary and replaces the entire workspace. An optional detail action should instead show a local loading state and contain import failures with a card-level error/retry path, including the existing stale-chunk recovery behavior.
AGENTS.md reference: AGENTS.md:L81-L81
Useful? React with 👍 / 👎.
…tails # Conflicts: # ui/config/control-ui-boot-modules.json
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* perf(ui): load expanded tool details on demand * fix(ui): settle deferred tool rendering before observation * test(ui): provide application context for lazy canvas fixtures
What Problem This Solves
Collapsed chat tool rows loaded the full expanded tool and diff renderer to show a summary and change counts.
User Impact
Chat boot downloads 6,455 B less gzip JavaScript and 70 B less gzip CSS, with no extra boot requests. Expanded cards keep the same content, controls, and host tags; their renderer loads on first expansion. Initially expanded cards load it immediately.
Why This Change Was Made
Keep raw-output/status hosts and small diff-stat chips eager; move the full tool renderer behind a local Solid loading boundary. Existing callers and registered tags share that renderer. Separate diff-stat chips from the full diff presentation so collapsed rows do not import it. The raw-output disclosure now uses local Solid state instead of querying and changing its own DOM.
The final simplification removes an unnecessary fragment and an intermediate default-value constant. There are no new owners or dependencies. New Session's small 128 B increase and startup's 98 B increase are import-reference changes from regrouping; both remain within existing budgets.
Evidence
Same machine/toolchain. Gzip totals include build-metadata variance. Comparison merge base:
02d223bd10cfc27c224bdcd25ae96f2ce7728d31; head:da7bece1d71789775dd883fb7aa77105edfa5165.pnpm tsgo:ui: pass.git diff --check: pass.pnpm deadcode:knip: pass.ci:full. No stylesheet or final rendered-content changes; screenshots are not applicable.The existing diff-fetch/highlighter effects and per-file source/presentation lifetimes are unchanged. Diff-panel edits only change its stats import; this PR adds no effect, subscription, or owner capture.
Final-head verification
f4b1617d2a55incorporates current main and regenerates the only conflict, the boot manifest, with the canonical capture tool. Runtime renderers merge cleanly. UI types, production Knip, the production build, and strict performance check pass: startup 340,973 B gzip, chat 1,593,217 B / 30 requests, New Session 1,285,877 B / 27 requests, one startup CSS request, zero violations. These integrated totals include other landed optimizations; the paired table above isolates this renderer change.The widget raw-details menu computes its next label before requesting the queued Solid toggle. Two canvas fixtures now supply a test-owned ApplicationContext while pending imports settle. All 79 message tests pass without unhandled errors, and the 39 targeted correction tests pass. No assertions were removed or weakened.
Full CI run 38993017434 passes every selected UI unit, Control UI E2E, browser-extension, and real-Gateway job. The only failed root job is the mock-export ratchet:
src/cli/update-cli/update-command-service-maintenance-native.test-support.ts:52, mocking./update-command-database-context.js. Latest scheduled main run 38991549274 fails the identical case. The complete update-cli tree, checker, and baseline are byte-identical between the actual CI main parent and tested merge. Landing uses the authorized native inherited-failure route; failed CI is not claimed green.