Skip to content

fix(ui): restore total CSS budget headroom - #189618

Merged
steipete merged 1 commit into
mainfrom
solid2/hf-css-gzip-cap-1031
Oct 31, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/hf-css-gzip-cap-1031

Conversation

@steipete

@steipete steipete commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes the total CSS budget failure in Control UI performance CI. Current main measured 309,737 B gzip against the fixed 309,366 B cap, beyond the earlier 26 B overrun reported in #189556.

User Impact

No visual or behavioral change. The production CSS is smaller without raising either CSS cap or changing lazy loading boundaries.

Why This Change Was Made

The document-wide reset already gives every light-DOM element box-sizing: border-box. Remove 94 redundant declarations from their rendering consumers while retaining pseudo-element and standalone/inline stylesheet resets. Also remove an exact duplicate chat-details action rule, the unrendered approval-source selector, and four unused mobile CSS variables. The complete change deletes 123 lines and adds none.

Evidence

Same machine and installed toolchain, Node 26.12.1. Baseline: 0fa8b191def1ac87f9109eb7a0c1485bcf3f9c1a. CI's exact pnpm ui:check-performance:base <base> reproduced the baseline measurements; the candidate used the same fixed comparison build identity with pnpm ui:build and the strict pnpm ui:check-performance --base-dist <baseline>.

Check Base Candidate
Total CSS gzip 309,737 B 309,190 B (-547 B)
Fixed gzip cap / headroom 309,366 B / -371 B 309,366 B / 176 B
Total CSS raw 1,601,796 B 1,599,243 B (-2,553 B)
Startup CSS gzip / requests 33,950 B / 1 33,900 B / 1
Startup JS gzip / requests 89,293 B / 3 89,281 B / 3
Changed stylesheet LOC 40,683 40,560
Strict performance comparison Existing absolute CSS overruns Passed
pnpm tsgo:ui — Passed
Targeted stylelint; git diff --check — Passed
Independent Codex autoreview, P0–P2 — Scoped clean; no actionable findings

Computed-style proof used production CSS, 127 concrete selector fixtures, 400/820/1280 px viewports, and light/dark themes: zero differences in computed CSS properties or geometry in all six cells. Only the four intentionally removed, unconsumed custom-property names were excluded from property enumeration. The selector fixtures cover every removed reset selector and the duplicate action rule, plus the old mobile-variable locations. Source search confirms the approval selector has no production renderer. No screenshots are required for a visual change because the rendered styles are unchanged; this uses the lane's explicitly allowed computed-style proof.

The requested 200 B gzip headroom target is missed by 24 B; both fixed caps pass without an increase. No leases or local Docker were used.

CI failure attribution

Run 41226684796, attempt 1, passed control-ui-performance, security-fast, both real-Gateway shards, and the other applicable checks. Three E2E jobs failed. Their seven exact test names also fail without this patch on CI's main parent b873e69d3c224be83206d5c6cc12be761618bf4d:

Test Baseline evidence
keeps dark child rows stable through loading and refresh at 390 px with a fine pointer and 100% text Same 36 px vs 44 px menu-width failure; also fails in scheduled main run 41224492067
keeps light child rows stable through loading and refresh at 390 px with a fine pointer and 100% text Same baseline failure
keeps dark child rows stable through loading and refresh at 390 px with a coarse pointer and 100% text Same baseline failure
keeps light child rows stable through loading and refresh at 390 px with a coarse pointer and 100% text Same baseline failure
dispatches a cloud target before sending its first turn and shows placement Same healthy cloud-badge count: 1 instead of 0
refreshes accessible sidebar disk pressure through canonical session events Same healthy cloud-badge count: 1 instead of 0
shares read-only Uncommitted demand between Environment and Review and recovers retained counts Same named case fails at the preceding loading assertion on the baseline; PR CI reaches the next assertion and sees 4 reads instead of 3. These are not claimed as identical assertion signatures.

The baseline runs selected only these failed cases, used headless Chromium, and left the baseline checkout clean. The tests and identified domain/sizing inputs are unchanged between the baseline and CI's tested merge 50156436dd80a61961831fd9f4207b7e994b3e2b. The native inherited-failure recovery retains these failures; it does not relabel CI green.

Remove redundant light-DOM border-box declarations already owned by the global reset, a duplicate chat-details action rule, an unrendered approval selector, and unused mobile variables. Keep pseudo-element and standalone/inline stylesheet resets.

Same-host production assets shrink from 309737 to 309190 B CSS gzip (176 B below the unchanged cap) and 1601796 to 1599243 B raw. Computed styles and geometry match for 127 selector fixtures across light/dark at 400/820/1280 px. UI typecheck, targeted stylelint, and independent P0-P2 review passed.
@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 complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

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-31T17:54:44.505901Z f9480a2 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.

@steipete
steipete enabled auto-merge (squash) October 31, 2026 18:00
@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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes redundant resets, duplicate styling, and unused CSS to restore Control UI asset-budget headroom.

Example: Build Control UI against the unchanged 309,366-byte gzip CSS cap.

  • Before: The reported baseline measures 309,737 bytes and exceeds the cap.
  • After: The reported candidate measures 309,190 bytes, leaving 176 bytes of headroom.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Focused, source-supported deletions with a passing performance check; computed-style evidence supports parity, while remaining browser failures limit the validation verdict.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored CSS reduction is outside the contributor proof gate; its production-build comparison and reported computed-style fixtures support the changed asset-size behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Control UI changes encounter a failing performance gate because aggregate CSS exceeds its fixed budget.
Reason: The maintainer-authored direction restores the existing contract with measured savings and no new machinery.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it restores the CSS budget through focused deletions, with no introduced defect found; remaining browser-test failures still need attribution.

Priority: P2
Reviewed head: f9480a2eda23c192b1f0a64b0f97d610cf2a8bc0

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI stylesheets enter the production asset build, which emits compressed CSS measured by the performance-budget checker and served to browsers.

flowchart LR
  A[Global reset] --> C[Production asset build]
  B[Component and route styles] --> C
  C --> D[Compressed CSS]
  D --> E[Performance budget checker]
  D --> F[Control UI browser]
Loading

Technical review

Best possible solution:

Retain the existing global reset and fixed budgets, remove the verified redundant CSS, and settle the remaining CI attribution before landing.

Do we have a high-confidence way to reproduce the issue?

The unchanged checker enforces the stated cap, the PR records a baseline overrun, and exact-head performance CI passes; no local build was run during this read-only review.

Is this the best way to solve the issue?

Deleting redundant declarations at their consumers is a focused repair that preserves the existing reset owner, cascade intent, and budget enforcement.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2fe0a234f29b.

Provenance checked

  • Redundant light-DOM box-sizing declarations keeps the original intent (unknown: These declarations enforce border-box geometry already supplied by the global reset; their original introduction could not be established because scoped history searches reached unavailable blobs.)
  • Duplicate Details action styling keeps the original intent (01b890d: fix(ui): publish pull requests from the Environment branch #179029 placed publication actions beside Environment; the earlier identical styling remains.)
  • Unused approval-source styling keeps the original intent (5bf26f6: improve(ui): simplify command approval cards #183350 reorganized approval presentation; current production renderers no longer emit this selector.)
  • Unused mobile and sharing custom properties keeps the original intent (fb0ad93: Panel and sharing presentation introduced these values, but current source contains no consumers of the removed property names.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 3c4d8d9 adds ui/src/styles/components.css:1477 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3c4d8d99cfc5; files: ui/src/styles/components.css)
  • Vyctor H. Brzezowski: Raw commit 07fae10 adds ui/src/styles/base.css:380 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 07fae10c385a; files: ui/src/styles/base.css)

PR surface

Source -123. Total -123 across 49 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 49 0 123 -123
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 49 0 123 -123

Labels

Label changes:

  • add P2: Restores a failing production asset-budget check without changing runtime behavior or introducing urgent user impact.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Restores a failing production asset-budget check without changing runtime behavior or introducing urgent user impact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attribute the request-count and cloud-badge failures against the base before landing.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 31, 2026, 2:09 PM ET / 18:09 UTC.

@steipete
steipete disabled auto-merge October 31, 2026 18:15
@steipete
steipete merged commit 53372e6 into main Oct 31, 2026
101 of 108 checks passed
@steipete
steipete deleted the solid2/hf-css-gzip-cap-1031 branch October 31, 2026 18:19
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
Remove redundant light-DOM border-box declarations already owned by the global reset, a duplicate chat-details action rule, an unrendered approval selector, and unused mobile variables. Keep pseudo-element and standalone/inline stylesheet resets.

Same-host production assets shrink from 309737 to 309190 B CSS gzip (176 B below the unchanged cap) and 1601796 to 1599243 B raw. Computed styles and geometry match for 127 selector fixtures across light/dark at 400/820/1280 px. UI typecheck, targeted stylelint, and independent P0-P2 review passed.
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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant