Skip to content

Lazy-load Marker Detail stylesheet#1339

Merged
elkimek merged 3 commits into
mainfrom
agent/lazy-load-marker-detail-stylesheet
Jul 24, 2026
Merged

Lazy-load Marker Detail stylesheet#1339
elkimek merged 3 commits into
mainfrom
agent/lazy-load-marker-detail-stylesheet

Conversation

@elkimek

@elkimek elkimek commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What changed

  • Replace the eager Marker Detail stylesheet link with an ordered lazy-load anchor.
  • Load and apply the stylesheet before opening marker detail, manual-entry, or custom-marker modals.
  • Single-flight concurrent loads, remove failed links, and use a cache-busting retry URL.
  • Keep the loader in the already-eager Marker Detail runtime adapter, avoiding another startup or first-click module request.
  • Keep the stylesheet in the service-worker app shell so the first offline open still works.
  • Add cold-start, first-open, failure/retry, responsive, Firefox offline, and deterministic coverage-ratchet coverage.

Why

Marker Detail presentation is not needed for the initial dashboard render. Deferring its CSS removes an unconditional startup request while preserving the first-interaction experience: the modal waits for styling and the isolated first-open contract completes within 1 second.

Measured impact

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

  • Before: 439 requests, 1,850,068 transferred bytes, 5,612,189 decoded bytes
  • After: 438 requests, 1,846,079 transferred bytes, 5,585,960 decoded bytes
  • Saved: 1 request, 3,989 transferred bytes, 26,229 decoded bytes

Validation

  • Quality guardrails: 11/11; largest module at the 1,168-line cap
  • TypeScript typecheck and check-JS typecheck
  • Architecture check: 465 modules, 0 cycles
  • Static verification: 131/131
  • Vitest: 487/487
  • Chromium Playwright: 404/404
  • Responsive matrix: 472/472
  • Firefox/offline smoke: 3/3
  • Combined function coverage: 67.33% (67.10% ratchet)
  • Final cold-load budget: 438 requests / 1,846,079 transferred / 5,585,960 decoded

@elkimek
elkimek marked this pull request as ready for review July 24, 2026 10:43
@elkimek
elkimek merged commit e60c650 into main Jul 24, 2026
3 checks passed
@elkimek
elkimek deleted the agent/lazy-load-marker-detail-stylesheet branch July 24, 2026 11:33
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