Skip to content

refactor(ui): scope lazy session menu controls to computations - #179201

Merged
steipete merged 1 commit into
mainfrom
solid2/w-s2-comp-a-menu-lifetime
Oct 21, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-s2-comp-a-menu-lifetime

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope Solid 2 census

Measured 154 production files / 36,938 lines on base f0c671ec92a5370b43e610c8501681202e34805c. Each cell is before → after this PR. Other family work remains in progress; this base does not yet include #179166.

File family Files 1 stale intrinsic handlers 2 onCleanup calls 3 async-read candidates 4 local mutation flows 5 renderer-loader candidates 6 structured signals 7 hand createComponent 8 throw-only context 9 sibling Loading 10 owner calls
app-sidebar* 42 0→0 4→4 0→0 0→0 1→1 0→0 0→0 0→0 0→0 5→5
sidebar-* 40 0→0 4→4 1→1 4→4 2→2 2→2 0→0 0→0 0→0 0→0
session-* 72 0→0 8→8 3→3 1 compliant→1 compliant 0→0 4→4 0→0 0→0 0→0 4→1
Total 154 0→0 16→16 4→4 4+1 compliant→same 3→3 6→6 0→0 0→0 0→0 9→6

Item 2 includes synchronous primitive/computation teardown. The three owner calls removed here captured/restored an owner for lazily created submenu content; the retained session owner call mounts a foreign-DOM plugin fallback. Four other foreign-DOM calls and the detached sidebar root addressed by #179166 account for the remaining scope total. Only three of 19 runtime imports are renderer-loader candidates; other imports load domain commands, observers, registrations, or retained prewarm/retry adapters.

What Problem This Solves

Session-menu appearance and snooze content used imperative caches plus captured-owner restoration to create reactive controls only when opened. Two lazy memos now own that content directly. The second snooze function call stays outside the memo so time-based presets remain fresh.

Solid 2 disposes an unobserved lazy memo: compact Back navigation therefore releases submenu registrations, and reentry recreates controls under the current menu owner. Existing appearance draft preparation remains authoritative. Desktop submenu retention is unchanged. No intended visual change, markup/style change, or selector change.

Evidence

Check Result
UI typecheck (tsrs) Passed
Session menu tests (default pinned Bun) 62 passed; compact appearance Back/reentry and custom snooze Back/reentry covered
Controller/owner guard Passed; getOwner/runWithOwner baselines shrunk
Targeted lint, format, whitespace Passed
Production Knip Passed
Independent Codex review through P2 Scoped-clean; no actionable findings
Base/head production builds and strict comparison Both built. Strict check reports the same inherited absolute startup-cap failure on both. Startup 331,664→331,668 B gzip (+4 B, within the 64 B variance), 8 JS requests and 1 CSS request; raw startup bytes unchanged. Chat 1,494,142→1,494,159 B (+17 B); New Session 1,013,430→1,013,429 B (−1 B). Route and locale caps pass.
Full CI ci:full requested for menus/focus

Touched production LOC: 478 → 477 (−1). Whole-scope production LOC: 36,938 → 36,937 (−1). Test LOC: 928 → 949 (+21). The added assertions cover controls surviving compact Back/reentry; no test-only production API.

Refactor-checklist counts in touched production: controllers, effects, render effects, untrack, direct listeners, DOM queries and flush all 0→0; getOwner 1→0, runWithOwner 2→0, createRoot 0→0. No screenshots because the DOM/style/visible-state contract is unchanged. No Crabbox/Testbox lease.

Full CI attribution

Run 39560247497, attempt 1, failed only the named dashboard draft test and root-tooling typecheck. Both reproduced on the exact tested merge’s main parent e58c6f298cfd15683bbededd010cb634578a720c: 1 failed / 3 skipped at the missing Chat button, and the identical TS2345 diagnostics at ci-changed-node-test-plan.test.ts:813 and :891. The five named source blobs are identical between baseline and CI checkout 1fc7ffe010eac825f1eb2c50a4d7fa7cb9954d03. Native inherited-failure admission retains these failures; CI is not represented as green.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review October 21, 2026 07:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T07:36:11.610190Z 62eeaf1 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces manually cached appearance and snooze controls with lazy Solid computations and adds compact-menu reentry coverage.

Example: Open compact Snooze, select Back, reopen Snooze, and submit January 1, 2099 at 09:00.

  • Before: The menu retains the manually cached snooze controls under a captured owner.
  • After: The lazy computation recreates released controls on reentry, preserving the custom snooze action.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is small and source-consistent with useful lifecycle coverage; behavioral evidence is limited to the in-process menu harness.
Proof confidence 🦐 gold shrimp (3/6) The ordinary contributor proof gate does not apply to this maintainer-authored internal refactor; supplied validation reports production-menu jsdom tests, with no shipped-entry-point capture and no material authority change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Appearance and snooze controls must remain usable after compact submenu navigation while their registrations follow the displayed content's lifetime.
Reason: The maintainer-directed change removes manual lifecycle machinery, preserves existing action and draft owners, and introduces no public behavior or configuration choice.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it is a focused, maintainer-directed lifecycle simplification with no actionable introduced defect found; required checks remain red.

Priority: P3
Reviewed head: 62eeaf1b1587c62de35341d21ca8dac85871e5c5

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-browser recording or live trace exercises compact appearance and custom snooze Back/reentry; the supplied focused tests use jsdom.
Agent review details

How this fits together

The Control UI session-menu renderer consumes session state and action handlers, constructs appearance and snooze controls, and forwards selections to the existing session-action owner.

flowchart TD
  A[Session state] --> B[Session menu entries]
  B --> C[Lazy appearance computation]
  B --> D[Lazy snooze computation]
  C --> E[Native menu controls]
  D --> E
  E --> F[Session action owner]
Loading

Technical review

Best possible solution:

Retain this small computation-owned refactor and resolve the remaining checks through the repository's native CI admission path.

Do we have a high-confidence way to reproduce the issue?

This is a behavior-preserving refactor rather than a reported bug; source inspection establishes the manual ownership being replaced, and no target code was executed.

Is this the best way to solve the issue?

The two lazy computations are the smallest complete replacement using existing Solid ownership, with no parallel renderer, new state owner, or unnecessary test scaffolding.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4e6f52e0beef.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -1, Tests +21, Other -2. Total +18 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 7 8 -1
Tests 1 21 0 +21
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 0 2 -2
Total 4 28 10 +18

Labels

Label changes:

  • add P3: This is a focused internal lifecycle cleanup with no established current user-facing failure.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused internal lifecycle cleanup with no established current user-facing failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 21, 2026, 4:08 AM ET / 08:08 UTC.

@steipete
steipete merged commit aba2412 into main Oct 21, 2026
166 of 175 checks passed
@steipete
steipete deleted the solid2/w-s2-comp-a-menu-lifetime branch October 21, 2026 08:11
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant