Repository navigation
perf(control-ui): make composer model pickers open faster - #173275
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
f919fe6 to
e054b25
Compare
e054b25 to
fe938ee
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
d45b0f6 to
d6240fc
Compare
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.
d6240fc to
2111eb5
Compare
* 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 ...
…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.
* 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]>
* 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]>
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; candidate2111eb5bc9278920d25599c03f7726678a79edc8. 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).
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.
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):ui/src/pages/chat/chat-pane-model-catalog.test.tsui/src/pages/chat/components/chat-model-picker.test.tsxui/src/components/overlay-anchor.browser.test.tsui/src/pages/chat/components/chat-model-picker.browser.test.tsxui/src/pages/chat/components/chat-effort-picker.browser.test.tsxui/src/pages/new-session/model-control.test.tsui/src/pages/new-session/model-control.metadata-lifecycle.test.tsui/src/e2e/model-catalog-partial-refresh.e2e.test.tsThe broader
chat-view.test.tspassed 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 withPrivate 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
8d4e374169beb205e70986e02caa9da4d6f144b8and current main4691afa4f88f8aa41c0d275e9a1988c81649d055, runrun_d70a7d99599a33865b946b5540a822d0: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.
Release-note context: composer model pickers open faster after reload while retaining current/default choices, provider recommendations, complete catalog search, and keyboard focus.