Skip to content

build: nothing checks that diagram CSS reaches the serve bundle #828

Done

Description

@bpowers

Nothing checks that @simlin/diagram's global CSS (theme.css, reset.css) actually ends up in the built simlin-serve web bundle.
If a bundler drops those side-effect imports, every diagram renders black (undefined var(--color-white) makes SVG fills fall back to black) and the toolbar is unstyled, while every test stays green.

Why it matters

This has shipped: simlin-serve served black diagrams because src/diagram/package.json's sideEffects list marked all JS as pure, so the bundler dropped the CSS imports in lib.browser/index.js.
#708 hit the same failure in src/app under rspack.
The existing guards, src/diagram/tests/theme-tokens.test.ts and src/simlin-serve/web/src/entry-css.test.ts, only check source text (the imports exist, sideEffects lists the right files).
A bundler upgrade that changes how sideEffects globs match, or a resolution change that skips lib.browser/index.js, would get past them.

Fix

Extend the simlin-serve smoke test, which already spawns the real binary with the built bundle embedded and fetches the SPA entry point: follow the stylesheet link in index.html and assert the CSS contains --color-white:.
That runs in the existing serve-smoke CI job with no new harness.
Alternative: a CI step after the serve-web build that greps src/simlin-serve/web/dist/*.css for the same marker.

Pointers

  • src/simlin-serve/tests/integration/smoke.rs
  • .github/workflows/ci.yaml (serve-web, serve-smoke jobs)
  • src/diagram/package.json (sideEffects), src/diagram/index.ts

Activity

  1. added
    ci
    on Oct 12, 2026
  2. changed the title [-]build: no dist-level smoke check that @simlin/diagram CSS (theme.css/reset.css) lands in serve-web bundle[/-] [+]build: nothing checks that diagram CSS reaches the serve bundle[/+] on Oct 12, 2026
  3. added
    frontend
    hygiene
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cifrontendhygiene

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions