Repository navigation
refactor(ui): use native lifetimes for app setup - #179375
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 manual Solid owner restoration with native readiness, subscription, and settlement lifetimes. Example: Open New Session, then navigate to Appearance through automation readiness.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-directed refactor removes manual Solid owner management while preserving the existing lifecycle contracts; no actionable correctness or security defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI application root connects Gateway, router, theme, and translation state to the shell, rendered pages, and the lazy browser automation readiness hook. flowchart TD
A[Gateway and domain owners] --> B[Shell subscriptions]
B --> C[Shell presentation]
C --> D[Rendered Control UI]
E[Automation getter] --> F[Keyed readiness lifetime]
F --> C
F --> D
Technical reviewBest possible solution: Retain the focused refactor with lazy readiness, synchronous subscription cleanup, and caller-independent commit receipts intact. Do we have a high-confidence way to reproduce the issue? This is a behavior-preserving refactor rather than a reported bug; source and supplied evidence were inspected without executing target code. Is this the best way to solve the issue? The change uses existing lifecycle and domain owners, removes the replaced restoration paths, and retains the prior ordering and disposal safeguards without additional machinery. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ecc3a77078f8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -1, Tests +11, Other -5. Total +5 across 9 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 21, 2026, 6:48 AM ET / 10:48 UTC. |
Validate the focused app-owner cutover in the current shared context. The prior initial Telegram fixture reply timeout remains unexplained; no inherited-failure claim is made.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* refactor(ui): use native lifetimes for app setup * fix(ui): preserve synchronous shell settlement * test(ui): remove retired heartbeat fixture config
What Problem This Solves
Automation readiness and shell connection setup capture and restore Solid owners manually. Mount the existing lazy readiness factory under a keyed
Show, and connect plain domain-owner subscriptions through the shell's nativeonSettledlifetime. This removes a nested root and five owner-API calls while preserving synchronous connection handling, disposal, and the first-read lazy readiness boundary.The existing translation singleton exposes
subscribeI18nso the plain shell owner still observes locale changes and lazy English catalog registration. No new owner abstraction, dependency, tag, route, or lazy boundary is introduced.ShellPresentationretains its original detachedonSettledregistration. Deferring that registration to a microtask let the sidebar's commit receipt settle before shell property publication and lost keyboard focus after reordering. The unchanged sidebar E2E test passes the base, fails the initial candidate, and passes the repaired candidate. The original scheduling and both bare-flush()test expectations are restored; this one owner-API survivor has an observed ordering contract.Evidence
Current head:
d7725adf93bd761ede50b8bbfd3970dbe8da99b5. The final commit only removes retired heartbeat fields from four Gateway fixtures.Refreshed build proof compares integrated main
60361b195afff010fb76c111b3b49d5353ab8fffwith head2a98a03be65a6c7b129b414f8e133ef7c4b20cfb. Current-main integration is conflict-free; the seven-file cutover and its production/test blobs are unchanged. Fresh typecheck, production Knip, and independent P0–P2 review passed on this integrated production candidate. The subsequent fixture-only correction reuses those unchanged-production results and paired builds; formatting and a fresh independent P0–P2 correction review pass for all four corrected fixtures. Replacement-head CI tests their startup against the current strict schema.pnpm tsgo:ui(tsrs)The focused sidebar E2E uses the original test and fixtures with retained base/head builds served through the normal shared-preview helper, Chromium preflight and isolated forks. Node is used for this Playwright configuration; unit tests use the pinned Bun runtime. No local full suite or parity run was used.
ci:fullis enabled for every UI unit, Control UI E2E, browser-extension, and real-Gateway shard.Both strict checks exit 1 for startup JS (325,476 B cap) and Chat boot JS (1,500,000 B cap). The integrated head is smaller by 26 B and 41 B respectively; no growth is being attributed to an inherited budget violation, and the absolute check is not claimed green. No new violations or warnings. All 42 locale assets retain their raw sizes; gzip differences range from -3 B to +3 B. Both builds ran sequentially in the same checkout with cache disabled and identical build identity metadata; the PR branch was restored.
createComponentcallsRemoved in touched files:
createRoot1→0,getOwner2→0,runWithOwner2→0. Across the three audited app-owner modules, owner-API calls are 6→1 because commit settlement remains unchanged. One unchangedonCleanupremains inside the palette custody primitive, and two unchangeduntrackcalls capture lifetime-stable shell props. The focus-document result remains an imperative bootstrap/route outcome: its shared loader records guarded navigation handoff, the wrapper conditionally canonicalizes the URL, and readiness must observe the result without suspending.Final touched production LOC: 1,810 → 1,809. Test LOC: 2,286 → 2,292. Eleven files, +56/−55. The only cross-scope interface change is the existing translation singleton's subscription export.
Initial CI run 39585314259 exposed the repaired sidebar regression. Corrected run 39592189078, on
0f9a94c, passed every UI unit and Control UI E2E shard. Its sole non-aggregate failure wasControl UI cross-channel automation management with a real Gateway > configured owners and admin chat manage a Telegram-created job while a non-owner cannot: the first Telegram reply timed out at line 308, before opening the browser UI. Scheduled main 39592709539 passed that case. The failure remains unexplained and is not claimed inherited or fixed. The integrated run 39603337399 passed that case and every UI unit and Control UI E2E shard; this is a passing replay, not a diagnosed fix. Its current-main merge exposed four fresh-fixture startup failures becauseagents.defaults.heartbeatwas retired by #179387. The agent-file, profile-page, command-palette search, and session-diff folding fixtures now omit that obsolete field. Their explicit agent owners, existing cron setting, and browser assertions remain unchanged. Fresh isolated state provisions no automation jobs on startup, so no replacement suppression flag is needed. The correction passes replacement-head CI 39610696760: all 3 UI unit shards,all 9 Control UI E2E shards, and both real-Gateway shards. The four corrected fixture assertion names explicitly pass; no inherited claim is made for those failures. The only remaining non-aggregate failure iscontrol-ui-performance(startup and Chat absolute caps); the native inherited-failure route uses the paired base/head evidence above. CI separately reports Chat 1,500,382→1,500,272 B(-110),New Session 1,018,356→1,018,294 B(-62),startup 331,160 B,and unchanged startup CSS 40,439 B/one request.The original bounded capture, retained from before current-main integration because the affected cutover blobs are unchanged, uses synthetic Demo data, a fixed date, and a 1174×900 viewport. It verifies New Session renders before readiness is requested, the first getter returns undefined, exactly one readiness chunk loads, navigation reaches Appearance through the real hook, and a simulated Gateway reconnect retains the connected shell. Both sides report no page errors. All full-frame captures were inspected; the corrected images match the published attachments byte for byte.