Repository navigation
perf(ui): reduce switch label DOM in automation lists - #189052
Merged
Merged
Conversation
Use native accessible labels for plain-string switches while retaining rich row labels and native interaction behavior. This removes 500 hidden elements from the large automation-list fixture.
Contributor
|
🦞👀 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. |
Contributor
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. |
Contributor
Author
|
Merged via squash auto-merge.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 1, 2026
* perf(ui): reduce standalone switch label DOM Use native accessible labels for plain-string switches while retaining rich row labels and native interaction behavior. This removes 500 hidden elements from the large automation-list fixture. * test(ui): scope mobile Panels readiness to its header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #188991
What Problem This Solves
Large automation lists create a separate hidden label element for every standalone switch, even though each switch already receives a plain string label.
User Impact
Automation lists render fewer DOM elements while keeping the same accessible switch names, native controls, focus, keyboard activation, and save-state behavior.
Why This Change Was Made
Use native
aria-labelforSettingsToggle's required string label.SettingsToggleRowkeeps its rich JSX and title-labelled paths. No public API, input handler, CSS, scheduling, or domain-owner changes are involved.In the synthetic 500-job fixture, hidden switch-label elements fall from 500 to 0 and table elements from 24,508 to 24,008. Solid retains empty text placeholders, so the measured reduction is 500 elements; text-node count remains 7,506.
Evidence
All 840 qualification observations passed. Paired WebKit typing medians improved 3.53% on desktop and 3.33% on mobile; Chromium improved 4.51% and 4.74%. The 1.3× engine-ratio target is not reached: typing remains 2.97× desktop / 2.62× mobile. This is a small measured improvement, not a claim of an irreducible browser floor.
Qualification rule: fixed synthetic 500-job Gateway fixture, ten serial interleaved base/head/base pairs per action and viewport, both engines, A/A controls, untraced complete-action wall time. The predeclared rule retained a real-action win only if the other engine and sibling actions stayed within the agreed timing band, with ten additional pairs for uncertain cells. Four cells received those additional pairs. WebKit Timeline is elapsed-time attribution, not CPU consumption. These workloads include browser-driver input delivery and the final frame wait, not just renderer work.
Production LOC:
settings-ui.tsx717 → 719 (+5/−3). Directly changed tests: 639 → 643 (+8/−4); total +13/−7. No imperative lifecycle, effect, listener, DOM-query, or owner-API counts change. The extra private string-label input keeps both existing callers in the shared renderer; no new abstraction is added. The old hidden-label assertion is replaced with an accessible-name assertion.The shared Mac had 1-minute load 14.71–39.04 (median 24.75). Chromium mobile paste retains a wall-time caveat: across 20 pairs its paired median was +1.12% and raw p95 104.15 → 112.47 ms. Its first A/A wall-time control drifted +8.62%; native renderer task CPU improved 2.22% (p95 56.06 → 55.44 ms), and script CPU improved 0.57%. Layout median rose about 0.05 ms while its p95 improved. Under the noisy-host rule, this is a CPU/DOM-work win, with no wall-time win claimed for that cell. Chromium mobile refresh settled to +0.59% across 20 pairs; pending typing settled to −0.22%, with sub-1% tail movement against the A/A control. WebKit mobile open settled to +0.52% with a lower p95.
Full paired timing table
Values are median / p95 [min–max] in ms. Paired changes compare the candidate with the geometric mean of its adjacent base slots; the base and A/A columns retain their raw distributions. Ten pairs per cell, twenty for the four confirmed cells. Base:
2919a0dba8d8; all runs use the same built candidate bytes.Visual comparison
Inspected synthetic fixtures; desktop and mobile appearance are unchanged.
CI repair
The first full CI run (41170905309) caught an ambiguous global “Panels” lookup in
docks Details in wide conversations and preserves manual intent, drafts, and independent scrolling. Scope its existing visibility wait to the mobile header, keeping all downstream assertions. The preserved base bundle passed a focused replay; the fixed test passed against the candidate bundle (1 selected case, 15.20 s). Both replays used the normal headless Playwright fixture with the existing prebuilt-assets contract; Node is required for this E2E config. UI typecheck, scoped lint/format and independent P0–P2 review pass for the repair. No production or measured bundle bytes changed.That run also failed
commits a streamed delta burst in frame-bound transcript batcheswithexpected 4 to be 0, matching the exact test and assertion in the latest completed scheduled main run 41168526404. This inherited failure is recorded rather than reported green.