Mission Control UI
Document path: docs/ui-mission-control.md
-
Title and Purpose This document defines the Mission Control shell, core panels, overlays, and feature flag surfaces required to satisfy Phase 1 acceptance criteria in docs/mvp-roadmap.md, including PR-D2 requirement for annotated wireframes and file anchors. It establishes a shared contract between product, design, and engineering for MissionControlLayout, panels under services/frontend/src/components/mission-control/panels/, overlays under services/frontend/src/components/mission-control/overlays/, and service hooks in services.ts.
-
Mission Control Shell Overview 2.1 Wireframe
%% Shell regions and responsibilities
flowchart TB
subgraph Mission Control Shell
direction TB
CANVAS[Center canvas hosts graph and overlays]
RIGHT[Right dock Issues panel with counts and filters]
BOTTOM[Bottom dock Console and Timeline stub]
STATUS[Status bar WS state flags summary p95 indicator]
end
CANVAS --- RIGHT
CANVAS --- BOTTOM
BOTTOM --- STATUS
2.2 Responsibilities and Anchors
- Layout container: MissionControlLayout
- Panels root: services/frontend/src/components/mission-control/panels/
- Overlays root: services/frontend/src/components/mission-control/overlays/
- Canvas and Contract Overlay 3.1 CONTRACT_OVERLAY States
- Compatible
- Incompatible
- Quick fix available
- Dismissed overridden
3.2 Overlay Wireframe and State Transitions
%% Contract overlay states and transitions
flowchart LR
COMP[Compatible]
INCOMP[Incompatible red hint]
QF[Quick fix available CTA]
DISM[Dismissed overridden muted]
COMP --> INCOMP
INCOMP --> QF
QF --> COMP
INCOMP --> DISM
DISM --> INCOMP
Anchors:
- Overlay view: ContractOverlay
- Issues surfacing: IssuesPanel
- Services integration: services.ts
Named service hooks:
3.3 Quick-fix CTA Flow and Linter Integration
%% Quick fix flow from overlay through services and back to UI
sequenceDiagram
participant U as User
participant O as ContractOverlay
participant S as MissionControl services
participant I as IssuesPanel
participant C as ConsolePanel
U->>O: Click Quick fix CTA
O->>S: Request validate and patch
S-->>O: Return patch applied and fresh diagnostics
O->>I: Update counts and list
O->>C: Log action and results
Counts update location: IssuesPanel
- Bottom Dock: Console and Timeline Stub 4.1 Layout Wireframe
%% Bottom dock with timeline stub above console
flowchart TB
subgraph Bottom Dock
direction TB
T[TIMELINE scrubber stub shows checkpoints]
C[CONSOLE shows structured logs]
end
T --> C
Anchors:
- Console: ConsolePanel
- Services: services.ts
Recorder hooks:
4.2 Behavior
- Timeline populates from listRuns() and listCheckpoints()
- Selecting a checkpoint scrolls Console to related logs
- Right Dock: Issues Panel 5.1 Wireframe and Responsibilities
%% Issues panel with filters and badges
flowchart TB
IP[Issues panel]
F[Filters error warning info]
L[List grouped by file edge node]
B[Badges counts]
IP --> F
IP --> L
IP --> B
Anchor:
5.2 Data Sources and Tie-ins
- Contract validation output from validateContract()
- Quick-fix results from applyQuickFix()
- Status Bar: Connectivity and QoS 6.1 Placement Wireframe
%% Status bar surfaces
flowchart LR
WS[WS connected disconnected]
FLAGS[Feature flags summary]
P95[p95 latency R Y G]
WS --- FLAGS --- P95
Anchors:
- Host layout: MissionControlLayout
- Status bar component placeholder: add under MissionControlLayout
6.2 Indicators
- WS Connected: connected disconnected with reconnection spinner
- Flags summary: compact pill with active flags
- p95 latency thresholds:
- Green ≤ 250 ms
- Yellow ≤ 500 ms
- Red > 500 ms
Note: This is forward-looking to PR-MC3 and included here for placement.
- Feature Flags Surfaces 7.1 Flags Matrix | Flag | Default | Affects | Surfaces Toggled | | --- | --- | --- | --- | | CONTRACT_OVERLAY | On | Contract validation and quick fixes | ContractOverlay, IssuesPanel | | CONNECT_WS | On | Live connectivity and streaming | Status bar WS, streaming to ConsolePanel | | EXPERIMENTS | Off | Experimental UI toggles | Gates new panels or controls in MissionControlLayout | | LINEAGE | Off | Data lineage views | Future overlay in services/frontend/src/components/mission-control/overlays/ | | POLICY_GUARDRAILS | Off | Policy warnings blocks | Warnings in IssuesPanel and canvas callouts |
7.2 Behavior Notes
- Flags determine visibility and interactivity, not just style.
- Flags are summarized in status bar and should be queryable from services.ts.
- User Flows Mapped to Acceptance Criteria 8.1 Flow A: Fix incompatible edge Steps:
- Edge edited leads to overlay state Incompatible with red hint on canvas via ContractOverlay
- Hover reveals mismatch details and suggested fix
- Quick-fix CTA invokes applyQuickFix()
- Revalidate via validateContract()
- IssuesPanel updates counts and clears resolved item
%% Flow A sequence
sequenceDiagram
participant U as User
participant CV as Canvas
participant OV as ContractOverlay
participant SV as Services
participant IP as IssuesPanel
U->>CV: Edit edge
CV->>OV: Show incompatible with details
U->>OV: Click Quick fix
OV->>SV: Apply fix and revalidate
SV-->>OV: Success and diagnostics
OV->>IP: Update list and badges
OV->>CV: Clear red hint
8.2 Flow B: Runs and QoS Steps:
- New run emits checkpoints to timeline via listRuns() and listCheckpoints()
- Selecting a checkpoint scrolls ConsolePanel
- Status bar QoS shows Green when p95 under threshold
%% Flow B sequence
sequenceDiagram
participant R as Recorder
participant TL as Timeline
participant C as ConsolePanel
participant SB as StatusBar
R-->>TL: Checkpoints available
U->>TL: Select checkpoint
TL->>C: Scroll to related logs
SB-->>U: QoS p95 Green
-
Anchor Map | UI Section | Source | | --- | --- | | Shell layout | MissionControlLayout | | Contract overlay | ContractOverlay | | Console panel | ConsolePanel | | Issues panel | IssuesPanel | | Mission control services | services.ts |
-
Assets and Conventions 10.1 Mermaid Notes
- Prefer flowchart and sequenceDiagram for layout and flows.
- Avoid double quotes and parentheses inside square brackets in node labels.
- Preview options: GitHub native Mermaid preview or VS Code Mermaid extensions.
10.2 Images Directory and Naming
- Optional images under docs/assets/ui/
- Naming: ui-mc-shell-v1.png, ui-mc-overlay-states-v1.png, ui-mc-bottom-dock-v1.png
10.3 Badge and Iconography Legend
- Error badge Red
- Warning badge Yellow
- Info badge Gray
- Quick-fix CTA Blue
- WS indicator Green Yellow Red
- Icons: circle filled for status dot, triangle for warning, square for info
- Roadmap Tie-ins and Handoffs
- PR-MC1: Establish shell scaffolding and panel placeholders in MissionControlLayout with bottom and right dock stubs
- PR-MC2: Implement CONTRACT_OVERLAY states and quick-fix CTA wired to services.ts
- PR-MC3: Add status bar WS and QoS p95 with thresholds and flags summary
- Traceability: see acceptance criteria in docs/mvp-roadmap.md
- Flags covered: CONTRACT_OVERLAY, CONNECT_WS, EXPERIMENTS, LINEAGE, POLICY_GUARDRAILS
Optional supporting asset:
- Create docs/assets/ui/.gitkeep as a placeholder (empty file) to allow adding images later.
Tooling guidance:
- Use write_to_file (or equivalent file creation tool) to create the above files with the exact content.
- Do not alter any other files.
Completion:
- When finished, use the attempt_completion tool summarizing the files created/updated and confirming the content was written verbatim and links follow the name format.