Skip to content

Lazy-load Import stylesheet#1338

Merged
elkimek merged 2 commits into
mainfrom
agent/lazy-load-import-stylesheet
Jul 24, 2026
Merged

Lazy-load Import stylesheet#1338
elkimek merged 2 commits into
mainfrom
agent/lazy-load-import-stylesheet

Conversation

@elkimek

@elkimek elkimek commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What changed

  • Remove css/import.css from the eager app shell and load it on the first import/review interaction.
  • Keep shared import buttons, header status, and empty-Labs drop-zone styles in the eager shell.
  • Preserve cascade order with an HTML anchor, single-flight concurrent loads, and remove/cache-bust failed loads so a later interaction can retry.
  • Route direct cycle-import previews through an explicit runtime dependency and keep the stylesheet in the service-worker app shell for offline first use.
  • Add real browser coverage for cold startup, file-entry UI, concurrent loading, failed-load retry, direct cycle import, and Firefox offline behavior.

Impact

The exact fresh mobile returning-user load moves from 440 requests / 1,854,314 transfer bytes / 5,635,229 decoded bytes to 439 requests / 1,850,068 transfer bytes / 5,612,189 decoded bytes. That saves one startup request, 4,246 transfer bytes, and 23,040 decoded bytes while preserving the import experience.

Validation

  • TypeScript and check-JS typechecks
  • Architecture map: 465 modules, zero cycles
  • Pre-release audit: 339 passed
  • Vitest: 487 passed
  • Chromium Playwright: 401 passed
  • Responsive browser matrix: 472 passed
  • Combined function coverage ratchet: 67.10% (minimum 67.10%)
  • Firefox smoke/offline suite: 3 passed
  • Cold-load budget reproduced exactly at 439 requests / 1,850,068 transfer bytes / 5,612,189 decoded bytes

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