Skip to content

Dashboard v2 — mock harness for absent endpoints #166

@thinmintdev

Description

@thinmintdev

Parent

#148

What to build

Port the designer's HAL0_DATA mock (from prototype's dash/data.jsx) into a runtime mock layer at ui/src/composables/useMock.js.

Activation modes:

  • VITE_MOCK_LEMONADE=1 — full mock for offline dev
  • Per-endpoint fallback when real API returns 404 (logs console warning, never crashes)

Mock fixtures are the single source of truth — Playwright apiMock.ts imports the same data so dev + test share one source.

Covers shapes that backend issues #142 (multi-modal slots), #145 (metrics aggregator), #146 (FLM/NPU install) will eventually fulfill. When a real endpoint lands, the store flips back to real data with zero code change in views.

Acceptance criteria

  • VITE_MOCK_LEMONADE=1 npm run dev boots dashboard with NO backend running
  • Mock fixtures importable from Playwright specs (one source of truth)
  • Per-endpoint 404 fallback logs console warning + does not crash
  • Documented in docs/dev/web-ui-mocks.md
  • Existing Playwright specs adapted to new shared-fixture import path

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    dashboard-v2Dashboard v2 rewrite (issue #148)enhancementNew feature or requestv0.2.1v0.2.1 release scope

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions