feat(web): vendor dashboard dependencies for offline local-first serving#69
Merged
Conversation
Download and serve all CDN dependencies from /static/vendor/ so the dashboard works fully offline. Removes all unpkg.com, esm.sh, cdn.tailwindcss.com, cdn.jsdelivr.net, rsms.me and fonts.googleapis.com references from non-vendor static files. Vendored: d3@7, d3-sankey@0.12.3, mermaid@10.9.1, lucide@0.414.0, 3d-force-graph@1.80.0 (UMD), Inter variable font, JetBrains Mono (latin, wt 400-500). three-spritetext is a no-op stub (see vendor/README.md for the THREE.js instance-compatibility rationale). Tailwind CDN runtime replaced by a lightweight utility layer added to app.css covering exactly the classes used in index.html — no 300 KB runtime, no JS-at-parse-time CSS generation. Adds test_no_cdn_references and test_vendor_files_present in tests/test_web.py to enforce the local-first invariant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
codegraph PR reviewDiff vs main · severity ≤
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Track A1 — the dashboard now matches the project's core pitch: one SQLite file, no daemon, no network. Previously D3, mermaid, lucide, 3d-force-graph, three-spritetext, Tailwind, and fonts all loaded from CDNs (unpkg/esm.sh/jsdelivr/rsms) — the dashboard was broken offline.
web/static/vendor/(5.28 MB total, manifest in vendor/README.md): D3 7.9.0, d3-sankey 0.12.3, mermaid 10.9.1, lucide 0.414.0, 3d-force-graph 1.80.0 UMD, Inter + JetBrains Mono woff2test_no_cdn_referenceswalks static/ and fails on any http(s) CDN reference outside vendor/README.md — the offline guarantee is now CI-enforcedImplemented by a Sonnet subagent against a Fable spec; reviewed by the orchestrating session.
Test plan
🤖 Generated with Claude Code