diff --git a/e2e/v137-sharing-managed-profiles.spec.ts b/e2e/v137-sharing-managed-profiles.spec.ts index 5239de994..95eb1a1b7 100644 --- a/e2e/v137-sharing-managed-profiles.spec.ts +++ b/e2e/v137-sharing-managed-profiles.spec.ts @@ -51,8 +51,7 @@ async function leaveRecord(page: Page) { ); } -test.describe("scoped sharing browser journeys", () => { - test.describe.configure({ mode: "serial" }); +test.describe.serial("scoped sharing browser journeys", () => { test.use({ storageState: SCOPE_DELEGATE_STORAGE_STATE_PATH }); for (const record of E2E_SCOPE_RECORDS) { diff --git a/src/components/layout/__tests__/shared-record-chrome.test.tsx b/src/components/layout/__tests__/shared-record-chrome.test.tsx index b2fbd65ca..53a2049f2 100644 --- a/src/components/layout/__tests__/shared-record-chrome.test.tsx +++ b/src/components/layout/__tests__/shared-record-chrome.test.tsx @@ -169,6 +169,19 @@ describe("", () => { expect(html).toContain("bg-warning/15"); expect(html).toContain("border-warning/40"); }); + + it("keeps the warning-banner context copy at the foreground contrast floor", () => { + const html = render( + { accounts: [OWNER], active: OWNER, canSwitch: true }, + , + ); + const context = html.match( + /]*data-slot="shared-record-banner-context"[^>]*>/, + )?.[0]; + + expect(context).toContain("text-foreground"); + expect(context).not.toContain("text-muted-foreground"); + }); }); describe("", () => { diff --git a/src/components/layout/shared-record-banner.tsx b/src/components/layout/shared-record-banner.tsx index 3d8744abb..9d30ce719 100644 --- a/src/components/layout/shared-record-banner.tsx +++ b/src/components/layout/shared-record-banner.tsx @@ -15,7 +15,7 @@ import { accountLabel } from "@/lib/sharing/account-access-view"; * are switched will log their own blood pressure into somebody else's record, * and there is no undo for a reading that was never theirs. So the banner * states three things in one line — that this is not your record, whose it is, - * and that you can only read it — and carries the way out beside them. + * and what sharing level applies — and carries the way out beside them. * * ## Why it looks like this * @@ -29,9 +29,9 @@ import { accountLabel } from "@/lib/sharing/account-access-view"; * somebody stops seeing after the third switch, and the failure mode here is * a person who has stopped noticing. * - * The name is `text-foreground` and the qualifier `text-muted-foreground`, per - * the two-tier text rule — the person's name is content, the read-only note is - * meta. + * The name and qualifier both use `text-foreground`: the warning wash is too + * dark for the muted token at this text size, while the foreground token keeps + * the context legible at the same contrast floor as the name. * * The row is the inline-action shape from UI-STANDARDS §11 rather than a * centred wrapping stack: sentence `min-w-0 flex-1`, action `shrink-0`, so the @@ -79,7 +79,10 @@ export function SharedRecordBanner() { {t("recordSharing.banner.viewing", { name })} {" "} - + {recordKindLabel(presentation.recordKind, t)}.{" "} {accessLabel(presentation.access, t)}