From f59f8e251d7343a28216b8671239934eb02a7ff2 Mon Sep 17 00:00:00 2001 From: mnovak Date: Mon, 23 Nov 2026 00:06:10 +0100 Subject: [PATCH] [docs] Domi UI: vendored at a tag, how to upgrade, the Nix hash still to paste --- CLAUDE.md | 3 ++- docs/ROADMAP.md | 11 +++++------ docs/domi-ui.md | 33 +++++++++++++++++---------------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 44597f8..dacb242 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -9,7 +9,8 @@ crates/core config model, schema, compilers (Pingora runtime + Caddy JSON), crates/edge Pingora data plane. Reads compiled config, serves traffic. Never decides policy. crates/control API, git routes repo, apply/rollback, share links, PKI flows. Loopback only. Never serves public traffic. apps/web Svelte 5 (runes, TypeScript strict). A client of the API; no logic. -packages/ui Ianitor's own components on @domi/ui (the shared Domi design system, pinned by tag; docs/domi-ui.md). +packages/ui Ianitor's own components on @domi/ui (docs/domi-ui.md). +packages/domi-ui @domi/ui, the shared Domi design system, vendored at a tag by its tools/vendor.mjs. Never edit it here. tests/diff same requests against Ianitor and Caddy, responses compared. tests/support shared test fixtures (test CA, upstreams, mock Authelia, clients); test-only. tests/fuzz cargo-fuzz targets. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index b27fac8..e7d945d 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -171,18 +171,17 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit (Rewritten at the end of every session: what changed, what was not verified, which build is deployed, the next step.) **2026-11-22: the web UI on @domi/ui, the shared Domi design system (docs/domi-ui.md). Open as a PR, not merged.** -- **Changed:** `@domi/ui` v1.0.1 pinned by tag in apps/web and packages/ui; its fonts, roles (`data-domi-room="ianitor"`, +- **Changed:** `@domi/ui` v1.0.2 vendored in packages/domi-ui (domi-design tools/vendor.mjs; MPL-2.0) and used as `workspace:*`; its fonts, roles (`data-domi-room="ianitor"`, the same hex) and controls replace Ianitor's copies. Buttons are its Button through Ianitor's adapter (desktop sizes kept); every text field is its TextField with a seal; checkboxes, the secret picker and segmented controls are its components. Ianitor's 22 role names are renamed to `--domi-*`; its own tokens and components stay in packages/ui. - Disabled buttons are natively disabled now (their reasons are visible text). A types-only shim covers - @domi/ui's Strike.svelte until it is fixed upstream. + Disabled buttons are natively disabled now (their reasons are visible text). apps/web's tsconfig sets `allowJs` + for @domi/ui's script-less Strike.svelte. - **Tests:** vitest 21; svelte-check clean; Playwright web 6/6 (the Apply lookup is exact now), aula 5/5; 13 screens compared before and after (in the PR). No Rust change. - **Deployed:** nothing. -- **Blocker (Mark):** domi-design is private, and the Nix build fetches pnpm dependencies without credentials, so - `nix build .#ianitor` would fail. Either Gitea serves domi-design to anonymous readers (as domi-pki), or Ianitor - vendors the tagged files. Then update `fetchPnpmDeps`'s hash in deploy/nixos/web.nix and merge. +- **Before merging:** `fetchPnpmDeps`'s hash in deploy/nixos/web.nix is `lib.fakeHash` (no Nix here; the vendored + package means the Nix build needs no Gitea login). Paste the hash `nix build .#ianitor-web` reports, then merge. - **Not verified:** the Nix build; Fabrica's runners installing @domi/ui; a phone (the 48 px touch sizes). diff --git a/docs/domi-ui.md b/docs/domi-ui.md index ab6c8ca..42b2af8 100644 --- a/docs/domi-ui.md +++ b/docs/domi-ui.md @@ -1,13 +1,20 @@ # Ianitor on @domi/ui The web UI's controls and roles come from **@domi/ui**, the shared Domi design system (Gitea `mnovak/domi-design`, -its `docs/INTEGRATE.md` and `docs/MIGRATION.md`). It is pinned by tag in `apps/web` and `packages/ui`: +its `docs/INTEGRATE.md` §6a and `docs/MIGRATION.md`). It is **vendored** at a tag in `packages/domi-ui` (MPL-2.0, +like Ianitor; `VERSION` names the tag, v1.0.2) and used as a workspace package by `apps/web` and `packages/ui`: ```json -"@domi/ui": "git+https://gitea.marek-novak.cz/mnovak/domi-design.git#v1.0.1" +"@domi/ui": "workspace:*" ``` -The lockfile holds the tag's commit (4c7173a). Upgrade by changing the tag after reading its CHANGELOG.md. +Why vendored: domi-design is private on Gitea, and the Nix build (`deploy/nixos/web.nix`) fetches the pnpm +dependencies in a sandbox without credentials. A token there would land in the world-readable Nix store and be needed +on every builder. The vendored copy is offline, reproducible and secret-free; the lockfile names no Gitea repository. + +**Do not edit `packages/domi-ui`.** Changes go to domi-design as a PR. To upgrade, read the next tag's CHANGELOG.md, +then from a clone of domi-design run `node tools/vendor.mjs /packages/domi-ui vX.Y.Z`, `pnpm install`, and +update `fetchPnpmDeps`'s hash in `deploy/nixos/web.nix` (`lib.fakeHash`, build, paste the hash Nix reports). ## What comes from where @@ -58,23 +65,17 @@ share dialog still opens with the focus on it. The host form still checks a field when the focus leaves it, now when it leaves the field and its seal. -## Type checking: a shim until @domi/ui fixes Strike.svelte +## Type checking -@domi/ui 1.0.x's `index.ts` imports `Strike.svelte`, which has no `