Repository navigation
refactor(ui): derive shared tab options - #174158
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 derives shared tab options with a memo instead of copying them into mutable state. Example: Select Beta while Alpha is active and the selection callback rejects the change.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this focused, maintainer-directed refactor has no actionable findings; the failed CI gate comes from a separately confirmed Models layout failure. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe shared Control UI tab primitive receives reactive selection and item props, renders keyed buttons, and supplies current options to the synchronous keyboard and focus controller. flowchart TD
A[Page props] --> B[Options memo]
A --> C[Keyed tab buttons]
B --> D[DOM synchronization effect]
B --> E[Untracked controller reads]
C --> E
D --> F[Focus and stylesheet updates]
E --> F
Technical reviewBest possible solution: Retain the memo derivation and existing synchronous controller, then land through the native workflow once the unrelated CI failure is dispositioned. Do we have a high-confidence way to reproduce the issue? This is an internal refactor rather than a reported defect; source inspection confirms the mutable options copy it removes, and no target code was executed. Is this the best way to solve the issue? The change follows the repository's derive-instead-of-copy guidance while preserving the existing imperative owner and its synchronization effect. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8858de49e356. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource -3. Total -3 across 1 file. 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 16, 2026, 7:38 AM ET / 11:38 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
The shared tab primitive copies reactive options into a mutable local object during effect application. Deriving those options with a memo removes that second representation while retaining the existing synchronous focus owner.
User Impact
Selection, rejection, keyboard behavior, keyed node identity, classes, and cleanup are unchanged. No markup or styles change.
Why This Change Was Made
The focus owner reads the current memo through an explicitly untracked sampling callback; the effect owns dependency tracking and synchronizes DOM and shadow styles. This keeps imperative reads out of Solid tracking without copying options into state.
Evidence
ci:fullThe first local test exposed a development warning at the imperative memo read. The explicit snapshot boundary fixes it; the final targeted run has no Solid read warnings. No assertion changes or extra test scaffolding.
Metrics for
ui/src/components/solid/tabs.tsxagainstab81577da1d128c428ec66553f8380802c7e114a:createEffectcreateRenderEffectcreateMemountrackflush/ owner capturesThe new
untrackis the documented imperative sampling boundary, not a frozen value: each DOM operation reads the current options. The remaining effect updates an external DOM owner. Test LOC is unchanged. No visual capture because DOM, classes, and styles are unchanged.Startup JavaScript: 339,753 → 339,746 B gzip (-7 B); 7 requests. CSS: 38,786 B, 1 request. Both strict checks passed, with no new dependency or lazy-boundary change.
Full CI attribution
Run 38893007970 passed all executed jobs except UI E2E 6/9 and its aggregate gate. The five failures are:
Each expected six settings rows but received the additional Utility Fallback Model row introduced on main by #173906. Actual CI merge
452f2e0124efea29364572b19edc7a170849355ahas ordered parents3d6fc699ad082cb41fde231706168944b53aa745and this PR head. The test, default-model renderer, SettingsRow primitive, and English catalog have identical Git objects between that main parent and the tested merge; only the tab primitive differs. This is an unrelated stale expectation, not a claimed matching-signature main failure. Latest scheduled main run 38894297213 was queued when checked; the older scheduled run passed this shard.The native documented admin route is authorized for this attributed failure. No failed CI result is reported as green.