Repository navigation
refactor(ui): use owners for login focus and portal updates - #176716
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 routes provider-login focus through settled callbacks and coalesces Portals host-property updates in the existing owner. Example: Select the quick-key-only provider, return to search, then select zebra.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it is a focused, owner-directed lifecycle refactor with no actionable introduced defect found; unresolved CI failures still prevent a clean landing assessment. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI login owner consumes provider choices and focuses rendered controls; the Portals owner consumes host properties and Gateway events, requests portal or environment state, and publishes the retained preview. flowchart TD
A[Provider selection] --> B[Login owner]
B --> C[Settled focus callback]
C --> D[Current choice button]
E[Native host property changes] --> F[Portals owner]
F --> G[Gateway reads]
G --> H[Retained portal preview]
Technical reviewBest possible solution: Retain the existing owners and focused coalescing mechanism, with required CI failures resolved or independently attributed before landing. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor, not a reported product failure; source and existing test scenarios were inspected without executing target code. Is this the best way to solve the issue? The implementation uses existing focus, bridge, projection, and Portals owners, removes the replaced effects, and adds only the scheduling state needed to preserve paired-write coalescing. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against dba2de1418b8. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +13, Tests +38. Total +51 across 6 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 18, 2026, 9:12 PM ET / October 19, 2026, 01:12 UTC. |
49fb31c to
afa3e6d
Compare
afa3e6d to
b144533
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b144533b3e
ℹ️ 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".
| ) { | ||
| let active = true; | ||
| let presentationPending = false; | ||
| const snapshotPresentation = (): PortalsPresentation => { | ||
| const current = presentation(); |
There was a problem hiding this comment.
Reduce this Solid refactor’s production LOC
The four touched production files grow by 13 lines overall (74 additions versus 61 deletions), contrary to the required Solid refactor checklist’s net-negative production-LOC rule. Most of the growth comes from this new snapshot/coalescing lifecycle, so simplify that ownership path or retain the smaller existing mechanism rather than landing a refactor that increases lifecycle bookkeeping.
AGENTS.md reference: ui/AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…#176716) * refactor(ui): route login focus and portal updates through owners * fix(ui): preserve login API-key ref method binding
What Problem This Solves
Login focus and Portals request updates used effects even though their owners already receive the relevant events. Login now chooses its current method or API-key target from the existing settled focus callback. Its API-key button ref forwards through the live login owner, matching the adjacent method-choice ref. Portals consumes native host-property receipts and coalesces paired changes before requesting the final environment.
This removes both effects while preserving selectors, lazy imports, iframe lifetime, cancellation, and focus behavior.
Evidence
Current head:
b144533b3ee8abef294ba53bd0bd83d49d005ea1, refreshed without conflicts onto737c8c126153d2b36d22fc50eb4ada8062394d93. All six authored files and the complete patch are identical to the previously reviewed headafa3e6d4b312bda0e8502af78f75a667753bbd08.pnpm tsgo:uiThe refreshed comparison covers 57 focused owner, view, bridge, focus, lifecycle, harness, style, and dependency inputs: 51 unchanged, six changed and inspected. The changes are outside these tested contracts: default-model selection, an unused gateway-page accessor, unrelated strings/defaults selectors, and a process-helper dependency pin. The original review context manifest was not recovered; this is an explicit fresh comparison. Broader app changes are left to fresh PR CI, and no claim is made that the whole transitive graph is unchanged.
The 39 unique boundary cases cover first-method focus, Back/search focus, quick-key fallback, provider return, paired property writes requesting only the final environment, and retained iframe/request lifetimes. These passing tests were preserved without another runtime rerun. The original complete-file tests used the authorized Node/cache-disabled fallback after diagnosed pre-collection rename stalls; the subsequent callback case passed with pinned default Bun. Portals emitted no Solid diagnostics. Login emitted
STRICT_READ_UNTRACKEDdiagnostics whose complete attribution remains unproved; none were suppressed.No local build or screenshots were added: this changes lifecycle wiring without changing rendered markup, CSS, classes, selectors, routes, lazy imports, or startup modules. Broad integration proof comes from
ci:fullon the refreshed head.createEffectcreateRenderEffect,untrack, raw listeners, DOM queriesThe 13 added production lines preserve Portals' coalescing contract while removing copied reactive state. No targeted patterns remain in these four production files.
Historical CI 39185953269, on
afa3e6d4b312bda0e8502af78f75a667753bbd08, passed every runtime job. Its existing chat absolute-budget failure measured base 1,491,219 B and old head 1,491,161 B (-58 B), both above 1,490,000 B; startup was 337,464 B gzip (7 JS/1 CSS). These measurements and that CI result do not certify the refreshed head.Inherited CI qualification
Exact-head CI 39199106551 completed for
b144533b3ee8abef294ba53bd0bd83d49d005ea1. All UI unit, ordinary Control UI E2E, browser-extension, type/lint, security, and strict performance checks passed. The only failed nonaggregate jobs contain these cases:ui-e2e-serial ui/src/e2e/session-pr-reader-lifetime.real-gateway.e2e.test.ts > Session PR readers through a real Gateway > keeps session PR and CI results with the current workspace and reader.The reader case timed out after 120 seconds. The same exact names and error signatures fail on the latest completed scheduled main run 39205204421, at
e3cc361b27cb48b494708891fee8df83e6811946. The actual CI checkout's ordered parents and reconstructed merge tree are verified, and the named failure-source blobs match its base and the scheduled-main head. These are qualified inherited failures; the native inherited-failure/admin route is used without claiming CI green. No failed assertion was weakened and no local E2E rerun was added.Current-head startup: 337,503 B gzip JavaScript, 7 requests, plus 38,500 B gzip CSS, 1 request. Same-host base/head chat boot: 1,489,923 → 1,489,905 B (-18 B); New Session: 1,049,408 → 1,049,397 B (-11 B). Lazy boundaries are unchanged.