Skip to content

Add Stratos Theme Builder (stb): build-time CSS theming tool - #5396

Merged
norman-abramovitz merged 29 commits into
cloudfoundry:developfrom
nabramovitz:develop
May 30, 2026
Merged

Add Stratos Theme Builder (stb): build-time CSS theming tool#5396
norman-abramovitz merged 29 commits into
cloudfoundry:developfrom
nabramovitz:develop

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Summary

Adds tools/stb — the Stratos Theme Builder, a standalone build-time CSS theming tool for operators. Independent SPA (Vite + TypeScript + Oat UI + @preact/signals-core + CodeMirror 6 + JSZip) that edits theme tokens with live light/dark preview and exports a zip bundle (preset.json + theme.css + assets/) for stratos to consume.

All changes are confined to tools/stb/; nothing else in the repo is touched.

Contents (29 commits)

  • stb MVP Integrating helion-ui-framework #1 — token sidebar, live preview, presets, asset upload, export bundle, status bar, cross-browser smoke tests, README.
  • Toolchain alignment with the retooled develop: vitest 4, jsdom 27, vite 7, bun, plus a Node-26 localStorage polyfill mirroring src/frontend/vitest.workspace.setup.ts.

Verification

  • typecheck OK / lint OK / build OK
  • tests: 46/46 pass (39 unit + 7 integration x chromium/firefox/webkit) under vitest 4 / Node 26 / bun.

The README promises npm run lint works, but it surfaced 42 pre-existing
errors after the MVP commits landed. Two gaps in eslint.config.mjs:

- Missing browser globals (Blob, fetch, setTimeout, clearTimeout,
  confirm, prompt, HTMLButtonElement, HTMLSelectElement, MouseEvent,
  Node) — 33 of the 42 errors.
- Base no-unused-vars rule flags interface-signature parameters as
  unused even though they're documentation in the type declaration.
  Switched to @typescript-eslint/no-unused-vars which understands
  TS contexts.

Also removed the unused vi import from tests/state/presets.test.ts
(inherited verbatim from the plan but never actually used).

npm run typecheck, lint, test (46/46), build all clean.
Develop retooled to vitest 4 / jsdom 27 / Node 26 / bun; stb was on
vitest 2.1.9, whose jsdom adapter left localStorage undefined under
Node 26 (native localStorage is gated behind --localstorage-file).

- Bump vitest 2.1.9 -> 4.1.7, vite 5 -> 7, playwright 1.48 -> 1.60;
  add @vitest/browser-playwright and declare jsdom explicitly so the
  DOM env no longer depends on monorepo hoisting.
- Convert vitest.workspace.ts -> test.projects (defineWorkspace removed
  in v4); browser provider string -> playwright() factory; browser.name
  -> browser.instances.
- Add tests/setup.ts localStorage/sessionStorage polyfill, mirroring
  src/frontend/vitest.workspace.setup.ts.
- Switch package manager npm -> bun (package-lock.json -> bun.lock).

46/46 tests pass; typecheck, lint, build clean.
@nabramovitz
nabramovitz marked this pull request as ready for review May 30, 2026 16:18

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@norman-abramovitz
norman-abramovitz merged commit 2f76d48 into cloudfoundry:develop May 30, 2026
11 checks passed
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.

2 participants