Skip to content

fix(ui): retain sidebar menu entries in their Solid owner - #179307

Merged
steipete merged 5 commits into
mainfrom
solid2/comp-a-anchor-lifetimes
Oct 21, 2026
Merged

steipete merged 5 commits into
mainfrom
solid2/comp-a-anchor-lifetimes

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope Solid 2 census

Source audit on current main a5e54e449604 → this PR’s changes. This PR fixes menu JSX ownership; the four remaining actionable candidates belong to #179247 (loaders) and #179302 (descriptor store). A separately audited combined overlay with #179323 and those two PRs has zero actionable survivors; that is provisional, not merged-main proof.

Family 1 stale handlers 2 component teardown 3 pure-read wrappers 4 mutation feedback 5 renderer loaders 6 copied structured signals 7 manual JSX creation 8 throw-only contexts 9 missing Reveal 10 disallowed owner APIs
app-sidebar* 0→0 0→0 0→0 0→0 1→1 0→0 0→0 0→0 0→0 0→0
sidebar-* 0→0 0→0 0→0 0→0 2→2 0→0 0→0 0→0 0→0 0→0
session-* 0→0 0→0 0→0 0→0 0→0 1→1 0→0 0→0 0→0 0→0

Combined candidate scope: 155 production files / 37,176 physical lines; current main: 154 / 37,129. Raw survivors are separately audited: 12 primitive/resource cleanups, four foreign-DOM owner calls, one immutable rail-identity conditional, three admitted/cancellable read adapters, four atomic identity/geometry/receipt signals, two optional null-default contexts, four independently activated Loading regions, and imperative command/registration imports. These are allowed contracts, not hidden actionable counts. Descriptor reconciliation, repository path validation and private-image abort/Blob custody stay with their synchronous owners. Reload feedback spans document navigation; clipboard and defaults-save feedback already use actions. No sibling content requires coordinated Reveal. The async/actions recipe file is absent on this main; rc.16 installed cheatsheet and current skill are the API references.

Problem and change

Menu selection reads its items outside a reactive owner. The rail, group, catalog-filter and roster renderers recreated JSX-bearing arrays there, producing unowned-effect diagnostics for rail selections. Their arrays now live in mounted-owner memos. Roster link registration also captures the element, registers it in onSettled, and removes that exact keyed binding on cleanup. Existing command owners, actions, disabled states, locale updates and focus behavior are preserved.

The main conflict resolution retains the pinned-agent Create Claw-only policy and clawCreatorAction dispatch. Two CI test repairs preserve their assertions: the mobile menu permits 0.05 px of browser geometry rounding, and the diff-folding test waits for the refreshed +3 source header before clicking its source-keyed row. Merged main includes #179073, which fixes explicit diff refresh admission.

Proof

Check Result
Regression All four rail-pin selections fail on base with NO_OWNER_EFFECT and pass on head. Roster ownership cleanup is not claimed as a separately reproduced leak.
Focused Bun tests 91/91 pinned-agent, native-menu and sidebar-interaction tests; 7/7 pinned-agent tests after conflict resolution
Mobile menu Targeted 390 px Playwright case passed; containment, keyboard, selection and focus assertions retained
Typecheck/static rc.16 tsrs, focused lint/format, controller guard, whitespace and final production Knip passed
Independent review Scoped-clean through P2, including conflict resolution and test repairs
Full CI Run 39594559022 completed success on be60dcfb7da554858d811364ff682a3d88742acb, including prior widget and folding cases
Exact-parent build Same-machine 40a16aadf9ba → be60dcfb7da5: startup 331,076→331,067 B gzip (−9); 8 JS / 1 CSS, CSS 40,439 B unchanged
Routes/locales Chat 1,499,806→1,499,776 B (−30); New Session 1,017,439→1,017,401 B (−38); locale total 3,310,363→3,310,353 B (−10); largest locale 181,679→181,677 B

Both builds exceed the absolute startup cap; this change passes the current ≤64 B comparative growth rule. Every saved build-file hash was verified. Local folding replays stopped during setup and are not counted as passing tests; full CI supplies that proof.

Production LOC across the three renderers: 1,385→1,396 (+11) for memo bindings and explicit roster registration/cleanup. No intended visual or style change, so screenshots are not applicable. No remote test lease or dependency change.

Landing uses the task-authorized replacement recovery for a confirmed-cancelled auto request. Its prior-success evidence points to this identical green head with an empty delta; no failed check is waived.

@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.

@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-21T11:50:47.021237Z be60dcf New commits
ℹ️ 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.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 21, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 21, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c89c7604e6

ℹ️ 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".

class: "sidebar-customize-menu__item",
icon: <Icon name="listTree" />,
},
...(canCreateClawDraft(context)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Invalidate roster items when Claw availability changes

When gateway.controlUi.experimental.claws is toggled while the roster remains mounted and no card update occurs, this memo does not rerun: canCreateClawDraft(context) reads the runtime-config and gateway owners directly without establishing a reactive dependency, while the memo's unrelated cards() dependency may remain unchanged. The menu therefore keeps the old create-claw entry state—missing after enablement or still visible after disablement—until another roster update or remount. Consume the relevant config/capability projection or owner revision when deriving these items.

AGENTS.md reference: ui/AGENTS.md:L16-L16

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR retains four sidebar menu item arrays in Solid memos and pairs roster link registration with settled cleanup.

Example: Select Move up for route:sessions between route:usage and person:ada.

  • Before: Selection reconstructs JSX outside its Solid owner and emits NO_OWNER_EFFECT warnings.
  • After: Selection reads retained menu entries; the reported regression test preserves dispatch without those warnings.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A useful, focused ownership repair with reported harness regressions and one remaining reactive-dependency defect.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; supplied evidence exercises real menu rendering in test harnesses, with no changed authority boundary.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Sidebar menu selection creates unowned reactive work, weakening menu lifecycle cleanup.
Reason: The maintainer-authored direction restores the existing ownership contract without adding a new capability or changing menu policy.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this PR addresses a real Solid ownership defect, but the roster memo still needs runtime-config invalidation.

Priority: P2
Reviewed head: ae563a42c2fb0b9bbb1659241da4a224f42bb6de

Before merge

  • Invalidate roster items when runtime config changes (P2) - The new memo calls canCreateClawDraft(context), which reads plain runtime-config state without subscribing to it. If config finishes loading or changes while an unpinned roster row remains mounted and its cards stay unchanged, the memo retains the previous create-claw membership; reopening the menu can therefore omit an enabled action or retain a disabled one. The sidebar's application-config subscription is a different owner. Consume the existing projectRuntimeConfig projection when deriving these items and cover a config-only update without a roster refresh. This confirms the earlier discussion finding on the current head.

Findings

  • [P2] Invalidate roster items when runtime config changes — ui/src/components/sidebar-agent-roster.tsx:166

Tests

  • Missing end-to-end proof: No shipped Control UI interaction trace is supplied; reported red/green evidence covers rail selection, while the roster warning assertion already passes on base.
Agent review details

How this fits together

Control UI sidebar renderers turn navigation, roster, and session-owner facts into shared Menu entries whose selections dispatch existing owner commands.

flowchart LR
  A[Navigation and config owners] --> B[Sidebar projections]
  B --> C[Renderer item memos]
  C --> D[Shared Menu]
  D --> E[Selection handlers]
  E --> F[Existing owner commands]
Loading

Technical review

Best possible solution:

Keep the renderer-owned memos and settled link cleanup, and derive Claw availability through the existing runtime-config projection.

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

The shared Menu event path explains the reported ownership warning, and source inspection establishes the missing runtime-config dependency; no reproduction was executed during this read-only review.

Is this the best way to solve the issue?

Renderer-owned memos are a small, appropriate fix using existing owners, provided their availability inputs remain reactive.

Full review comments:

  • [P2] Invalidate roster items when runtime config changes — ui/src/components/sidebar-agent-roster.tsx:166
    The new memo calls canCreateClawDraft(context), which reads plain runtime-config state without subscribing to it. If config finishes loading or changes while an unpinned roster row remains mounted and its cards stay unchanged, the memo retains the previous create-claw membership; reopening the menu can therefore omit an enabled action or retain a disabled one. The sidebar's application-config subscription is a different owner. Consume the existing projectRuntimeConfig projection when deriving these items and cover a config-only update without a roster refresh. This confirms the earlier discussion finding on the current head.
    Confidence: 0.95
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 086548f2463b.

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/components/app-sidebar.pinned-agents.test.ts src/components/app-sidebar-nav-menus.test.tsx --maxWorkers=1
  • pnpm tsgo:ui
  • pnpm check:control-ui-controllers
  • git diff --check

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit d00f793 adds ui/src/components/sidebar-agent-roster.tsx:102 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d00f7932b275; files: ui/src/components/sidebar-agent-roster.tsx)

PR surface

Source +11, Tests +12. Total +23 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 174 163 +11
Tests 2 12 0 +12
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 186 163 +23

Review metrics

Metric Value Why it matters
Production versus test LOC Production net +11; tests +12 The growth consists of four memo bindings, paired link setup/cleanup, and assertions added to existing tests.

Labels

Label changes:

  • add P2: This is a focused sidebar lifecycle repair with a limited menu-availability regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This is a focused sidebar lifecycle repair with a limited menu-availability regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

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, 6:19 AM ET / 10:19 UTC.

@steipete
steipete enabled auto-merge (squash) October 21, 2026 10:25
@steipete
steipete disabled auto-merge October 21, 2026 10:27
@steipete
steipete merged commit d2590fe into main Oct 21, 2026
115 of 117 checks passed
@steipete
steipete deleted the solid2/comp-a-anchor-lifetimes branch October 21, 2026 12:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with prior CI and scoped validation.

MarMarLabs pushed a commit to MarMarLabs/openclaw that referenced this pull request Oct 21, 2026
…place it once (openclaw#179254)

Peter (2026-10-20): "the sidebar has a late reload flicker that looks ugly". Live filmstrips on Team: on chat deep links the warm cached sidebar shrank to a partial list ~3.2 s into a reload and grew back with avatars ~110 ms later; on the dashboard route the session list went completely blank for ~1 s first. Two causes: when hello arrived before the user identity resolved, the snapshot scope's profileId briefly became null, retiring the admitted cached roster (blank list); and live sessions.list results were published per query (partial list) instead of once.

Keep the admitted boot profile while hello's selfUser is unresolved (a different resolved user still changes scope and replaces), hold the cached roster until the foreground pane is ready plus an idle period (1.8 s cap), then hand off to the live roster once with row identity preserved; sidebar menus and group dialogs move behind their lazy boundaries to keep chat boot JS under budget.

Evidence (AWS c7a.4xlarge, 11 pairs per route, per-frame sidebar DOM probe + filmstrips): roster transitions chat 4 -> 1, dashboard 3 -> 1; blank frames 78 -> 0 / 59 -> 0; 20 cached rows retained; FCP 280 -> 276 / 288 -> 276 ms; hello 774 -> 745 / 825 -> 771 ms; LoAF 394 -> 351 / 346 -> 295 ms; transcript settled +28.1 / +12.2 ms paired (within the no-regression rule; an earlier +45 ms chat variant was explicitly accepted and is documented in the PR). Chat boot JS 1,499,305 B gzip (-608 B, 695 B headroom).

Runtime +70 LOC (11 files; most of the line count moves menu rendering behind its lazy boundary). 155 focused + 24 native e2e tests; full UI e2e and changed checks (remaining failures reproduce on pre-patch or newer main); exact-head CI red only on the account-menu precision assertion fixed upstream in openclaw#179307. Avatar initials -> image swaps remain a separate follow-up.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…79307)

* fix(ui): retain sidebar menu entries in their Solid owner

* test(ui): allow subpixel rounding in publication menu geometry

* test(ui): await refreshed patch before folding code
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
…place it once (openclaw#179254)

Peter (2026-10-20): "the sidebar has a late reload flicker that looks ugly". Live filmstrips on Team: on chat deep links the warm cached sidebar shrank to a partial list ~3.2 s into a reload and grew back with avatars ~110 ms later; on the dashboard route the session list went completely blank for ~1 s first. Two causes: when hello arrived before the user identity resolved, the snapshot scope's profileId briefly became null, retiring the admitted cached roster (blank list); and live sessions.list results were published per query (partial list) instead of once.

Keep the admitted boot profile while hello's selfUser is unresolved (a different resolved user still changes scope and replaces), hold the cached roster until the foreground pane is ready plus an idle period (1.8 s cap), then hand off to the live roster once with row identity preserved; sidebar menus and group dialogs move behind their lazy boundaries to keep chat boot JS under budget.

Evidence (AWS c7a.4xlarge, 11 pairs per route, per-frame sidebar DOM probe + filmstrips): roster transitions chat 4 -> 1, dashboard 3 -> 1; blank frames 78 -> 0 / 59 -> 0; 20 cached rows retained; FCP 280 -> 276 / 288 -> 276 ms; hello 774 -> 745 / 825 -> 771 ms; LoAF 394 -> 351 / 346 -> 295 ms; transcript settled +28.1 / +12.2 ms paired (within the no-regression rule; an earlier +45 ms chat variant was explicitly accepted and is documented in the PR). Chat boot JS 1,499,305 B gzip (-608 B, 695 B headroom).

Runtime +70 LOC (11 files; most of the line count moves menu rendering behind its lazy boundary). 155 focused + 24 native e2e tests; full UI e2e and changed checks (remaining failures reproduce on pre-patch or newer main); exact-head CI red only on the account-menu precision assertion fixed upstream in openclaw#179307. Avatar initials -> image swaps remain a separate follow-up.
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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant