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>
2.2 KiB
2.2 KiB
Orphan Copy, Inline Code, and Truncate Adoption
Sprint: SPRINT_20260308_014_FE_orphan_copy_inline_truncate_adoption
Summary
Adopted the dormant shared utility primitives (CopyToClipboardComponent, InlineCodeComponent, TruncatePipe) on mounted operator and admin surfaces that previously hand-rolled clipboard copy, bare <code> tags, and manual string truncation.
Adopted consumers
CopyToClipboardComponent
console-admin/clients/clients-list.component.ts-- replaced bespokecopySecret()methodtriage/components/replay-command/replay-command.component.ts-- replaced bespokecopyCommand()+getCopyButtonContent()methods
InlineCodeComponent
console-admin/clients/clients-list.component.ts-- clientId, tenantIdconsole-admin/audit/audit-log.component.ts-- tenantId, resourceId, event IDconsole-admin/roles/roles-list.component.ts-- scope, roleIdconsole-admin/users/users-list.component.ts-- tenantIdconsole-admin/tokens/tokens-list.component.ts-- tokenId, clientId, tenantIdoffline-kit/components/jwks-management.component.ts-- kid, fingerprinttriage/components/replay-command/replay-command.component.ts-- hash-value
TruncatePipe
console-admin/tokens/tokens-list.component.ts-- replacedformatTokenId()bespoke truncation
Excluded consumers (reserved for sprint 018)
- All evidence-panel components (attestation-chain, binary-diff-tab, diff-tab, provenance-tab, policy-tab)
- attestation-viewer, snapshot-viewer
- triage-workspace attestation copy
- release-orchestrator evidence-detail
- DSSE badge, proof-chain, quick-verify
Test coverage
copy-to-clipboard.component.spec.ts-- 9 cases (render, aria, copy API, feedback, timeout, error)inline-code.component.spec.ts-- 6 cases (render, text display, updates, GUIDs, scopes)truncate.pipe.spec.ts-- 11 cases (null/undefined/empty, default length, custom length, suffix, edge cases)clients-list.component.spec.ts-- 5 cases (adoption verification: InlineCode renders, CopyToClipboard renders, bespoke method removed)tokens-list.component.spec.ts-- 6 cases (adoption verification: TruncatePipe, InlineCode, bespoke method removed)