Skip to content

perf(ui): reduce switch label DOM in automation lists - #189052

Merged
steipete merged 2 commits into
mainfrom
solid2/w-webkit-cron-1030
Oct 31, 2026
Merged

steipete merged 2 commits into
mainfrom
solid2/w-webkit-cron-1030

Conversation

@steipete

@steipete steipete commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

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-label for SettingsToggle's required string label. SettingsToggleRow keeps 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.

Check Result
Shared switch and Cron naming tests 8/8 pass; reactive names, activation, rejected changes, saved job labels
Browser accessible-name/DOM probe 8/8 pass; Chromium/WebKit, desktop/mobile, before and after filtering
UI typecheck, scoped lint/format Pass
Production Knip Pass, 1m 51.1s
Production UI build and strict asset check Pass
Startup JS gzip / CSS requests 88,766 → 88,762 B / 1 → 1
Independent complete-diff review Scoped clean, P0–P2

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.tsx 717 → 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.

Action Viewport Engine Pairs Base Candidate A/A control Paired change A/A change
cron-menu-open desktop chromium 10 181.0 / 194.5 [178.5–194.5] 181.5 / 208.8 [164.2–208.8] 180.7 / 211.7 [175.4–211.7] +0.55% -0.52%
cron-menu-open desktop webkit 10 293.4 / 319.8 [262.3–319.8] 293.2 / 326.1 [277.8–326.1] 302.8 / 328.6 [274.4–328.6] -0.81% +5.50%
cron-menu-open mobile chromium 10 147.9 / 164.7 [139.6–164.7] 147.7 / 164.4 [145.4–164.4] 148.0 / 164.9 [130.9–164.9] -3.12% +0.02%
cron-menu-open mobile webkit 10 230.5 / 274.7 [198.6–274.7] 215.4 / 247.5 [211.0–247.5] 230.9 / 263.1 [214.3–263.1] -3.21% +2.81%
cron-open desktop chromium 10 136.7 / 212.1 [126.8–212.1] 129.4 / 175.4 [111.4–175.4] 141.4 / 223.7 [126.5–223.7] -5.89% +5.74%
cron-open desktop webkit 10 205.0 / 397.3 [181.3–397.3] 200.4 / 259.1 [163.1–259.1] 197.8 / 240.7 [192.6–240.7] -1.76% +0.27%
cron-open mobile chromium 10 145.4 / 154.0 [112.0–154.0] 142.1 / 145.1 [112.0–145.1] 144.6 / 147.2 [129.2–147.2] -2.68% +0.23%
cron-open mobile webkit 20 196.8 / 233.9 [178.4–242.5] 197.2 / 226.7 [178.6–276.5] 197.2 / 213.6 [178.7–227.2] +0.52% -0.59%
cron-refresh desktop chromium 10 127.8 / 129.7 [107.3–129.7] 128.1 / 134.7 [103.3–134.7] 126.4 / 165.7 [100.2–165.7] +0.25% -1.49%
cron-refresh desktop webkit 10 129.2 / 146.0 [112.5–146.0] 121.3 / 133.1 [110.7–133.1] 115.5 / 130.8 [111.8–130.8] -1.80% -6.29%
cron-refresh mobile chromium 20 128.6 / 131.0 [107.1–133.5] 128.9 / 131.3 [108.8–131.8] 128.9 / 130.3 [112.1–130.7] +0.59% +0.56%
cron-refresh mobile webkit 10 114.4 / 130.8 [110.8–130.8] 114.2 / 115.7 [112.5–115.7] 115.0 / 145.0 [113.0–145.0] -3.69% +1.71%
cron-search desktop chromium 10 95.1 / 127.7 [77.5–127.7] 93.8 / 96.4 [78.3–96.4] 95.3 / 118.7 [78.8–118.7] -5.41% -0.17%
cron-search desktop webkit 10 334.1 / 357.9 [327.4–357.9] 328.5 / 345.4 [314.2–345.4] 327.9 / 373.0 [322.8–373.0] -1.58% -1.93%
cron-search mobile chromium 20 79.5 / 104.1 [77.5–123.0] 80.4 / 112.5 [77.8–121.8] 92.3 / 95.8 [77.4–96.0] +1.12% +0.72%
cron-search mobile webkit 10 246.5 / 264.8 [228.3–264.8] 239.0 / 248.8 [229.4–248.8] 245.0 / 260.6 [229.4–260.6] -1.18% -0.79%
cron-search-typing desktop chromium 10 161.2 / 195.4 [144.8–195.4] 158.8 / 163.2 [143.9–163.2] 159.1 / 184.8 [143.3–184.8] -4.51% -0.83%
cron-search-typing desktop webkit 10 478.4 / 527.6 [462.2–527.6] 470.8 / 484.3 [460.2–484.3] 478.2 / 529.2 [460.2–529.2] -3.53% +1.65%
cron-search-typing mobile chromium 10 145.9 / 160.5 [128.0–160.5] 145.3 / 161.3 [128.5–161.3] 144.9 / 296.3 [128.1–296.3] -4.74% -0.86%
cron-search-typing mobile webkit 10 395.3 / 446.5 [363.7–446.5] 380.3 / 397.7 [378.2–397.7] 398.1 / 412.6 [380.3–412.6] -3.33% +1.55%
cron-search-typing-pending desktop chromium 10 127.9 / 286.3 [111.4–286.3] 127.4 / 146.0 [110.4–146.0] 128.3 / 177.7 [110.6–177.7] -12.88% +0.14%
cron-search-typing-pending desktop webkit 10 180.0 / 212.6 [178.6–212.6] 187.7 / 197.7 [165.4–197.7] 196.7 / 229.4 [178.9–229.4] -3.20% +8.81%
cron-search-typing-pending mobile chromium 20 127.6 / 142.2 [109.3–152.8] 120.1 / 146.2 [110.7–155.0] 127.8 / 145.8 [110.3–186.0] -0.22% -0.03%
cron-search-typing-pending mobile webkit 10 163.7 / 208.6 [147.2–208.6] 148.0 / 163.8 [146.7–163.8] 147.6 / 165.5 [144.1–165.5] -4.58% -9.47%

Visual comparison

Inspected synthetic fixtures; desktop and mobile appearance are unchanged.

Viewport Before After
Desktop Before desktop After desktop
Mobile Before mobile After mobile

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 batches with expected 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.

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.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 31, 2026
@clawsweeper

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 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-31T05:03:10.707066Z f7d525e PR opened
ℹ️ 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.

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Oct 31, 2026
@steipete
steipete enabled auto-merge (squash) October 31, 2026 05:24
@steipete
steipete merged commit 5af7cb1 into main Oct 31, 2026
85 checks passed
@steipete
steipete deleted the solid2/w-webkit-cron-1030 branch October 31, 2026 05:29
@steipete

Copy link
Copy Markdown
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
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:feature Preliminary submission classification; full source review pending. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant