[docs] Domi UI: vendored at a tag, how to upgrade, the Nix hash still to paste
This commit is contained in:
@@ -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.
|
||||
|
||||
+5
-6
@@ -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).
|
||||
|
||||
|
||||
|
||||
+17
-16
@@ -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 <this repo>/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 `<script lang="ts">`. Outside the package, a strict
|
||||
svelte-check refuses that import (implicit any). `apps/web/tsconfig.json` maps `@domi/ui` to
|
||||
`apps/web/src/domi-ui-types.ts`, which re-exports the components Ianitor uses straight from their files. This is
|
||||
for types only: Vite, Vitest and the build use the package. Remove both when @domi/ui adds the script tag
|
||||
(reported to the domi-design session).
|
||||
@domi/ui's `Strike.svelte` has no `<script lang="ts">`, so TypeScript reads it as JavaScript. `apps/web/tsconfig.json`
|
||||
sets `allowJs` (with `checkJs` off), as domi-design's own tsconfig does; without it a strict svelte-check refuses the
|
||||
import (implicit any).
|
||||
|
||||
## Risks
|
||||
|
||||
- **The Nix build cannot fetch @domi/ui.** `deploy/nixos/web.nix` fetches the pnpm dependencies in a sandbox
|
||||
without credentials. domi-pki is readable without a login, but domi-design is not (checked 2026-11-22: an
|
||||
anonymous `git ls-remote` is refused). Until Gitea serves domi-design to anonymous readers, or Ianitor vendors
|
||||
the tagged files, `nix build .#ianitor` fails, and `fetchPnpmDeps`'s hash in `web.nix` cannot be updated.
|
||||
**This change must not be merged before that is decided** (Mark).
|
||||
- Fabrica's runners need a Gitea login for `pnpm install` (the Windows runner on Mark's PC has Git Credential
|
||||
Manager; INTEGRATE.md §1 has the CI way: a short-lived credential from Custos).
|
||||
- **The Nix hash is not filled in yet.** `fetchPnpmDeps`'s hash in `deploy/nixos/web.nix` is `lib.fakeHash` because
|
||||
no machine here has Nix. The first `nix build .#ianitor-web` fails and prints the hash to paste. **Do not merge
|
||||
before it is pasted and the build passes.**
|
||||
- A visual change Mark has not seen beyond the asked-for controls: the field labels are @domi/ui's (13 px, 600),
|
||||
and Ianitor's group labels (Certificate, Visit log, What is it) follow them so a form reads as one; the
|
||||
segmented controls are as wide as their choices, not the panel.
|
||||
|
||||
Reference in New Issue
Block a user