Repository navigation
refactor(ui): own tooltip and lightbox interaction lifetimes - #176449
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 moves Control UI listeners, focus targets, observers, and presentation subscriptions onto existing lifetime owners. Example: Open a two-image gallery, navigate to the second image, and close the viewer.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: the previous lazy-loading defect is resolved, and this review found no remaining actionable patch defect. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI custom-element bridges supply live properties to Solid renderers, whose interaction owners manage browser events, focus, media resources, and teardown. flowchart TD
A[Control UI callers] --> B[Native host bridge]
B --> C[Shared lazy renderer]
B --> D[Host context]
D --> C
C --> E[Interaction owners]
E --> F[Browser events and focus]
E --> G[Resource cleanup]
Technical reviewBest possible solution: Retain the existing synchronous interaction owners, shared lazy boundary, and explicit lifecycle cleanup. Do we have a high-confidence way to reproduce the issue? This refactor claims preserved behavior rather than a new user-facing bug reproduction; no target code was executed during this read-only review. Is this the best way to solve the issue? The change reuses existing listener, observer, projection, and modal owners; the small host context preserves the lazy-loading contract established by #174830. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5f63135f917a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +52. Total +52 across 18 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 18, 2026, 5:39 PM ET / 21:39 UTC (Revision 2). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a84d3e19f5
ℹ️ 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".
|
The four lightbox regressions are fixed at their source: one module-level lazy component now receives its host through context, preserving cached readiness and reconnect behavior. All 21 existing lightbox tests pass without weakening their assertions. The follow-up type-only move into the existing types module also passes the exact Madge gate (zero cycles) and UI typecheck. The current head is @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…w#176449) * refactor(ui): own tooltip and lightbox interaction lifetimes * fix(ui): preserve cached lightbox readiness * fix(ui): break lightbox host context import cycle
What Problem This Solves
Tooltip, modal and image-viewer components still bind listeners manually and rediscover elements they render. Several small effects also duplicate shared lifetime primitives.
User Impact
No visual or interaction change is intended. Tooltips retain their accessible descriptions and reconnect behavior; image viewers retain gallery navigation, zoom, keyboard focus and resource cancellation; memory import retains synchronous request admission.
Why This Change Was Made
Listeners now use the shared cleanup helper or owned native refs. The lightbox registers focus targets, file preview observes accepted modal visibility, and the folder picker captures its existing input ref. The deferred file section uses the shared intersection observer, the divider's renderer owns ARIA bindings, and memory import reads an owner projection. One shared lazy lightbox component receives each host through Solid context; its host/props types live in the existing type leaf to avoid an import cycle. Redundant
untrackwrappers are removed; the one remaining snapshot names the keyed palette row'sinitialKey.This is a second components checkpoint. Modal autofocus and tooltip-description discovery still need caller registration contracts; file-preview focus and scroll synchronization still need shared primitives. These remain outstanding wave-zero work.
Evidence
de4ae5412eeapnpm check:madge-import-cyclespassed with 0 cycles at2e9427767f87; the type-only leaf repair is unchanged by main integrationa84d3e19f5epassed all 21 tests (36.65 s). Main pointer-owner integration passes all 8 divider tests on the merged candidate. Initial tooltip/onboarding local attempts stalled before assertions; prior-head full UI CI passed those suites. No local broad suite.a84d3e19f5e: both sides passed from merge base01a806546943b009ed364e362c13eb57721f1627; startup 336,575 → 336,560 B gzip, 7 JS requests and 1 CSS request; raw startup JS decreases by 332 B.d9fb4de16f39: scoped-clean P0–P2; targeted divider lint/format and diff check also passci:fullrun 39168044298, at2e9427767f87, completed with every UI unit and Control UI E2E shard green. Three exact-name inherited Gateway failures and an inherited chat budget failure remain. Merged-head CI39170533676 has passed UI units and performance; remaining E2E jobs are running. No local full E2E suite or remote leaseMeasured changed production scope (18 files), against merged main parent
d9fb4de16f393656aa52511ca25801296c4b77e7:createEffectcreateRenderEffectuntrackaddEventListenerquerySelector(All)including generic callsThe 51-line growth is explicit lightbox focus registration, cleanup and a host context; the shared observer, renderer bindings and projection remove duplicated lifetime machinery.
Remaining categories (paths under
ui/src/components/):command-palette-view.tsx:449,453.image-lightbox-content.tsx:452,483.modal-dialog.ts:419.onboarding-memory-import-solid.tsx:131,170.command-palette-view.tsx:357.file-preview-modal.tsx:183,203.modal-dialog.ts:204andtooltip-owner.ts:496.Current head and CI evidence
Merge commit
de4ae5412eeabbf4b2175ff7aaf0a6b3a15f29eaintegrates maind9fb4de16f393656aa52511ca25801296c4b77e7after one divider import conflict. The resolution retains main's pointer-drag owner for capture, cancellation and disposal plus renderer-owned ARIA bindings, with no second cleanup. Frozen install, UI typecheck, eight divider tests, targeted lint/format and fresh review pass. Final Knip finds onlysrc/auto-reply/reply/reply-admission-ticket.tsandsrc/auto-reply/reply/reply-turn-admission-owner.ts, matching scheduled main 39163574553. Current-head CI39170533676 is running; UI units and performance have passed; runtime and screenshot evidence above is explicitly reused from the unchanged lightbox contracts.Prior-head run 39168044298, at
2e9427767f87, passed every UI unit and Control UI E2E shard. Its three failing Gateway names also fail on completed scheduled main 39163574553:Managed image ordering through real chat.send and history > keeps headings, managed images and trailing prose ordered live and after reload without duplicatesSpeech supplements through real chat.send and cursor history > attaches delayed speech to each original answer live and after reloadControl UI media transcript replay with a real Gateway > delivers PowerPoint and keeps persisted attachment failures replay-safeThat prior run's performance comparator reports chat boot 1,494,544 → 1,494,590 B, both above the 1,490,000 B ceiling, and passing startup at 336,637 B gzip, 7 JS / 1 CSS. These are prior-head results, not current-head admission evidence.
Final merged-head CI
Run39170533676 passed on
de4ae5412eeabbf4b2175ff7aaf0a6b3a15f29ea: all three UI unit shards, all nine Control UI E2E shards, both real-Gateway shards, performance, security and the CI gate. No inherited-CI exception is needed for this head.