Skip to content

Lazy-load Genetics stylesheet#1341

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

Lazy-load Genetics stylesheet#1341
elkimek merged 1 commit into
mainfrom
agent/lazy-load-genetics-stylesheet

Conversation

@elkimek

@elkimek elkimek commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What

  • defer css/genetics.css until the Genome route or a styled DNA import/manual-entry surface is opened
  • keep shared DNA behavior eager while the existing DNA runtime owns stylesheet single-flight, cascade position, failure containment, and retry
  • cover cold-start exclusion, route/action failures, retries, and cache behavior in browser and audit tests
  • ratchet the cold-load reference and document the new presentation boundary

Why

DNA logic is shared by returning-user dashboard summaries, recommendations, catalog setup, and import routing, so splitting that behavior would add risk and requests. The Genetics presentation layer is not needed on a normal returning-user dashboard startup and can be deferred safely.

Cold-load impact

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

  • requests: 437 → 436 (-1)
  • compressed transfer: 1,844,244 → 1,841,186 bytes (-3,058)
  • decoded resources: 5,577,570 → 5,562,340 bytes (-15,230)

Validation

  • COVERAGE=1 ./run-tests.sh
    • 487 Node/Vitest tests
    • 410 Chromium tests
    • 472 responsive assertions
    • offline PWA and two-device sync coverage
    • 67.13% global function coverage (67.10% floor)
  • npm run quality (11/11)
  • npm run typecheck
  • npm run typecheck:checkjs
  • npm run architecture:check (465 modules, 0 cycles)
  • targeted Genetics/DNA/views browser coverage (8/8)
  • npm run performance:check (436 requests, 1,841,186 transfer bytes, 5,562,340 decoded bytes)

@elkimek
elkimek marked this pull request as ready for review July 24, 2026 13:40
@elkimek
elkimek merged commit 6419855 into main Jul 24, 2026
3 checks passed
@elkimek
elkimek deleted the agent/lazy-load-genetics-stylesheet branch July 24, 2026 13:41
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