Skip to content

Lazy-load Category views stylesheet#1342

Merged
elkimek merged 1 commit into
mainfrom
agent/lazy-load-category-stylesheet
Jul 24, 2026
Merged

Lazy-load Category views stylesheet#1342
elkimek merged 1 commit into
mainfrom
agent/lazy-load-category-stylesheet

Conversation

@elkimek

@elkimek elkimek commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What

  • defer css/category-views.css until Category, Compare, or Correlations is opened
  • use the already-eager category runtime for single-flight loading, cascade preservation, failure containment, and cache-busted retry
  • keep dashboard greeting spacing, alert cards, and date-range controls in eager dashboard ownership
  • update route/static CSS fixtures for the new async presentation contract
  • add browser coverage for cache/order, failure/retry, and eager shared-style ownership
  • ratchet the cold-load budget and document the boundary

Why

Category and comparison presentation is not needed on a normal returning-user dashboard startup. A few rules in the former bundle were shared by dashboard widgets, so those rules were relocated unchanged before deferring the remaining route-only stylesheet.

Cold-load impact

Identical fresh mobile returning-user runs with browser cache and service workers disabled:

  • requests: 436 → 435 (-1)
  • compressed transfer: 1,841,186 → 1,836,218 bytes (-4,968)
  • decoded resources: 5,562,340 → 5,539,354 bytes (-22,986)

Validation

  • COVERAGE=1 ./run-tests.sh
    • 487 Node/Vitest tests
    • 413 Chromium tests
    • 472 responsive assertions
    • offline PWA and two-device sync coverage
    • 67.24% global function coverage (67.10% floor)
  • npm run quality (11/11)
  • type checks, architecture (465 modules, 0 cycles), vendor integrity, and 131 verification checks
  • targeted route/dashboard/cold-load browser coverage (11/11)
  • npm run performance:check (435 requests, 1,836,218 transfer bytes, 5,539,354 decoded bytes)

@elkimek
elkimek marked this pull request as ready for review July 24, 2026 14:12
@elkimek
elkimek merged commit 37b9883 into main Jul 24, 2026
3 checks passed
@elkimek
elkimek deleted the agent/lazy-load-category-stylesheet branch July 24, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant