Repository navigation
refactor(ui): reuse chat panel lifecycle primitives - #176605
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 maintainer review before merge. What this changesThis PR replaces local chat timing, visibility, listener, and geometry machinery with existing shared lifecycle primitives. Example: “Read first” appears at 0 ms and “Read latest” arrives at 800 ms.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a focused, maintainer-directed simplification that preserves the existing lifecycle contracts; no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI chat components consume activity, attachment, presentation, and resize updates and produce retained DOM, menu visibility, media handlers, and widget placement. flowchart TD
A[Chat owner updates] --> B[Solid chat components]
C[Presentation state] --> B
B --> D[Shared lifecycle primitives]
E[Browser media and resize events] --> D
D --> F[Retained DOM and widget placement]
Technical reviewBest possible solution: Use the existing shared primitives while retaining headline cadence, presentation parking, media cleanup, and deferred resize observation. Do we have a high-confidence way to reproduce the issue? This PR claims a refactor rather than a reproduced product bug; source inspection and existing contract tests support its stated scope. Is this the best way to solve the issue? The change follows the smallest complete approach by replacing duplicated lifecycle wiring with existing owners and removing the superseded paths. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a4182c6c1f4a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -63. Total -63 across 5 files. Added test files: 0. 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 18, 2026, 7:28 PM ET / 23:28 UTC. |
|
Merged via squash.
|
What Problem This Solves
Chat headline cadence, attachment scroll indicators, publication menu visibility and widget geometry still carried local effect/listener machinery. The refactor uses the existing shared primitives while preserving retained-panel behavior and resize ordering.
Changes
Derive the readable headline from its previous value and a shared timer cadence; fast activities replace pending copy while failed/blocked activity remains immediate. Use the shared scroll-state and presentation projections. Pair native lightbox media handlers through
listen, and batch widget geometry reads before layout writes through the existing layout scheduler.Evidence
ci:fullruns every UI unit, Control UI E2E, browser-extension and real-Gateway shardcreateEffectcreateRenderEffectuntrackSurvivors:
widget-card-view.tsx:522synchronizes external ResizeObserver geometry and deliberately defers observer attachment to avoid skipped resize delivery; the existing shared observer helper does not cover that ordering.widget-card-view.tsx:290snapshotsinitialPromptCapablefor the frame identity. Its existing export lookup at line 493 is tracked for the next owned-ref cutover and is not claimed as an allowed Solid-shell query.Production drops 63 lines. No new abstraction or dependency. Markup, styles, host tags, routes and lazy boundaries remain unchanged; no intended visual change, so this behavioral refactor uses focused interaction tests and full CI rather than additional screenshots. Base
de42210bcdd6244ad44a6165a5ba555ae24b2046.Head
2f2dd477f7c7d463afceb7cc81733cc72e553e68. Whole change: five production files, 99 insertions and 162 deletions; no tests added or changed.