Repository navigation
feat(ui): scaffold Svelte 5 toolchain + port graph-model + serving - #27
AndyTechnologies wants to merge 4 commits into
Conversation
Add the Svelte 5 + Vite toolchain for the re-platformed dashboard: - devDeps (svelte 5, vite 6, vite-plugin-svelte, testing-library, jsdom) - build:ui script emitting the compiled SPA to repo-root dist/ui with hashed assets/* chunks (outDir resolved absolutely from the config file) - minimal build entry shell (Spanish shell: title, banner, Principal nav with the five views) that Phase 3 replaces with the real App.svelte
1:1 typed port of the dashboard graph-model (layout, connect/guard/ self-edge, loop, condition, params, payload) with the full oracle test suite ported verbatim — identical pass counts to the JS original (76 tests / 144 expect). Add the MINOR-A purity guard: eslint bans svelte imports in src/ui-svelte/lib and a boundary test enforces it.
MAJOR-1: resolveUiAsset rejects per segment (.., leading dot, backslash, absolute, empty) -> null no-fallback, then forward-slash concat (never path.join); segments may nest, so hashed assets/* subdirectories resolve. MAJOR-2: contentTypeFor extended with woff/woff2/map/wasm. /ui block: benign unknown GET falls back to index.html (never /api/*); traversal 404s without fallback; missing build returns the run build:ui 404. uiDir resolution: UI_DIR wins, then ./dist/ui, then the embedded copy (excluding the legacy src/ui tree via its app.js marker).
static-spa.test.ts: traversal rejection kept; subdir + /ui fallback + /api isolation + full MAJOR-2 content-type matrix (20 tests). e2e-smoke.test.ts: compiled dist/ui landmarks/a11y + hashed assets/* triangulation; skips with a documented gate when the build is absent; old app.js/graph-model.js string checks dropped. e2e harness + spec: UI_DIR -> dist/ui with a missing-build warning; harness-only POST /api/ui/_e2e/complete seam for the SSE-live spec; spec rewritten to the Spanish 5-view contract (Panel de control / Principal / Validar), drag/keys/connect, undo/redo, validate/apply (editor-interaction groups are the RED acceptance device for Unit 2). Mark unit-1 tasks 1.6/1.7/2.1-2.4 done.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Closed without merge: this svelte-ui chain (pr1→pr2→pr3→tracker) was an earlier UI iteration superseded by PR #30 (WeaveLLM 0.1.0 full rewrite, merged as squash). Its work is already absorbed into master via the rewrite; merging it now would reintroduce the legacy UI over the new Astro 7 surface. |
Summary
resolveUiAssetcon fallback/ui/*, traversal guard, content-type completo, y reescribir suites estáticas + e2e SSE para el contrato español 5 vistas.Changes
src/ui-svelte(Svelte 5 + Vite,build:ui→dist/uihashed), vitest config, tsconfig, strict TS, NO dev server (build-only).src/ui-svelte/lib/graph-model.ts(76 tests 1:1, 144 expects byte-identical),src/server.tsresolveUiAssetsanitización por segmento (reject.., leading-dot, backslash, vacío, absoluto) → null sin fallback,contentTypeFor(8 types + octet-stream), fallback/ui/* → index.htmlque nunca intercepta/api/*, exclusion marker ensrc/ui/app.js;static-spa.test.ts(20 tests),e2e-smoke.test.tscontra dist/ui compilado.Testing
bun test src/dashboard— 116 pass (40 static-spa + 76 e2e-smoke)bun test src/ui-svelte— 79 pass (graph-model + purity)bun run typecheckcleanbun run lintcleanbun run build:uiemitedist/uicon assets hasheadosChain Context
svelte-ui-tracker6c4bae5(master)Chain Overview
Scope
/ui/*, static-spa + e2e-smoke rewrites.--assetembed + MAJOR-3 binary smoke, tsc/eslint gate final (Unit 3).Autonomy