From 7c6e6fe32a889101e8aedc84a1679cbb5b9daab0 Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Sat, 27 Jun 2026 13:15:21 -0400 Subject: [PATCH] feat(ext): org error-copy entries for ERROR_COPY coverage gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The full-suite meta-test (src/shared/__tests__/error-copy.test.ts) requires a user-facing ERROR_COPY entry for every literal 'ok: false, error: ' the SW returns. The org handlers added org_not_configured (literal) with no copy → RED. Add org_not_configured plus copy for the org codes that reach the popup via thrown err.message (not_an_org_member, device_key_unavailable, not_in_org_context, org_switch_failed). item_not_found already had an entry. (Dev-B added some of these independently; B reconciles the wording when it syncs main post-merge.) Full extension vitest: 70 files / 478 tests green (incl. error-copy 3/3). Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_014s527M917W47LDrfQ4t47g --- extension/src/shared/error-copy.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/extension/src/shared/error-copy.ts b/extension/src/shared/error-copy.ts index 2d62e92..04fa959 100644 --- a/extension/src/shared/error-copy.ts +++ b/extension/src/shared/error-copy.ts @@ -113,6 +113,28 @@ export const ERROR_COPY: Record = { title: 'Unsupported vault type', body: 'This vault uses a second-factor type not supported by this version of Relicario — update the extension.', }, + // --- Org vault (Plan A) --- + org_not_configured: { + title: 'Organization not set up', + body: 'This organization is not configured in this extension yet — add it before switching to it.', + }, + not_an_org_member: { + title: 'Not a member', + body: 'This device is not a member of that organization. Ask an org admin to add this device key.', + }, + device_key_unavailable: { + title: 'Device key unavailable', + body: 'Unlock your personal vault first so this device can open organization vaults.', + cta: UNLOCK_CTA, + }, + not_in_org_context: { + title: 'No organization selected', + body: 'Switch to an organization before viewing its items.', + }, + org_switch_failed: { + title: 'Could not open organization', + body: 'Something went wrong opening that organization — check your connection and try again.', + }, }; export function lookupErrorCopy(code: string): ErrorCopy {