Skip to content

perf(ui): load Agents styles with the lazy page - #172033

Merged
steipete merged 2 commits into
openclaw:mainfrom
steipete:solid2/w-perf-agents-css
Oct 14, 2026
Merged

steipete merged 2 commits into
openclaw:mainfrom
steipete:solid2/w-perf-agents-css

Conversation

@steipete

@steipete steipete commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Agents-only layout, identity, file-preview, tool, and skill styles ship in the startup stylesheet even though the Agents page is lazy.

Solution and Impact

Move those rules into the existing lazy agents.css stylesheet. Shared controls stay in the startup stylesheet, and the existing imports keep the same loading boundary and request count. Remove eight declarations that are already overridden on the rendered baseline. Two existing browser fixtures include agents.css so their assertions keep exercising the same styles.

Startup CSS is 3,321 B gzip smaller (6.68%). Tags, classes, routes, interactions, and appearance are unchanged. Production LOC across the three stylesheets is 7,129 → 7,115 (−14); the two fixture imports add two test lines.

Evidence

Same-machine builds and strict performance checks against a97192d2556b:

Measurement Before After
Startup JS gzip 349,020 B 349,000 B
Startup CSS gzip 49,695 B 46,374 B
Startup CSS raw 298,420 B 278,308 B
Startup CSS requests 1 1
Startup JS requests 8 8
Ready New Session stylesheet links, including fonts 9 9

Raw startup JS is unchanged; its 20 B gzip difference is asset-hash/compression variation. Both strict checks pass. This PR alone remains 294 B above the 46,080 B CSS advisory target. The combined result with the separate sidebar-style cleanup will be measured after landing; gzip savings are not assumed additive.

The targeted browser capture covers identity, workspace, file editing, markdown preview, expanded tools, and skills at 1440×960 and 390×844. All 12 before/after pairs are pixel-identical, with zero changed pixels across 10,269,360 pixels, zero sampled computed-style/geometry changes, and no page errors. All 24 full captures were inspected and contain synthetic data only.

Check Result
Scoped formatting and stylesheet lint Pass
UI typecheck Pass
Same-machine builds and strict performance checks Pass on both sides
Targeted captures and comparison Pass; all 12 pairs unchanged
Form controls fixture 21/21 passed through the supported UI package runner; original cold-worker attempt timed out before assertions
Cursor policy fixture 7/7 passed; wrapper and cleanup exited successfully
Independent review Scoped-clean; no actionable P0–P2 findings; source verification passed
Production Knip Pass; no findings or ignores

Candidate 266411836ea1 merges current main, including the landed titlebar fixture repair from #171808. The authored five-file stylesheet/fixture patch remains unchanged. Final-head UI typecheck and production Knip passed; full PR CI 38576969393 completed SUCCESS on this exact head, including every UI unit/E2E, browser-extension, and real-Gateway shard. The context check passed after its heading was corrected to Evidence.

Previous full PR CI 38549225781 completed on 27a1e51068188 with ci:full; all checks passed except Control UI lazy custom-element recovery > recovers the native titlebar visibly after its chunk fails. That fixture allowed automatic reload to overtake its manual Retry assertions. The landed repair holds successful document probes until Retry completes and retains the reload, toolbar, and navigation assertions. This PR consumes that repair from main, with no inherited-failure exception.

The single form-controls recovery changed neither source nor assertion timeouts; all original proof processes are joined. No local full suite, E2E battery, or parity suite was run. Successful builds use the supported NODE_DISABLE_COMPILE_CACHE=1 setting after the original baseline build stalled in optional Node compile-cache persistence. That setup failure was interrupted and joined; no build-time speedup is inferred from host wall times. No remote lease remains.

Screenshots

Before: Agents file preview with synthetic data

After: identical Agents file preview

Before: Agents tools at narrow viewport with synthetic data

After: identical narrow Agents tools

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 14, 2026
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review October 14, 2026 10:23
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T14:11:23.230763Z 2664118 New commits
ℹ️ 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 merged commit e3604e8 into openclaw:main Oct 14, 2026
110 of 113 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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. size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant