Skip to content

perf(ui): trim unused filter styles and defer popup geometry - #196291

Merged
steipete merged 1 commit into
mainfrom
solid2/w-perf-bytes-paydown-1109
Nov 9, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-perf-bytes-paydown-1109

Conversation

@steipete

@steipete steipete commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Control UI ships unused filter selectors and repeats search-field declarations. Chat also loads popup geometry before the sign-in flow is used.

User Impact

Fewer bytes on the initial route, with the same search fields, popup sizing, Archive Undo, and page-leave commit behavior. This pays down existing size overruns without raising any budget or removing features.

Why This Change Was Made

Move popup geometry to the existing lazy sign-in owner. Keep the shared reservation helper responsible for synchronous window creation and opener isolation. Delete the obsolete Usage row/pin and Dashboard select rules, and group identical search declarations after checking their cascade. Distinct font, flex, padding, and margin rules remain intact.

Evidence

Same-machine production builds and strict checker, base a8d7470fbdc → this patch (normalized gzip):

Surface Base Head Change
Startup JS gzip 91,766 B 91,766 B 0 B
Startup CSS requests 1 1 0
Startup CSS gzip 38,756 B 38,719 B −37 B
Chat preload JS gzip 1,298,479 B 1,298,456 B −23 B
New Session preload JS gzip 803,731 B 803,708 B −23 B
Total CSS gzip 326,774 B 326,709 B −65 B
Total CSS raw 1,684,678 B 1,683,728 B −950 B

The strict checker remains red for inherited caps: CSS is still 1,600 B gzip / 7,974 B raw over, and New Session is 344 B over. All three improve; no cap or baseline changes. Chat is 72 B below its current cap. Across all lazy JS assets the gzip sum grows 245 B (raw sum shrinks 4 B); this is the disclosed compression trade for keeping sign-in code out of route preload. The 23 B route saving is below the 64 B build-variance band; it is not claimed as a meaningful timing win.

pnpm tsgo:ui, scoped test typechecking, scoped oxlint/stylelint/format, git diff --check, and production pnpm deadcode:knip pass. Both directly changed test files pass: 24 tests. Three popup geometry cases now exercise the actual sign-in entry point, including reservation before its first Gateway read. Local Codex autoreview of the complete seven-file change reports no actionable P0–P2 findings. Production LOC 7,612→7,553 (−59); tests 330→348 (+18). The Solid state/effect/owner API counts are unchanged.

Visual proof: 16 synthetic states across desktop 1280 px / phone 400 px and light/dark. All 50 computed-style/geometry snapshots and all 16 complete viewport images are identical. The phone Author capture explicitly waits for all ten search highlights; earlier incomplete captures were discarded as setup evidence. All 123 stylesheet asset hashes are identical between the visual-proof build and final accepted build.

Before After
Desktop before Desktop after
Phone before Phone after
Historical Chat attribution and rejected experiment

Three clean historical builds isolate Archive Undo and the attachment crossing; the existing exact popup-parent build is reused.

Checkpoint Chat gzip Delta
b32f01a 1,295,872 B —
e6b1d86 Archive parent 1,295,655 B −217 B interval
c31ffe8 Archive head 1,296,686 B +1,031 B
2dce49c attachment picker 1,296,999 B +313 B; crosses 1,296,751 B cap
9eb1dc2 popup parent 1,297,038 B +39 B interval
50a1577 popup head 1,297,287 B +249 B

The attachment delta comes from its two input modules in the shared chunk; the Archive delta comes mainly from held-archive state and Chat presentation. They preserve working iOS picker positioning and Undo behavior. The −217 B and +39 B intervals are not assigned to individual owners. A candidate moving Archive's page-hide listener to its lazy runtime added 17 B of normalized Chat gzip compared with the popup-only candidate and was dropped; its 21 focused tests passed. No accepted transcript performance trade was removed.

The remaining CSS overrun belongs to live Usage picker/filter and Dashboard gallery/row styles. The source audit found no further certain dead rules in those stylesheets. This patch is a bounded cleanup, not full recovery of the accumulated caps.

Timing confirmation: 240/240 observations passed, twenty rotated base/head/A/A-control triplets per scene and engine. Fresh Chromium/Firefox processes, desktop, no throttle, production bundles and synthetic Gateway. Host load min/median/max 18.91/23.75/29.76. No resolved timing regression and no timing win claimed.

Flow / engine Ready median / p95, base → head Paired head median Absolute A/A median
Cold Chat / Chromium 422.50 / 547.10 → 425.05 / 505.30 ms −0.09% 3.61%
Cold Chat / Firefox 495.50 / 572.00 → 509.50 / 574.00 ms +1.19% 4.29%
Dashboard / Chromium 139.90 / 156.50 → 140.45 / 152.60 ms +0.64% 1.54%
Dashboard / Firefox 162.50 / 178.00 → 157.00 / 170.00 ms −4.78% 5.60%

Chromium paired task medians are −0.06% cold / +0.82% Dashboard, with both p95s lower. Every cold arm renders 400 messages / 6 mounted rows and completes 20 JS requests; Dashboard retains 637 elements. The +2 ms Firefox cold tail is <1%; tiny layout/style tails remain inside A/A variation. Firefox does not supply CPU counters. Usage timing is excluded by the committed harness; its visual/computed proof above covers the changed controls. WebKit startup smoke timed out, so no WebKit pass is claimed. Reusable Chromium crashed in the host display link; the completed run uses the existing fresh-process option.

CI follow-through

Exact-head CI run 42714856084 passed the performance job, the other UI unit shards, browser-extension and real-Gateway coverage. The first attempt had one transcript clamp unit failure (scrollTop 960 versus 860); a single targeted job retry passed on attempt 2. Two local base attempts timed out in the Mac browser before reaching that assertion; a queued Linux Testbox was stopped without running its payload. No source change or passing replay is claimed as a fix; the original timing failure remains documented.

The three E2E failures match the scheduled run at the exact merge base, 42711813458: aligns Person left status at 1200 px, aligns Person left status at 390 px (both measure 14 versus 13), and keeps a single web conversation with in-page native navigation and Dashboard handoff (header 56 versus 64). The first two labels are redacted in both logs; the identical case order, unchanged source matrix and Person-only assertion identify them. Owning tests and layout styles are byte-identical in the base and actual CI merge 2f9ed93b3e76c8caa9c9b2c4429486b4fe59e411. They are retained as failures, not reported as passing.

Both startup and closeout WebKit launch smokes timed out at 12 seconds. No WebKit pass is claimed.

The native inherited-failure route is selected for the three matching E2E cases; all other current jobs pass.

Keep popup sizing in the lazy OpenClaw ID account flow while preserving synchronous reservation and opener isolation. Remove obsolete Usage and Dashboard selectors and consolidate identical search declarations without changing their computed styles.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 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.

@steipete
steipete marked this pull request as ready for review November 9, 2026 22:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 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-09T22:48:21.977151Z ecc3473 Draft marked ready
ℹ️ 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) November 9, 2026 22:49
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR removes unused filter styles, combines identical CSS declarations, and moves popup geometry into the lazy sign-in module.

Example: Open the Dashboard author search at 400 px in dark mode.

  • Before: The search field uses separate declarations duplicating the gallery search styles.
  • After: The field looks the same while sharing those declarations.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup with inspected visual evidence, retained popup contracts, and no actionable finding; exact-head CI remains blocked by verified inherited failures and unfinished checks.
Proof confidence 🐚 platinum hermit (4/6) The ordinary contributor proof gate does not apply to this maintainer-authored PR; inspected browser screenshots cover the changed CSS, while relocated popup geometry is supported by sign-in unit coverage rather than a new current-head popup capture.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: The browser downloads unused filter styles and shared popup geometry before the sign-in feature needs it.
Reason: The maintainer-directed change reduces shipped CSS and production code with no new configuration or architecture; its small byte savings and lazy-JS compression tradeoff are disclosed without claiming faster interactions.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-directed cleanup preserves existing behavior, with no introduced defect found; both failing UI checks match verified earlier failures.

Priority: P3
Reviewed head: ecc3473f702fa9f3d379b368776dd04fc20be7be

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI loads shared styles and external-window utilities for multiple routes; lazy account code supplies sign-in popup geometry before the shared helper opens an isolated window.

flowchart TD
  A[Control UI routes] --> B[Shared field styles]
  A --> C[Lazy account menu]
  C --> D[Sign-in popup geometry]
  D --> E[Shared window reservation]
  E --> F[Browser popup]
  C --> G[Gateway sign-in flow]
Loading

Technical review

Best possible solution:

Retain this bounded cleanup using the existing lazy account owner, shared window reservation helper, and stylesheet owners.

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

Source inspection confirms unused selector families, duplicated declarations, and popup geometry in the shared utility; no target build or test was executed during this review.

Is this the best way to solve the issue?

The patch follows the smallest complete approach: delete unused CSS, group identical declarations, and move unchanged geometry into its existing lazy consumer without adding state or dependencies.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5b3bd03b8bb9.

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Josh Lehman: Raw commit e29577b adds ui/src/lib/openclaw-id/account.ts:178 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: e29577b7d7df; files: ui/src/lib/openclaw-id/account.ts)
  • Vyctor H. Brzezowski: Raw commit 832bbf9 adds ui/src/styles/dashboards.css:117 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 832bbf926fc5; files: ui/src/styles/dashboards.css)
  • Peter Steinberger: Raw commit 812fcdc adds ui/src/styles/components.css:3536 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 812fcdc67fc8; files: ui/src/styles/components.css)

PR surface

Source -59, Tests +18. Total -41 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 31 90 -59
Tests 2 55 37 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 86 127 -41

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test delta Production +31/−90 lines; tests +55/−37 lines Production shrinks by 59 lines; the 18-line net test growth relocates geometry coverage to sign-in and verifies reservation before the Gateway read.

Labels

Label changes:

  • add P3: This is a small byte-reduction cleanup with preserved user behavior and no demonstrated urgent regression.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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:

  • P3: This is a small byte-reduction cleanup with preserved user behavior and no demonstrated urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 November 9, 2026, 6:02 PM ET / 23:02 UTC.

@steipete
steipete disabled auto-merge November 9, 2026 23:20
@steipete
steipete merged commit 626bc34 into main Nov 9, 2026
245 of 264 checks passed
@steipete
steipete deleted the solid2/w-perf-bytes-paydown-1109 branch November 9, 2026 23:24
@steipete

steipete commented Nov 9, 2026

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 10, 2026
…w#196291)

Keep popup sizing in the lazy OpenClaw ID account flow while preserving synchronous reservation and opener isolation. Remove obsolete Usage and Dashboard selectors and consolidate identical search declarations without changing their computed styles.
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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