Repository navigation
refactor(ui): simplify retained chat pane composition - #174723
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 consolidates retained chat-pane rendering and lifecycle composition and reuses shared presentation and listener helpers. Example: Display chat with “A retained draft” at 1280×900 and 560×900.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains The previous startup identity finding is fixed, and no new source defect was found; exact-head CI now has catalog-observation failures that still need attribution. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherThe Control UI pane composition consumes synchronous chat runtime facts and Gateway projections, then publishes retained DOM frames and coordinates commit completion, focus, subscriptions, and disposal. flowchart TD
A[Gateway and application owners] --> B[Synchronous chat runtime]
C[Native pane bridge inputs] --> B
B --> D[Pane view composition]
D --> E[Parked render lifecycle]
E --> F[Retained chat DOM]
F --> G[Commit and focus callbacks]
G --> B
Technical reviewBest possible solution: Retain the consolidated composition and resolve the catalog-observation CI attribution before landing. Do we have a high-confidence way to reproduce the issue? This refactor reports no current product bug; source comparison confirms the earlier startup identity defect is repaired, without executing target code. Is this the best way to solve the issue? The consolidation is appropriate because it preserves synchronous runtime authority, removes the intermediate owner, and shares existing presentation behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6395e66c4911. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -21, Tests 0. Total -21 across 10 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 HistoryReview history (1 earlier review cycle)
Reviewed October 16, 2026, 7:32 PM ET / 23:32 UTC (Revision 2). |
|
@clawsweeper re-review The startup progress-scope identity finding is fixed, all eight frame-update browser cases pass, and the final body includes refreshed exact-base build and screenshot proof. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* refactor(ui): simplify retained chat pane composition * refactor(ui): keep composer-owned view cleanup out of pane scope * refactor(ui): remove unused pane reveal option * fix(ui): preserve initial progress projection identity * docs(ui): document retained pane teardown queries * docs(ui): explain retained chat boundary ownership
What Problem This Solves
Retained chat panes still routed Solid publication through an extra owner module, and the board duplicated the embedded panels' presentation listener.
User Impact
Chat keeps its transcript, draft, focus handoff, and parked-panel behavior. Host tags, selectors, and lazy route boundaries stay intact.
Why This Change Was Made
The pane view now owns publication, initial mounting, and disposal in one composition. It consumes the synchronous pane runtime directly, removes the intermediate owner object and frozen prop handoffs, and reads progress-card scope from its owner instead of maintaining a second binding copy. The board shares the pane presentation helper, page listeners use owned teardown, and notice classes use Solid arrays.
Remaining effects synchronize the progress-card watch, browser timer, committed DOM/focus, and Gateway/presentation event streams. The single render effect supplies native bridge inputs before the first pane render. Remaining snapshots, native DOM queries, and domain listeners have explicit ownership comments. The active composer lane's files remain untouched.
The final main integration resolves the
session-prefetch.tsconflict by taking main's owned-listener implementation and boundary comments in full; that file drops out of this PR.Evidence
Final head:
03747c87161a40b77e9745f48b87d2d03077483b. Merge base:b0ab44081ef483fcd0a86c8afae3b4eb30e9bc24.ci:fullrun 38988467031 completed successfully on the final headpnpm tsgo:uipassed after conflict resolutionOne production build per side on the same machine, Node 26.12.0 and pnpm 12.11.1. Both strict checks passed without warnings or violations. Raw startup JS is unchanged at 1,036,482 B across seven requests; startup CSS is 38,666 B gzip in one request. The 7-byte gzip increase remains below the 374,285-byte budget, with no added startup request or eager page import.
The desktop capture fills the draft, waits for fonts and two animation frames, then captures; it does not wait for the 200 ms persistence timer and asynchronous draft-presence projection. All eight inspected badge-pipeline files are identical between the compared commits. Timing is a plausible explanation for the marker difference, not an established cause. This is an accepted capture limitation; no transcript, composer, or layout pixels differ. All four complete images were inspected and contain synthetic data only.
createEffectcreateRenderEffectuntrackflush/ captured Solid ownersProduction delta: −8 lines, including the boundary comments. Test/support delta: no net added lines. The seven controller-pattern matches are native invalidation callbacks in the frame adapter. Remaining queries cross retained pane, transcript, header, suggestion-card, or plugin-composer renderer boundaries; the two raw listeners belong to synchronous domain owners with dispose cleanup. No dependency or ignore changes.
Failure investigation and limits
CI exposed a second startup render caused by seeding the progress projection from a fresh object instead of its scope memo. Seeding it from the memo preserved identity. The existing frame-update browser file reproduced five failures, then passed all eight cases after the repair and again after the earlier main integration.
Historical CI run
38980625929failed six variants ofControl UI metadata observation > shares pending catalog reads across metadata invalidations:single,shared,late follower,late follower without metadata,late follower without metadata, metadata first, andlate follower, catalog first. All six reproduced on its exact main parentbe6eedf5e0d5a081a0e89a1f8a44d3b4fe4f02a8withmodels.listexpected 2, observed 3. Main commit2b3e9726390subsequently corrected these stale expectations and is included in the current base.That historical run also timed out in
Control UI cross-channel automation management with a real Gateway > configured owners and admin chat manage a Telegram-created job while a non-owner cannot, at the line-496 provider-result poll. It remains unclassified. Baseline behavior reached a successful final verdict but failed artifact cleanup. One later two-case invocation at prepared runtime head712fbf2437734982ab979d71eeb63414591c9962passed Gateway replacement (236.768 s); the owner/admin case hit its 240-second outer timeout after bootstrap alone consumed 172.349 s. That local timeout did not reproduce the CI assertion and is not passing proof. A queued Testbox allocation was stopped without executing tests. No further local replay was run. Final exact-head full CI run38988467031completed successfully; that current proof qualified the landing without claiming the historical timeout was fixed by comment changes.Knip attribution: the identical production command exits 1 on both exact commits with output SHA-256
26365230143e4100741f1b597fbea8186d1a227271ae2fe8d272cb11c8b1dac1. All finding-file blobs match:extensions/discord/src/internal/discord.ts,extensions/discord/src/internal/rest.ts,extensions/discord/src/monitor/provider-session.runtime.ts,src/agents/agent-tools.params.ts,src/agents/embedded-agent-runner/run/attempt-stage-timing.ts,src/agents/runtime/internal-hooks.ts, andsrc/commands/doctor-maintenance-foreground.ts.