feat(ui): adopt domain signal chips on mounted surfaces [SPRINT-013]

Replace hand-rolled digest truncation/copy and reachability badges with
shared DigestChipComponent and ReachabilityStateChipComponent on releases
list, evidence-thread, attestation-links, and reachability-center.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
master
2026-03-08 19:24:39 +02:00
parent f24d49ddeb
commit c52ca82652
14 changed files with 395 additions and 90 deletions

View File

@@ -0,0 +1,49 @@
# Domain Signal Chips Adoption (DigestChip + ReachabilityStateChip)
## Module
Web
## Status
VERIFIED
## Description
Replaced hand-rolled digest truncation/copy markup and bespoke reachability state
display with shared domain chip components (`DigestChipComponent`,
`ReachabilityStateChipComponent`) across mounted (routed) consumer surfaces.
## Implementation Details
### DigestChipComponent adoption (4 consumers)
- `src/Web/StellaOps.Web/src/app/features/releases/releases-list-page.component.ts`
- Replaced `shortDigest()` + `copyDigest()` + inline SVG copy button with `<app-digest-chip variant="bundle">`
- `src/Web/StellaOps.Web/src/app/features/evidence-thread/components/evidence-thread-view/evidence-thread-view.component.ts`
- Replaced `shortDigest()` computed + `copyDigest()` snackbar-based copy with `<app-digest-chip variant="artifact">`
- `src/Web/StellaOps.Web/src/app/features/evidence-thread/components/evidence-thread-list/evidence-thread-list.component.ts`
- Replaced `shortDigest()` method with `<app-digest-chip variant="artifact">`
- `src/Web/StellaOps.Web/src/app/features/lineage/components/attestation-links/attestation-links.component.ts`
- Replaced `truncateDigest()` + `copyDigest()` + clipboard icon with `<app-digest-chip variant="artifact">`
### ReachabilityStateChipComponent adoption (1 consumer)
- `src/Web/StellaOps.Web/src/app/features/reachability/reachability-center.component.ts`
- Added `<app-reachability-state-chip>` to witness rows, mapping `isReachable` boolean to `ReachabilityState` type and `confidenceScore` to confidence input
- Added `reachabilityState()` helper method for type mapping
### Shared chip source components
- `src/Web/StellaOps.Web/src/app/shared/domain/digest-chip/digest-chip.component.ts`
- `src/Web/StellaOps.Web/src/app/shared/domain/reachability-state-chip/reachability-state-chip.component.ts`
## Focused tests
- `src/Web/StellaOps.Web/src/app/features/releases/releases-list-page.component.spec.ts`
- `src/Web/StellaOps.Web/src/app/features/lineage/components/attestation-links/attestation-links.component.spec.ts`
- `src/Web/StellaOps.Web/src/app/features/reachability/reachability-center-chip-adoption.component.spec.ts`
- Updated: `src/Web/StellaOps.Web/src/app/features/evidence-thread/__tests__/evidence-thread-view.component.spec.ts`
## Exclusions
- `finding-list` and `finding-row` consumers reserved for sprint 020
- Dead witness pages and disconnected route files excluded
- Only mounted (currently routed) surfaces adopted
## Verification
- Date: 2026-03-08
- Sprint: SPRINT_20260308_013_FE_orphan_domain_signal_chips_adoption
- Route verification: all consumers confirmed reachable via route tree

View File

@@ -0,0 +1,91 @@
# Sprint 20260308_013 - FE Orphan Domain Signal Chips Adoption
## Topic & Scope
- Replace hand-rolled digest truncation/copy markup with `DigestChipComponent` in mounted consumers.
- Replace bespoke reachability state text/badges with `ReachabilityStateChipComponent` in mounted consumers.
- Working directory: `src/Web/StellaOps.Web`.
- Expected evidence: updated component files, focused Angular tests, checked-feature note.
## Dependencies & Concurrency
- No upstream sprint dependencies.
- Do NOT touch `finding-list` or `finding-row` consumers (reserved for sprint 020).
- Do NOT reopen dead witness pages or reconnect route files.
## Documentation Prerequisites
- `src/Web/StellaOps.Web/src/app/shared/domain/digest-chip/digest-chip.component.ts`
- `src/Web/StellaOps.Web/src/app/shared/domain/reachability-state-chip/reachability-state-chip.component.ts`
## Delivery Tracker
### FE-ODSC-001 - Freeze consumer list
Status: DONE
Dependency: none
Owners: Developer (FE)
Task description:
- Read the source chip components.
- Search `features/` for mounted consumers that hand-roll digest truncation/copy or reachability state display.
- Verify each consumer is reachable from the current route tree.
- Record the frozen list in the execution log.
Completion criteria:
- [x] Frozen list recorded in Execution Log
- [x] Each consumer verified as mounted via route tree
### FE-ODSC-002 - Adopt DigestChipComponent
Status: DONE
Dependency: FE-ODSC-001
Owners: Developer (FE)
Task description:
- In the frozen consumer list, replace ad-hoc digest truncation and copy markup with `DigestChipComponent`.
- Import it in each consumer's imports array and use `<app-digest-chip>` in templates.
- Preserve verification labels.
Completion criteria:
- [x] DigestChipComponent imported and used in each frozen digest consumer
- [x] Hand-rolled truncation/copy methods removed from adopted consumers
- [x] Existing verification labels preserved
### FE-ODSC-003 - Adopt ReachabilityStateChipComponent
Status: DONE
Dependency: FE-ODSC-001
Owners: Developer (FE)
Task description:
- In the frozen reachability consumer list, replace bespoke reachability text/badges with `ReachabilityStateChipComponent`.
- Import and use `<app-reachability-state-chip>` in templates.
- Map existing data into the chip's state/confidence inputs.
Completion criteria:
- [x] ReachabilityStateChipComponent imported and used in each frozen reachability consumer
- [x] Bespoke reachability display logic retained for backward compat (reachabilityLabel kept as it is used in filtering)
- [x] Data mapped correctly into state/confidence inputs via reachabilityState() helper
### FE-ODSC-004 - Verify and document
Status: DONE
Dependency: FE-ODSC-002, FE-ODSC-003
Owners: Developer (FE)
Task description:
- Add focused Angular tests for the adopted consumers.
- Create a checked-feature note under `docs/features/checked/web/`.
- Update the sprint execution log with results.
Completion criteria:
- [x] Focused Angular tests added for adopted consumers
- [x] Checked-feature note created at `docs/features/checked/web/domain-signal-chips-adoption.md`
- [x] Sprint execution log updated with results
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-03-08 | Sprint created; FE-ODSC-001 DOING. | Developer (FE) |
| 2026-03-08 | FE-ODSC-001 DONE. Frozen consumer list: **DigestChip**: (1) `releases-list-page.component.ts` (route: `releases.routes.ts`, has `shortDigest()`+`copyDigest()`), (2) `evidence-thread-view.component.ts/html` (route: `evidence-thread.routes.ts`, has `shortDigest()`+`copyDigest()`), (3) `evidence-thread-list.component.ts/html` (route: `evidence-thread.routes.ts`, has `shortDigest()`), (4) `attestation-links.component.ts` (child of lineage, routed via `lineage.routes.ts`, has `truncateDigest()`+`copyDigest()`). **ReachabilityStateChip**: (1) `reachability-center.component.ts/html` (route: `security.routes.ts` + `security-risk.routes.ts`, has `reachabilityLabel()`+`confidenceLabel()`). All verified as mounted. | Developer (FE) |
| 2026-03-08 | FE-ODSC-002 DONE. DigestChipComponent adopted in all 4 frozen consumers. Removed 4 hand-rolled `shortDigest`/`truncateDigest` methods and 3 `copyDigest` methods. Imported DigestChipComponent in each consumer's imports array. | Developer (FE) |
| 2026-03-08 | FE-ODSC-003 DONE. ReachabilityStateChipComponent adopted in reachability-center. Added `reachabilityState()` helper to map `isReachable` boolean to `ReachabilityState` type. Retained `reachabilityLabel()` and `confidenceLabel()` for backward compat with filter logic. | Developer (FE) |
| 2026-03-08 | FE-ODSC-004 DONE. Created 3 focused test files: releases-list-page.component.spec.ts (6 tests), attestation-links.component.spec.ts (7 tests), reachability-center-chip-adoption.component.spec.ts (6 tests). Updated existing evidence-thread-view spec to remove shortDigest reference. Created checked-feature note at `docs/features/checked/web/domain-signal-chips-adoption.md`. | Developer (FE) |
## Decisions & Risks
- Scope limited to mounted (currently routed) surfaces only.
- finding-list/finding-row excluded per sprint 020 reservation.
- Dead witness pages and disconnected route files excluded.
## Next Checkpoints
- All tasks DONE by end of sprint.