Skip to content

refactor(ui): derive palette search readiness from its admitted read - #179958

Merged
steipete merged 3 commits into
mainfrom
solid2/w-s2-palette-readiness
Oct 22, 2026
Merged

steipete merged 3 commits into
mainfrom
solid2/w-s2-palette-readiness

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole assigned-scope syntax census, exact merge base f365d7852ae1 → candidate. Unchanged cells show one value. These are candidates for source audit, including plain-owner and foreign-DOM contracts; they are not unqualified migration debt.

Family 1 Handler candidates 2 Cleanup 3 Async fn/memo 4 Action/optimistic/store 5 Import/lazy 6 Structured seed/store/projection 7 Factory 8 Context 9 Reveal 10 Root/get/run owner LOC
solid 4 10 8/0 0/0/0 3/2 0/2/0 0 0 0 1/1/1 7881
config 0 0 0/0 0/0/0 0/0 1/1/0 0 0 0 0/0/0 4962
menus 0 5 7/0 0/0/0 3/1 2/0/0 2 0 0 0/0/0 8256 → 8286
rest 4 18 21/2 1/1/0 6/1 2/1/0 0 2 0 0/0/1 20004
pagesA 3 3 89/10 12/15/0 6/0 1/3/1 0 0 0 0/0/0 26103
pagesB 1 12 152/2 2/2/1 22/4 4/6/1 0 1 1 0/0/0 42926
pagesC 4 31 201/1 3/5/0 43/4 12/9/0 20 0 0 0/0/0 54461
app 2 3 129/0 0/0/0 67/6 1/2/0 0 1 0 0/0/1 31633
lib 0 5 267/0 1/1/0 12/1 1/2/0 3 1 0 2/0/2 54628
plugins 0 3 18/0 1/1/0 13/1 1/2/0 0 0 0 2/2/3 4024
api 0 0 12/0 0/0/0 2/0 0/0/0 0 0 0 0/0/0 2104
total 18 90 904/15 20/25/1 177/20 25/28/2 25 5 1 5/3/8 256982 → 257012

The new read is a promise-returning receipt memo (not an async function), so the syntax-only async-memo count does not increase. The touched-file table below records that adoption.

What Problem This Solves

The command palette kept a separate pending boolean beside its admitted session search. This change exposes that existing search promise and lets Solid present readiness while the plain owner retains query debounce, IME, connection scope, request generations, and expected error outcomes.

User Impact

Search feedback and keyboard selection keep their existing behavior while readiness follows the admitted search. No migration or user action is required.

Why This Change Was Made

A synchronous memo narrows the stable receipt identity before the page-lifetime async memo consumes it under a search-only Loading / Errored boundary. latest keeps static commands and the listbox available, and isPending supplies the search indicator and aria-busy. Changing the query, entering a prompt, closing, or disconnecting still retires the original search through the existing owner. There is no new RPC, copied result state, or cancellation owner.

Evidence

Touched-file checklist Before After
1 Native conditional/prop-handler candidates 0 0
2 Component-level cleanup debt 0 0; existing keyed row cleanup stays tied to its For computation
3 Separate search pending flag / receipt memo / boundaries 1 / 0 / 0 0 / 2 / 1 Loading + 1 Errored
4 Mutation presentation Existing submission action helper Unchanged
5 Manual component loaders 0 0
6 Copied structured signals 0 0
7 Handwritten component factories 0 0
8 Throw-only context wrappers 0 0
9 Sibling loading regions requiring coordination 0 0
10 Root/owner APIs 0 0

Catalog readiness remains derived from the shared model reader and its existing admitted catalog receipt. Expected session-search failures stay recorded by the owner so a failed best-effort search never appears as successful zero results; the boundary covers unexpected rejected reads/render failures. The catalog pending affordance is a separate remaining async-read cutover; its shared owner already exposes an onRead receipt and is next in this lane. Expected error outcomes remain owner facts.

Proof Result
Focused default-Bun pending-search suite 19/19 passed; first process exited before assertions at the 120s no-output watchdog, supported retry used 600s startup allowance
General palette suite 32/32 passed after the CI correction, default Bun and one worker
UI tsrs Passed
Scoped lint Passed
Paired strict build Both passed, zero violations; same machine and normalized build identity
Production Knip Corrected-source final run passed; no new ignores
Independent P0–P2 autoreview Original review scoped clean. Correction review found only the old INDEX version; explicitly confirmed the working-tree correction fixes it. Staged that exact reviewed correction.
Startup JS gzip / CSS requests 324,967 → 324,979 B (+12); 1 → 1
Chat / New Session boot gzip 1,441,504 → 1,441,526 B (+22); 1,019,914 → 1,019,927 B (+13)
Combined locale assets gzip 3,070,568 → 3,070,473 B (−95); all individual locale pairs below cap
Production LOC 1,305 → 1,335 (+30); directly coupled E2E test +1 line

CI initially caught seven general palette cases where keyboard and row publications restarted the same resolved promise. The stable receipt identity now isolates those publications from async readiness, retaining immediate selection behavior. The general suite passes after correction. The earlier CI boot-render-storm failure matches scheduled main by exact test name; all other failures remain subject to exact-head attribution.

Synthetic captures use a held session read and a rejected session read at 1000×720. Both sides retain the same static commands, search status, and visible failure outcome. All four full frames were inspected; the final warmed fixture capture reported no browser errors.

State Before After
Pending session search Before pending After pending
Failed session search Before failure After failure

Coupled Details readiness correction

Exact prior-head CI 39688671784 also exposed Chat header and delegated work > keeps new batches collapsed until Subagents is opened manually without duplicate wait status. Its optional .chat-details-session metadata section can legitimately be empty and have no visible geometry. The test now waits for attachment to establish implementation arrival. The visible Details panel, removal of its loading status, and visible subagent content assertions remain. This is not attributed to main.

The exact base and prior head each passed a focused replay; the corrected test passed its focused replay (1/1, 50.99s). Scoped typed lint and independent P0–P2 review pass. Production source and the paired build are unchanged by this one-line test correction; fresh ci:full remains the landing evidence for the replacement head.

@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-21T23:46:04.067565Z f26c79f 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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:feature 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 derives command-palette search readiness from the existing admitted search promise instead of a separate pending flag.

Example: Search for “plugins” while the session read is held, then rejected.

  • Before: An owner-maintained boolean shows “Searching sessions”; failure appears beside usable static commands.
  • After: Solid derives the same pending presentation from the search promise, while the owner retains the failure outcome.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Visible presentation parity is supported, but the asynchronous cutover is incomplete while affected consumer tests fail.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The inspected synthetic Control UI screenshots exercise the changed search presentation with held and rejected session reads and show retained commands plus matching pending and failure outcomes.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: The palette must keep navigation commands usable and accurately present pending and failed session searches.
Reason: The maintainer-authored direction adopts the documented owner-receipt pattern without new options, RPCs, or competing result state.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-approved refactor preserves the search owner, but the asynchronous cutover leaves existing palette consumer tests failing.

Priority: P3
Reviewed head: c7820b8d3148d729f2de80155b1c6bcda54506f8

Before merge

  • Wait for Solid settlement in the affected palette tests (P2) - The new promise-returning memo adds asynchronous settlement to updates of the parked palette projection, including updates that revisit an already-settled receipt. Existing consumers still await only palette.updateComplete, which covers bridge work rather than this Solid computation. Exact-head CI consequently fails seven existing assertions: for example, ArrowDown in the two-model scenario still observes “Needle Alpha” instead of “Needle Bravo” at command-palette.test.ts:607. Update the affected test consumers to await observable Solid settlement using the existing waitForSolid helper, preserving the selection, row-identity, catalog-clearing, and accessibility assertions.

Findings

  • [P2] Wait for Solid settlement in the affected palette tests — ui/src/components/command-palette-view.tsx:422

Tests

  • Missing end-to-end proof: The screenshots establish pending/failure presentation parity; the affected keyboard, catalog-refresh, row-identity, and accessibility assertions still need passing settlement-aware validation.
Agent review details

How this fits together

The Control UI palette owner admits Gateway session and transcript searches, fences stale results, and publishes results and outcomes to the Solid renderer.

flowchart LR
  A[Palette input] --> B[Search owner]
  B --> C[Gateway search reads]
  C --> B
  B --> D[Owner projection]
  D --> E[Receipt memo]
  E --> F[Search presentation]
  D --> F
Loading

Technical review

Best possible solution:

Keep the existing search owner and receipt-based presentation, and adapt affected palette assertions to wait for Solid settlement without weakening their behavior checks.

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

Exact-head CI records the failing palette assertions, and source inspection explains the asynchronous settlement mismatch; no target code was executed during this review.

Is this the best way to solve the issue?

Observing the admitted promise follows the repository's Solid recipe and preserves one search owner; the consumer-test cutover needs completion.

Full review comments:

  • [P2] Wait for Solid settlement in the affected palette tests — ui/src/components/command-palette-view.tsx:422
    The new promise-returning memo adds asynchronous settlement to updates of the parked palette projection, including updates that revisit an already-settled receipt. Existing consumers still await only palette.updateComplete, which covers bridge work rather than this Solid computation. Exact-head CI consequently fails seven existing assertions: for example, ArrowDown in the two-model scenario still observes “Needle Alpha” instead of “Needle Bravo” at command-palette.test.ts:607. Update the affected test consumers to await observable Solid settlement using the existing waitForSolid helper, preserving the selection, row-identity, catalog-clearing, and accessibility assertions.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.93

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Search readiness and synchronous domain ownership keeps the original intent (84255bc: The Solid migration retained plain synchronous domain owners and existing keyboard behavior.)
  • Reconnect retirement and retained search results keeps the original intent (c7d9291: Same-identity transport edges retain presentation while stale requests remain fenced.)
  • Mention-driven search admission keeps the original intent (8ade3dd: Mention owner transitions pause and resume searches directly rather than relying on rendering effects.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/components/command-palette.test.ts src/components/command-palette-pending.test.ts src/components/command-palette-mentions.test.ts src/components/command-palette-lifecycle.test.ts
  • pnpm tsgo:ui
  • git diff --check

What I checked:

Likely related people:

  • RoboClaw: Raw commit 67ff90c adds ui/src/components/command-palette-state.ts:156 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 67ff90cfdbb6; files: ui/src/components/command-palette-state.ts)

PR surface

Source +29. Total +29 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 51 22 +29
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 51 22 +29

Labels

Label changes:

  • add P3: This is an internal presentation refactor with a focused test-consumer repair; no lasting user-visible failure is established.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit 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:

  • P3: This is an internal presentation refactor with a focused test-consumer repair; no lasting user-visible failure is established.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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:18 PM ET / 22:18 UTC.

@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: applying reviewed decision.

I am applying the reviewed decision for this pull request: refactor(ui): derive palette search readiness from its admitted read This is item 1/1 in the current shard. Shard 1/1.

This transient lease prevents a newer review from overlapping label, comment, or close mutations.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Oct 22, 2026
@steipete
steipete merged commit 469da15 into main Oct 22, 2026
98 checks passed
@steipete
steipete deleted the solid2/w-s2-palette-readiness branch October 22, 2026 01:01
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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