Skip to content

feat(web): vendor dashboard dependencies for offline local-first serving#69

Merged
smochan merged 1 commit into
mainfrom
feat/dashboard-vendor-deps
Jun 10, 2026
Merged

feat(web): vendor dashboard dependencies for offline local-first serving#69
smochan merged 1 commit into
mainfrom
feat/dashboard-vendor-deps

Conversation

@smochan

@smochan smochan commented Jun 10, 2026

Copy link
Copy Markdown
Owner

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.

  • 8 pinned assets vendored into 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 woff2
  • Tailwind CDN runtime (~300 KB JS) removed — the small set of utilities actually used folded into app.css (~5 KB) mapped to existing design tokens
  • three-spritetext is a documented no-op stub: it needs the same THREE instance as 3d-force-graph, whose UMD doesn't expose window.THREE. 3D view fully works; always-visible text labels degrade to the existing HTML hover fallback. Restoration path (shared-ESM THREE) documented in the stub and scheduled for the A3 3D-view PR.
  • New guard test test_no_cdn_references walks static/ and fails on any http(s) CDN reference outside vendor/README.md — the offline guarantee is now CI-enforced

Implemented by a Sonnet subagent against a Fable spec; reviewed by the orchestrating session.

Test plan

  • test_no_cdn_references + test_vendor_files_present
  • Full suite 708 passed; ruff + mypy --strict clean
  • Manual CDN-reference sweep clean

🤖 Generated with Claude Code

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>
@github-actions

Copy link
Copy Markdown

codegraph PR review

Diff vs main · severity ≤ high

codegraph review (target: main)

Diff: +3 / -0 / ~0 nodes, +21 / -0 edges

Findings (0)

No findings.

Triggered by codegraph CI · last run

@smochan smochan merged commit 4b2b2e9 into main Jun 10, 2026
5 checks passed
@smochan smochan deleted the feat/dashboard-vendor-deps branch June 10, 2026 14:14
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant