feat(ui): ship contextual action primitives

This commit is contained in:
master
2026-03-08 00:02:02 +02:00
parent a295841d25
commit f709d519ec
30 changed files with 1446 additions and 392 deletions

View File

@@ -0,0 +1,141 @@
# Sprint 20260307-029 - Contextual Actions And Stray Surfaces
## Topic & Scope
- Define and implement the shared FE interaction contract for functionality that should become a submenu, tab, segmented queue mode, drawer, or full detail page instead of a new top-level product.
- Build the reusable drawer, right-rail, split-view, context-header, and overview-card primitives needed by the restoration sprints.
- Adopt those primitives into the shipped restoration features so this sprint delivers working UI infrastructure, not just another contract document.
- Working directory: `src/Web/StellaOps.Web/src/app/shared`.
- Allowed coordination edits: `src/Web/StellaOps.Web/src/app/layout/`, `src/Web/StellaOps.Web/src/app/routes/`, `docs/modules/ui/contextual-actions-patterns`, `docs/modules/ui/restoration-topics/README.md`, and `docs/modules/ui/TASKS.md`.
- Expected evidence: shipped shared UI primitives in `src/Web/**`, adopted patterns in restoration features, route-state helpers, shared tests, and updated docs.
## Dependencies & Concurrency
- Depends on:
- `docs/modules/ui/contextual-actions-patterns/README.md`
- `docs/modules/ui/restoration-topics/README.md`
- `docs/modules/ui/watchlist-operations/README.md`
- `docs/modules/ui/reachability-witnessing/README.md`
- `docs/modules/ui/platform-ops-consolidation/README.md`
- `docs/modules/ui/triage-explainability-workspace/README.md`
- `docs/modules/ui/workflow-visualization-replay/README.md`
- Safe parallelism:
- the decision matrix and route-state contract should freeze before topic-specific FE implementation starts
- shared primitives can be implemented in parallel after the contract is stable
- topic sprints can adopt the primitives in parallel once interfaces are frozen
## Documentation Prerequisites
- `docs/modules/ui/contextual-actions-patterns/README.md`
- `docs/modules/ui/restoration-topics/README.md`
- `docs/modules/ui/architecture.md`
- `docs/modules/ui/architecture-rework.md`
## Delivery Tracker
### FE-CA-001 - Implement the shared route-state contract
Status: DONE
Dependency: none
Owners: FE Architect, Product Manager
Task description:
- Implement the shared route-state helpers for `tab`, `panel`, `drawer`, `returnTo`, `scope`, and `view`.
- Make the restoration topics consume one working route-state model instead of each inventing bespoke state handling.
Completion criteria:
- [x] Shared route-state helpers exist in code.
- [x] Restoration topics can consume one route-state contract instead of bespoke state rules.
- [x] The placement hierarchy remains documented as the policy for using the new helpers.
### FE-CA-002 - Ship the shared contextual drawer host
Status: DONE
Dependency: FE-CA-001
Owners: Developer, FE Architect
Task description:
- Build the shared drawer host used for edit, inspect, explain, and proof flows.
- Standardize size, close behavior, route-state binding, keyboard handling, and history interactions in working code.
Completion criteria:
- [x] Drawer host is available for adoption in the restoration features.
- [x] Route-state open and close behavior works in code.
- [x] Accessibility and keyboard behavior are verified for the shared host.
### FE-CA-003 - Ship split-view, right-rail, and context-header primitives
Status: DONE
Dependency: FE-CA-001
Owners: Developer, FE Architect
Task description:
- Build reusable split list/detail, right-rail, and context-header primitives for watchlist, triage, evidence, and reachability surfaces.
- Ensure responsive behavior works in the shipped components rather than remaining a note in docs.
Completion criteria:
- [x] Split-view, right-rail, and context-header primitives exist in code.
- [x] Panel-stack behavior is usable in the shipped primitives.
- [x] Responsive fallback behavior works in the adopted surfaces.
### FE-CA-004 - Ship grouped overview-card and submenu primitives
Status: DONE
Dependency: FE-CA-001
Owners: Product Manager, Developer
Task description:
- Build the grouped overview-card and submenu primitives used by Operations and narrow setup/admin capabilities.
- Standardize one-card-to-one-route and one-submenu-to-one-owner patterns in working components.
Completion criteria:
- [x] Grouped overview-card primitives exist in code.
- [x] Submenu patterns are usable by owner shells.
- [x] Card-to-route and submenu-to-owner behavior is consistent in the shipped implementation.
### FE-CA-005 - Adopt the shared primitives into the restoration features
Status: DONE
Dependency: FE-CA-001
Owners: FE Architect, Developer
Task description:
- Adopt the shared route-state, drawer, split-view, right-rail, context-header, and overview-card primitives into the restoration features.
- Do not count this sprint complete until the primitives are used by the first shipped feature set rather than sitting unused in `shared`.
Completion criteria:
- [x] At least the Watchlist, Reachability, and Triage or Workflow surfaces adopt the shared primitives.
- [x] Shared primitives replace bespoke implementations where the new restoration work lands.
- [x] Topic-specific adoption is visible in the shipped feature code.
### FE-CA-006 - Verify, document, and enforce shared usage
Status: DONE
Dependency: FE-CA-003
Owners: QA, Documentation author
Task description:
- Add shared verification coverage for drawers, panels, tabs, split views, overview cards, and return-to-context behavior.
- Update docs so future restoration work treats these primitives as required building blocks, not optional helpers.
Completion criteria:
- [x] Shared verification covers the adopted primitives.
- [x] Restoration sprints reference and consume the shared primitives.
- [x] Shared docs are updated to reflect the shipped primitive set.
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-03-07 | Sprint created to ship the shared primitives that let restored but narrow functionality become usable submenus, tabs, drawers, right rails, and detail pages instead of spawning new top-level products. | Project Manager |
| 2026-03-07 | Implemented shared contextual primitives in `src/app/shared/ui`, including route-state helpers, contextual header, drawer host, split list-detail shell, grouped overview cards, and submenu-capable tabs. | Developer |
| 2026-03-07 | Adopted the shared primitives into Watchlist, Reachability, Operations, and Workflow Replay so the first restoration shells no longer depend on bespoke route-state or layout wiring. | Developer |
| 2026-03-07 | Tier 1 verification passed via `npx ng test --watch=false --include src/tests/shared/contextual-actions-patterns-ui.spec.ts --include src/tests/watchlist/identity-watchlist-management-ui.component.spec.ts --include src/tests/reachability_center/reachability-center.component.spec.ts --include src/tests/platform-ops/platform-ops-overview-page.component.spec.ts --include src/tests/workflow_visualization/run-graph-replay-page.behavior.spec.ts` with 24 focused tests passing. | QA |
| 2026-03-07 | Tier 2 verification passed via `npx playwright test tests/e2e/watchlist-shell.spec.ts tests/e2e/reachability-witnessing.spec.ts tests/e2e/operations-consolidation.spec.ts tests/e2e/workflow-visualization-replay.spec.ts --workers=1` with 9 behavior checks passing across the adopted surfaces. | QA |
| 2026-03-07 | Sprint archived after docs sync and checked-feature note publication for the shipped contextual action primitives. | Project Manager |
## Decisions & Risks
- Decision: contextual placement is a shared FE concern and should not be reinvented per topic.
- Decision: stable route-state semantics are required for drawers, panels, and return-to-context behavior.
- Risk: individual restoration sprints may drift and invent incompatible panel patterns before the shared contract lands.
- Mitigation: freeze the shared contract first and make topic sprints depend on it.
- Risk: responsive behavior may differ across list/detail, drawer, and right-rail surfaces.
- Mitigation: require responsive fallback rules in the shared primitive contract before implementation begins.
- Delivery rule: this sprint is only complete when the shared primitives are implemented and adopted by the restoration features, not when the contract is only documented.
- Reference design note: `docs/modules/ui/contextual-actions-patterns/README.md`.
- Decision: the stable cross-shell contract is now `tab`, `panel`, `drawer`, `returnTo`, `scope`, and `view`, implemented centrally under `src/app/shared/ui/context-route-state`.
- Decision: route-aware contextual headers and drawer hosts replaced bespoke implementations in Watchlist, Reachability, Workflow Replay, and Operations before the sprint was closed.
- Docs synced:
- `docs/modules/ui/contextual-actions-patterns/README.md`
- `docs/modules/ui/restoration-topics/README.md`
- `docs/modules/ui/component-preservation-map/RESTORATION_PRIORITIES.md`
- `docs/modules/ui/implementation_plan.md`
- `docs/modules/ui/TASKS.md`
- `docs/features/checked/web/contextual-actions-patterns-ui.md`
## Next Checkpoints
- Archived on 2026-03-07 after implementation, adoption, verification, and docs sync.