Skip to content

Dashboard v1 phase 3 (#280): authoring domain — atomic commands, presentation resolution, workspace-wide validation #285

Description

@BorisTyshkevich

Part of #280 (Dashboard as a first-class module). Phase 3 of 6, after Phase 2. Normative spec in #280.

Goal

Dashboard editing becomes typed, fallible, atomic commands on a DashboardAuthoringSession draft, with JSON Merge Patch presentation resolution and whole-workspace validation on every saved-query mutation.

Scope (from #280 "Phase 3: authoring domain")

  • DashboardAuthoringSession + the DashboardCommand set (add-query, add-query-instance, remove-tile, move-tile, update-tile, update-placement, change-layout) with the atomic command algorithm: clone draft → apply → normalize via layout plugin → validate structure/references/presentations/placement/limits → sort diagnostics → replace draft only when valid. On failure the previous draft is byte-for-byte unchanged.
  • draftVersion stale-command protection (dashboard-command-stale diagnostic; no silent index clamping).
  • RFC 7396 JSON Merge Patch utility (net-new, in-house, src/core/) + the canonical presentation resolver: base panel → named variant patch → tile override patch → full resolved-panel validation, with all normative patch rules from Make Dashboard a first-class module with one-dashboard-per-current-workspace v1 UX #280 (arrays replace, null deletes, no renderer-type change, no silent variant fallback).
  • Saved-query mutations validate a complete candidate workspace; invalidating mutations are rejected unless the user picks an atomic repair (per Make Dashboard a first-class module with one-dashboard-per-current-workspace v1 UX #280 "Saved-query mutations must preserve workspace validity").
  • Revision semantics: increment only on successful persistence commit; draft edits, preview, and export never increment.

Dependencies

Phase 2 (repository), Phase 1 (resolver validates against generated schemas). Star/unstar UI rewires to add-query/remove-tile here.

Tests

Per #280 "Presentation resolution", "Atomic commands", and "Whole-workspace validity" test lists — all of them.

Acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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