Files
ss-tools/specs/039-dashboard-scenario-ui/contracts/modules.md

9.7 KiB
Raw Blame History

#region DashboardScenarioUi.Modules [C:5] [TYPE ADR] [SEMANTICS contracts,dashboard-testing,scenario,ux] @BRIEF Model, API client, entry action, workspace, parameter, baseline, artifact, and confirmation UI contracts. @RATIONALE 039 owns presentation and interaction state while 036038 own run, graph, and artifact semantics; this boundary prevents UI components from reimplementing backend truth. @REJECTED Component-local fetching and business state — rejected because independent panels could render different revisions or bypass the shared HITL gate. @RELATION DEPENDS_ON -> [DashboardScenarioUi.DataModel] @RELATION DEPENDS_ON -> [AgentRuns.Model] @RELATION DEPENDS_ON -> [ScenarioGraph.Api]

// #region DashboardTesting.ApiClient [C:3] [TYPE Module] [SEMANTICS dashboard-testing,api,types] // @defgroup DashboardTesting Typed fetchApi wrappers for 036038 scenario endpoints. // @RELATION DEPENDS_ON -> [Api.ApiModule] // @DATA_CONTRACT OpenAPI DTOs -> TypeScript DTOs with no any at public boundaries. // @INVARIANT 401/403/409/422/5xx retain typed code/status; no silent empty fallback. // #endregion DashboardTesting.ApiClient

// #region DashboardTesting.WorkspaceModel [C:5] [TYPE Model] [SEMANTICS dashboard-testing,scenario,workspace,model] // @defgroup DashboardTesting Screen model for scenario review, resolution, baseline impact, and draft preview. // @STATE unavailable | bootstrapping | analyzing | needs_parameters | scenario_ready | generating | draft_ready | waiting_approval | saved | failed | disconnected // @ACTION initialize(context, agentRun) — enter scenario mode for valid v2 intent only. // @ACTION applyScenarioResponse(response) — atomically replace revision/validation. // @ACTION updateParameter(name, value) — local declared typed edit. // @ACTION applyParameterDefinitions() — validate dirty ParameterDefinitions against base revision; launch values remain 045-owned. // @ACTION generateDraftPack() — request 038 safe template pack. // @ACTION selectArtifact(id) / loadPreview(id) — side-effect-free preview. // @ACTION requestSave(ids) / requestBaselineApproval(candidate) — delegate gate creation. // @INVARIANT AgentRunModel is sole authority for run/stages/gate; workspace never parses chat prose. // @INVARIANT canRequestSave is false for preview_only, invalid artifact, blockers, or unresolved required input. // @RELATION DEPENDS_ON -> [DashboardTesting.ApiClient] // @RELATION DEPENDS_ON -> [AgentRuns.Model] // @RELATION BINDS_TO -> [DashboardTesting.Workspace] // @RATIONALE One composed screen model makes cross-panel readiness testable without DOM. // @REJECTED Independent component fetch/state — causes revision and gate races. // #endregion DashboardTesting.WorkspaceModel

#endregion DashboardScenarioUi.Modules