Repository navigation
refactor(ui): remove duplicate shell layout publication - #176965
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: blocked before merge. What this changesThis PR removes the eager shell-layout publication and moves two initial test measurements into Solid’s settled lifecycle. Example: Open Models Settings at 1440×1000 while auth status is pending.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this maintainer-directed cleanup removes redundant initialization while preserving the existing layout owner; no introduced code defect was found. Priority: P3 Before merge
FindingsNone. Agent review detailsHow this fits togetherControl UI page components report layout traits through ShellLayoutBoundary to ShellLayoutOwner, which applies classes to the ancestor main element and clears departing reporters. flowchart TD
A[Settings and route components] --> B[ShellLayoutBoundary]
B --> C[Tracked Solid effect]
C --> D[ShellLayoutOwner]
D --> E[Main element classes]
E --> F[Settled descendant measurements]
Technical reviewBest possible solution: Use the existing tracked effect as the sole trait publisher while retaining synchronous class ownership, settled measurements, and reporter cleanup. Do we have a high-confidence way to reproduce the issue? This is a refactor rather than a reported product failure; source confirms eager and tracked initial publication, and no target code was executed during review. Is this the best way to solve the issue? The diff is the smallest complete cleanup: it removes the redundant path, keeps the existing owner, and preserves distinct loading, update, sibling, bridge, and cleanup assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against baf2f7683192. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -2, Tests +4. Total +2 across 2 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 19, 2026, 1:40 AM ET / 05:40 UTC. |
b878706 to
70159b8
Compare
70159b8 to
785c928
Compare
785c928 to
60c946e
Compare
Publish layout traits through the existing tracked effect, which runs before descendant settled setup and measurements. The renderer flushes before returning, so the component-setup snapshot is redundant. Keep dynamic trait updates and cleanup, and align the two measurement probes with onSettled without dropping their assertions.
60c946e to
5ec0286
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ec028691d
ℹ️ 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".
| createEffect( | ||
| () => props.traits, | ||
| (traits) => scope.owner.record(token, scope.host, traits), |
There was a problem hiding this comment.
Preserve synchronous trait publication for child setup
When a descendant reads or measures layout during component setup, this effect has not yet applied, so it observes the shell without the requested classes and can initialize from incorrect CSS. The previous regression explicitly exercised this ordering, but this commit moves both probes into onSettled, masking the behavior change rather than preserving the refactor's existing contract. Keep an initial synchronous publication, or otherwise publish before evaluating children.
AGENTS.md reference: AGENTS.md:L78-L80
Useful? React with 👍 / 👎.
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
) * refactor(ui): remove duplicate shell layout publication Publish layout traits through the existing tracked effect, which runs before descendant settled setup and measurements. The renderer flushes before returning, so the component-setup snapshot is redundant. Keep dynamic trait updates and cleanup, and align the two measurement probes with onSettled without dropping their assertions. * test(ui): retain facts for avatar and media failures * test(ui): bound avatar failure diagnostics * test(ui): fix avatar diagnostic lint * test(ui): name unsettled Gateway roots in cleanup failures
Remove the migration-only initial shell-layout publication and its
untracksnapshot. The existing tracked effect publishes traits before descendant settled measurements, then owns later updates and cleanup through the sameShellLayoutOwner. Initial measurement probes now useonSettled; the native, bridged, detached and Models loading-shell contracts remain covered.The current change also preserves bounded public failure facts for the unexplained self-avatar CI case: request/status/MIME counts and menu/avatar presence. Raw URLs and identifiers are not exported; public facts are booleans, counts or null. Existing assertions, test timeouts and baselines are unchanged. The best-effort avatar DOM read has a one-second host deadline, so a stalled renderer cannot hide the original assertion failure. Main owns the managed-media capture observer and waits for the terminal recap before capture. The conflicting local media diagnostics were removed during rebase; that file is unchanged by this PR.
Proof
Base:
886ba0f3eaeb533f53b17ba47ffc30e179449388. Head:5ec028691d4f21a8a653fd370ad0ed4cbc3b93dc. The original four commits are patch-identical across the latest rebase; the layout patch is unchanged. Rebase resolution retained main's managed-media helper and removed our overlapping diagnostic additions. Frozen install, the default UI and affected UI E2E type graphs, focused lint and formatting passed on this final patch. The added root-owner diagnostic passed independent P0–P2 review. No checker override has been used:pnpm tsgo:uiruns the repository's default tsrs backend.5ec028691d4f; no ignores addedThe prior-head failures were
Control UI session owner assignment mocked Gateway E2E > assigns named and self owners through one themed keyboard-accessible submenu(self-avatar image count 0), andManaged image ordering through real chat.send and history > keeps headings, managed images and trailing prose ordered live and after reload without duplicates(image/frame nodes replaced with identical bounds). The retained CI artifact omitted the private DOM/screenshot detail needed to distinguish causes. Passing replays are not a repair or an inherited-failure claim. The avatar diagnostic change supplies missing evidence if that failure recurs. The managed-media case uses main's newer capture observer without local changes.Run 39227526531 also failed the first
Control UI usage sessions owner attribution > keeps same-id owners separate with an empty current session: %scase during browser cleanup: two Gateway roots remained after 15 seconds. The retained fixture failure then failed the second parameter and bothclears ranges after session recreation (1 points)/(2 points)cases. All four exact cases passed scheduled main 39225083411, and all four passed one local replay on actual failing-PR baseccfc2d2961bb5836654fb10ce4d89638af938448(148.51 seconds in Vitest, 303.08 seconds including the required runtime build). This is an unresolved prior-head cleanup failure, not an inherited-failure claim. The assertion now includes the existing bounded Gateway root-owner inventory; its zero-count requirement, timeout and cleanup order are unchanged. Current-head CI must pass this file.Production Knip passed on this final head. Older candidates and their exact bases both reported the same unused Signal/Levanto/plugin-install-record declarations; current main has removed those failures. No ignores or production workaround were added.
Historical paired production proof is reused for the unchanged layout patch: base
86431079ec51, headb87870628254, same machine. Both builds passed; startup was 337,063 → 337,060 B gzip, CSS 38,500 B / 1 request unchanged. Both strict checks failed only the then-existing New Session cap (1,050,179 → 1,050,170 B; limit 1,050,000 B). Four inspected synthetic before/after pairs are byte-identical. These are historical results, not current-head performance claims. Current PR CI owns current performance and broadci:fullproof; its measured results are below. No local full E2E/parity suite or remote lease.Final current-head CI and inherited exception
Run 39231810160 tested merge
2259569a90505d75126bee1f0aa9b73942bc8f05of main4d86a5965c24e1684185e6d6bab6d97ed26bd0deand this head. All nine UI browser shards, both real-Gateway shards, types, lint and performance passed. The prior avatar, media and Gateway root-cleanup cases pass in this run.The only failed test is
src/pages/chat/components/chat-composer-plus-menu-loading.test.tsx > keeps the menu open and retries a failed content load: the menu closes and hides its error/Retry control. One targeted run on the actual CI main parent reproduced that exact case and assertion (1 failed, 6 passed; 3.45 s Vitest / 6.12 s including the wrapper). The latest completed scheduled main run predates this regression and passed it; the inheritance claim uses the actual-base failure, not a shared shard name. #177208 owns the fix. This PR does not edit those sources. Their four relevant blobs are identical across base, head and the inspected tested merge. The downstream CI gate is red solely for that case. Native inherited/admin replacement recovery is used under the user's standing authorization; this failed run is not described as green.Size and wave-zero counts
The layout production delta is 34 → 32 LOC; its tests 314 → 318. Avatar diagnostics add 98 net test/helper lines and the Gateway cleanup message adds 7, with no runtime change. Complete diff: 6 files, +125/−18. All changed tests/helpers 3,257 → 3,366 (+109). Growth retains otherwise-missing CI evidence; it adds no production synchronization.
untrackcreateEffectcreateRenderEffectaddEventListenerquerySelector(All)The surviving effect publishes page layout traits into the ancestor shell's class owner. No new owner, primitive, eager import or compatibility path. Changelog is release-owned.
Before / after
Synthetic full Models Settings app and shell, with identical masking of checkout metadata only. Pending frames show the auth-status response pending; the global model defaults are already rendered. The unchanged unit regression owns the pre-body reservation proof. These are bounded captures of the touched state, not a full E2E run.
No remote leases, private state, or model calls. Changelog is release-owned in this repository.