Skip to content

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.

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.

  1. Add app/utils/fixtureTransport.ts: a Proxy over a typed partial of the generated Transport; unimplemented methods reject with a message naming the method.
  2. Add app/fixtures/{index,overview/system,overview/dashboard}.ts: a ~40-node SystemGraph and a DashboardState, plain typed data with constant timestamps. index.ts exports one symbol per line.
  3. Define the PrototypeData interface in app/fixtures/ for data no generated method serves; mark it temporary.
  4. Add server/api/state.get.ts, a fixture-gated stub for /api/state.
  5. 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, and withSettingsNamespace wraps it the same way.
  6. Add a vitest test that unimplemented methods reject clearly and that implemented ones return fixture data.
AreaNote
solutions/ontological/desktop/src-nuxt/app/utils/fixtureTransport.tsnew 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.tsthird branch; edited by this task only
solutions/ontological/desktop/src-nuxt/server/api/state.get.tsfixture-gated /api/state stub
solutions/ontological/desktop/src-nuxt/app/generated/transport.tsread only; the interface being implemented
  • AC-1: ?fixtures=1 (dev) and NUXT_PUBLIC_FIXTURES=1 start the app with no backend and the shell renders.
  • AC-2: Calling an unimplemented Transport method 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.ts is unchanged outside the new branch; production builds never select fixtures.
  • AC-5: moon run sdf:check and moon run sdf:test pass, run detached one at a time; nuxi typecheck and vue-tsc are never run locally (CI typechecks).
  • Real transports, the generated Transport surface, and any story (this task lands none).
  • none
  • Plan: /Users/sksizer/.claude/plans/toasty-soaring-ullman.md (the adoption wizard and operator screens, built in SDF) and N-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.

← Back to Tasks