Add the missing d3-transition dependency + import so graph-island's zoom transitions animate (and astro check reaches zero)
task-graph-island-d3-transition-dep
Add the missing d3-transition dep so graph-island's zoom transitions animate
Site chrome unified into shared SiteHeader + SiteFooter + ThemeToggle components, and the docs/KB surface made fully open — DEC-0022's DOCS_ENABLED landing-only gate is removed so /knowledge ships publicly alongside the landing/board/graph wired pages/graph.astro into the shared site chrome and fixed a NUL-byte parse bug so the graph compiles. While verifying, the FDE found astro check was clean on every file touched — but 4 errors remain in src/lib/graph-island.ts, pre-existing and unrelated to the chrome work.
The gap
graph-island.ts calls .transition() on a d3 selection (the zoom-button animation), but d3-transition is imported by neither the file nor packages/site/package.json — the deps are only d3-force / d3-selection / d3-zoom / d3-drag. d3's .transition() is added to selection.prototype by the d3-transition module's side effect; without it the call is untyped (the 4 ts(2339) Property 'transition' does not exist errors) and, at runtime, a no-op — so the graph renders but the zoom buttons jump instead of animating.
The fix
- Add
d3-transition(+@types/d3-transition) topackages/site/package.json. import 'd3-transition';at the top ofgraph-island.ts(or wherever the selection/zoom is created) so the prototype augmentation + types are present.
Why a task, not a fix-in-place
Adding a dependency is the graph work-stream's call, not a one-token hygiene edit, and it was explicitly out of scope for DEC-0038. Routed to the Astro Starlight Engineer (owns the site/graph surface). Provenance: surfaced by the log-auditor recording DEC-0038; originally confidence: inferred (agent-verified against astro check output + package.json, not human-curated). Board globbed before filing — no open task covered the d3-transition gap.
Outcome (done) — verified
Closed during the ClientRouter-survival / shared-ThemeInit UX pass:
d3-transitionadded as a direct dependency (^3.0.0) and@types/d3-transitionas a devDependency (^3.0.9) inpackages/site/package.json;pnpm installlinked them (the runtime module was already present transitively viad3-zoom, now declared honestly).import 'd3-transition';added at the top ofgraph-island.ts(with a comment): the bare side-effect import is REQUIRED because the types ship as adeclare module 'd3-selection'augmentation that only applies when the module is actually imported — pnpm's@typesauto-include did not pick it up.pnpm --filter @dossier/site check→ 0 errors (the 4ts(2339)errors are gone) — acceptance #1 and #2 met and verified.- Acceptance #3:
.transition()is now both typed and explicitly loaded. Note — the runtime calls were already functional via the transitived3-zoom → d3-transitionimport (the graph was browser-verified rendering 70 nodes / 331 edges with working zoom under ClientRouter nav); the explicit import HARDENS this so it no longer depends on another package's import order. The literal zoom-button click animation was not re-clicked in this pass.
Kept on the board as done (not deleted) — ids are permanent addresses; the completed-work record stays legible.