T-GTKM-sdf-adopt-fixtures-transport
State: closed/superseded · Impact: medium · Complexity: medium
Make SDF runnable and storyable with no backend, so every later screen sketch renders against typed fixture data. This is the foundation milestone’s core and unblocks all screen work.
useTransport.ts picks the Tauri or HTTP transport only. Experience plugins
(app/plugins/system-graph.client.ts) call the transport at boot, and there is no fixture data, so
the app and stories cannot run without a backend.
Proposed
Section titled “Proposed”FixtureTransport (a Proxy over a typed partial of the generated Transport, rejecting
unimplemented methods with a clear message) is selected by a third branch in useTransport.ts,
gated on import.meta.env.DEV and ?fixtures=1 or NUXT_PUBLIC_FIXTURES. Fixture data lives in
app/fixtures/. Data no generated method serves yet sits behind a separate PrototypeData
interface; the generated Transport gets nothing added.
Approach
Section titled “Approach”- Add
app/utils/fixtureTransport.ts: a Proxy over a typed partial of the generatedTransport; unimplemented methods reject with a message naming the method. - Add
app/fixtures/{index,overview/system,overview/dashboard}.ts: a ~40-nodeSystemGraphand aDashboardState, plain typed data with constant timestamps.index.tsexports one symbol per line. - Define the
PrototypeDatainterface inapp/fixtures/for data no generated method serves; mark it temporary. - Add
server/api/state.get.ts, a fixture-gated stub for/api/state. - Add the third branch to
app/composables/useTransport.ts. Gotcha: the experience plugins call the transport at boot, so the fixture branch must be chosen before they run, andwithSettingsNamespacewraps it the same way. - Add a vitest test that unimplemented methods reject clearly and that implemented ones return fixture data.
| Area | Note |
|---|---|
solutions/ontological/desktop/src-nuxt/app/utils/fixtureTransport.ts | new Proxy over the generated Transport |
solutions/ontological/desktop/src-nuxt/app/fixtures/ | typed fixture data and the PrototypeData interface |
solutions/ontological/desktop/src-nuxt/app/composables/useTransport.ts | third branch; edited by this task only |
solutions/ontological/desktop/src-nuxt/server/api/state.get.ts | fixture-gated /api/state stub |
solutions/ontological/desktop/src-nuxt/app/generated/transport.ts | read only; the interface being implemented |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
?fixtures=1(dev) andNUXT_PUBLIC_FIXTURES=1start the app with no backend and the shell renders. - AC-2: Calling an unimplemented
Transportmethod in fixture mode rejects with an error naming that method (vitest). - AC-3: The fixture branch is chosen before the experience plugins’ boot-time transport calls.
- AC-4:
useTransport.tsis unchanged outside the new branch; production builds never select fixtures. - AC-5:
moon run sdf:checkandmoon run sdf:testpass, run detached one at a time;nuxi typecheckand vue-tsc are never run locally (CI typechecks).
Out of scope
Section titled “Out of scope”- Real transports, the generated
Transportsurface, and any story (this task lands none).
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”- Plan:
/Users/sksizer/.claude/plans/toasty-soaring-ullman.md(the adoption wizard and operator screens, built in SDF) andN-6DUQ. - Control spec:
docs/planning/strategy/wizard-prototype.html; strategy: N-HETB-adopting-a-project. - Rules every agent follows are in the plan and the shared acceptance criteria above; the derive step later replaces fixtures with generated transport.