Skip to content

refactor(ui): use native async placement boundaries - #179263

Merged
steipete merged 4 commits into
mainfrom
solid2/comp-a-async
Oct 21, 2026
Merged

steipete merged 4 commits into
mainfrom
solid2/comp-a-async

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope Solid 2 census

Measured against 286a668b9d9b669971cf38796e4c57cf3e75965b after integrating Solid rc.16. Counts cover production app-sidebar*, sidebar-*, and session-* component files. Cells are before → after this PR on that base; the separate focused checkpoints #179201, #179241 and #179247 are reported in their own censuses.

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

The two remaining async-read candidates have synchronous owner contracts: descriptor observation captures its reconcile receipt before awaiting and exposes loading to the sessions page; group-default repository validation immediately prevents submission against a stale checked path. Their owners remain authoritative. Raw cleanup calls register synchronous primitive/computation disposal. Structured signals publish atomic target identity, geometry, descriptor status, an existing mutable folder-browser view, or navigation handoff; they are not copied list drafts. The placement source label and destination regions share one request, so they do not need independent sibling coordination.

What Problem This Solves

The placement picker encoded pending, failed, and successful catalog reads in one nullable/string union, then copied those states into separate derivations. The menu-work contract also carried a loading field that no renderer consumed.

User Impact

The placement form, Cancel button, and submit button remain mounted while the catalog loads, fails, and retries. Source labels keep their supplied fallback and enrich from successful device results, including an initially empty label. Machine choices, keyboard navigation, focus, routes, tags, and classes are preserved.

Why This Change Was Made

Use one async memo under narrow Loading/Errored boundaries and native retry. Keep the footer outside those boundaries; a null selection prevents it from reading unresolved catalog data. Delete the unused menu-work loading field and its writes in both producers without moving request-version or connection authority. A JSX fragment also fixes an existing untracked read in the machine-configuration slot.

Solid rc.16 and its migration note/installed cheatsheet were read after merging main. The async-and-actions recipe file is not present on this base. No artificial isPending, affects, or refresh is added: this dialog has an initial read and retry, not background revalidation or an owned server mutation slot.

Evidence

Check Result
UI typecheck (tsrs), rc.16 Passed
Placement tests, rc.16 20/20 passed; no Solid tracking diagnostics. Prior rc.14 integration also passed 20/20
Menu tests 65/65 passed across session-menu and session-menu-solid; field removal unchanged
Production Knip Passed on final rc.16 source
Controller guard, targeted lint, format, whitespace Passed
Independent Codex review through P2 Async conversion and focused rc.16 slot correction both scoped-clean
Same-machine base/head build and strict comparison Both rc.16 builds passed. Startup 329,539→329,523 B gzip; Chat 1,499,219→1,499,194 B; New Session 1,016,014→1,015,978 B; 1 CSS request. Maximum locale increase 3 B. Both sides exceed the absolute startup cap; all comparative changes remain within the 64 B rule.
Broad proof ci:full for the shared session menu/placement surface

Touched production LOC 3,350→3,330 (−20); tests 1,451→1,486 (+35). Whole-scope production LOC 37,085→37,066 (−19). Removed the error/data union, reload signal, two read derivations and unused menu-work state; the coupled sessions-page producer accounts for the remaining deleted line. Refactor census in scope remains: effects 7→7, untrack 4→4, direct listeners 0→0, DOM queries 1→1 (foreign island), flush 2→2, hand component calls 0→0. No intended visual or DOM/style change. No remote test lease.

CI attribution

Full CI run 39567812837 has one failing test: Control UI Markdown table interactions > contains content-sized tables after restoring a percentage reading width. That exact name also fails on completed scheduled main run 39570916649, head a6482a5158919ec2b3b0e3bfd93642c91582d9b7. Its test source is identical between the tested merge, the merge main parent, and scheduled main. All UI unit shards and other non-aggregate jobs passed. Native inherited-failure evidence retains both logs, exact tested merge fc4a5b282914d1c6e9ed7bb37a354a106f509cdd, ordered parents, source hashes and complete job list.

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

@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-21T08:35:42.915761Z 6652655 PR opened
ℹ️ 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 enabled auto-merge (squash) October 21, 2026 08:34
@steipete
steipete disabled auto-merge October 21, 2026 08:51
@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 placement-catalog status bookkeeping with native Solid async boundaries and removes an unused session-menu loading field.

Example: The destination catalog fails, then Retry returns device-a labeled Desktop.

  • Before: A nullable catalog/error union and reload counter drive the loading, error, and destination views.
  • After: Native Loading and Errored boundaries drive the same views while the form, Cancel button, and submit button remain mounted.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported refactor with meaningful unit coverage; the supplied behavior evidence remains unit-level.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored refactor is outside the contributor proof gate; the body reports focused placement/menu tests and static validation, with no shipped-entry-point recording or runtime trace supplied.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Users need destination loading, retry, selection, and cancellation to remain usable while internal async handling is simplified.
Reason: The maintainer-authored direction removes redundant state using existing primitives while preserving the established placement interaction.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored refactor removes redundant state, preserves placement safeguards, and has no actionable introduced findings.

Priority: P3
Reviewed head: 6652655013eeea9ebee227ad5f394a4f1856fb1b

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not show the changed catalog failure-and-retry path running through the shipped browser UI.
Agent review details

How this fits together

The Control UI placement picker consumes Gateway destination catalogs and returns an explicit destination to the existing placement runtime, which rechecks session identity, connection, and permissions before sending a move.

flowchart TD
  A[Session actions] --> B[Placement runtime]
  B --> C[Catalog request owner]
  C --> D[Async catalog memo]
  D --> E[Loading and error boundaries]
  E --> F[Destination selection]
  F --> B
  B --> G[Authorized Gateway request]
Loading

Technical review

Best possible solution:

Use one async catalog memo with narrow native boundaries while preserving footer lifetime, explicit selection, and the existing placement authorization owner.

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

This is primarily a behavior-preserving refactor; source inspection confirms the redundant state, and no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The change follows the existing Solid async contract, removes superseded bookkeeping across both menu producers, and adds no competing state owner or unnecessary production machinery.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Async catalog representation changes intended behavior with a stated reason (e2dbd36: Use an owned async memo while retaining controls during pending reads and retiring results with the dialog.)
  • Explicit destination selection and retry keeps the original intent (a38409f: Organize destinations, expose retry, and prevent submission without an explicit changed destination.)
  • Sidebar menu-work lifecycle keeps the original intent (12c556d: Keep presentation state with its owner and retire pending work through request-version, connection, and attachment lifetimes.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 12c556d adds ui/src/components/sidebar-menus.tsx:147 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 12c556d66995; files: ui/src/components/sidebar-menus.tsx)
  • Vyctor H. Brzezowski: Raw commit a38409f adds ui/src/components/session-placement-move-dialog.tsx:132 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a38409f85f77; files: ui/src/components/session-placement-move-dialog.tsx)

PR surface

Source -20, Tests +35. Total +15 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 44 64 -20
Tests 3 60 25 +35
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 104 89 +15

Review metrics

Metric Value Why it matters
Production versus test growth Production +44/−64; tests +60/−25 Production shrinks by 20 lines; the 35-line net test increase extends existing focus coverage through failure, retry, and empty-label recovery.

Labels

Label changes:

  • add P3: This is a focused internal UI refactor with no intended user-facing behavior change.
  • 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 UI refactor with no intended user-facing behavior change.
  • 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, 5:09 AM ET / 09:09 UTC.

@steipete
steipete merged commit 649340b into main Oct 21, 2026
102 of 107 checks passed
@steipete
steipete deleted the solid2/comp-a-async branch October 21, 2026 09:26
@steipete

Copy link
Copy Markdown
Contributor Author

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

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 22, 2026
* refactor(ui): consume session placement catalog through async boundaries

* fix(ui): track placement configuration slot reads
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: S 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