Skip to content

fix(ui): provider setup fails when advancing to endpoint compatibility - #194866

Merged
steipete merged 8 commits into
mainfrom
solid2/w-perf-first-run-1107
Nov 8, 2026
Merged

steipete merged 8 commits into
mainfrom
solid2/w-perf-first-run-1107

Conversation

@steipete

@steipete steipete commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fresh provider setup can throw Cannot read properties of undefined (reading 'variant') when advancing from the API-key field to endpoint compatibility. A real fresh-Gateway baseline reproduced the render failure in 10/10 Chromium sessions.

User Impact

Provider setup advances through its existing choices without the picker render failure. The existing benchmark can now measure a new user's setup, consent, restart, first two replies, and native plugin first visits against an isolated real Gateway.

Why This Change Was Made

Keep SingleChoice's required picker parameters in one stable object with reactive getters instead of a whole-object memo. No fallback state, new product option, or consent change is added.

Extend the compiled-Gateway RPC benchmark with fresh state, a deterministic loopback provider, mobile assistant dismissal, optional empty plugin installation, and browser document/reconnect diagnostics. Each sample starts a new Gateway and browser context. First-run's 100 ms RTT preset retains localhost identity; the existing remote-client census behavior is unchanged.

The new workload exposed two bugs in the shared latency simulator. Independent packet timers reordered TCP bytes; one FIFO delivery timer preserves their order. Normal upstream close could also discard delayed response bytes; preserve the reverse delivery until it finishes. Both have regressions that fail their previous owners.

Evidence

Proof Result
Real provider-setup reproduction Base: render error in 10/10 Chromium journeys. Selected candidate journeys have no render or step errors.
Core first-run matrix 16 conditions: Chromium/WebKit/Firefox, desktop/mobile, localhost/100 ms RTT, plus Chromium 4× CPU.
Optional native-plugin matrix Same 16 conditions; Workboard, X, ClawRouter, Knowledge and MCP Relay, plus packaged Memory/Channels/Nostr/WhatsApp views.
First versus second reply Three additional local desktop cases, one per engine. Together with the matrices: 35 complete selected cases, one sample each.
Wizard tests 11 passed. The added transition case also passes on base; the real Gateway is the failing picker reproduction. Two duplicate assertions were removed.
Wire-link tests 8 passed. Byte-order and HTTP connection-close regressions fail old owners. A real 8 MiB TCP transfer returns the exact checksum.
Types, lint, format, Knip UI and scripts types, tooling test types, targeted lint/format and final-head production Knip passed.
Test-line ratchet Passed with a scoped allocation of exactly 173 net regression-test lines (61 wizard, 112 wire); shared scalar unchanged. Concurrent main changes consumed the previous shared slack.
Build and strict asset check Base/head UI builds pass. Both strict checks report the same six existing violations; no ceiling changed.
Independent review Complete candidate and subsequent corrections reviewed; no actionable P0–P2 findings.
Final-head CI ci:full run 42429586635 passed: 44 jobs passed, 24 skipped, including UI E2E and real-Gateway shards. Head 13b3e1e3c4f2bd6cc08bf58099271ea84147da23.

Startup JavaScript remains 90,853 B normalized gzip / 3 requests; CSS remains 39,090 B / 1 request. Total JavaScript normalized gzip decreases 19 B; document gzip differs by 1 B. Lazy boundaries are preserved.

These are coverage measurements, not a claimed timing optimization or 20-pair acceptance result. Browser readiness starts after Gateway startup. The loopback provider excludes external inference latency and OAuth. Per-step RPC counts are filtered to the observer window; resource totals are completed subresources and exclude initial navigation. Unsupported engine counters remain null.

One optional-plugin Chromium mobile RTT/4× trial reloaded during the first send. Its screenshot shows the delivered reply and enabled composer, but document replacement reset the readiness probe and invalidated the timing. That failed measurement is retained; a single repeat completed all 24 steps. It is not described as a 120-second user reply. Every selected run also retains the existing final CLI shutdown watchdog failure: the server closes, but the process self-terminates with two remaining message ports.

Remaining findings are visible rather than hidden: setup's deferred restart costs roughly 6–7 seconds; cold first replies exceed same-session second replies; provider activation records about 0.415 desktop CLS from the hidden navigation column's grid transition. The shell transition and optional mascot import recovery are unmeasured follow-up candidates. Host-installed AI binary discovery remains host-dependent despite isolated HOME/PATH.

Previous-head CI found the diagnostic innerText lint error and test-budget exhaustion; both are fixed and checked locally. The scoped 173-line allocation covers only the picker transition and TCP ordering/close regressions; no asset ceiling changes. Its E2E shard ended without a failed test name in its log/timeout artifact, so no inherited-failure claim is made. The final-head ci:full run passed, including the previously unidentified E2E shard; no inherited-failure exception is used.

Visual Proof

Synthetic model selection before/after, inspected for private data. Choices and layout are unchanged.

Before After
Before: synthetic model selection After: synthetic model selection

Scope and Size

9 files, 2,312 → 3,593 LOC (+1,481/−200). Product UI is 661→671 LOC; memos 6→5, with no new effects, DOM queries, flush calls or owner APIs. Most growth is the requested real first-run driver and measurement. No dependencies, product config options, or changelog changes.

Keep the wizard picker parameter object present across step transitions. Add a real fresh-Gateway benchmark for explicit provider setup, onboarding restart, first chat, and native plugin visits. Preserve render and shutdown failures as failures; synthetic provider traffic stays on loopback.
@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 7, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T00:27:17.110375Z 13b3e1e 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XL labels Nov 7, 2026
@steipete steipete changed the title fix(ui): keep first-run provider picker stable fix(ui): provider setup fails when advancing to endpoint compatibility Nov 7, 2026
A high-bandwidth real TCP probe exposed reordered packets from independently rounded delivery timers. Use one FIFO delivery timer while retaining the existing transmission schedule, and cover the byte-order contract with a deterministic regression.
@steipete
steipete enabled auto-merge (squash) November 7, 2026 23:50
@steipete
steipete disabled auto-merge November 7, 2026 23:52
Keep valid Connection: close responses intact under added RTT. Cover the real HTTP boundary and retain document/reconnect diagnostics for failed first-run samples. Select each native plugin's own host when capturing its content.
Read failure snapshot text without forcing layout and remove two duplicate assertions while retaining the busy-transition behavior proof. Keep the test-line ratchet within its existing allocation.

@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: 13b3e1e3c4

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

Comment on lines +905 to +907
const records = await page.evaluate(
() => Reflect.get(window, "openclawRpcPayloads") ?? [],
);

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 Restrict first-run RPC records to the measured step

In --first-run mode, this reads the entire RPC buffer, which is cleared only at the previous measurement's end. runControlUiFirstRunFlow waits for the onboarding shutdown/reconnect between measurements, so the next first-message-compose observation includes reconnect and bootstrap traffic from that unmeasured interval, while its server and browser metrics cover only composing. This misattributes RPC counts and payload bytes to the step and makes comparisons depend on intervening background work. Filter records by the measurement's browser-local start/end timestamps, or reset the buffer at the start of each measurement.

Useful? React with 👍 / 👎.

@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. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@steipete
steipete merged commit bda0fa9 into main Nov 8, 2026
132 of 134 checks passed
@steipete
steipete deleted the solid2/w-perf-first-run-1107 branch November 8, 2026 00:48
@steipete

steipete commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 8, 2026
openclaw#194866)

* fix(ui): keep first-run provider picker stable

Keep the wizard picker parameter object present across step transitions. Add a real fresh-Gateway benchmark for explicit provider setup, onboarding restart, first chat, and native plugin visits. Preserve render and shutdown failures as failures; synthetic provider traffic stays on loopback.

* fix(bench): preserve byte order under simulated latency

A high-bandwidth real TCP probe exposed reordered packets from independently rounded delivery timers. Use one FIFO delivery timer while retaining the existing transmission schedule, and cover the byte-order contract with a deterministic regression.

* fix(bench): follow mobile onboarding and localhost RTT setup

* fix(bench): flush delayed responses before upstream close

Keep valid Connection: close responses intact under added RTT. Cover the real HTTP boundary and retain document/reconnect diagnostics for failed first-run samples. Select each native plugin's own host when capturing its content.

* test(bench): compare the first reply with a warm second turn

* style(bench): read reply content without layout work

* fix(ci): tighten first-run diagnostics and transition coverage

Read failure snapshot text without forcing layout and remove two duplicate assertions while retaining the busy-transition behavior proof. Keep the test-line ratchet within its existing allocation.

* test(ui): allocate first-run regression coverage
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. 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. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant