Add optional import and export for dashboard models #9

Open
opened 2026-06-18 16:12:57 +02:00 by vince · 0 comments
Owner

Parent: #1

Goal

Support portable dashboard model import/export without making YAML or any flat file the source of truth.

Scope

  • Add JSON export for the canonical dashboard model.
  • Add optional YAML export generated from the canonical model for humans who prefer GitOps-style review.
  • Add import flow that validates incoming JSON/YAML against the TypeBox/Ajv model schema before persistence.
  • Add clear import diagnostics for agents and humans.
  • Add conflict handling so imports can preview changes before replacing active state.
  • Use import/export libraries only at this boundary; do not let YAML become a runtime dependency for the renderer.
  • Document that persistence and the validated model remain the source of truth.

Acceptance criteria

  • A dashboard can be exported and imported without losing supported fields.
  • Invalid imports fail with field-specific errors and do not modify active state.
  • Import preview shows what would change before commit.
  • YAML support is explicitly a compatibility/export format, not the primary agent editing path.
  • Tests cover JSON roundtrip, YAML roundtrip, invalid import, and preview-only import.

Out of scope

  • Full Homepage config compatibility.
  • Visual editor import wizard.
  • Agent mutation tool implementation beyond using the import validation path.
Parent: #1 ## Goal Support portable dashboard model import/export without making YAML or any flat file the source of truth. ## Scope - Add JSON export for the canonical dashboard model. - Add optional YAML export generated from the canonical model for humans who prefer GitOps-style review. - Add import flow that validates incoming JSON/YAML against the TypeBox/Ajv model schema before persistence. - Add clear import diagnostics for agents and humans. - Add conflict handling so imports can preview changes before replacing active state. - Use import/export libraries only at this boundary; do not let YAML become a runtime dependency for the renderer. - Document that persistence and the validated model remain the source of truth. ## Acceptance criteria - A dashboard can be exported and imported without losing supported fields. - Invalid imports fail with field-specific errors and do not modify active state. - Import preview shows what would change before commit. - YAML support is explicitly a compatibility/export format, not the primary agent editing path. - Tests cover JSON roundtrip, YAML roundtrip, invalid import, and preview-only import. ## Out of scope - Full Homepage config compatibility. - Visual editor import wizard. - Agent mutation tool implementation beyond using the import validation path.
vince added the
agent
backend
labels 2026-06-18 16:12:57 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: vince/dimensionlab-website#9
No description provided.