Repository navigation
build(gateway): embed the UI tree as a fossilize directory asset - #1837
Conversation
…ity smoke project Adds packages/ui as a workspace package pinned to Solid 1.9.15 (Solid 2 rc blocked by @kobalte/core / vite-plugin-solid / @solidjs/router, see README), with a jsdom compatibility smoke (router, Kobalte dialog+select, IME composition, TanStack table/virtual, Tailwind 4 + Lore tokens), the /api/v1 inventory corrected against api.ts, a reproducible gateway baseline script and the clean-main numbers. Root test scripts now also run the UI unit tests. Part of #1796 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…dashboard removal Solid SPA shell (project nav, list pane, document-first detail, search placeholder, connection status, responsive collapse, dark/light) with real data from /api/v1 and the /ui/fixture design specimen. The gateway embeds the built assets and serves /ui, /ui/* with history fallback, strict CSP, immutable caching for hashed files and the same management authorization as /api. Removes packages/gateway/src/ui.ts; the contradiction/dedup decision logic moves to review-actions.ts without new routes. Part of #1797, #1824. Parity gaps tracked in #1823. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…and mapping Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…alls Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Map packages/website/public/theme.css light/dark semantic variables onto the Lore CSS custom-property tokens and Tailwind theme (values only, no website CSS), soften radii/borders/shadows to match the site's cards, self-host the website font stack (DM Sans / Playfair Display, latin+latin-ext woff2) so the strict CSP holds, and copy the light/dark Lore logo + favicon into packages/ui for a theme-aware shell header. The fixture banner now uses the shared inverse tokens. Mapping table documented in packages/ui/README.md. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nd logo Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…oke' into devin/1789743959-ui-02-shell-gateway
…ark the gateway unreachable Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…apsed hours Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… on gateway port collisions Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…oke' into devin/1789743959-ui-02-shell-gateway
Dev/test-only screens (fixture, _compat) are mounted only under import.meta.env.DEV. Playwright now runs fixture.spec.ts against a Vite dev server proxying /api to the same seeded gateway (dev-* projects), and the production projects assert both routes render the not-found screen. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…esponses Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…otiation Embed zstd (22), brotli (11, text) and gzip (9) variants of compressible UI assets at build time (node:zlib only; zstd skipped with a warning when the build host lacks it; build ID still digests identity bytes only). The static handler negotiates zstd > br > gzip > identity honouring q-values, sets Vary: Accept-Encoding and per-encoding ETags on compressible assets, and never compresses at request time. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…e as documented Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…oke' into devin/1789743959-ui-02-shell-gateway
…equests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…oke' into devin/1789743959-ui-02-shell-gateway
At its level-22 ceiling zstd stayed 5-8 % larger than brotli on every UI asset (long-distance matching / window / strategy tuning changed nothing), so it only grew the bundle. Also adds a regression test that cached asset bodies are standalone copies of the embedded bytes. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
knowledge_contradictions is keyed on logical ids; resolveContradiction / dismissContradiction now map possibly-superseded version ids through ltm.logicalIdOf first, so a stale reviewer id no longer returns a false negative. Regression tests use a genuinely stale (non-logical, non-head) version id. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…oke' into devin/1789743959-ui-02-shell-gateway
…lives on #1796 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…oke' into devin/1789743959-ui-02-shell-gateway Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # packages/ui/README.md # packages/ui/docs/api-inventory.md # packages/ui/docs/baseline.md
…ts or disk
Replace the generated ui-assets module (base64 bytes inside the bundle) with
a staged file tree: script/ui-assets.ts copies packages/ui/dist into
packages/gateway/dist/ui with .br/.gz siblings and writes ui-manifest.json
(types, sizes, variants, identity-only build ID). ui-static.ts reads that tree
through a UiAssetSource: sea.getRawAsset("ui/<path>") in the SEA binary
(build-binary-sea.ts adds every staged file to the fossilize manifest) and
dist/ui on disk otherwise (npm CJS, Bun ESM, tsx, tests). Manifest is
validated before serving; bodies are read lazily and cached. Negotiation,
ETags, CSP and caching are unchanged; dist/index.cjs shrinks by ~0.9 MB.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…2-shell-gateway Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # packages/ui/README.md # packages/ui/index.html # packages/ui/package.json # packages/ui/src/app.tsx # packages/ui/src/styles/app.css # pnpm-lock.yaml
Pass <staging>/ui=ui/ through fossilize's `assets` option instead of listing every staged UI file in the per-target asset manifest. Requires fossilize >= 0.11 (BYK/fossilize#37); UiAssetsResult.staged is gone with its only consumer. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Released with BYK/fossilize#37 (directory assets with key prefixes). Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
authorOf trimmed created_by for the label but not for the avatar kind, so a blank-but-non-empty author rendered "Curator" with a person avatar. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- CONTENT_TYPES becomes a Map - fs/promises + promisified zlib throughout ui-assets.ts; one recursive dirent readdir instead of a stat per entry; reads/compressions run concurrently and fold back in tree order so the build ID stays stable - drive vite's programmatic build() in-process instead of spawning its CLI - .lore.md / AGENTS.md describe the UI package, serving and staging design Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…2172-ui-fossilize-asset-dir Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> # Conflicts: # packages/gateway/script/ui-assets.ts
BYK
left a comment
There was a problem hiding this comment.
Don't forget to update .lore.md if this changes any entries there.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Re |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Coverage Results 📊✅ Patch coverage is 100.00% (no changed executable lines found; target 80%). Coverage diff@@ Coverage Diff @@
## main #1837 +/-##
==========================================
+ Coverage 82.38% 84.15% +1.77%
==========================================
Files 260 262 +2
Tracked lines 46600 45554 -1046
Branches 37483 36683 -800
==========================================
- Hits 38391 38335 -56
+ Misses 8209 7219 -990
+ Partials 3986 3953 -33Generated by Coverage Action |
|
Summary
Follow-up to #1831, stacked on its branch (retarget to
mainonce #1831 lands). Pinsfossilizeto0.11.0(the release with BYK/fossilize#37) and uses its directory-asset embedding for the UI.build-binary-sea.tsstops enumerating the UI files for fossilize. The staged tree is copied to<staging>/uiand passed as one directory asset with a key prefix:so
ui/index.html,ui/assets/index-*.js.br,ui/ui-manifest.json, … are embedded exactly as before andsrc/ui-static.ts'sgetRawAsset("ui/<path>")is untouched. ThesharedManifestUI loop andUiAssetsResult.staged(its only consumer) are removed;--from-stagingstays self-contained since the copy lives inside the staging dir. The.br/.gzvariants are still produced byscript/ui-assets.tsand ride along in the directory — fossilize 0.11.0 does not precompress.Lockfile change is limited to the fossilize entry (same transitive deps as 0.10.1);
pnpm install --frozen-lockfileaccepts it. No effect ondist/index.cjs(17,478,460 B, unchanged from #1831) — only the SEA binary build path changes.Verified against the released
fossilize@0.11.0:build:binary:sea --platforms linux-x64logsEmbedding 40 assets(12 manifest + 27ui/+manifest.json),node scripts/ui-deep-link-smoke.mjs -- <binary>passes from outside the repo, main JS servedcontent-encoding: br(78,658 B) decodes to the 294,264 B identity file,/ui/favicon.svg(public asset) 200.pnpm run typecheck/lint/format:checkclean.Part of #1797.
Link to Devin session: https://app.devin.ai/sessions/5ac126b5d15542608f3dcaccc477ac32
Open in Devin Desktop: https://app.devin.ai/desktop/session/5ac126b5d15542608f3dcaccc477ac32?variant=devin
Requested by: @BYK