Skip to content

perf(control-ui): make composer model pickers open faster - #173275

Merged
steipete merged 6 commits into
mainfrom
steipete/coldload-menu-first-open
Oct 16, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/coldload-menu-first-open

Conversation

@steipete

@steipete steipete commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Composer model choices take several frames to appear on first activation after a signed-in dashboard deep-link reload. The campaign recorded a 14-state reload, and its earlier interaction evidence measured 58.8 ms model-option readiness and 22.3 ms Details readiness.

Ready for lead review. Exact-head PR CI is green. Full UI e2e completed with 3,509 passing cases, one environment failure reproduced on baseline and current main, and one existing skipped desktop-carrier case. The lead reviews and lands this campaign PR.

Change and User Impact

The shared composer owner presents accepted summary activation synchronously, instead of waiting for the queued native toggle. Composer surfaces declare their same-root relationship and use CSS anchors without opening a second spatial proxy. Generic live cross-root reanchoring retains its existing contract. Model selection closes through the existing overlay registry, preserving the upstream microphone migration's deletion of legacy dropdown dismissal machinery.

Catalog projection was already memoized; this adds no second projection cache. Unranked providers initially expose nine choices through the existing list/disclosure structure, keeping current/default choices first. All models and full catalog search retain access to every choice. Configured recommendations retain their behavior. Search assigns IDs to active descendants and updates the previous highlight and numbered shortcuts, removing list-wide DOM writes. Scoped pane bindings apply each accepted catalog result once, avoiding a warm-open pane render. Menus remain mounted at boot.

The model picker owns search focus; Effort preserves pointer typing focus. Unavailable Effort remains hidden, inert, and explicitly disabled, with the mounted control required by its private return type. The entry animation ends before closing inspects pending presentation, preserving rapid reopen/Escape behavior in WebKit. New Session fixtures use their document-owned mount helper. Details already meets the two-frame target and retains its positioning implementation.

Production source delta: +46 lines, 135 insertions / 89 deletions across nine modules, excluding both test extensions and test support. Growth supplies the accepted-activation/notification and same-root contracts while preserving keyboard, programmatic, and cross-root behavior. Duplicate trigger handlers, pane updates, catalog application, and list-wide writes are removed. There is no maintained benchmark diff, Gateway/schema/configuration/dependency change, or changelog edit.

Evidence

Baseline production code 8d4e374169beb205e70986e02caa9da4d6f144b8; candidate 2111eb5bc9278920d25599c03f7726678a79edc8. One AWS Crabbox cbx_843259ee1526, c7a.4xlarge, run run_ec50aff2056f7f7e56a0d5a1944acebf. The standard catalog has 14 interleaved baseline/candidate pairs, balanced seven AB/seven BA; the 300-model catalog has seven interleaved pairs, alternating AB/BA. All 42 reload samples are included. Interrupted comparisons are excluded. Both bundles are built in the pinned candidate checkout; baseline reverses the scoped production patch to the base, so the benchmark Git/build identifier is shared.

Repo Playwright Chromium, the maintained Team-scale bench (300 sessions, 30 pins, 120 people, 240 messages, 12 widgets), and campaign LoAF/mutation plus WS/RPC probes. Pre-measure one-second samples show 100% idle CPU, no swap activity, and no competing workload. Each target starts from a fresh document and real pointerdown with no held press. The posted task after the first ready rAF measures a rendering-opportunity upper bound, not an exact compositor timestamp.

All values are milliseconds, median (IQR width).

Interaction Baseline Candidate
Standard model: first option ready 58.05 (1.50) 14.10 (0.10)
Standard model: rendering opportunity 66.60 (1.55) 21.05 (0.50)
300 models: first option ready 129.20 (5.35) 19.20 (0.85)
300 models: rendering opportunity 147.80 (5.00) 27.60 (1.05)
Standard Details: rendering opportunity 22.60 (1.08) 23.80 (1.68)
300-model fixture Details: rendering opportunity 25.00 (1.85) 25.00 (1.60)

All 21 candidate model openings retained search focus. The largest candidate model bound was 29.0 ms; the largest Details bound was 28.1 ms. All 300 model rows remain mounted and searchable. Logical mock-Gateway RPC count is 87 in every reload; this is not a live-socket measurement.

Reload trace Baseline Candidate
Standard main-thread busy 3969.60 (123.75) 3894.46 (70.69)
300-model main-thread busy 4423.64 (68.03) 4423.84 (18.24)
Standard forced-layout time 595.65 (31.07) 574.64 (149.89)
300-model forced-layout time 647.44 (180.06) 659.41 (14.50)

There is no measured reload CPU regression: standard median is 1.9% lower and the 300-model median is effectively unchanged. Both builds retain the existing two-mode layout distribution; the slightly higher large-catalog layout median is disclosed above. Representative raw reload traces/profiles are retained. This replaces the earlier seven-pair block's unresolved reload qualification.

Validation

Fresh autoreview is clean through P2. Exact-head PR CI is green.

On the same AWS lease: 226 unit/chat-view contracts, 38 native Chromium cases, 38 WebKit cases, and 10 catalog/focus e2e cases passed. The two UI test type graphs that caught the optional-return mismatch now pass (UI app 75.5 s; UI e2e 80.6 s). The warm-catalog and accepted-activation regression controls fail on the original owners at their expected assertions and pass on the candidate. The partial-catalog control passes all nine cases on baseline and candidate. Coverage includes filter removal/ARIA cleanup, search and keyboard focus, disabled activation, sibling effort/context controls, adopted templates, and live cross-root reanchoring.

Changed/affected test wall times (pnpm test <file> --maxWorkers=1):

File Passed Wall time
ui/src/pages/chat/chat-pane-model-catalog.test.ts 7 9.65 s
ui/src/pages/chat/components/chat-model-picker.test.tsx 7 4.72 s
ui/src/components/overlay-anchor.browser.test.ts 17 3.99 s
ui/src/pages/chat/components/chat-model-picker.browser.test.tsx 11 5.39 s
ui/src/pages/chat/components/chat-effort-picker.browser.test.tsx 6 3.47 s
ui/src/pages/new-session/model-control.test.ts 28 4.61 s
ui/src/pages/new-session/model-control.metadata-lifecycle.test.ts 25 7.46 s
ui/src/e2e/model-catalog-partial-refresh.e2e.test.ts 9 27.77 s

The broader chat-view.test.ts passed 149 contracts in 10.96 s wall time. The changed-file gate passed all ten affected test type graphs, UI typecheck, formatting, lint/styles, i18n, and the other scoped guards. Its aggregate result is red on the 452-versus-453 environment-variable budget and global unused-export findings outside the changed files. Both findings reproduce unchanged on baseline. Current main has corrected the budget to 452/452; its global unused-export scan remains red with a different set of findings.

The full UI e2e suite ran once on the final head: 807 files — 805 passed, one failed, one skipped; 3,509 passed cases, one failed, one skipped, 5,502.79 s. The sole failed file is extensions/qa-lab/src/control-ui-automation-management.real-gateway.e2e.test.ts. Its configured-owner case fails during Crabline artifact setup with Private mutation boundary is writable by another POSIX principal, before browser interaction. The preceding Gateway-restart case passes. The existing desktop-carrier resize fixture is skipped. No full-suite waiver or guard bypass is claimed.

Narrow controls used the same AWS lease, with untouched baseline 8d4e374169beb205e70986e02caa9da4d6f144b8 and current main 4691afa4f88f8aa41c0d275e9a1988c81649d055, run run_d70a7d99599a33865b946b5540a822d0:

Control Baseline Current main
Environment-variable budget Same 452/453 failure Pass, 452/452
Global unused exports Same findings as candidate Fail, different global findings
Failed automation e2e file 1 passed / 1 failed, same permission error 1 passed / 1 failed, same permission error

The full file-level inventory, raw JSON, comparison samples, and control logs are retained with the lane proof artifacts. Synthetic captures below are from the final-head comparison.

Synthetic before / after

Inspected full captures from the final-head comparison, using only synthetic fixture data. The initial viewport preserves the existing layout; the interaction changes bound the list's initial layout and retain access through search and All models. No private campaign capture or real account data is included.

Before After
300-model picker before 300-model picker after

Release-note context: composer model pickers open faster after reload while retaining current/default choices, provider recommendations, complete catalog search, and keyboard focus.

@clawsweeper

clawsweeper Bot commented Oct 15, 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.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: S labels Oct 15, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 15, 2026
@clawsweeper

clawsweeper Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head f919fe6a7e5a973047e16860752b6075d626c048, but the PR head is now 2111eb5bc9278920d25599c03f7726678a79edc8. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

Review history (1 earlier review cycle)
  • reviewed 2026-10-15T16:40:25.896Z sha f919fe6a7e5a973047e16860752b6075d626c048 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the steipete/coldload-menu-first-open branch from f919fe6 to e054b25 Compare October 15, 2026 18:22
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M and removed scripts Repository scripts size: S labels Oct 15, 2026
@steipete
steipete force-pushed the steipete/coldload-menu-first-open branch from e054b25 to fe938ee Compare October 15, 2026 19:06
@steipete steipete changed the title experiment(control-ui): menu first-open attribution [do not merge] improve(control-ui): make composer model pickers open faster Oct 15, 2026
@steipete
steipete marked this pull request as ready for review October 15, 2026 19:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-15T22:40:47.546803Z 2111eb5 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 force-pushed the steipete/coldload-menu-first-open branch 5 times, most recently from d45b0f6 to d6240fc Compare October 15, 2026 22:03
Reuse accepted catalog receipts instead of rerendering a warm picker. Bound unranked initial groups with the existing All models disclosure while preserving complete search and configured recommendations. Keep cross-root positioning in its generic owner.
Assign option IDs when they become active descendants, update only the previous highlight and numbered shortcuts, and retain unused hidden ranks. Preserve active-descendant cleanup when refreshed catalog choices disappear.
Stop the entry animation before native overlay closing inspects pending presentation. Mount New Session picker fixtures in the document so accepted-open refreshes exercise their native lifecycle.
Keep pointer focus policy with the composer and each control. The shared synchronous activation path must not move effort-picker focus away from the draft. Cover pointer preservation before the native keyboard reopen and Escape flow.
@steipete
steipete force-pushed the steipete/coldload-menu-first-open branch from d6240fc to 2111eb5 Compare October 15, 2026 22:35
@steipete steipete changed the title improve(control-ui): make composer model pickers open faster perf(control-ui): make composer model pickers open faster Oct 15, 2026
@clawsweeper clawsweeper Bot removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 16, 2026
@steipete
steipete merged commit 3971bf5 into main Oct 16, 2026
130 checks passed
@steipete
steipete deleted the steipete/coldload-menu-first-open branch October 16, 2026 01:27
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* commit '56c315156f4542f197a2b7f727681ba3f41c21b5': (23 commits)
  fix(ui): remove stale Lit cleanup from model catalog tests
  refactor(tests): consolidate iMessage discovery checks (#173624)
  fix(auto-reply): retire older collect cancellation after admission
  fix(memory): avoid rebuilding initially empty indexes after restart (#173622)
  fix(test): preserve subprocess runtime identity (#173446)
  perf(sessions): batch transcript index reconciliation (#173620)
  fix(gateway): share GitHub options preparation during reconnects (#173589)
  perf(control-ui): open the composer model picker without list-wide work (#173275)
  fix: finish compile-cache cleanup after short CLI commands exit (#173603)
  refactor(ui): finish native shell rendering (#171554)
  fix: preserve standalone CLI profiles and settle Doctor shutdown (#173154)
  refactor: centralize agent memory host typing (#173619)
  fix: camera fallback picker opens away from the attachment button (#173618)
  refactor: deduplicate existing CI runner routing with YAML anchors (#172670)
  fix(ai): preserve multiline Google replies and report malformed streams (#173612)
  refactor(tests): remove duplicate speech policy test (#173606)
  refactor(ui): simplify page rendering and derivations (#173608)
  fix(release): Linux channel promotion fails after a withdrawn Windows companion (#173615)
  fix(update): wait for native Gateway ownership before restarting (#173588)
  test(sessions): admit schema probe fixture writes behind maintenance
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 16, 2026
…rk (openclaw#173275)

First open of the composer model picker did list-wide DOM writes (IDs and highlight on every option), re-applied an unchanged catalog result through a pane render, double-handled activation, and laid out every model of unranked providers. Search now updates only the previous and next highlighted rows, each accepted catalog result is applied once per pane binding, same-root overlays skip cross-root reanchoring, and unranked providers show their first nine choices (current/default first) in the existing per-provider disclosure; All models and search still reach every model, and configured recommendations are unchanged.

21 interleaved AWS pairs, pointerdown to rendering opportunity: standard catalog 66.6 -> 21.1 ms, 300-model catalog 147.8 -> 27.6 ms; Details unchanged (~24 ms). Runtime +46 LOC. Full UI e2e 3,509 passed (one inherited Crabline permission failure on main); exact-head CI green.
vincentkoc added a commit that referenced this pull request Oct 16, 2026
* fix(ci): share the iOS screenshot build

* fix(ci): preserve the screenshot artifact container on download

* merge: integrate main for iOS screenshot workflow conflicts

* style(ci): format the combined screenshot evidence changes

* docs(ci): name the combined screenshot capture

* fix(ios): expose screenshot simulator creation errors

* Merge main at 56c3151 to include the UI test cleanup fix

* commit '56c315156f4542f197a2b7f727681ba3f41c21b5': (23 commits)
  fix(ui): remove stale Lit cleanup from model catalog tests
  refactor(tests): consolidate iMessage discovery checks (#173624)
  fix(auto-reply): retire older collect cancellation after admission
  fix(memory): avoid rebuilding initially empty indexes after restart (#173622)
  fix(test): preserve subprocess runtime identity (#173446)
  perf(sessions): batch transcript index reconciliation (#173620)
  fix(gateway): share GitHub options preparation during reconnects (#173589)
  perf(control-ui): open the composer model picker without list-wide work (#173275)
  fix: finish compile-cache cleanup after short CLI commands exit (#173603)
  refactor(ui): finish native shell rendering (#171554)
  fix: preserve standalone CLI profiles and settle Doctor shutdown (#173154)
  refactor: centralize agent memory host typing (#173619)
  fix: camera fallback picker opens away from the attachment button (#173618)
  refactor: deduplicate existing CI runner routing with YAML anchors (#172670)
  fix(ai): preserve multiline Google replies and report malformed streams (#173612)
  refactor(tests): remove duplicate speech policy test (#173606)
  refactor(ui): simplify page rendering and derivations (#173608)
  fix(release): Linux channel promotion fails after a withdrawn Windows companion (#173615)
  fix(update): wait for native Gateway ownership before restarting (#173588)
  test(sessions): admit schema probe fixture writes behind maintenance
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* fix(ci): share the iOS screenshot build

* fix(ci): preserve the screenshot artifact container on download

* merge: integrate main for iOS screenshot workflow conflicts

* style(ci): format the combined screenshot evidence changes

* docs(ci): name the combined screenshot capture

* fix(ios): expose screenshot simulator creation errors

* Merge main at a11e38b to include the UI test cleanup fix

* commit 'a11e38b8bb1eb58aaf392a0eab458dbb47aad30f': (23 commits)
  fix(ui): remove stale Lit cleanup from model catalog tests
  refactor(tests): consolidate iMessage discovery checks (openclaw#173624)
  fix(auto-reply): retire older collect cancellation after admission
  fix(memory): avoid rebuilding initially empty indexes after restart (openclaw#173622)
  fix(test): preserve subprocess runtime identity (openclaw#173446)
  perf(sessions): batch transcript index reconciliation (openclaw#173620)
  fix(gateway): share GitHub options preparation during reconnects (openclaw#173589)
  perf(control-ui): open the composer model picker without list-wide work (openclaw#173275)
  fix: finish compile-cache cleanup after short CLI commands exit (openclaw#173603)
  refactor(ui): finish native shell rendering (openclaw#171554)
  fix: preserve standalone CLI profiles and settle Doctor shutdown (openclaw#173154)
  refactor: centralize agent memory host typing (openclaw#173619)
  fix: camera fallback picker opens away from the attachment button (openclaw#173618)
  refactor: deduplicate existing CI runner routing with YAML anchors (openclaw#172670)
  fix(ai): preserve multiline Google replies and report malformed streams (openclaw#173612)
  refactor(tests): remove duplicate speech policy test (openclaw#173606)
  refactor(ui): simplify page rendering and derivations (openclaw#173608)
  fix(release): Linux channel promotion fails after a withdrawn Windows companion (openclaw#173615)
  fix(update): wait for native Gateway ownership before restarting (openclaw#173588)
  test(sessions): admit schema probe fixture writes behind maintenance
  ...

Co-authored-by: Vincent Koc <[email protected]>
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 docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant