Repository navigation
fix(ui): provider setup fails when advancing to endpoint compatibility - #194866
Conversation
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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
Codex Review Summary: ✅ CompletedThis 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. |
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.
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.
There was a problem hiding this comment.
💡 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".
| const records = await page.evaluate( | ||
| () => Reflect.get(window, "openclawRpcPayloads") ?? [], | ||
| ); |
There was a problem hiding this comment.
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 👍 / 👎.
|
Merged via squash.
|
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
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
ci:fullrun 42429586635 passed: 44 jobs passed, 24 skipped, including UI E2E and real-Gateway shards. Head13b3e1e3c4f2bd6cc08bf58099271ea84147da23.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
innerTextlint 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-headci:fullrun 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.
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.