feat(ui): adopt copy-to-clipboard, inline-code, and truncate pipe [SPRINT-014]

Replace bespoke clipboard handlers, bare <code> tags, and manual
truncation with shared CopyToClipboardComponent, InlineCodeComponent,
and TruncatePipe across console-admin, offline-kit, and triage surfaces.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
master
2026-03-08 19:24:46 +02:00
parent c52ca82652
commit 44cd1827c2
15 changed files with 706 additions and 261 deletions

View File

@@ -0,0 +1,95 @@
# Sprint 20260308-014 - FE Orphan Copy, Inline Code, And Truncate Adoption
## Topic & Scope
- Revive the dormant utility primitives that standardize copy behavior and inline technical text presentation.
- Adopt `CopyToClipboardComponent`, `InlineCodeComponent`, and the shared `TruncatePipe` on mounted operator and admin surfaces that still hand-roll these patterns.
- Keep this sprint away from DSSE, proof-chain, and quick-verify consumers reserved for sprint `018`.
- Working directory: `src/Web/StellaOps.Web`.
- Allowed coordination edits: `docs/modules/ui/orphan-revival-batch/README.md`, `docs/modules/ui/TASKS.md`, `docs/modules/ui/implementation_plan.md`, `docs/features/checked/web/`, `src/Web/StellaOps.Web/src/app/shared/ui/`, `src/Web/StellaOps.Web/src/app/shared/pipes/`, `src/Web/StellaOps.Web/src/app/features/console-admin/`, `src/Web/StellaOps.Web/src/app/features/offline-kit/`, `src/Web/StellaOps.Web/src/app/features/triage/components/replay-command/`, `src/Web/StellaOps.Web/src/app/features/trust-admin/`, and `src/Web/StellaOps.Web/src/app/features/release-orchestrator/`.
- Expected evidence: targeted Angular tests on adopted consumers, one checked-feature note, and sprint execution-log updates.
## Dependencies & Concurrency
- Hard dependency inside the orphan revival batch: none.
- External prerequisite already satisfied: console admin, trust administration, offline operations, triage, and release shells are already mounted in the current product.
- Safe parallelism:
- Can run in parallel with all other queued sprints.
- Do not modify DSSE, proof-chain, evidence-drawer, or quick-verify consumers reserved for sprint `018`.
## Documentation Prerequisites
- `docs/modules/ui/orphan-revival-batch/README.md`
- `src/Web/StellaOps.Web/AGENTS.md`
- `src/Web/StellaOps.Web/src/app/shared/ui/copy-to-clipboard/copy-to-clipboard.component.ts`
- `src/Web/StellaOps.Web/src/app/shared/ui/inline-code/inline-code.component.ts`
- `src/Web/StellaOps.Web/src/app/shared/pipes/truncate.pipe.ts`
## Delivery Tracker
### FE-OCI-001 - Freeze mounted utility adoption list
Status: DONE
Dependency: none
Owners: Developer (FE), Project Manager
Task description:
- Freeze a bounded consumer list of mounted surfaces where copy, inline code, and truncation are currently bespoke.
- Keep the list inside the files reserved for this sprint so other orphan revival sprints can run in parallel without editing the same consumers.
Completion criteria:
- [x] Consumer list is recorded in the execution log.
- [x] Every chosen consumer is mounted in the current product.
- [x] Proof and evidence consumers reserved for sprint `018` are explicitly excluded.
### FE-OCI-002 - Adopt `CopyToClipboardComponent`
Status: DONE
Dependency: FE-OCI-001
Owners: Developer (FE)
Task description:
- Replace bespoke copy-button markup and repeated clipboard handlers in the frozen consumer list with `CopyToClipboardComponent` where the user interaction is a direct field copy.
- Keep route-changing or workflow-triggering copy flows outside this sprint.
Completion criteria:
- [x] Adopted consumers use `CopyToClipboardComponent` for direct field-copy actions.
- [x] Existing success and failure feedback remains operator-visible.
- [x] Redundant local clipboard helpers are removed from the adopted consumers.
### FE-OCI-003 - Adopt `InlineCodeComponent` and `TruncatePipe`
Status: DONE
Dependency: FE-OCI-001
Owners: Developer (FE)
Task description:
- Replace raw `<code>` tags and ad hoc truncation helpers in the frozen consumer list with `InlineCodeComponent` and `TruncatePipe`.
- Preserve semantics and readability; this sprint standardizes presentation, not page layout.
Completion criteria:
- [x] Adopted consumers use `InlineCodeComponent` for inline technical identifiers.
- [x] Manual truncation helpers are replaced by the shared pipe where appropriate.
- [x] No adopted surface loses access to the full underlying value.
### FE-OCI-004 - Verify and document utility revival
Status: DONE
Dependency: FE-OCI-002
Owners: Test Automation, Documentation author
Task description:
- Add focused Angular coverage for the adopted consumers and document the shipped utility-adoption slice.
Completion criteria:
- [x] Focused Angular tests cover the adopted utility consumers.
- [x] Checked-feature note exists under `docs/features/checked/web/`.
- [x] UI plan/task docs reflect the shipped utility revival.
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-03-08 | Sprint created from the orphan-revival batch to revive copy, inline code, and truncation utilities on mounted non-proof consumers. | Project Manager |
| 2026-03-08 | FE-OCI-001 DONE. Frozen consumer list: **CopyToClipboard**: (1) console-admin/clients/clients-list (copySecret), (2) triage/components/replay-command (copyCommand). **InlineCode**: (1) console-admin/clients/clients-list (clientId, tenantId, secret), (2) console-admin/audit/audit-log (tenantId, resourceId, eventId), (3) console-admin/roles/roles-list (scope, roleId), (4) console-admin/users/users-list (tenantId), (5) console-admin/tokens/tokens-list (tokenId, clientId, tenantId), (6) offline-kit/jwks-management (kid, fingerprint), (7) triage/replay-command (hash-value). **TruncatePipe**: (1) console-admin/tokens/tokens-list (formatTokenId). Excluded: all evidence-panel, attestation-viewer, snapshot-viewer, DSSE, proof-chain, quick-verify, triage-workspace attestation copy, release-orchestrator evidence-detail. | Developer (FE) |
| 2026-03-08 | FE-OCI-002 DONE. Replaced bespoke `copySecret()` in clients-list with `<app-copy-to-clipboard>`. Replaced bespoke `copyCommand()`, `getCopyButtonContent()`, DomSanitizer usage in replay-command with `<app-copy-to-clipboard>`. Removed redundant clipboard helpers from both consumers. | Developer (FE) |
| 2026-03-08 | FE-OCI-003 DONE. Replaced bare `<code>` tags with `<app-inline-code>` in 7 consumers: clients-list (2), audit-log (5), roles-list (2), users-list (1), tokens-list (3), jwks-management (3), replay-command (1). Replaced `formatTokenId()` bespoke truncation in tokens-list with TruncatePipe. Full tokenId exposed via title attribute. | Developer (FE) |
| 2026-03-08 | FE-OCI-004 DONE. Created 5 test files: copy-to-clipboard.component.spec.ts (9 cases), inline-code.component.spec.ts (6 cases), truncate.pipe.spec.ts (11 cases), clients-list.component.spec.ts (5 cases), tokens-list.component.spec.ts (6 cases). Created checked-feature note at docs/features/checked/web/orphan-copy-inline-truncate-adoption.md. Updated TASKS.md and implementation_plan.md. | Developer (FE) |
## Decisions & Risks
- Decision: this sprint is limited to direct copy actions and simple inline technical text.
- Decision: proof and evidence viewers are excluded because they are owned by sprint `018`.
- Risk: replacing bespoke copy handlers blindly could remove route-specific side effects.
- Mitigation: freeze the consumer list first and only adopt cases that are pure copy affordances.
## Next Checkpoints
- 2026-03-09: utility adoption list frozen.
- 2026-03-10: targeted Angular verification criteria agreed.