## 0.103.0

There are no subscription levels (Pricing & Metering §4/§14; tiers removed everywhere 2026-11-17, Ben).

- **`NavUser.tier` removed.** The top bar and account menu no longer show "tier · role" under the user's name; they show the email, else the role, else "member", as before. Contacts' `/api/me` stopped returning `tier` (politogy-contacts#481) and the apps stopped passing it.
- **Breaking (type only):** an app that still passes `tier` in its `NavUser` object gets a TypeScript excess-property error on upgrade. Drop the key.

## 0.102.3

No app code change. Release lane fix only: the Publish workflow's last step ("Verify the published version resolves") now waits up to 10 minutes for npm to list the new version, instead of 2. npm has been taking 97-188 s to list a version since 2026-11-14, so releases 0.101.0-0.102.1 showed a false red although they were on npm. The step still fails, and prints npm's answer, when a version truly never appears.

## 0.102.2

Every org's icon shows in the org switcher, in every app (bug seen live 2026-11-15, Ben: switching orgs from Relationship Mode → Email, "not every org icon displayed").

- **Cause.** Apps that pass their own switcher list (`tokenOrg.orgs`) make the shell skip its `/api/orgs` read. Most of them merge branding with a copied helper that keeps only `logoUrl` and `brandColor`, so the Brand Kit icon (`iconUrl`) never reached the switcher and an org without a Primary logo showed initials.
- **Fix.** When any row of `tokenOrg.orgs` has no `iconUrl` key, the shell reads the chrome org list too (de-duped, fail-soft) and fills each row's missing icon, logo and brand color by org id. The app's own values win, and rows are never added, removed or reordered. Apps whose rows carry `iconUrl` (even `null`) are left as they are, with no extra read. New export on `./app-chrome`: `fillOrgBranding(rows, chromeOrgs)`.
- Tests: `__tests__/switcherOrgBranding.test.tsx` (new); `activeOrgV2` now passes branded rows for its no-read case.

## 0.102.1

The Credits tooltip's gauges stay inside the tooltip (bug seen live 2026-11-15, Ben: "the credits tooltip has gauges extending past the container").

- **Cause.** The shared top-bar tooltip is at most `max-w-56` (224px) with `px-3` padding, so it has 200px for content. The Credits tooltip's content was a fixed `w-56` (224px), so its gauges ran 24px past the content edge and 12px past the tooltip's own edge.
- **Fix.** The Credits tooltip content is `w-full min-w-48`: it fills the 200px content box, and short lines no longer shrink the gauges. Checked in a browser: the gauges are 200px wide (192px when every line is short) and stay inside the padding.
- Tests: `__tests__/chromeActions.test.tsx` checks the content has no fixed width wider than the tooltip.

## 0.102.0

Linked Accounts in the chrome (live test 2026-11-15 of county party ↔ campaign links; Organization Settings §8.8, Parent workspace plan row 9).

- **"Via <Parent>" in the org switcher.** A membership that comes through a Parent Organization link carries `via: { id, name }` (Politogy ID `GET /api/orgs`). `NavOrgOption` and `ChromeOrgSummary` gain an optional `via`, every org-list mapping in the chrome passes it through, and the switcher row shows "Via TEST County Party" over the Linked Account's name. Ordinary memberships look as before. New export on `./native`: `orgViaLabel(via)`. Apps that build their own list (`tokenOrg.orgs`, `controlledOrg.orgs`) must pass `via` through to show it.
- **Plain role words in the account menu.** "Roles & Organizations" printed the stored role upper-cased, so a link Account Manager read "ACCOUNT_MANAGER". It now uses the user card's labels (Admin, Account Manager, Member, Viewer), else the raw role made readable, and no longer upper-cases it. New: `menuRoleLabel()` in `lib/roleLabel`.
- Tests: `__tests__/orgSwitcherVia.test.tsx` (new).

## 0.101.1

The user card's re-read after a profile change asks for a fresh profile (follow-up to 0.101.0, live check 2026-11-14).

- **Cause.** The chrome API (Contacts) keeps each profile row for 15 s. Politogy ID writes a new photo or name straight to VRM Core, so the re-read that 0.101.0 fires right after the save could still get the old photo when the page had read `me` in the last 15 s. Seen live: the card kept the old photo until the event fired again later.
- **Fix.** On `politogy:profile-changed` the provider reads `me?fresh=1`, and the chrome API drops its cached copy of the caller's own profile before answering (politogy-contacts, `GET /api/me?fresh=1`). An API without the flag answers a normal read.
- Tests: `__tests__/profileChanged.test.tsx` checks the re-read path.

## 0.101.0

A new photo or name saved on My Profile shows in the left-bar user card at once (bug seen live 2026-11-14, Ben: "updating profile picture from My Profile does not immediately display in the personal information footer").

- **Cause.** `NavChromeProvider` read `me` (the user's name and photo) once per page and kept it. My Profile saved the new photo and updated its own preview, but nothing told the chrome, so the card kept the old photo until a reload.
- **Fix.** The provider now reads `me` again when the page fires the `politogy:profile-changed` window event, skipping the read cache. Only the newest read lands, and a failed re-read keeps the last good identity.
- New exports on `./native`: `announceProfileChanged()` (fires the event) and `PROFILE_CHANGED_EVENT`.
- Tests: `__tests__/profileChanged.test.tsx` (new).

## 0.100.0

New pages open at the top (Ben 2026-11-08, clicked "Save as written" and "Go, all Modes" in the scroll-to-top session box; Reference/UI-Platform → URL state → "Scroll position"). Ben: "when clicking from one tab to another … the next page starts out slightly scrolled down. I need every new page to start fully scrolled at the top."

- **Cause.** Next's App Router only scrolls when the new page's top edge is off screen, so a page scrolled down a little kept that offset. And most pages and tabs switch by query parameter (`?page=…&tab=…`) on the same path, which nothing reset.
- **Fix.** `NavAppShell` (so every app on `PolitogyAppFrame`) now scrolls the window to the top, instantly, when the URL moves to a new page: a different path, or a different `mode`, `page` or `tab`. Changing only `section`, `org_id` or a feature parameter (filters, pagination) keeps the place; filling a missing default is not a new page; Back / Forward keep the browser's own position; a `#anchor` URL lands on its anchor. Uses the Navigation API where present, with a `popstate` + render-time check as the fallback, and survives apps that remount their chrome on each page (Tribes, Surveys).
- New exports on `./native`: `useScrollToTopOnNewPage`, `isNewPage`, `pageIdentityOf`, type `PageIdentity`.
- Tests: `__tests__/scrollToTop.test.tsx` (new).

## 0.99.1

The user card says "Account Manager" for an Account Manager (bug seen live 2026-11-07: benedtl@hotmail.com, `account_manager` in "TEST Campaign A (link test)", a Linked Accounts roster membership, was shown as "Member").

- **Role line from the real role.** The card under the name printed the app's own role string, and apps collapse roles to their permission pair (Contacts: admin | member), so `account_manager` came out as "Member". `PolitogyAppFrame` now labels the active organization's raw membership role (the chrome API's `rawRole`; in token mode the `org_role` claim) and falls back to the app's string. Labels (Specs/Organization-Settings §8.4 groups): owner / admin / account_admin → "Admin" and member / field roles → "Member" as before; account_manager → "Account Manager"; viewer → "Viewer".
- `useChromeState()` gains `activeRawRole`. In controlled mode (Contacts) it comes from the chrome API org list when the app's list has no `rawRole`.
- Tests: `__tests__/userCardRole.test.tsx` (new).

## 0.99.0

VRM Verified badge and the Contact Card slide-in (Ben 2026-11-06, typed in the UI debugging box; specs Contacts §4.2, §8.6A and VRM-Verified §2 updated with his go).

- **Verified in a pill is a green dot.** `VrmVerifiedBadge` (pill, the default) draws Verified like the other tiers: a dot (`--vrm-tier-verified`, fallback `#00A651`) and the words "VRM Verified". Ben: "where it is in a pill… it should just be a green dot and remain in the pill".
- **New `variant="icon"`** for a contact view's name line: the Brand `verifiedIcon` alone (no words, no pill, `role="img"`, label "VRM Verified", the VRM Verified tooltip), placed before the first letter of the first name. It renders nothing for any other tier.
- **New `ContactSlideIn` + `useContactSlideIn`** (on `.` and `./native`): the Contact Card slides in from the right over the current page, matching Contacts' own drawer (40% overlay, right panel up to 672px, "Contact Card" header, close button, Esc and overlay click close), with an "Open in Contacts" link. It frames Contacts' chrome-less card view `/contacts/embed/<uvp id>?org=<org>`. Helpers `contactEmbedUrl`, `contactPageUrl`, `CONTACTS_ORIGIN`. Contacts §8: the Card opens as a slide-in "anywhere a contact reference appears".
- Tests: `__tests__/vrmVerifiedBadge.test.tsx` (pill dot, icon variant), `__tests__/contactSlideIn.test.tsx` (new).

## 0.98.0

The one VRM Verified badge (Contacts v59 §4, decided 2026-11-05, Ben: "Every badge is the brand `verifiedIcon`, drawn by one shared shell component"; Data-System/VRM-Verified v7 §2, §2.6).

- **New `VrmVerifiedBadge`** (on `.` and `./native`): `tier` (`verified | identified | anonymous | stale | inactive | null`), `size`, `showLabel`. Verified draws the Brand `assets.verifiedIcon` read at runtime from the token sheet (`--asset-verified-icon`), never a bundled copy; until the sheet loads its box is reserved and nothing stands in. Other tiers draw a dot (colour from `--vrm-tier-<tier>`, defaults as the apps draw them today per Contacts §4.1) and the tier name. The Verified tooltip is the spec's sentence, "Politogy has confirmed this is a real, registered voter."; no tooltip suggests permission to text or email. Also exports `VRM_VERIFIED_TOOLTIP`, `VRM_TIER_LABELS`, types `VrmVerifiedTier`, `VrmVerifiedBadgeProps`.
- **New `useBrandAsset(kind)`** and `BrandAssetKind` gains `'verified-icon'`.
- Tier dot colours per VRM-Verified v8 (decided 2026-11-05, Ben): Identified purple, Anonymous black, Stale yellow, Inactive gray; Verified is the brand badge. They are CSS variables (`--vrm-tier-<tier>`).
- Tests: `__tests__/vrmVerifiedBadge.test.tsx` (new).

## 0.97.1

Two left-bar and top-bar fixes (Ben 2026-11-05, typed in the UI debugging box; specs updated with his go).

- **Top-bar tooltips stay on screen.** `TopBarTooltip` gains `align?: 'center' | 'end'` (default `center`). `end` lines the body up with the trigger's right edge and keeps the arrow on the trigger's center. `TopBarLinkAction` (Organization settings, My profile) uses `end`. Measured at 1547px before the fix: the centered 224px body ran 75px past the viewport for My profile and 35px for Organization settings.
- **One quiet build line.** The left-bar footer's two build rows (`env | commit | version`, `date | author`) are now one line, `v<version> · <Mon D>`, 10px mono in the inactive-row gray (`--sidebar-row-text`: 66% white, `#F0CFD2` on the Campaign rail; both clear 4.5:1). The full build info (env, commit, version, date, author) is the line's hover title. New export `buildLineParts()`. Specs/Left-Navigation §10, Reference/UI-Platform → Debug info.
- Tests: `__tests__/tooltipEdge.test.tsx` (new), `__tests__/native.test.tsx`, `__tests__/sidebarContrast.test.ts` (the contrast check now targets the build line's `--sidebar-row-text`).

## 0.97.0

Top bar and left bar rework (Ben 2026-11-04, typed in the UI debugging box; specs updated with his go).

- **Top bar is Search · Credits · Notifications · Organization settings · My profile.**
  - **Removed:** the support-request icon (`SupportAction`: life-buoy and modal), the DevNotes launcher, and the Spec overlay icon. The exports stay (`SupportAction`, `SpecOverlayAction`); `ChromeTopBarActions` no longer renders them. The DevNotes provider still mounts, and its reads stay gated, so nothing loads at boot.
  - **Added:** **Organization settings** (`settings` glyph → Settings app `/organization-settings?org_id=<tail>`) and **My profile** (`circle-user` glyph → Politogy ID `/my-profile?org_id=<tail>`), icon only, with the label and a one-line callout in the shared tooltip. New exports: `TopBarLinkAction`, `OrganizationSettingsAction`, `MyProfileAction`, type `TopBarLinkActionProps`.
- **Left bar:** the ACCOUNT section (My profile, Organization settings) is no longer drawn. New `NavItem.railHidden`: the rows stay in the tree, so Settings and Politogy ID breadcrumbs and active-row matching are unchanged, but `NavSidebar` skips them.
- **Support:** the top-bar support-request icon is removed now (Ben 2026-11-04). A left-bar footer **Support** link to `https://politogyvrm.com/support` follows in a later release, once that page is live on the new website (kept on branch `feat/footer-support-link-later`).
- **Account menu:** no Navigation display option. The preference itself (state, storage, the frame's use of it) is unchanged.
- Tests: `__tests__/topBarActions.test.tsx` (new), `__tests__/devNotesLazyOpen.test.tsx` (no launcher, no boot reads), `__tests__/retiredHostLinks.test.tsx`, `__tests__/native.test.tsx`.

## 0.96.2

The org switcher list shows each organization's icon (Specs/Left-Navigation §6: each org "with its icon mark, name and short ID"; Ben 2026-11-04: the Primary logo showed in the card, but the list did not show the icon).

- **Switcher rows use `iconUrl`.** A row shows the org's Brand Kit icon on a white tile, uncropped (`object-contain`). Without an icon it shows the Primary logo as before, then initials. Each row's mark carries `data-org-option-mark="icon" | "logo" | "initials"`.
- **`iconUrl` reaches the switcher and the collapsed rail.** `ChromeOrgSummary` gains optional `iconUrl` (sent by the chrome API `/api/orgs` from contacts#425). Every org-list copy in the chrome state (token, controlled and uncontrolled providers) and the active org card in `PolitogyAppFrame` now carry it, so the collapsed rail's `OrgIconMark` gets the icon too. Apps that pass their own `tokenOrg.orgs` or controlled `orgs` should include `iconUrl` from `/api/orgs`.
- Tests: `__tests__/orgSwitcherIcon.test.tsx`.

## 0.96.1

Privacy, Terms and Subscriptions open in a new tab (Ben 2026-11-04: clicking Privacy replaced the app with the public Politogy ID page, with no left bar or top bar).

- **Left-bar footer links honor `external`.** `NavFooterLink.external` was documented as "opens in a new tab" but the rail footer ignored it, so every app sent the user away from the app in the same tab. External links now get `target="_blank"` and `rel="noopener noreferrer"`; links without `external` keep opening in the same tab. Every app on the frame gets this with a version bump and no code change.
- **Privacy and Terms point at the website** (Ben 2026-11-04: "Yes, point them now"): Privacy `https://politogyvrm.com/privacy` (was Politogy ID `/privacy-policy`), Terms `https://politogyvrm.com/terms-of-service` (was `/terms-and-conditions`). Subscriptions is unchanged. `footerLinks()` no longer depends on the host, so staging links to the same public pages.
- Tests: `__tests__/native.test.tsx` ("opens external legal links in a new tab"), `__tests__/retiredHostLinks.test.tsx` (the three addresses).

## 0.96.0

One shared "⋯" row menu for list rows (Ben 2026-10-26: Email's broadcast menu stuck open, and on the last row Archive and Delete were cut off by the table frame).

- **New `RowMenu`** (root and `/native`): the trigger button plus a panel rendered in a portal on `<body>` with fixed positioning, so a table wrapper or card with `overflow: hidden/auto` never clips it. It opens below the trigger, right-aligned, and flips above when it does not fit below. It closes on an outside click, on Escape (focus back on the trigger), after a `role="menuitem"` is chosen, when another row's menu opens, and on page scroll or resize. Arrow keys, Home and End move between items. Clicks on the trigger and in the panel do not bubble to the row (React carries portal events to ancestors), so a clickable row does not open too. Clicks on anything that is not a menu item (an inline form expanding in the panel) keep it open; the close after a choice waits a tick so a submit button's form still submits. Pass `triggerClassName` / `panelClassName` to use an app's own classes instead of the default token look.
- **New `RowMenuItem`**: a plain button item (`onSelect`, `disabled`, `danger`).
- Also exported: `rowMenuPosition()` (the placement math) and the `RowMenuPlacement` type.
- Tests: `__tests__/rowMenu.test.tsx`.

## 0.95.0

Every app's browser tab shows the Brand's VRM tile (Brand `assets.favicon`; Reference/UI-Platform conformance: "Favicons resolve from Brand `assets.favicon`, not static files").

- **New `BrandFavicon`** (root and `/native`), rendered by `PolitogyAppFrame`, so every app on the frame inherits it with no code change. After mount it reads `--asset-favicon` and `--asset-apple-icon` from the runtime token sheet (`/api/tokens?format=css`, already loaded by the browser in every app) and sets `<link rel="icon">` and `<link rel="apple-touch-icon">`. The link is kept the last icon link in `<head>`, so a stale metadata icon or a leftover static file never wins. Draws nothing until the sheet defines the asset.
- Why: `politogyAppIcons()` resolves icons on the server, and in production Cloudflare's bot check answers the Worker's request to `specs.politogyvrm.com/api/icons/<app>` with a challenge, so the metadata had no icon and tabs showed the browser default or an app's leftover Next.js `favicon.ico` triangle.
- **`politogyAppIcons()` fallback:** when the API can't be reached or has no favicon, it now returns `SPECS_FAVICON_URL` (`https://specs.politogyvrm.com/api/favicon`, Specs' public 302 to Brand `assets.favicon`; `?kind=apple` for the iOS icon) instead of no entries. The icon link is in the server HTML, so the browser never asks for `/favicon.ico` and never flashes a blank tab. Exported: `SPECS_FAVICON_URL`.
- Also exported: `applyBrandFavicon()`, `watchBrandFavicon()`, `BRAND_FAVICON_LINK_ID`, `BRAND_APPLE_ICON_LINK_ID`, for apps outside the frame.
- **New subpath `@the-portland-company/shell/brand-favicon`** (client entry, React only): import `BrandFavicon` from it in a root layout to cover pages that do not render the frame (public forms, surveys, polls), without pulling in `./native`.
- Apps should delete any `app/favicon.ico` or `app/icon.svg` they still carry.
- Tests: `__tests__/brandFavicon.test.tsx`.

## 0.94.0

One shared look for the three "no AI Credits" states (VRM-Admin/Pricing-and-Metering §8.6 and §8.10.3; Ben's go on the AI metering plan, 2026-10-24).

- **New `AiCreditsState`** (root and `/native`): `kind` is `out` ("Out of AI Credits", interactive AI), `paused` ("Paused — out of AI Credits" with the time of the last output, automatic AI) or `waiting` ("Waiting for AI Credits", a workflow step that resumes on its own). An Account Admin gets **Buy AI Credits** and **Turn on auto top-off**, both opening the Wallet on the active org; everyone else gets "Ask an Account Admin to add AI Credits." Optional **Check again**. Pure React with token-based inline styles: no Tailwind, Chakra or router needed.
- Also exported: `aiCreditsWalletUrl(orgId)` and `AI_CREDITS_STATE_TITLES`.
- Tests: `__tests__/aiCreditsState.test.tsx`.

## 0.93.0

Tab icons come from the Brand tab icon map (Reference/UI-Platform → Tabs, "Tab icon map (Brand `tabIcons`)", Ben 2026-10-24).

- **`NavTabStrip` `iconStrip` prop** (optional, e.g. `iconStrip="forms"`). Each tab reads `--tab-icon-<iconStrip>-<tab.key>` from `:root` (emitted by `/api/tokens?format=css`) and renders the named Lucide icon at the tab icon size (15px / 13px small, 1.75 stroke, `text-current`). Missing, empty or unknown names render the tab's own `icon`. One `<head>` MutationObserver per strip re-reads when the Brand stylesheet loads; no `window` access during render. Without `iconStrip` nothing changes.
- **New `resolveTabGlyph(name)` and `KNOWN_TAB_GLYPHS`** (main entry and `./native`): the 124-name tab icon vocabulary, kebab-case Lucide names mapped to `react-icons/lu` components. `resolveTabGlyph` trims, strips quotes and lowercases; it returns `null` for an unknown name. Also exports the `TabGlyphComponent` type.
- `react-icons/lu` is external in the build (like `react-icons/fi`); `./native` still has no Chakra, emotion or react-router dependency.
- Tests: `__tests__/tabIconMap.test.tsx`.

## 0.92.0

Politogy ID gets its own registry row (Reference/UI-Platform: each app that renders the chrome has its own `POLITOGY_APPS` row).

- **New app key `auth`** (`PolitogyAppKey`): title "My profile", origin `https://auth.politogyvrm.com`, storagePrefix `auth`. No `mode` (My profile is in every mode, Specs/Left-Navigation §9.4, like `settings`), no grants, no beta flag. Politogy ID's My profile page renders `<PolitogyAppFrame app="auth">` instead of borrowing Settings' row.
- Tests: `__tests__/modeNavAgree.test.tsx`.

## 0.91.0

Reverts the 0.88.0 and 0.89.0 shared form set (Ben 2026-10-24: restore the look from before the 10-22/23 shell wave; keep the 0.90.0 PageHeader, which matches the Spec). No live app uses 0.88 or newer.

- **Removed** `Button`, `Input`, `Select`, `Textarea`, `Checkbox`, `FileInput`, `FormField` and their types, from the root and `/native`.
- **Card** is back to its 0.87 form (plain padded box, `title` as an h3); the `--app-card-*` tokens are gone from chrome.css.
- **Theme.** The native-field border rule applies to every text-like control again (no `data-shell-field` exemption).
- **ESLint guard removed** (`@the-portland-company/shell/eslint`, its peer and dev dependency): its rules required the removed primitives.
- **Kept:** the 0.90.0 PageHeader, the router-agnostic PageHeader / BreadcrumbBar split and their `/native` exports (with `Card`, `HeaderTabBar`), and the `shell-version-check` bin.

## 0.90.0

`PageHeader` matches the Spec (Reference/UI-Platform "Page header" and "Page header and width").

- **Surface and color.** The filled `--app-tab-header-bg` bar, white title, `text-slate-100` and bottom border are gone: the header sits on the page background and the title is Graphite (`--color-text`, fallback `#2F3136`). The title is now an `h1`.
- **Breadcrumbs.** The `breadcrumbs` prop is deprecated: accepted, renders nothing, `console.warn` once in dev.
- **Eyebrow.** Reads the mode color through `--color-accent-fg`, which follows the Mode's stamped primary (`--mode-accent`, the same token the tab strip uses for `modes.<mode>.primary`) and is pinned AA-safe for Petition. Never the white `modes.<mode>.accent`.
- **Spacing.** 22px above the header; 24px desktop gutter, 16px below `md`. `md:ml-60` sidebar offset unchanged.
- **Width.** `maxW` is deprecated and ignored (warns once in dev); the header spans its container.
- **Email guard.** A string `title` / `subtitle` containing an email address warns once in dev.
- Unchanged: 30px bold title, 11px uppercase eyebrow, 15px G4 subtitle, actions right, tabBar beneath.
- Tests: `__tests__/pageHeaderEyebrow.test.tsx`.

## 0.89.0

Card follows the theme, and the form set gains Checkbox and FileInput. Follow-up to the 0.88.0 migrations.

- **Card tokens.** Surface, border and text come from new `--app-card-bg`, `--app-card-border`, `--app-card-fg` and `--app-card-fg-muted` (chrome.css). Light: `#FFFFFF`, `#D7DADF`, `#2F3136`, `#5C6B80`. Dark (under `.dark`): `#161616`, `#333333`, `#E8E8E8`, `#A3A3A3`. Both pairs clear 4.5:1. This fixes the white cards on surveys dark mode and the petitions contrast failure on dark pages. The Brand `.dark {}` can still override the tokens.
- **Card props.** `subtitle`, `aside`, `actions`, `footer`, `bodyClassName`, `padding` (`none | sm | md | lg`, default `md`). A plain `<Card title>` renders as before (p-6, h3 title). Any of `subtitle`, `aside`, `actions`, `footer`, `bodyClassName` switches to a bordered header / body / footer layout, which is what dashboard `RdParts` and settings `ui/kit` Card need.
- **New `Checkbox`.** `label`, `description`, `indeterminate`, `invalid`, forwards its ref, 44px-tall clickable row, accent fill, `data-shell-field`. Exported from the root and `/native`.
- **New `FileInput`.** The `type="file"` control with the Input label/helper/error chrome, 44px tall, secondary-button styling on the native button. `Input` still rejects `file` and `checkbox`; its docs point to these.
- **ESLint guard.** `no-raw-control-styling` now flags `<input type="checkbox">` and `<input type="file">` with `className` or `style` unless the file imports `Checkbox` / `FileInput` (importing `Input` no longer excuses them). `no-local-primitives` also covers `Checkbox` and `FileInput`.
- Tests: `__tests__/cardCheckboxFileInput.test.tsx` (including light and dark contrast of the card tokens), `__tests__/eslintGuard.test.ts`.

## 0.88.0

Shared form primitives, so apps stop hand-rolling them.

- **New exports** `Button`, `Input`, `Select`, `Textarea` (plus `ButtonProps`, `ButtonVariant`, `ButtonSize`, `InputProps`, `SelectProps`, `TextareaProps`).
- **Button.** Variants `primary | secondary | ghost | danger`; sizes `md` (44px) and `sm` (36px); `loading` and `disabled`; `href` / `as` link-buttons; forwards its ref. Primary uses the `--app-btn-primary-*` tokens (Specs buttonPrimary).
- **Input, Select, Textarea.** `label`, `helperText`, `error`, `invalid`; 44px control height for Input and Select; forward their refs; `--app-field-*` tokens.
- **Rule.** Apps use these instead of a local Button / Input / Select / Textarea (README "Form primitives").
- **Native subpath.** `Button`, `Input`, `Select`, `Textarea`, `Card`, `PageHeader`, `FormColumn`, `BreadcrumbBar`, `HeaderTabBar` (and their types) are also exported from `@the-portland-company/shell/native`, which has no Chakra or react-router peer. The native `PageHeader` and `BreadcrumbBar` render breadcrumb links as plain anchors. The main entry is unchanged.
- Tests: `__tests__/formPrimitives.test.tsx`.

## 0.87.1

Release fix only; same code as 0.87.0, which never reached npm. The 0.87.0 version bump regenerated `package-lock.json` with a newer npm that dropped two optional `yaml@2.9.1` entries, so the publish gate's `npm ci` refused it. The lock file is restored from 0.86.0 with only its version changed.

## 0.87.0

The top-bar search works in Relationship Mode. Spec cited: Reference/UI-Platform "Top bar — required elements" (Relationship search returns the Account's Contacts only) and Data-System/UVP §7.1 (a result opens the Contact Card).

- **Why.** Reported by Ben 2026-10-18: clicking the search box in Contacts did nothing. The frame passed only a placeholder, so `NavTopBar` drew a read-only input in every app.
- **Relationship Mode.** The box takes typing; Enter opens Contacts → All Contacts filtered to the query: `?mode=relationship&page=contacts&tab=contacts&section=table&org_id=<tail>&q=<query>`. Same origin from inside Contacts, the `-staging` twin from a staging host. No app wiring and no new prop (an app never passes chrome configuration).
- **Campaign and Petition.** Unchanged: decorative until their search is built (Campaign voter lookup is Campaign-Voter-Record §3).
- **New export** `relationshipSearchHref(query, { orgId, fromApp, hostname })`.
- **Needs** Contacts to read `q` into its table search (politogy-contacts, same day).
- Tests: `__tests__/relationshipSearch.test.ts`, `__tests__/topbarSearch.test.tsx`.

## 0.86.0

Campaign Mode gets a Tribes row. Spec cited: Specs/Tribes §2.3–§2.4 and Specs/Left-Navigation §9.2 (decided 2026-10-16 by Ben: Campaign and Relationship Tribes are separate; Campaign Tribes live in Campaign Mode).

- **Campaign tree.** Race data now lists Battleground · District data · **Tribes** (`users-round`), linking to `https://battleground.politogyvrm.com/tribes` (org carried as before). It is a page of the Battleground app at `/tribes`, so it is the only active row there.
- **Relationship tree unchanged.** Relationship Tribes stay inside Contacts → Tribes; there is still no Relationship Tribes row.
- **Release order.** Publish after the Battleground app serves `/tribes`, so the row never links to a missing page.
- Tests: `__tests__/standardNav.test.ts`.

## 0.85.0

The mode switcher, the rail and the rows always show one mode. Spec cited: Specs/Left-Navigation §9.1, §9.2, §9.4 and §11.1 ("the rail never shows a mix of two modes").

- **Why.** Reported by Ben and measured on production 2026-10-16 on "We need Steve": after picking Campaign, Contacts (and Forms, Surveys, CTAs) drew the red "Campaign mode" rail and the Campaign search placeholder around Relationship rows, even after a reload. These apps had no registry mode, so the switcher took the user's last choice (`vrm.activeMode`) while the rows stayed Relationship.
- **Registry.** `contacts`, `forms`, `surveys` and `ctas` are pinned to `mode: 'relationship'`: they are Relationship rows only (§9.1) and Campaign has none of them (§9.2). Same fix as the Dashboard's earlier pin. Clicking another mode still goes to that mode's landing.
- **Unpinned apps** (Settings: the Account section is in every mode, §9.4) draw the tree of the mode their switcher shows, so rows, rail colour and label agree. Core (`vrm`) is unchanged.
- **Loading Screen.** For an unpinned app it stays up until the organization's Modes are read, so the rail never changes mode under the user. `NavMode` gains optional `resolved` (false while the id is a stand-in).
- Tests: `__tests__/modeNavAgree.test.tsx`; `frame-grants.test.tsx` updated for the new pins.

## 0.84.0

An organization switch lands on the new organization's Relationship Dashboard. Spec cited: Specs/Left-Navigation §6 and §11.2 (v21, decided 2026-10-15 by Ben; supersedes the 2026-10-06 rule that kept mode, page and tab).

- **Why.** Measured by Ben on production 2026-10-15: switching from "We need Steve" in Campaign Mode to an organization without Campaign Mode kept the Campaign rail, then showed an access error that required signing out and in again.
- **Token-org path.** After the IdP accepts the switch, the tab keeps the switch pending (Loading Screen up), lets the current app re-exchange for up to 4 seconds, then navigates to `https://dashboard.politogyvrm.com/dashboard?mode=relationship&org=<new org>` (`-staging` twin from a staging host). A refused switch still rolls back and calls `onSwitchError`.
- **Legacy path.** `ChromeStateProvider` navigates to the same landing after writing the cookie.
- **Frame.** The Loading Screen's synthetic ready signal waits while `orgPending` is true.
- **New export** `orgSwitchLanding` (`href`, `navigate`); tests replace `navigate`.
- **Not changed.** A per-tab `?org_id=` override and a switch made in another tab (followed on focus) do not navigate: neither is a switch made in this tab.

## 0.83.0

The top bar's Credits icon shows credit health. Spec cited: Reference/UI-Platform v57 "Top bar → Credits" and "Credit health in the payload" (decided by Ben, 2026-10-13); VRM-Admin/Pricing-and-Metering v5 §7.5.

- **Icon.** The battery with the lightning bolt, coloured by the worst state among the credit types in use: green when every one is Good, yellow when at least one is Low, red when at least one is Out. Not in use never changes it. The fill drains with the state (full, part, empty) and the state is in the `aria-label` ("Credits: low on Signal Credits"), so colour is never the only signal. A payload without `state` is unknown: neutral icon, no colour, no gauge level.
- **Tooltip** (hover or focus) lists all four types, each with Available, a gauge against its full mark and the state in words ("Signal Credits: 38 left, about 1 day at your recent pace"). **Click** opens the breakdown: four rows, Available, Included (with the next grant date) and Purchased when the ledger publishes them, gauge, state, and a "+" to buy that type.
- **Retired.** The low-balance hint that hung under the icon ("You're low on fuel" / "Buy More Fuel"), its sessionStorage dismissal and the new-reply toast's clearance for it. No pop-up about credits opens by itself. `lowFuel` / `lowFuelThreshold` are no longer read. The word is Credits everywhere; "fuel" appears in no string.
- API: `FuelChannelStatus` gains `state`, `fullMarkUnits`, `daysOfUseLeft`, `includedUnits`, `purchasedUnits`, `nextGrantAt`; `CommunicationsFuelStatus` gains optional `ai` and `enhancement`. `TopBarPopover` gains `icon`, `ariaLabel` and `tooltip`; `topBarIconButtonClass` tones gain `ok` and `low` (`TopBarIconTone`). New export `CreditsAction` (alias of `FuelAction`) and the pure helpers from `./native` (`creditsIconState`, `creditGaugeRatio`, `creditTooltipLine`, `creditsAriaLabel`). New tokens `--credits-good`, `--credits-low`.
- Tests: `__tests__/credits.test.ts`, `__tests__/chromeActions.test.tsx` (Credits block).

## 0.82.1

The legacy chrome provider (Contacts, and any app not yet on `tokenOrg`) writes the organization to the address bar as the 7-char `org_id` tail and never the full-uuid `?org=`. Spec cited: Reference/UI-Platform "URL state" (`org_id`, always present; the legacy `org=` and cookie stay only until every app reads the org from the token).

- **Cause.** The provider's sync effect set `?org=<full uuid>` whenever the active org changed, so Contacts' canonical URL regained a second org key after every load (reported by Ben's agent, 2026-10-13).
- **Fix.** The effect deletes `org=` and sets `org_id=<tail>` (a replace, never a navigation); the cookie mirror is unchanged. At boot an `org_id` tail counts as an explicit selector and, once the member list resolves, selects that org (uncontrolled apps); a non-member tail is rewritten to the active org.
- Tests: `__tests__/legacyOrgIdUrl.test.tsx`.

## 0.82.0

The universal-search placeholder names what the current Mode searches. Spec cited: Reference/UI-Platform v56 "Top bar — required elements" (decided by Ben, 2026-10-12).

- Relationship: "Search contacts, Tribes, forms" · Campaign: "Search voters, walk lists, polls" · Petition: "Search petitions, sheets, circulators". The Glossary term is Tribe, so the design frame's "segments" is not used.
- A mode-scoped app takes its registry mode; an unscoped app (Contacts, Forms, Surveys, CTAs, Settings) follows the mode the pill shows. `data.searchPlaceholder` still overrides. The old per-app table (Contacts only) is gone.
- `NavMode` gains `id`; new export `MODE_SEARCH_PLACEHOLDER`.
- Tests: `__tests__/searchPlaceholder.test.tsx`.

## 0.81.2

The rail header matches the Left Navigation design's vertical rhythm. Spec cited: Specs/Left-Navigation §3-§7 (values the page states are unchanged; the design decides the gaps it does not state).

- **Cause.** The org card's white band was fixed at 70px, the Brand `orgLogoMaxHeight` cap, where the design draws a 52px band; the ORGANIZATION eyebrow sat 21px under the lockup where the design has 16px; the mode caption sat 6px under the track where the design has 8px. Every section row landed about 26px low (Design Compare, 2026-10-12: label_moved on Relationship mode / Dashboard / Contacts).
- **Fix.** `--sidebar-org-band-height: 52px` (logos still scale to fit; the 70px Brand token stays the logo cap), eyebrow margins 2px/9px, caption 8px.

## 0.81.1

The active row's left marker is visible. Spec cited: Specs/Left-Navigation §8.1 ("9% white tint, semibold white text, and a 2px inset marker on the left edge in white").

- **Cause.** The marker drew in `--mode-accent`, the Mode's chrome accent, which is graphite (#2F3136) on the graphite Relationship rail (#1B1C20): in the DOM, invisible on screen. The Design Compare for Left Navigation read the Dashboard row as having no active state (measured 2026-10-12 by the visual-regression tester).
- **Fix.** New `--sidebar-active-marker: #FFFFFF` in chrome.css (Brand `modes.<mode>.accent`, white for every mode as of v153); `NavActiveRail` draws in it, falling back to the old accent on an older sheet.
- Tests: `__tests__/mode-accent.test.tsx`.

## 0.81.0

An organization switch without a reload keeps the mode switcher and the address bar right, and no shell link builds on the retired VRM core. Spec cited: Reference/UI-Platform "Retirement of app.politogyvrm.com" and "URL state"; Specs/Left-Navigation §7.

- **Cause (mode switcher).** After a switch the pill showed the new organization at once, but the entitlement read (`me` with `x-contacts-org`) ran before the app had re-exchanged its token. The chrome API answers for the verified token org, so the old organization's modes were cached under the new one's key: on an organization that holds Campaign Mode the Campaign button stayed dimmed ("isn't active for this organization") until a reload (reported by Ben; reproduced 2026-10-12 on the Dashboard, `account: <old org>` in the response).
- **Fix.** `ChromeState` gains `orgPending`; `useChromeMode` waits for it to clear and reads entitlements with the new token.
- **Cause (address bar).** The shell wrote the new `org_id` tail, then the app's `onReexchange` revalidated its tree and the Next router restored the URL it last navigated to, with the previous tail.
- **Fix.** The tail is stamped again when the token settles on the new organization, after that refresh.
- **Links.** My Profile and Add account go to Politogy ID (`auth.politogyvrm.com/my-profile`); Organization settings goes to the Settings app with the 7-char `org_id`; Privacy, Terms and the Beta terms go to Politogy ID; the fuel top-up link goes to the Settings Subscription & Billing tab. New export `settingsBaseUrl()` and `footerLinks()`. `CORE_APP_ORIGIN` stays only for `resolveOrgLogoUrl` (the storage proxy is data service, not UI).
- Tests: `__tests__/orgSwitchPending.test.tsx`, `__tests__/retiredHostLinks.test.tsx`.

## 0.80.2

The mode switcher goes to each mode's landing page. Spec cited: Specs/Left-Navigation §7 and §11.1.

- **Cause.** The Relationship and Campaign buttons still pointed at the retired VRM core (`app.politogyvrm.com/relationship/dashboard`, `/campaign/dashboard`). Its redirect lands on the Dashboard app without a mode, and that app then chooses by the `politogy_active_mode` cookie. From a Campaign page the cookie says campaign, so clicking Relationship landed back on Battleground (measured 2026-10-12 on an organization that holds Campaign Mode).
- **Fix.** Relationship goes to `https://dashboard.politogyvrm.com/dashboard?mode=relationship`; Campaign goes to `https://battleground.politogyvrm.com/battleground?mode=campaign`. Both carry the active organization, and move to their `-staging` twins from a staging host. New export `modeLandingHref`.
- **The `dashboard` registry row is pinned to `mode: 'relationship'`.** It was unscoped, so its frame followed the user's last mode selection: after a visit to Campaign Mode the Relationship Dashboard drew the red Campaign rail and the "Campaign mode" label over the Relationship rows (reported by Ben, reproduced 2026-10-12; Left-Navigation §11.1). Pinned, the Dashboard always draws the Relationship frame and writes `relationship` to the active-mode cookie, like `email`.
- Tests: `__tests__/modeLandingHref.test.ts`.

## 0.80.1

The Dashboard row shows its active marker on the Dashboard. Spec cited: Specs/Left-Navigation §8.1 and §11.3 ("Exactly one row is active").

- **Cause.** The Relationship tree linked Dashboard to the host root (`https://dashboard.politogyvrm.com/`). The app serves the page at `/dashboard` and the root only redirects there; `isNavItemActive` treats a `/` target as active on `/` alone, so no row was active on the Relationship Dashboard (measured 2026-10-12).
- **Fix.** The row links to `https://dashboard.politogyvrm.com/dashboard`. Other apps follow the same link without the extra redirect.
- Tests: `__tests__/standardNav.test.ts`.

## 0.80.0

The URL-state helper. Specs cited: Reference/UI-Platform "URL state" (decided 2026-10-06, Spencer) and Global Rules → URL State. Until now the page said the helper "ships in a shell minor release" and no app could carry `section=` without concatenating by hand.

- **`@the-portland-company/shell/url-state`** (pure, server- and client-safe): `readUrlState`, `writeUrlState`, `buildSearch`, `normalizeUrlState`, `historyMode`, `slugify`, `URL_STATE_KEYS`, `URL_STATE_MODES`.
- Reads and writes `?mode=&page=&tab=&section=&org_id=` in the fixed order, keeps every feature parameter after them in its own order, writes a full org uuid as its 7-character tail, and refuses a feature parameter that names a base key.
- `normalizeUrlState(search, { page, mode?, tabs?, sections?, org_id? })` fills a missing default and corrects an unknown `tab` or `section` to the first one, reporting whether the URL needs a replace. `historyMode(prev, next)`: `push` for a `mode`, `org_id`, `page` or `tab` change, `replace` for a `section`-only change or a normalization.
- Section tracking on scroll (debounced replace) and the scroll-into-view on load are the consuming app's to wire with this helper; the shell's own frame does not touch the URL.

## 0.79.0

Battleground and District Data on their own hosts. Specs cited: Reference/UI-Platform "Dashboard, Battleground and District Data are three features in two Modes" (decided 2026-10-12), Specs/Left-Navigation §9.2, §13 ("Measured 2026-10-12") and §14.

- **Registry.** `battleground` origin → `https://battleground.politogyvrm.com`, `districts` origin → `https://districts.politogyvrm.com` (both `mode: 'campaign'`, unchanged otherwise).
- **Left bar.** The Campaign tree's Battleground and District data rows link to those hosts (`.../battleground`, `.../districts`, org carried as before).
- **Served by** the dashboard deployment (politogy-dashboard #47), which answers at the new hosts and, with `CAMPAIGN_HOSTS_LIVE`, redirects its old `dashboard.politogyvrm.com/battleground` and `/districts` paths there permanently. Release this and flip that flag together.

## 0.78.0

Dashboard, Battleground and District Data are three features in two Modes; no Polls row in the Relationship left bar. Specs cited: Reference/UI-Platform "Dashboard, Battleground and District Data are three features in two Modes" (decided 2026-10-12, Ben), Specs/Left-Navigation §9.1 and §9.2.

- **New registry rows `battleground` and `districts`**, both `mode: 'campaign'`, titles "Battleground" and "District Data". The Dashboard deployment must render those two pages with `app="battleground"` / `app="districts"`, never `app="dashboard"`: the `dashboard` row is unscoped, so it draws the Relationship rail, which is how both pages showed inside Relationship Mode with a "Dashboard · Battleground · District Data" strip above the header (measured 2026-10-12). Their hosts are decided (`battleground.politogyvrm.com`, `districts.politogyvrm.com`; UI-Platform, 2026-10-12) but not live, so both origins and both left-bar links stay on the dashboard host until each goes live.
- **`dashboard` row unchanged** in behavior; its comment now says it is the Relationship Dashboard only.

Polls: Spec cited: Specs/Left-Navigation §9.1 ("Polls is not a Relationship row. Polling is a Campaign Mode feature only").

- **Relationship tree.** `standardPolitogyNav` no longer adds a `Polls` row to the Collect section (it was restored in 0.75.0). Collect is Calls to action, Forms, Surveys. Seen live on dashboard.politogyvrm.com in Relationship Mode on 2026-10-12.
- **Campaign tree unchanged.** `Polling` stays under Research, and the `polls` registry entry is already `mode: 'campaign'`, so the Polls app keeps an active row.
- **For consumers.** `hiddenItems: ['Polls']` is now a no-op and can be dropped.
- Tests: `__tests__/standardNav.test.ts`.

## 0.77.0

No theme control in the account menu. Specs cited: Reference/UI-Platform "Theme — light only (Dark Mode retired)" and "There is no theme control … Apps must not render any theme control"; Reference/Global-Rules "Theming — Light Only".

- **Breaking for the eye only.** `PolitogyAppFrame` no longer passes `theme` to the account menu, so the "Appearance" radio group (one option, "Light", since 0.73.0 made the theme light only) is gone from every app. `NavUserMenu.theme` stays optional for a caller that still passes it; nothing in the shell does.
- `./theme-preference` and `useThemePreference` are unchanged: they still resolve every stored preference to light and keep the cross-app cookie contract for the apps that import them.
- **Audit note (closeout 2026-10-12, item 1).** The "Known shell defect — dark theme restored in 0.68.0" paragraph in Reference/UI-Platform is stale: 0.73.0 (#116, 2026-10-06) removed dark rendering, `chrome.css` ships no `.dark` block (the remaining mentions are comments), and the pre-paint script hardcodes light. The runtime Brand token sheet (specs app, `lib/brand-authoring.ts`) still emits `.dark {}` blocks that nothing applies.

## 0.76.18

Consolidates 0.76.16 and 0.76.17, neither of which reached npm (their publish gates failed). Specs cited: Global-Rules v38, UI-Platform v46, Specs/Left-Navigation (no Tribes row, §9.1), Specs/System-Communications §6.3 and §12.2 (Binding, 2026-10-03).

- **`NotificationsAdapter` (comms bell).** `src/notifications/adapter.ts`: `list(orgId)`, `markRead`, `archive`, `resolve`. The default reads `me/notifications` through the chrome proxy with the viewer's session (comms `GET /v1/me/notifications`, `POST /v1/me/notifications/:id/{read,archive,resolve}`, politogy-comms #14). Any failure (401, 404, network, malformed body) is an empty bell, never an error; owner actions resolve `false` instead of throwing. `NavChromeProvider` and `PolitogyAppChrome` take `notificationsAdapter`: omitted = comms (default); `null` = legacy contacts-shaped feed (replies, imports, quarantine). Alert rows read the server `read_at`; the badge is the server count.
- **Behavior change for consumers.** Apps that rely on the legacy contacts replies, imports or quarantine rows in the bell must pass `notificationsAdapter={null}`.
- **Tests.** `__tests__/notificationsAdapter.test.ts` (new). `__tests__/chromeFetchDedupe.test.tsx` counts `me/notifications`. `__tests__/chromeActions.test.tsx` pins its legacy `NotificationsAction` tests to `notificationsAdapter={null}`; this is what fixed the 8 CI-only failures that blocked the 0.76.16 publish gate.
- **Tribes.** No `tribes` registry row in this release. Tribes lives inside Contacts; a `tribes.politogyvrm.com` entry would point at an empty scaffold.
- **Tab containers are left-aligned and fluid** (Spencer, 2026-10-11: "all apps, all tabs, all screens"; Reference/Global-Rules "Tabs & UI Styling": the strip spans the full width of the content area, tabs keep their natural width, left-aligned). `HeaderTabBar` (deprecated) no longer stretches each tab with `flex-1`: tabs sit at natural width packed from the left on a full-width strip (40px hit area). `NavTabStrip` already met this (full-width block, `flex` with default start alignment, natural-width tabs) and is unchanged; `__tests__/tabsLeftAligned.test.tsx` (new) pins both so neither grows `mx-auto`, `justify-center` or a fixed width.

## 0.76.17

Tooltips on the Spec tooltip theme, and the new-reply toast no longer paints over the bell's tooltip. Specs cited: Brand guideline "Tooltips point at their trigger" (`tooltips-point-at-their-trigger`, Spencer 2026-10-06), Reference/UI-Platform "Top-bar tooltips and panels - one shared treatment", Reference/Global-Rules "Tooltip on every tab / UX", tokens v150 `shellChrome.button.tooltipBg/Fg`.

- **`TopBarTooltip` is styled on the tooltip tokens.** Body, border and arrow use `--app-btn-tooltip-bg` (v150: #2F3136), title and description use `--app-btn-tooltip-fg` (#FFFFFF, description at 75% opacity). It was on the panel surface (`--panel-elevated` / `--line`), which is why it rendered as a light card. Opens on keyboard focus (`group-focus-visible/tbtip`) as well as hover, per the guideline.
- **Toast/tooltip overlap (a2p dashboard, reported 2026-10-11).** The new-reply toast and the bell's hover tooltip are both z-50 under the same trigger; hovering the bell while a toast was up painted the toast over "Alerts & Notifications". `TopBarPopover` takes `hideTooltip`; `NotificationsAction` passes it while the toast is visible and `FuelAction` while the low-fuel hint is up. One surface per trigger.
- **`HeaderTabBar` (deprecated) uses the shared tooltip** instead of Chakra's `Tooltip`; the shell no longer ships a second tooltip.
- Tests: `__tests__/tooltipTheme.test.tsx` (new).
- **Not changed:** `src/css/chrome.css` still carries the pre-v150 fallbacks (`--app-btn-tooltip-bg: #0F172A`, mode primaries). `npm run gen:tokens` against Specs v150 produces a 508-line diff including `--mode-relationship-primary` #D32F3B -> #2F3136, which is a Brand-token question, not this fix; the runtime token sheet (`ensureRuntimeBrandTokens`) already overrides every fallback live.
- **Still open:** `aria-describedby` from trigger to tooltip (guideline) is not wired; apps outside the chrome still use native `title=` attributes rather than `TopBarTooltip` (exported from `./native`).

## 0.76.16

The shell's Notifications bell reads the comms feed through a `NotificationsAdapter`. Specs cited: Global-Rules v38, UI-Platform v46, Specs/Left-Navigation (no Tribes row, §9.1), Specs/System-Communications §6.3 and §12.2 (Binding, 2026-10-03).

- **`NotificationsAdapter` (bell).** New `src/notifications/adapter.ts`: `list(orgId)`, `markRead`, `archive`, `resolve`. The default reads `me/notifications` through the chrome proxy with the viewer's session, which is the comms `GET /v1/me/notifications` and `POST /v1/me/notifications/:id/{read,archive,resolve}` (politogy-comms #14). Any failure (401, 404, network, malformed body) is an empty bell, never an error state; owner actions resolve `false` instead of throwing.
- **Bell wiring.** `NavChromeProvider` and `PolitogyAppChrome` take `notificationsAdapter`. Omitted, the comms adapter is used. `null` keeps the legacy contacts-shaped feed (replies, imports, quarantine) for any app that needs it. Alert rows read the server `read_at` state; the badge is the server's single count.
- Exports: `createCommsNotificationsAdapter`, `normalizeNotificationsFeed`, `emptyNotificationsFeed` and the adapter types from the package root.
- Tests: `__tests__/notificationsAdapter.test.ts` (new); `__tests__/chromeFetchDedupe.test.tsx` now counts `me/notifications`. The 41 pre-existing localStorage/cookie failures are unchanged and not addressed.
- **Still open:** `subscribe` (realtime) is not implemented; the bell refreshes on open and after a mark-read. Resolve and archive are on the adapter but have no panel control yet.

## 0.76.15

TITLEBAR: the chrome no longer draws the 56px page-title `<h1>` strip (for example "A2P Messaging" above the "CAMPAIGN MODE" eyebrow) for feature apps. The Design shows the page opening on its own eyebrow + H2, so `PolitogyAppFrame` now passes only core's own page title as `topBar.title`. The `title` grant is kept but inert; removing it is a follow-up.

## 0.76.1

One chrome read per endpoint per page load. `me`, `notifications` and `communications/fuel-status` each fired twice (Surveys F4 measurement).

- `useChromeMode` reuses the provider's boot `me` when its `account` is the active org, else reads through the de-duped cache. New `useNavChromeDedupedFetch`.
- `FuelAction` / `NotificationsAction` do not read without an org, and `ChromeTopBarActions` passes the org only after the org list settles.
- Test: `__tests__/chromeFetchDedupe.test.tsx`.

## 0.76.0

Auth-owned active org, shell phase (Global-Rules v38, UI-Platform v46; plan `specs/docs/auth-owned-active-org-plan.md` §3.2). Opt-in: no change for apps that do not pass `tokenOrg`.

- **`tokenOrg` on `PolitogyAppChrome` / frame data.** The org comes from the app's verified token claims (`org_id`, `org_role`). The pill switch calls `POST {auth}/api/active-org`, then the app's `onReexchange(orgId, { perTab: false })`. A refused switch rolls back and calls `onSwitchError`.
- **Per-tab override.** `?org_id=` (or legacy `?org=`) scopes this tab only: the chrome calls `onReexchange(orgId, { perTab: true })` and never changes the shared org or the cookie. A non-member selector is ignored.
- **URL = 7-char tail.** Token mode writes `org_id=<last 7>` and drops `?org=` with a replace. Full uuid and the 6-char tail are accepted.
- **No per-request chrome `/api/orgs`** when the app passes `tokenOrg.orgs`; `useChromeOrgs({ enabled })` and `SupportAction` reuse the chrome list.
- **`active-org` helpers:** `switchActiveOrg`, `ActiveOrgSwitchError`, `orgClaimsFromToken`, `orgClaimsFrom`, `orgIdTail`, `isOrgSelector`, `matchOrgSelector`, `readOrgSelectorFromUrl`, `withOrgIdParam`, `authBaseUrl`. `readActiveOrgCookie` / `resolveActiveOrg` are deprecated; the legacy cookie is still written for apps not yet on v2.

## 0.75.2

Two fixes found on top of 0.75.1:

- **Contrast (item 4).** Several rail/mono text colors were tuned only against the ink rail (`#1B1C20`) and dropped below WCAG 2.2 AA's 4.5:1 minimum for normal-size text on the Campaign-mode red rail (`#8F1F2A`, raised card `#A12430`) and the loading screen (`#0a0a0c`): the account-menu "Roles & Organizations" caption (`--muted` / `--topbar-breadcrumb-color`, 3.63:1 on `--panel-elevated`), the sidebar user-email/mode caption (`--sidebar-caption`, 3.25:1 on the Campaign rail), the org-id hash (2.93:1 on the Campaign card), the nav section eyebrow (`--sidebar-eyebrow`, 3.55:1 even on the ink rail), and the loading-screen footer tagline (inline literal, 3.50:1). Fixed entirely through tokens: `--topbar-breadcrumb-color` darkened to `#5C6B80`; `--sidebar-text-muted`/`--sidebar-meta-text` lightened to `#CDCFD2`; `--sidebar-eyebrow`/`--sidebar-caption`/`--sidebar-row-text` raised to `rgba(255,255,255,.72)`/`.66`; the loading-screen's two `rgba(255,255,255,0.38)` literals (footer tagline and the error-state "Sign out" button) raised to `0.72`; and `native/index.tsx`'s hardcoded `--sidebar-meta-text` fallback updated to match. Each value clears 4.5:1 against every background it can actually render on (ink rail, Campaign rail, Campaign card, loading-screen ink, white/`--panel-elevated`), not just the one it was first tuned against. New test: `__tests__/sidebarContrast.test.ts` computes WCAG relative-luminance contrast for each token/background pair and fails the build if any drops below 4.5:1.
- **Missing `title` grant (item 5).** `POLITOGY_APPS.forms` had no `title` grant, so Forms could never publish a real per-page title — the page header fell back to the static registry title "Forms" forever and the designed "mode" eyebrow + H2 + subtitle block never rendered with real page data. Same gap existed on every other feature app with real per-page names: `surveys`, `polls`, `ctas`, `email`, `a2p`, `phonebank`, `canvass`, `signs` all got `grants: ['title']` added, by the same reasoning already applied to `petitions`. Left `dashboard` and `settings` (no per-record pages), `contacts` (already `pageTitle: false`), and `vrm` (core, gated by `app === CORE_APP` instead) ungranted. `__tests__/frame-grants.test.tsx` rewritten to assert the full grant set explicitly.

**Noted, not fixed:** UI-Platform (v44) says the `breadcrumbs` grant was retired 2026-09-30, but `petitions` still carries `grants: ['breadcrumbs', 'title']` and the `PolitogyFrameGrant` type still includes `'breadcrumbs'`. Removing it touches `deriveBreadcrumbs`, the `NavBreadcrumb` type, `PolitogyGrantedFrame.breadcrumbs`/`PolitogyCoreFrame.page.breadcrumbs`, and the `breadcrumbs` prop threaded into `NavTopBar` — out of scope for this release. Flagging per spec-is-source-of-truth rather than doing an unscoped removal.

## 0.75.1

Three visual-regression fixes found by cross-app comparison (every app diverged from the design the same three ways):

- **Font tokens.** `--font-sans`, `--font-mono` and `--font-plex-mono` were referenced across `loading-screen.tsx` and `native/index.tsx` (and `theme/index.ts` read `--type-mono-family`) but `chrome.css` never emitted any of them, so those surfaces silently fell back to a hardcoded system stack instead of the Brand `--font-family` token — the actual source of the Inter/Acumin mismatch. Every sans surface now consumes `--font-family` (the one token the Brand API emits); every mono surface now consumes one shared, shell-emitted `--font-mono` (also added to `scripts/gen-tokens.mjs`).
- **Card tokens.** `--color-panel` aliased `--color-surface` (`--surface-1`, #F0F4F7 — the PAGE background), so every card rendered page-tinted instead of the Brand Card white. `--color-border` aliased `--line` / `--sidebar-border`, a token scoped to the always-dark left rail, leaking a dark-rail-intended border onto light content. Fixed in `chrome.css` (and `gen-tokens.mjs`): `--color-panel` is now `--color-layer-3` (white); `--color-border` is now `--color-g3` (#D7DADF, the neutral Brand border step).
- **Mode eyebrow + tab icons.** `PageHeader` had no `mode`/`eyebrow` prop at all, so the 11px uppercase mode eyebrow (Reference/UI-Platform → "Page header") never had anywhere to render; it now renders by default whenever `mode` is passed (`showEyebrow`/`eyebrow` to override). `NavTab.icon` was marked `@deprecated` and explicitly not rendered as of 0.69.0 — reversed by the 2026-10-06 Tabs decision ("Icon + label. Each tab is a Lucide icon") — `NavTabStrip` now renders the icon again, 15px (13px on `size="sm"`), 1.75 stroke, 6px left of the label, following the label's color via `currentColor`.

## 0.75.0

Built on top of 0.74.0 (`claude/retire-nav`). Two fixes:

- **Regression fix**: restored the `Polls` row to `standardPolitogyNav`'s default Collect section. Commit 03c4dc2 (retiring `app.politogyvrm.com`) dropped it entirely instead of repointing it — Polls (`polls.politogyvrm.com`) is a standalone app, independent of the retired core app, and belongs in the default tree. Apps that don't want it pass `hiddenItems: ['Polls']`.
- **Cross-app nav prerender**: `NavAppShell` now renders a `<script type="speculationrules">` (via the new `SpeculationRulesScript`, built on `buildNavSpeculationRules`/`collectSiblingAppUrls` in `src/speculation/emitRules.ts`) for every sibling `*.politogyvrm.com` link in the consumer's own sidebar tree, `eagerness: "moderate"` — the browser prerenders on hover/pointerdown of a matching link, no custom JS trigger needed. Sign-out and other destructive rows (by label or `/signout`-style path) are excluded. Browsers without Speculation Rules support fall back, once idle, to `<link rel="prefetch">` tags for the same URLs. Because this is wired into `NavAppShell` itself (used by both `PolitogyAppFrame` and direct `NavAppShell` consumers), every consumer gets it with no per-app opt-in.
  - **Each sibling app must send `Supports-Loading-Mode: credentialed-prerender`** on its responses for cross-origin prerender to activate while the user is authenticated — without it the browser silently falls back to a normal navigation (other agents are adding this header per-app).
  - `buildSpeculationRules`/`AppRegistryEntry` (the old, unused registry-based API) is kept for back-compat and now documented `@deprecated` in favor of `buildNavSpeculationRules`.

## 0.74.0

Repoint `standardPolitogyNav` off `app.politogyvrm.com` (Reference/UI-Platform → "Retirement of app.politogyvrm.com", DECIDED 2026-10-07; District data target per v44).
- Dashboard, Battleground, District data → `dashboard.politogyvrm.com`.
- Organization settings (incl. the depth-3 Subscription & Billing branch) → `settings.politogyvrm.com`.
- My profile → `auth.politogyvrm.com` (Politogy ID account app).
- Calls to action → the standalone CTAs app (`ctas.politogyvrm.com`), replacing the legacy in-core feature.
- Removed the V1 Email Broadcast legacy child row (VRM core's email surface is retired).
- `coreBaseUrl` is now optional and unused — every row resolves against its V2 host directly. Kept on `StandardNavOptions` so existing callers compile unchanged.
- Added `PolitogyAppKey` registry entries `dashboard` (`dashboard.politogyvrm.com`) and `settings` (`settings.politogyvrm.com`) so those new V2 apps can drop their own hardcoded chrome config.

## 0.72.0

Left-Navigation §5, §10 and §12.
- The rail takes its mode colour from the current mode label when no registry modeId is passed, as in VRM core. Campaign Mode is now Deep Race Red, not ink.
- The Campaign rail tokens are #A12430 for raised wells, #F0CFD2 for inactive row text and #F6DADD for the eyebrow.
- The footer user row shows the name as "First L.", with two-letter initials.
- Flat bar per §8.2: a row with children is drawn as one link with no chevron and no accordion. It points to its own page or its first child's, and it is active on any route beneath it. The children stay in the tree for breadcrumbs and tabs.
- Icons per §8.1: standardPolitogyNav falls back to the shared Lucide map when no `icons` are passed, so VRM core rows get icons. The map moved to native/standardNavIcons and app-chrome re-exports it.
- Removed the tests for the retired accordion and Navigation Display sub-menu, and added §8.2 tests.

## 0.71.1

Build line in the rail footer follows Specs/Left-Navigation §9 and Reference/UI-Platform Meta.
- Shown in production too, as `prod | <commit> | v<version>` over `date | author`.
- Two centered rows of plain mono text at 11px, with no chip and no leading or trailing pipes.

## 0.71.0

Rail and top bar match the Specs/Left-Navigation Design.
- Org card logo band is 70px tall with 10px padding under it, and the org block sits 7px lower.
- Mode switcher buttons are compact and left-aligned on desktop.
- Top bar icon buttons have no border.
- The Dev notes button uses the notebook-pen icon.
- Footer links are centered and separated by a middle dot.

## 0.70.0 — 2026-10-06

The top bar and left rail match Specs/Left-Navigation and Reference/UI-Platform.

### Changed

- **No Build notes control.** The top bar has exactly the five UI-Platform elements: search, Dev notes, Credits, Notifications, Help. `<PolitogyAppFrame>` no longer passes `buildNotes`; `NavTopBar` renders Build notes only when a caller passes the prop. (#101)
- **The top bar fits a 390px phone.** Search shrinks below `md` (fixed 320px from `md` up), the `/` hint hides below `md`, and the header gap narrows. (#104)
- **No hamburger on phone.** The top bar draws no hamburger. Below `md` the collapsed rail's logo tile is the expand control ("Expand navigation"); the drawer's close button is "Collapse navigation". The drawer itself is unchanged (Left-Navigation §11.6). The expand choice is remembered per user (`politogy_rail` cookie on `.politogyvrm.com` plus localStorage, via `readRailPreference` / `writeRailPreference` in `nav-preference`) and read back on the next load below `md`; a nav-link click closes the overlay without changing it. New `NavSidebar` props `onOpen` and `onNavigate`. `NavTopBar` still renders a hamburger for direct callers that pass `onOpenNav`. (#106, #108, #110)
- **Lucide icons.** `standardNavIcons` maps every slot to Lucide (`react-icons/lu`); the mode switcher uses contact-round, megaphone and file-signature. New slots: `layoutDashboard`, `usersRound`, `mousePointerClick`, `clipboardList`, `circleUser`, `crosshair`, `landmark`, `chartNoAxes`, `doorOpen`, `signpost`. (#105, #106)
- **Nav trees follow Left-Navigation §9.** Relationship: Relationship (Dashboard, Contacts, Email broadcast, SMS/MMS blast) · Collect (Calls to action, Forms, Surveys) · Account. Polls and CTAs rows removed. Campaign: Race data (Battleground, District data) · Research (Polling) · GOTV (Field canvassing, Phone banking, A2P texting, Sign mapping) · Account. Dashboard, Voter Contact and Tribes rows removed; Battleground is the landing row. A section left empty by availability flags is dropped. The Petition tree is unchanged. (#106)

### Fixed

- react-router 6.30.6 clears the publish audit gate (#102); lockfile regenerated with npm 10 so CI `npm ci` succeeds (#103).

## 0.69.0 — 2026-10-04

The left rail collapses instead of hiding, `<main>` is fluid, and there is one page tab strip. Implements Specs/Left-Navigation §11.6 and §5, the Brand guidelines "Content width is fluid", "Content body padding", "Tabs are an underlined strip" and "Logo standard", and the two "Known shell defect" notes in Reference/UI-Platform (Brand v135).

### Changed

- **The rail is never hidden.** `hidden … lg:flex` is gone. At `md` and up the rail is the full 236px rail; below `md` it collapses to the 64px icon rail. Content is offset by the rail at every width (`pl-[64px] md:pl-[236px]`). The collapse is pure CSS (`max-md:` utilities on one DOM tree), so there is no hydration flash and no second copy of the nav.
  - Collapsed: `assets.logoSquare` at the top; the org card shrinks to the org's Brand Kit icon mark (32px, on its white tile) inside the **same switcher trigger**, so the org switcher stays interactive; the mode buttons stack; eyebrows become 1px dividers (the first is screen-reader only); rows show icons with a tooltip naming the row; counts, legal links and build metadata are hidden; the footer shows the avatar only.
  - The top-bar hamburger now shows below `md` (was below `lg`) and expands the icon rail to the full rail as a drawer, exactly as before.
  - New optional `NavOrg.iconUrl` / `NavOrgOption.iconUrl` (the Brand Kit icon mark); falls back to `logoUrl` scaled to fit, then initials.
- **The rail logo is read at runtime from the Brand.** `<PolitogyAppFrame>` reads `assets.logoHorizontal` (the all-white lockup) and `assets.logoSquare` from the live token sheet (`--asset-logo-horizontal` / `--asset-logo-square`, emitted by `/api/tokens?format=css`) via the new `useBrandAssets()`. It is 24px tall (`sidebar.brandLogoHeight`), sits directly on the rail with no plate, and is the same lockup in every Mode. While the sheet loads the logo's box is reserved and nothing is drawn — never a stand-in. The frame no longer points at app-relative files under `/brand/logos/` (the bundled `relationship-mode-logo.png` / `petition-mode-logo.svg`); apps can delete them. New `NavBrand.logoSquareSrc` and `NavBrand.logoPending`.
- **`<main>` is fluid.** The centered `main > .mx-auto.max-w-7xl` wrapper is removed; page content is a direct child of `<main>`. The gutter is 24px, or 16px below `md`, horizontally and vertically, with no max-width. (The chrome-owned title line, when the registry draws one, shares the same horizontal gutter and stays 22px above the content.)
- **`NavTabStrip` is THE page tab strip, and it is now the underlined text strip.** Text tabs (13px semibold, 12px vertical padding; `size="sm"` for 12px / 8px) with an optional mono `count` pill, on a 1px G3 rule (`--tab-border-color`), 24px apart (`--tab-gap`). The selected tab is Graphite with a 2px underline in the mode color — `modes.<mode>.primary`, read as `var(--mode-accent, var(--color-accent))` — never `modes.<mode>.accent`, which is white. Unselected tabs are G4 and turn Graphite on hover. The icon-only folder geometry is retired: `NavTab.icon` is now optional, deprecated and not rendered. The optional `children` panel renders on the page surface with no card chrome.
- **Favicons: no bundled fallback.** `politogyAppIcons()` / `toMetadataIcons()` return whatever `GET /api/icons/<app>` resolved (which ends at Brand `assets.favicon`). When the API is unreachable or returns no browser-tab icon they now return **empty** icon arrays instead of a hardcoded copy of an old `assets.logoSquare` upload.

### Added

- **`<FormColumn>`** — the one constrained layout inside the fluid `<main>`: a single left-aligned column, `max-width: 960px`, for form and settings pages. No width prop, no gutter of its own, never centered. Exported from the main entry and from `./native` (the same component), so an app needs no Chakra / react-router peer to use it.
- `useBrandAssets()`, `readBrandAsset()` and `parseCssUrl()` in `src/lib/brandAssets.ts` (internal to the frame).

### Deprecated

Each warns once in the dev console (`NODE_ENV !== 'production'`); none is removed in this release.

- **`HeaderTabBar`** — use `NavTabStrip` from `./native`. Why `NavTabStrip` is the canonical one: it has no Chakra or react-router dependency, so every app can import it whatever its framework; it renders `href` tabs through the app's own link primitive, so sub-views are URL-addressable; and it already carries tablist / tab / disabled semantics. `HeaderTabBar` is icon-only by construction (its label is only a Chakra tooltip), filled rather than underlined, and state-only.
- **`PageContainer`** — apps never emit their own page container, a second `<main>`, a max-width or an `mx-auto` wrapper. Render content directly inside the frame; use `<FormColumn>` for form and settings pages.
- **`BreadcrumbBar`** — the breadcrumb trail is retired.
- **`NavAppShellProps.contentWrapper`** — `'bare'` is still honored (so VRM core, which renders `NavAppShell` directly around pages that still carry `PageContainer`, does not get a nested `<main>`), and warns. `'padded'` is now the same as omitting it.
- **`PolitogyCoreFrame.brandLogoSrc`** — ignored; the logo comes from the Brand. **`VRM_FALLBACK_ICON`** — unused; will be removed.

### Removed

- **The `contentWrapper` registry grant.** `PolitogyFrameGrant` is now `'breadcrumbs' | 'title'`, and Petitions' row grants exactly those two. `PolitogyFrameData.frame.contentWrapper` is still typed (so an app that passes it keeps compiling) but is ignored and warns in dev. **Petitions must drop its own `PageContainer` when it takes this version**, or its pages render a `<main>` inside the frame's `<main>` with a doubled gutter.

### Not in this release

- The dark theme that 0.68.0 re-added (a "Known shell defect" in Reference/UI-Platform) is untouched here; it is removed separately.
- A user-controlled collapse/expand toggle at `md` and up (Left-Navigation §11.6, "the choice is remembered per user") is not built; this release covers the breakpoint behaviour.
- `--sidebar-collapsed-width` is read with a `64px` fallback; the Brand sheet does not emit it yet.

## 0.68.1 — 2026-10-03

### Fixed

- **Dark theme: chrome whites stay white.** The Brand token sheet remaps `--color-white` to `#0A0A0A` under `.dark`, and Tailwind's `bg-white` / `text-white` read it, so the org logo band went near-black behind its dark wordmark and white labels on accent fills (avatars, badges, active group headers) went near-black. Chrome now uses the literal `[#FFFFFF]`. Regression test: `__tests__/chrome-fixed-white.test.ts`.

## 0.68.0 — 2026-10-03

Contacts design parity for the `chrome` Design Compare kind (Specs/Contacts v25 design frames `00-welcome-ben` 1440×900 / 390×844). Additive props only; every existing consumer prop keeps working.

### Added

- **Sidebar section captions.** `NavItem.kind: 'section'` renders a non-interactive caption row (RELATIONSHIP / COLLECT / ACCOUNT); `standardPolitogyNav` emits them for the Relationship tree (mode-dependent captions for Campaign/Petition).
- **Row badge.** `NavItem.badge` draws a right-aligned mono count on a row; `PolitogyFrameData.contactsItem.count` ("31.9K") feeds the Contacts row.
- **User card in the rail footer.** `NavFooter.user` / `userMenu` / `onSignOut` render avatar + name + email + chevron above Privacy · Terms · Subscriptions. `NavAppShellProps.accountMenuPlacement` (`'sidebar'` default, `'topbar'` = pre-0.68 layout) and `NavTopBarProps.accountMenu` (`'topbar' | 'sidebar' | 'none'`).
- **`PolitogyFrameData.hiddenNavItems`** (`['Polls', 'CTAs']`) → `StandardNavOptions.hiddenItems`: drop standard rows by label; a section left empty is dropped too.
- **`PolitogyFrameData.flatNav`**: strip every standard row's children before the rail draws (no accordion chevrons); active-row matching still uses the unstripped tree.
- **`PolitogyFrameData.searchPlaceholder`**; Contacts defaults to "Search contacts, segments, forms". `NavUserMenu.navDisplay` for the account menu's nav-display control.
- **Registry `pageTitle: false`** (Contacts): the chrome draws no `<h1>` page-title line above `main`; `NavTopBarProps.title` is now optional.
- **Mode switcher always shows the row of three** (Relationship · Campaign · Petition); modes the org does not hold are dimmed and disabled, never hidden (Left-Navigation §7).
- **Dark mode restored** in `./theme-preference` (`readResolvedTheme` honours the `politogy_theme` cookie / localStorage / OS); `chrome.css` ships a `.dark, [data-theme="dark"]` token block. NOTE: Reference/Global-Rules v22 and Reference/UI-Platform v30 say "Light only (dark retired 2026-09-21)"; Spencer explicitly ordered light AND dark for Contacts on 2026-10-03. Those specs are not edited here.

### Changed

- Sidebar 236px, org card (white logo band + name row + id copy + chevron), graphite segmented mode switcher with sentence-case "Relationship mode" caption, sentence-case row labels ("Email broadcast", "SMS/MMS blast", "Calls to action", "My profile", "Organization settings"), row geometry 13px / 10×9px padding, 2px active rail; top bar 60px, search 320×36 with `/` kbd, "Build notes" with book icon, 34px icon buttons (17px glyphs), gradient rule.
- Top-bar action cluster order: DevNotes · Fuel · Spec overlay · Alerts · Support.

### Fixed

- **Light-theme rail contrast.** The design-rail washes (`--sidebar-card-bg`, `--sidebar-active-bg`, `--sidebar-line`, `--sidebar-eyebrow`, …) lived under `[data-politogy-mode]`, which unscoped apps (Contacts) never stamp — the org card drew light-grey with white text and the active row in solid brand red. They now live at `:root` (none is defined by the runtime Brand sheet).
- **Dark text invisible under the Brand sheet.** The runtime `.dark {}` ends with shadcn HSL triples for `--background` / `--foreground` / `--muted`; `html.dark` aliases them to full colours so chrome labels no longer fall to black on dark.

## 0.61.0 — 2026-09-30

### Changed

- **Spec drawer shows YOUR view on open.** Opening the drawer now rasterizes the current page in the browser (`modern-screenshot`, DOM → PNG, viewport size, drawer excluded) and sends it as the LIVE side of the compare — your org, data, theme and full frame. No click and no screen-share prompt (the 0.60.0 `getDisplayMedia` path is removed). Status is requested with `&theme=` so Specs renders the design in your theme; the active org name is sent for the label. "Recapture" re-runs it.

## 0.60.1 — 2026-09-30

### Fixed

- **Meta footer contrast (WCAG 2.2 AA).** The commit / version / date / author rows inherited `--muted` (#718096, 4.02:1 on the light rail) and, since 0.58.0 renders Meta for every viewer, tripped Petitions' contrast regression gate (+4 fails per route). New token `--sidebar-meta-text` (light #696D72 = 5.2:1, dark #A3A3A3 = 7.2:1) scoped to the Meta block (`data-shell-meta`); separators and the env chip unchanged.

## 0.60.0 — 2026-09-30

### Added

- **Spec overlay: Capture my view** — compare the design against this tab (own org/theme) (#79).

## 0.59.0 — 2026-09-30

### Fixed — parent nav row stays active on child routes when the 'tabs' nav preference strips children (`src/app-chrome/frame.tsx`, DevNotes ebb036a1)

## 0.58.0 — 2026-09-30

### Fixed — Meta build-metadata row renders for every viewer (`src/app-chrome/index.tsx`)

`useChromeFooter` gated the `env | commit | version` / `date | author` rows
behind Super Administrator. Reference/UI-Platform "Left bar — required
elements" and Specs/Left-Navigation §10 list Meta unconditionally, so every
non-admin viewer was missing a required rail element (DevNotes 83a64713).

### Fixed — rail font pinned to the Brand token (`src/native/index.tsx`)

`NavSidebar` now sets `font-family: var(--font-family, …)` directly instead
of inheriting `body`, so an app-level font (Contacts) can no longer leak into
the left rail (DevNotes 64a4961e).

## 0.57.0 — 2026-09-30

### Fixed — 10DLC alert no longer auto-redirects on every login (`src/native/chromeActions.tsx`)

The once-per-session `10dlc_registration` alert redirect fired on every
login because every login is a new browser session (a fresh
`sessionStorage`), so the full-page `window.location.assign` re-booted the
app on every single sign-in — visible to the user as a second loading-screen
blink that always lands on
`/organization-settings/subscription-billing/text-email`. The auto-redirect
is removed entirely. The alert still surfaces in the notifications
bell/panel (unread, like any other alert) — that panel is now the only
user-visible surface for it.

### Added — Spec overlay top-bar action, Spencer + Ben only (`./native`, `./app-chrome`)

A new `SpecOverlayAction` top-bar control (wired into `ChromeTopBarActions`,
between DevNotes and Support) shows the live spec/visual-regression status
of the current page, sourced from the Specs app's overlay API
(`https://specs.politogyvrm.com/api/overlay/access` and `/api/overlay/status`).
It renders nothing — no icon, no network noise — for anyone the access
check doesn't allow; the allow/deny answer is cached in `sessionStorage`
for the session. When allowed, a "Spec" button shows a rounded
mismatch-percentage badge (green when the compare passed, red when it
didn't, a neutral "—" when the page has no compare target yet) and opens a
480px right-hand drawer with the spec title, "Open spec" / "Compare tab"
links, and an iframe of the live overlay. Status re-fetches (debounced
300ms) on route change and org change. All calls are plain
`fetch(..., { credentials: 'include' })` against the Specs origin — this
does NOT go through the same-origin chrome proxy `fetchJson`.

### Fixed — de-duped chrome fetches + lazy DevNotes boot fetch (`src/native/chromeActions.tsx`, `src/app-chrome/index.tsx`)

`useChromeOrgs`, `me`, `FuelAction`'s `communications/fuel-status`, and
`NotificationsAction`'s `notifications` were each fetched 2-4x per page load
(consumers mounting independently), costing 1-3.5s per redundant call. Added
a provider-scoped in-flight-promise + 30s-TTL cache
(`dedupedFetch`/`invalidateChromeCache` on `useNavChrome`) keyed by
`(path, orgId)`, so concurrent consumers share one request and org switches
naturally miss the cache. Separately, DevNotes' boot-time reads (tasks,
task types, task lists, collaborators, app-link status, capabilities — up to
6.8s cold) are deferred until the DevNotes panel is first opened by wrapping
the adapter passed into `@the-portland-company/devnotes`'s
`DevNotesProvider`; the launcher button renders instantly and unblocks the
gated calls via `onPointerDownCapture` before the click fires. The unread
badge count still resolves on boot, via `requestIdleCallback` instead of
blocking it.

## 0.56.0 — 2026-09-30

### Fixed — mode continuity for dual-mode apps (a2p)

a2p (Specs/A2P) is the SMS/MMS delivery engine for BOTH Relationship Mode and
Campaign Mode, but it was registered `mode: 'campaign'` only, so the
Relationship tree's "SMS/MMS Blast" row sent users into a2p and the whole left
nav flipped to the Campaign tree + "Campaign Mode" pill — a jarring identity
switch for a user who never left Relationship Mode.

`POLITOGY_APPS[app]` now supports an optional `dual: { modes, defaultMode }`.
a2p declares `dual: { modes: ['relationship', 'campaign'], defaultMode:
'campaign' }`; its EFFECTIVE mode is resolved per-visit by the new
`resolveActiveMode` (`src/mode-preference.ts`): `?mode=` query param → the new
cross-subdomain `politogy_active_mode` cookie → the app's own default. Every
pinned app and core writes that cookie with its own mode, so arriving at a2p
after using Relationship Mode elsewhere resolves to Relationship even without
an explicit `?mode=` link. The Relationship tree's "SMS/MMS Blast" row now
links straight to a2p with `?mode=relationship` (the dead
`/relationship/sms-mms-blast/*` core routes are removed); the Campaign tree's
existing A2P row is unchanged.

## 0.55.0 — 2026-09-30

### Fixed — org pill body no longer takes the Mode accent (`./native`)

Reference/UI-Platform ("Left bar" / "Per-mode branding") is explicit: the org
pill sits on a **neutral surface** — only the circular org badge carries a
brand or Mode color, never the pill body. The `./native` `NavSidebar`'s org
pill (both the disabled single-org button and the multi-org `<details>`
selector) resolved `var(--mode-accent, var(--panel-elevated))` as its own
background and `var(--mode-on-accent, var(--foreground))` as its text color —
so a Mode with its own accent (Campaign's `#8F1F2A`) painted the **whole
pill** solid red instead of just the badge. Reported live as "V1 styling" on
a2p.politogyvrm.com (shell 0.46.0, still present through 0.54.0). Both spots
now render the neutral `--panel-elevated` / `--line` / `--foreground` chain
unconditionally; the badge (unchanged) still resolves the org's brand color
or, absent one, the chrome/Mode accent.

### Fixed — mode pill resolves the semantic Mode accent, not the flat global one

The mode pill (both the disabled single-mode button and the multi-mode
selector) was hardcoded to `var(--color-accent)` / `text-white`, so a Mode
that declares its own `chrome.accent` (Reference/UI-Platform → "Per-mode
branding") never reached this pill — only the rail background did. It now
resolves `var(--mode-accent, var(--color-accent))` with
`var(--mode-on-accent, white)`, matching the org pill's badge and the active
nav row's existing pattern.

### Why

Live audit against Reference/UI-Platform + the shared Relationship Mode UI
design template (orchestrator rail-parity sweep, 2026-09-30).

## 0.53.0 — 2026-09-29

### Added — Loading Screen boot surface (Specs/Loading-Screen)

`PolitogyAppFrame` now renders the platform's boot screen: a full-screen
`ink-900` surface with the Politogy VRM lockup, a determinate/monotonic
gradient progress bar (Race Blue → Race Red), and a throttled monospace
status line, shown on cold start / hard reload / organization switch / mode
switch — the four events Global-Rules' Boot Screen Exception names — and
never for an in-page fetch or navigation. New export
`LoadingScreen`/`BootProgress` from `@the-portland-company/shell/app-chrome`
lets an app report real pipeline stages; a new `PolitogyAppFrame` prop
`appReady` lets an app dismiss the screen explicitly. Neither is required:
an app that passes nothing gets a truthful two-stage report driven by the
same org/nav resolution signal the frame already computes, so all 14
consumer apps keep working unchanged. `prefers-reduced-motion` skips the
exit transition; the bar is `role="progressbar"` with `aria-live` announced
copy throttled to one per 1.5s (final "Ready." always announced).

## 0.52.0 — 2026-09-12

### Added — mobile navigation (GLOBAL)

Every consumer hides the sidebar below the `lg` breakpoint
(`hidden … lg:flex`) and nothing opened it, so on a phone the main menu was
unreachable. `NavAppShell` now owns the open state: `NavTopBar` renders a
hamburger button (hidden at `lg` and up) as the first thing in the header,
and `NavSidebar` renders as a modal drawer when open — backdrop, a close
button, Escape, and focus moved to the close button and back to the
hamburger on close. It closes on route navigation and on a nav-link click.
Desktop is unaffected; both new sidebar props (`open`, `onClose`) and both
new top-bar props (`onOpenNav`, `navOpen`) are optional, so an app calling
`NavSidebar` / `NavTopBar` directly (outside `NavAppShell`) sees no change
unless it wires them up itself.

### Why

Reported from Petition Mode on a phone: "I cannot seem to access the menu on
my mobile device."

## 0.48.0 — 2026-08-13

V1-parity round 2, driven by a measured element-by-element audit of a live V1
build against 0.47.1. Two kinds of change: one global conformance fix, and a
set of registry/Mode opt-ins that are byte-identical for apps that declare
nothing.

### Fixed — the sidebar now consumes its own Brand tokens (GLOBAL)

"Sidebar width, colors, item radius, and spacing come from `--sidebar-*`"
(Reference/UI-Platform) — but the chrome painted the bar from `--surface-1`
and rows from `--muted`, so `--sidebar-bg: #FFFFFF` and
`--sidebar-text: #2F3136` were dead tokens and a Brand edit to them did
nothing. Consuming them changes every app toward what the Brand editor
declares: white rail, dark rows in light; the same #161616 ramp in dark
(dark values added to chrome.css's own `.dark` block so stylesheet order
between chrome.css and the runtime sheet cannot flip them). This also ends
the app-wide 3.65:1 AA failure on every inactive row (now 12.6:1).

### Added — opt-in, byte-identical defaults

- **Org pill takes the Mode accent** (`--mode-accent` / `--mode-on-accent`,
  the latter luminance-derived by the Brand API). Neutral everywhere a Mode
  declares nothing, and in dark.
- **`navShape: 'flat'` (registry)** — a rail whose whole tree nests under one
  entry renders the children at the root: no parent "Dashboard" row, no
  accordion; rows take the wash active treatment (V1's rail rows).
- **`beta: false` (registry)** — omits the Beta banner strip for that app.
- **`'title'` grant** — a granted app's pages may publish the top-bar title
  ("Batches", not the app name on every page).
- **Granted breadcrumbs now REPLACE the derived trail** (like core): a page
  that publishes none shows none, instead of inheriting
  "Dashboard › <page>" from a tree it opted out of.

Petitions is the only registry row using any of these.

## 0.47.1 — 2026-08-13

Two fixes found by running a consuming app's WCAG contrast gate against 0.47.0.
Both are 0.47.0 defects; nothing from before 0.47.0 is affected.

### Fixed — `--color-danger` collided with apps' own Tailwind theme colour

0.47.0 introduced `--color-danger` at `:root` to separate "attention/error" from
"accent". The name was a bad choice: Tailwind v4 derives utilities from
`--color-*` theme keys, and Petitions already defined
`--color-danger: var(--tone-danger)` (`#c53030`) to back its `bg-danger` badges.
The shell's declaration won the cascade, so every `bg-danger` element repainted
from `#c53030` to `#E63946` — dropping white-on-danger from 6.2:1 to **4.17:1**
and failing WCAG AA on eight badges in one view.

Renamed to **`--chrome-danger`**. The shell should not squat a generic
`--color-*` name that apps legitimately own; `--color-accent` stays as it is,
because that one is a documented chrome alias apps already consume.

### Fixed — a Mode accent must not carry into dark

0.47.0 let a Mode's accent through to dark on the theory that a foreground
colour is safe there. Measured: Petition Mode's `#15803D` on the dark elevated
panel `#1F1F1F` is **3.29:1**, and it regressed fourteen routes at once.

A Mode's palette is authored against white. Nothing makes it legible against
black, and deriving a dark variant would be inventing a dark theme for a Mode
whose design never had one — which the brief explicitly ruled out. So a Mode
accent is now reset under `.dark`, and dark keeps the platform's neutral ramp
exactly as it did on 0.46.0. This is chrome POLICY, in `chrome.css`, so no Mode
can opt out of it by authoring a value.

## 0.47.0 — 2026-08-13

Petition Mode has been green since V1 and has rendered red for the whole of the
0.4x chrome. This release fixes the cause rather than the symptom, and the cause
turned out to be a platform bug that affects everyone.

**Opt-in with byte-identical defaults.** Every change below is additive. An app
that declares nothing renders exactly as it did on 0.46.0 — the tests assert the
fallbacks explicitly, not just the new behaviour.

### Fixed — the chrome painted its UI furniture with a political party colour

`--color-race-red` is the PARTY identity token, the one the party-share charts
use for Republican. The chrome used it directly in 32 places as its UI accent:
the mode pill, the org badge, active nav rows, the avatar circle, focus rings,
primary buttons, the nav hover sweep.

Besides mis-signalling, it made the accent unoverridable — apps reasonably set
`--color-accent` and nothing happened, because nothing read it.

Those 32 references now resolve a semantic token, split by what the colour
actually means: `--color-accent` for genuine accent furniture, and a new
`--chrome-danger` for attention and error (count badges, the low-fuel meter and
its nudge, validation messages). The danger set stays red in every Mode — a
green "3 unread" badge is worse than a red one.

`chrome.css` defines both as `var(--color-race-red)`, so **no pixels move**.
The last hardcoded accent literal went too: the nav hover sweep's
`linear-gradient(90deg,#EA4751 0%,#E63946 100%)` is now `--nav-hover-gradient`,
defaulted to those same two ramp stops.

Red ramp STOPS (`--color-race-red-400` etc.) are unchanged — the red ramp is
legitimately the red ramp. It was the semantic "this is our accent" use that was
wrong.

### Added — one accent per Mode

A Mode may now carry its own chrome accent; the platform keeps one accent by
default.

`NavAppShell` stamps `data-politogy-mode` on its root, sourced by
`PolitogyAppFrame` from the `POLITOGY_APPS` registry — never from a prop an app
passes, so an app still cannot pick its own chrome colour; it inherits its
Mode's. The Brand API serves a Mode's values as
`[data-politogy-mode="petition"] { --mode-accent: … }` and `chrome.css`
re-declares the aliases on that element:

```css
[data-politogy-mode] {
  --color-accent: var(--mode-accent, var(--color-race-red));
}
```

The placement is load-bearing: a custom property is substituted at
computed-value time on the element it is declared on, so declaring this at
`:root` would resolve `--mode-accent` there (unset) and inherit the fallback
down — the Mode block could never win.

A Mode that declares no chrome group leaves `--mode-accent` unset and every
line falls back to its pre-0.47 value. Relationship and Campaign declare none;
unscoped apps carry no attribute at all, so the block does not even match them.

Dark mode keeps the platform's neutral ramp. The Brand sheet resets the Mode
SURFACES to the guaranteed-invalid value under `.dark` so they fall through to
the neutrals; only the accent, a foreground colour, carries over.

Active sub-rows also gain a 3px left rail drawn from
`var(--mode-accent, transparent)` — invisible and out of flow for any app whose
Mode declares no chrome group.

**Where Mode SURFACES are read matters, and the rule is not obvious.** They are
resolved at the point of use with the pre-0.47 value as an inline fallback:

```
bg-[color:var(--mode-accent-surface,var(--panel-elevated))]
```

Not through an alias declared in the `[data-politogy-mode]` block — that block
does not match an app which is not mode-scoped, so the alias would be unset and
a bare `var()` is invalid at computed-value time, dropping the property to its
initial value. And not through a `:root` alias either — `.dark` is a separate
top-level selector, so a `:root` alias substitutes the LIGHT value and inherits
it into dark. Point of use is the only placement correct in both themes, scoped
and unscoped. Two tests enforce it; both mistakes were made and caught during
the release candidates.

Needs the matching Brand API release (`tokens.modes.<id>.chrome`).

### Added — `NavItem { kind: 'section' }`, non-interactive section rows

V1's rail grouped eleven rows under MANAGE / PIPELINE / PEOPLE / SYSTEM. 0.43
dropped the capability; this restores it.

`kind` is optional and defaults to `'link'`, so every existing `NavItem[]` keeps
its type and rendering. It is a widened field rather than a discriminated union
on purpose — a union would make `item.href` a type error for every consumer that
reads it, turning an additive feature into a breaking change.

It is also not the `disabled`-row trick apps have been faking it with: that
renders `aria-disabled`, which announces a heading as an unavailable CONTROL. A
section carries no control semantics at all.

Rendered at both nesting levels, so an app that nests its tree under a standard
nav entry (Petitions) gets its sections inside the expanded group too.

### Added — registry-granted frame inputs

`contentWrapper` and `page.breadcrumbs` existed but were gated to the core app,
which left Petitions with a 1280px centred box around a 1550px left-aligned page
container, and a trail reading "Dashboard › Adjudication" on every adjudication
URL including a specific sheet and line.

Rather than widening the `app === CORE_APP` gate — which would let any app
re-specify any chrome element — the exception is declared in the registry:

```ts
petitions: { …, grants: ['contentWrapper', 'breadcrumbs'] }
```

`data.frame.<field>` is honoured only when the app's registry row lists it. An
app cannot grant itself, the complete set of exceptions is one greppable table,
and an ungranted app that passes the prop gets `undefined` — "no effect", never
a silent effect.

A grant is for a fact only the app HAS, never for a look.

### Added — the brand lockup follows the Mode

`brandLogoSrc` became core-only in 0.43, so every mode-scoped app rendered the
Relationship lockup — a red wordmark on a purple `vrm` badge — whatever Mode it
was scoped to. Petition Mode shipped a green Petition lockup in V1 and lost it in
that migration.

Resolved from the registry by Mode, like the accent:
`MODE_BRAND_LOGOS = { petition: '/brand/logos/petition-mode-logo.svg' }`. Only
Modes with a shipped lockup are listed; everything else keeps today's default.
The path is app-relative, so add the asset to the app's `public/` before adding
a Mode here.

### Changed — prereleases publish under the `next` dist-tag

`npm publish` tags `latest` whatever the semver, so an rc would silently become
what a fresh `npm i @the-portland-company/shell` resolves to across the estate.
The release workflow now detects a prerelease version and publishes it under
`next`, leaving `latest` on the last stable release until the promotion tag.

## 0.41.1 — 2026-08-03

### Fixed — the Chakra tooltip override in 0.41.0 did not actually take

0.41.0 pinned `Tooltip.baseStyle.bg`, but Chakra's own baseStyle sets
`bg: var(--tooltip-bg)` and then assigns that VARIABLE from its palette — and it
ships a `_dark` block that reassigns `--tooltip-bg` to `colors.gray.300`,
deliberately inverting in dark mode. Overriding `bg` alone therefore lost, and
the bubble still measured `#E8E8E8` live after the 0.41.0 deploy. Both the base
and the `_dark` block now pin `--tooltip-bg` / `--tooltip-fg` /
`--popper-arrow-bg` to the shared panel surface, with a test asserting it.

## 0.41.0 — 2026-08-03

### Fixed — the expanded sub-menu was the same colour as the left bar

Reference/UI-Platform → Styling pins the nav ramp (page `#0A0A0A` → left/top bar
`#161616` → **expanded sub-menu `#212121`** → row hover `#2B2B2B` → borders
`#333333`). The expanded group painted `--panel`, which is `#161616` in dark —
the same value as the bar behind it — so nesting read as flat. New tokens
`--nav-submenu-bg` and `--nav-row-hover` carry the ramp's steps; the nested
sub-group's hover no longer reuses `--panel-elevated` (`#1F1F1F`), which was
DARKER than the panel it sits on and made a hovered row recede.

### Fixed — quarantined-contact rows looked clickable and were not

The rows in the Alerts panel carried a hover highlight on a non-interactive
`<li>`, so a row advertised interactivity and then did nothing. Each row is now
a real `<a>` — keyboard focusable, Enter-activatable, with a visible
focus-visible ring — opening the quarantined-contacts view filtered to that
number (`?phone=`), the same destination as "View all" but scoped. Counts cap at
`99+` and match the shared badge geometry.

### Fixed — the `.dark` block was missing whole token groups

Global-Rules → Dark Mode: "A var can never exist in one block and not the
other." The form-control, app-field, floating-label and `--app-color-gray-*`
groups were declared in `:root` only, so a control in dark mode kept its LIGHT
border, placeholder and label values — measured live as slate `#64748B` /
`#475569` against black, which is also the forbidden blue-tinted family. All are
now overridden, with the gray ramp INVERTED (pale surface → dark surface, dark
text → light text).

### Fixed — Chakra tooltips and subtle alerts in dark mode

Chakra's stock `Tooltip` inverts, so in dark mode every `div#tooltip-*` rendered
a near-white `#E8E8E8` slab against black chrome (15 of 29 pages). It is now
pinned to the shared panel surface, so a Chakra tooltip and the native chrome's
`TopBarTooltip` are one treatment, per UI-Platform. Chakra's `subtle` /
`left-accent` alerts resolved `<scheme>.200` for BOTH the surface and the icon,
so an error alert painted `#FEB2B2`; in dark they now use a neutral raised
surface and carry meaning in the icon/text accent, with red reconciled to the
brand ramp rather than Chakra's `#E53E3E`.

### Fixed — `gen:tokens` silently deleted hand-written chrome rules

`scripts/gen-tokens.mjs` rewrites `chrome.css` wholesale, but the widget-slot
badge normalization and the beta-banner defaults had been appended to the
committed file by hand. The next regeneration would have deleted them — 0.40.0's
badge fix included. They now live in the generator (`STATIC_CHROME_CSS`), so the
file regenerates losslessly.

### Added

`__tests__/darkTokenCompleteness.test.ts` asserts that every colour-valued
`:root` var has a `.dark` override and that every dark chrome hex is hue-free
(R = G = B) — the arithmetic check the spec asks for, rather than an eyeball.

## 0.40.1 — 2026-08-03

### Fixed — a top-bar nudge could still cover an open panel

0.40.0 stopped the new-reply toast covering the notifications panel, but the
same collision existed from a NEIGHBOURING trigger: the low-fuel nudge is wider
than its own trigger and the panels are right-aligned, so with Notifications
open the nudge sat on its header (measured live on contacts.politogyvrm.com
after the 0.40.0 deploy). The top bar now keeps one module-scoped count of open
panels (`useAnyTopBarPanelOpen`); both transient nudges yield while any panel is
open and return when it closes. Still no z-index changes.

## 0.40.0 — 2026-08-03

### Fixed — the DevNotes badge was a second badge definition

Reference/UI-Platform "Badge Counters" allows exactly ONE badge definition, and
`.topbar-widget-slot` in `chrome.css` is supposed to restate it for a launcher
that brings its own badge markup. It did not: the only rule was
`.topbar-widget-slot button > span.relative { position: static }`, and DevNotes
0.6.x writes that wrapper with an INLINE `position: relative` and **no class**,
so the selector matched nothing. The badge kept anchoring to the glyph instead
of the 32px trigger, and its own inline styles (`top:-4 right:-8`, `#dc2626`,
`font-weight:700`, no `height`) rendered a visibly different bubble — measured
different on app.politogyvrm.com vs contacts.politogyvrm.com.

The slot CSS now (a) matches every direct span child of the launcher, not a
class, and (b) restates the whole badge definition — 16px circle, `#E63946`
via `--color-race-red`, 10px / weight 400 / line-height 1, `top:-4px`
`right:-4px` — with `!important` so inline styles cannot win. `TopBarCountBadge`
pins `font-weight: 400` and `line-height: 1` explicitly rather than inheriting.

### Fixed — the new-reply toast rendered on top of the notifications panel

Both the toast and the panel anchor to the bell trigger, and nothing suppressed
one while the other was up, so opening Notifications put a message preview over
the panel's "NOTIFICATIONS" header and first row. `TopBarPopover` gained
`onOpenChange`; `NotificationsAction` clears the toast when the panel opens,
refuses to raise a new one while it is open, and does not render it when open.
One surface per trigger, per Reference/UI-Platform. No z-index was changed.

## 0.37.1 — 2026-07-27

### Fixed — cross-app navigation kept the user's active organization

Every link the Relationship tree emitted was bare: `Forms` / `Surveys` / `Polls`
went to their standalone apps, and every core route went to `app.politogyvrm.com`,
with no `?org=` selector. A multi-org user working in one organization clicked a
feature and landed in whichever organization the destination resolved by default
(reported: working in "We Need Steve", clicked Contacts, arrived in another org's
contacts). Intra-app links already carried the selector, so the jump only
happened when crossing apps.

`standardPolitogyNav` now stamps `?org=<full-uuid>` on EVERY link it builds, in
every tree — the Campaign and Petition trees already did. The full UUID is the
only collision-free selector (contacts-api matches exact id first, then a short
suffix that can collide across a user's orgs), and `isNavItemActive` already
excludes `org` from active-detection, so nothing changes about which row is
selected. The app-owned `contactsItem` override is still used verbatim; the
`politogy_active_org` cookie remains the fallback for a bare URL.

The same treatment applies to the chrome's own cross-app links — "Buy More Fuel"
/ "Add fuel" and "View all" quarantined contacts, which all point into VRM core.

## 0.37.0 — 2026-07-27

### Fixed — organization logo renders in every app, not just VRM core

`organizations.logo_url` is authored by VRM core and stored as a ROOT-RELATIVE
core route (`/api/storage/public?bucket=organization-logos&path=<org>/logo.png`
— core's signed-storage proxy). VRM core rendered it fine because the path
resolved against its own origin; every feature app resolved the same path
against ITS origin (`forms.politogyvrm.com/api/storage/public`), 404'd, and
showed a broken image in the sidebar org pill and the org dropdown.

`resolveOrgLogoUrl` (exported from `./native`) now absolutizes a relative logo
path against `CORE_APP_ORIGIN` at the point of render, for all three org-badge
sites (active pill, dropdown rows, non-switcher pill). Absolute, protocol-
relative and `data:` URLs pass through untouched; empty values still fall back
to initials. This is the same treatment `absolutizeAvatarUrl` already applied to
`profiles.avatar_url` in the chrome API — the org logo was simply missed.

## 0.36.0 — 2026-07-24

### Added — cross-subdomain active-org + favicon cache-busting

`ChromeStateProvider` now seeds the active org from a shared cross-subdomain
signal (`active-org` module: URL `?org=<uuid>` → `.politogyvrm.com` cookie
`politogy_active_org`) before falling back to host-only localStorage, and stamps
`?org=<full-uuid>` into the address bar on every page. Previously each app +
subdomain restored from its own host-only localStorage and otherwise defaulted
to the earliest-joined org, so apps diverged onto different orgs and campaign
apps could land on a Relationship-only org and lock themselves. `setOrgId` now
writes the shared cookie so the last-used org follows the user across every app,
and cross-app/core links carry the FULL org uuid (not the lossy last-6 suffix),
the only collision-free selector for contacts-api membership matching.

`toMetadataIcons` stamps the Brand revision onto every favicon URL as
`?v=<version>` (falling back to `updatedAt`) so an aggressively-cached browser
picks up a new Brand publish even when the stored filename is unchanged.

## 0.32.0 — 2026-07-23

### Added — mode-aware navigation (Campaign Mode) with zero new chrome config

`standardPolitogyNav` now builds a per-Mode tree. `mode: 'relationship'` (the
default) is **byte-for-byte** what it produced before — no consumer changes,
no regression. `mode: 'campaign'` produces the Campaign tree — Dashboard, Voter
Contact (both core-hosted under `app.politogyvrm.com/campaign/*`), then A2P,
Phone Banking, Field Canvassing, Sign Mapping (standalone apps), Tribes (the
Contacts app's `/tribes`) and Polling Engine (the polls app). `mode: 'petition'`
is a minimal tree pointing at the Petition Mode app.

Which tree an app renders is **derived, not passed**: it comes from the app's
own `mode` in the `POLITOGY_APPS` registry. New rows were added for the four
Campaign apps — `a2p`, `phonebank`, `canvass`, `signs` — each `mode: 'campaign'`,
so they render the Campaign tree and a **static Campaign pill** (never a
Relationship pill). Unscoped apps (forms / surveys / polls / contacts / vrm)
have no `mode` and render Relationship exactly as before. The zero-drift
contract holds: an app still passes nothing about its chrome.

### Added — `CAMPAIGN_FEATURE_AVAILABILITY` (staged feature rollout)

Campaign features ship incrementally. A disabled feature is **omitted** from the
nav (not rendered as a dead row); its flag flips to `true` in a later patch
release as the app launches. Defaults at this version: Polling Engine and Tribes
on; A2P, Phone Banking, Field Canvassing and Sign Mapping off.

### Changed — Mode switcher targets, and cross-app links carry the active org

The Campaign/Petition trees carry the active org on every cross-app link as
`?org=<last6>` — the same convention the Mode switcher and My Account menu use —
so the destination app opens on the same org. The Mode switcher's Petition
destination is corrected to `petition-mode.politogyvrm.com` (the petitions app's
real production subdomain), and a mode-scoped app can pass `pinnedModeId` to
`useChromeMode` so its pill shows its own mode while a multi-mode org still gets
the switcher to leave.

## 0.31.0 — 2026-07-23

### Fixed — Surveys sub-menu now shows all three items (matches the tab strip)

0.25.0 collapsed the Surveys group to a single "Surveys" child to kill an
all-active bug, which left the sidebar sub-menu showing 1 item while the tab
strip showed 3 (Surveys / Canvas / Results). Restored to three, with distinct
`?view=` hrefs so active-detection still singles out exactly one.

### Changed — Beta banner reads as a warning (amber)

The `--beta-banner-*` tokens were never emitted, so the banner had no reliable
colour. It now falls back to amber-100 fill, amber-500 border and amber-900
text — a clear warning treatment with a darker text/border shade.

## 0.30.0 — 2026-07-23

### Added — `TopBarPopover` is public (enables the VRM widget port)

The shared top-bar popover — 32px circular trigger, standard tooltip, count
badge, right-aligned panel with the pointer arrow — was private, so an app with
a richer panel than the stock actions (VRM: fuel breakdown, import progress,
system alerts, reply feed) had no way to render it inside the shared chrome and
hand-rolled its own trigger instead. That is the last structural reason VRM's
top bar differs from forms/polls/surveys/contacts.

Exporting it lets those panels move into the shared cluster **one at a time**,
each keeping its behavior — rather than a wholesale swap to the generic actions,
which would drop capability VRM already ships (UI-Platform explicitly forbids
migrating an app to a rendering that loses an element it has).

## 0.29.0 — 2026-07-23

### Added — `./runtime-tokens` (`ensureRuntimeBrandTokens`)

A static `<link>` to `/api/tokens?format=css` in `<head>` is not sufficient on
its own: an app's own bundled `chrome.css` can be injected AFTER it and win the
cascade. VRM linked the runtime sheet and still resolved `--color-accent` from
the build-time snapshot, so a Brand edit reached four apps and not the fifth.

`ensureRuntimeBrandTokens()` appends (or moves) the tokens link to the END of
`<head>` at startup, making the live Brand values last in the cascade for every
app. Idempotent, and the response's ETag + `max-age=60` means no extra fetch.

## 0.28.2 — 2026-07-23

### Fixed — the Chakra theme hardcoded the body font

`politogyTheme.fonts.heading/body` were pinned to the system stack. Chakra's
global styles beat app CSS, so VRM rendered in `-apple-system` while every app
on the native chrome rendered the Brand family — and no Brand-editor font change
could ever reach it. Both now resolve `var(--font-family, …)` (mono resolves
`--type-mono-family`), with the old stacks as the pre-tokens fallback only.

## 0.28.1 — 2026-07-23

### Fixed — the left bar lost its background (regression in 0.25.0)

`gen:tokens` regenerated `chrome.css` from Specs but the generator never emitted
**`--nav-surface`** (the sidebar's own surface, which `NavSidebar` reads
directly) or the hand-authored neutral-black dark chrome ramp — both had been
edited into the committed file by hand, so regenerating silently dropped them.
Live result: the left bar computed `background-color: rgba(0,0,0,0)`.

Both are now emitted BY the generator — `--nav-surface` in light, and an
explicit `#0A0A0A → #161616 → #1F1F1F → #333333` chrome ramp with `#A3A3A3` /
`#E8E8E8` text in `.dark`, rather than whatever the ShadCN dark triplets happen
to be. Global-Rules requires dark chrome to be hue-free (R=G=B); deriving it
from a blue-tinted palette would violate that. Regenerating can no longer lose
either one.

## 0.28.0 — 2026-07-23

### Fixed — DevNotes "Create Task" did nothing

`AppDevNotes` mounted `DevNotesProvider` and the menu, but never
`<DevNotesOverlay />`. The menu only TOGGLES creation mode; the overlay is what
renders the click-to-place capture layer, the report dots and the report form —
so on forms / surveys / polls, clicking **Create Task** closed the menu and
nothing happened at all (HITL bug report 2026-07-23). Contacts escaped it only
because it still carried its own hand-rolled surface.

The chrome now mounts a `DevNotesSurface` at the chrome root: the overlay, plus
the "View All Tasks" modal (rendered at the root so the top bar's stacking and
backdrop-blur can't trap it, and mounted only while open so it doesn't fetch
every user's tasks on page load).

## 0.27.0 — 2026-07-23

VRM native-chrome parity (shell-nav-handoff §1–§3). All three were verified in
this package's source before changing anything, and all three are additive —
forms / surveys / polls / contacts behavior is unchanged.

### Added — `NavAppShell contentWrapper`

`'padded'` (default) keeps the existing `<main class="px-6 py-7">` + `mx-auto
max-w-7xl`. `'bare'` renders children directly. VRM wraps every page in the
shell's own `PageContainer` — which emits its OWN `<main>` and max-width — so
the default gave it a **nested `<main>`** (invalid HTML) and a doubled gutter on
Org Settings, Email Broadcast and SMS/MMS Blast.

### Added — nav group headers can navigate as well as expand

A group header always toggles; when the item also carries an `onClick`, that now
runs too, so a parent row can open its section dashboard AND expand in one
click. Existing apps pass no parent `onClick`, so nothing changes for them.

### Added — `NavItem.disabled` + `NavItem.disabledTitle`

Mirrors `NavTab`'s existing contract: a gated row renders as a non-interactive,
dimmed `aria-disabled` span with its reason as a tooltip. VRM gates Email / SMS
until setup is complete and previously had no way to express that, so gated rows
rendered fully clickable.

## 0.26.0 — 2026-07-23

### Added — `PolitogyAppFrame` data plumbing (so Contacts can adopt it)

`PolitogyFrameData` (the optional `data` prop) carries the things that differ by
**where an app's data comes from**, never by how its chrome looks:

- `fetchJson` / `devNotes` — for apps that authenticate client-side instead of
  through a same-origin `/api/chrome/*` proxy (Contacts).
- `org` — controlled active-org state for apps that own switching.
- `contactsItem` — app-owned children for a standard nav entry the app owns.
- `fallbackAvatarUrl` — avatar fallback (stored memoji / default) when the
  profile has no uploaded photo.

Adding a *visual* option here would re-open the drift this component closes.

## 0.25.0 — 2026-07-23

### Added — `PolitogyAppFrame`: one component owns the whole app frame

Shipping the same package at the same version was never enough: the package
exported PRIMITIVES and every app hand-assembled them in its own ~150-line
`Shell.tsx`, so identical inputs were never guaranteed and production drifted.
Apps now render

```tsx
<PolitogyAppFrame app="forms" pathname={pathname} linkComponent={Link}
                  session={{ userId, email, role, accountName, accountId }}
                  onSignOut={signOut}>{children}</PolitogyAppFrame>
```

and pass **nothing** about the chrome — no nav, breadcrumbs, title, mode, user
menu, footer or theme. What an app cannot pass, it cannot drift on.
`POLITOGY_APPS` is the single per-app registry (title / origin / storage key).

### Added — brand-driven app icons (`./app-icons`)

`politogyAppIcons(app)` resolves favicons from `GET /api/icons/<app>` at runtime
(60s revalidate) for use in Next `generateMetadata()`, ending at the VRM Core
logo when an app has no icon of its own. Never throws.

### Fixed — Surveys sub-menu rendered entirely active

`standardPolitogyNav` gave Surveys / Canvas / Results the **identical href**
(`https://surveys.politogyvrm.com/surveys`), so on surveys.politogyvrm.com every
child matched active-detection and the whole sub-menu lit up race-red. Canvas
and Results are survey-scoped routes with no id-less destination, so the group
now carries only the reachable list route. A regression test asserts no two
sibling nav items anywhere in the standard nav share an href.

### Fixed — theme kept reverting to Light

A theme picked on Politogy ID (which has no chrome-API session) only reached the
cookie; the next app's reconcile then read the **stale** profile value from
`GET me` and overwrote the user's fresh choice. A choice is now marked pending
(`politogy_theme_pending`, cross-subdomain) until it is written to the profile,
and the first app that can reach the chrome API pushes it UP instead of pulling
the stale value down.

### Fixed — an email is never rendered as a user's name

Identity is resolved by the package from the chrome API (`useChromeIdentity`),
with the app's session claim as a pre-hydration fallback only. Forms passed
`user.name ?? user.email`, so a user with no name set saw their email in the
top-right and the "add your name" affordance never fired.

### Fixed — the mode pill is no longer hardcodable

`useChromeMode()` derives the current mode from the org's entitlements and the
USER'S selection (persisted cross-app as `vrm.activeMode`); the argument is now
only a pre-entitlement fallback. Apps passed the literal `'relationship'`.

### Fixed — breadcrumbs are derived, not hand-built

`deriveBreadcrumbs()` builds **Dashboard › Sub › Item** from the same nav tree
the sidebar renders. Polls previously rendered a lone "Polls" crumb under a
"Polls" title ("Polls / Polls").

### Fixed — apps no longer declare chrome CSS variables

`chrome.css` now emits the app-surface aliases (`--color-bg`, `--color-surface`,
`--color-panel`, `--color-border`, `--color-text`, `--color-accent`,
`--skeleton-*`, …) in light and neutral-black dark. Every app had defined its
own fallback palette and they had drifted — surveys' accent was `#C8102E` where
every other app was `#E63946`.

## 0.11.3 — 2026-07-20

### Fixed (native — token contract + client boundary)

- **Native chrome now has a real semantic token layer.** The `./native`
  components (NavTopBar / NavSidebar / NavTabStrip / NavAppShell) reference
  `--background`, `--foreground`, `--muted`, `--panel`, `--panel-elevated`,
  `--line`, `--shadow-soft` directly as `var(--x)`, but chrome.css never defined
  them for light mode and only emitted `--foreground`/`--muted`/`--background`
  inside `.dark` as ShadCN **HSL channel triplets** (`210 40% 98%`) meant for
  `hsl(var(--x))` — invalid when used as a full color, so out-of-the-box the
  native chrome had no surface/border and broken text. `gen:tokens` now emits
  these seven names as **full colors in both `:root` (light, aliased to the
  canonical `--topbar-*`/`--surface-*`/`--sidebar-border`/`--shadow-lg` tokens)
  and `.dark` (from the Specs `darkMode.*` values wrapped in `hsl()`)**. Note
  `--muted` maps to muted-*foreground* because native uses it as secondary text.
  Apps consuming `./native` no longer need an app-side var bridge in globals.css.
- **`"use client"` is now emitted on `dist/native.{js,cjs}`** (prepended
  post-build, since esbuild strips a source/banner directive). Next.js App
  Router apps can import the native chrome into Server Components without a
  manual client-boundary wrapper. Ignored (harmless) by Vite/Chakra consumers.

## 0.11.2 — 2026-07-20

### Added (native — per-slot Brand glyphs)

- **`NavTopBarAction` gains an optional `slot`** so the native top-bar action
  icons source their glyph by name from `--topbar-icon-<slot>` (Brand API),
  matching the Chakra `<TopBarIcon>`; button size/color/hover and the cluster
  gap now resolve the universal `--topbar-icon-*` tokens with the previous
  literals as fallbacks. Shared slot contract extracted to
  `src/lib/topbarIconSlot.ts` (framework-agnostic, no Chakra import).

## 0.11.1 — 2026-07-20

### Fixed (packaging — native install)

- **Chakra-only peers are now `optional`** via `peerDependenciesMeta`
  (`@chakra-ui/react`, `@emotion/react`, `@emotion/styled`,
  `@supabase/supabase-js`, `react-icons`, `react-router-dom`). The `./native`
  export imports none of them — only `react`/`react-dom` (still required) — so
  the Next.js worker apps (Forms/Surveys/Polls) can `npm i
  @the-portland-company/shell` without `ERESOLVE` and without
  `--legacy-peer-deps`. The Chakra `.` export still expects these at runtime;
  apps that use it already install them.
- **Relaxed the `@supabase/supabase-js` peer range** from `~2.95.3`
  (`>=2.95.3 <2.96`) to `>=2.95.3 <3` so it no longer conflicts with apps on a
  newer 2.x (e.g. surveys on `^2.106.2`).

## 0.11.0 — 2026-07-20

### Added (native — icon-only tab strip)

- **`NavTabStrip`** in the `./native` export: the standard icon-only secondary
  navigation the Next.js worker apps (Forms / Surveys / Polls) render below the
  top bar, promoted from each app's hand-rolled `.tabstrip`/`.tab-strip` markup
  into the shell so they stop diverging. Icon-only tabs with `role="tablist"` /
  `role="tab"`, `title` tooltips + `aria-label`; the **selected tab merges into
  the content panel** (top/left/right border, no bottom border, shared
  `--tab-content-bg`). All geometry is driven by the Brand `--tab-*` CSS vars
  (`--tab-height`, `--tab-icon-size`, `--tab-radius`, `--tab-gap`,
  `--tab-content-bg`, `--tab-unselected-opacity` [default `0.6`]) with literal
  fallbacks. Items are `{ key, label, icon, href?, onSelect?, selected,
  disabled?, disabledTitle? }`; `href` tabs render through the injectable
  `linkComponent` (Next `<Link>`), no-`href` tabs render as `<button>`, and
  `disabled` tabs render a dimmed non-interactive span (e.g. Surveys' Canvas /
  Results before a survey is chosen). Pass `children` to render the merged
  content panel, or omit to compose your own. No Chakra, no react-router.
- `NavLinkProps` widened with optional passthrough attributes
  (`role`, `aria-selected`, `aria-label`, `title`, `style`) so one injected link
  can back both a nav row and a routed tab.
- Tokens regenerated from Specs (`gen:tokens`, tokens v38).

## 0.10.3 — 2026-07-13

### Fixed (sidebar)

- **Sidebar width is driven by the `--sidebar-width` Brand token** (default
  `240px`) so the Chakra `Sidebar` tracks the Brand API value.

## 0.10.2 — 2026-07-13

### Security (XSS) + UI

- **Sanitize host-supplied hrefs** in native NavLink / footer / action links
  (`safeHref` blocks `javascript:`/`data:` URL schemes) — merged from the
  skills-scan security review. `npm audit` added to prepublish.
- **Smaller OrgPill badge** (`28px` → `20px`) — carried forward from 0.10.1.

  This is a single publish combining the XSS fix (was on `main` @ 0.10.0) and the
  OrgPill change (was on `feat/orgpill-smaller-badge` @ 0.10.1).

## 0.10.1 — 2026-07-13

### Changed (OrgPill)

- **Sidebar org switcher badge is smaller** (`28px` → `20px`) so the initials/logo
  circle no longer nearly fills the `sm` MenuButton — gives visible top/bottom
  breathing room. Only the icon size changed; the pill's colors/background and the
  dropdown are untouched (light/dark styling unchanged).

## 0.10.0 — 2026-07-12

### Fixed (Specs brand colors)

- **Brand ramp is Specs race-red (`#E63946`)**, not legacy burnt-orange (`#E86A3A`).
  `gen:tokens` now emits `--app-color-brand-*` and Chakra `brand` from `colors.raceRed`.
- Mode defaults, focus ring, and field focus use relationship primary / race-red.
- Sidebar footer Privacy/Terms/Subscriptions links use race-red (not theme orange).
- OrgPill fallbacks, nav badges, support button: race-red / `red` scheme.


# Changelog

## 0.9.0 — 2026-07-12

### Fixed (Chakra chrome — reconciled with main app)

- **`NavItem` re-synced to main-app `AuthenticatedLayout`**: removed the orange→red gradient hover sweep that had diverged from production chrome; restored gray hover, parent active when any child route matches (including Tabs Only), and the effectiveHref vs href-less accordion header split. `brandIcon` + `safeHref` shell additions retained.

### Note for hosts

- Main VRM app now renders chrome exclusively via `ShellChrome` + `AppLayout` (no dual `AuthenticatedLayoutFrame` chrome path). Contacts already used this path — both apps should pin `^0.9.0`.

## 0.8.0 — 2026-07-02

### Added (backward-compatible)

- **Host-driven auth for non-Supabase apps**: `ShellProviderProps.supabaseClient` is now optional, and a new optional `auth: ShellInjectedAuth` prop (`{ status, user, signOut }`, exported type) takes precedence over Supabase session tracking. This lets OIDC apps (e.g. the standalone Contacts app) mount the full Chakra chrome — `ShellProvider` → `ShellChrome` → `AppLayout` — with their own identity feeding `useShellAuth`/`UserMenu`. The host builds a Supabase-shaped `user.raw` (`id`/`email`/`user_metadata.full_name`) so chrome components render identically. With neither prop, auth resolves to `unauthenticated`. Existing `supabaseClient` consumers are unaffected.

### Tests

- Injected auth: precedence over Supabase (no `getSession`/`onAuthStateChange`/`auth.signOut` calls), client-less mounting, neither-prop fallback (3 tests).

## 0.7.0 — 2026-07-01

### Added (native chrome — all backward-compatible)

- **Expandable nav groups**: `NavItem` gains optional `children?: NavItem[]`. A parent with children renders as an accordion group header — clicking toggles (never navigates, even with `href`; the href only feeds active detection), a right-aligned chevron rotates 180° when open, the sidebar keeps a single group open at a time, and the group containing the active route auto-expands on route change. Sub-items render as smaller nav rows on a lighter panel through the same injected `LinkComponent` (with `onClick` button support), with the main app's exact treatments: parent solid race-red when itself-or-a-child is active, active sub-item on elevated panel with race-red text, inactive rows keep the orange→red hover gradient sweep. Flat menus are byte-identical to before.
- **`standardPolitogyNav`** (new export, with `StandardNavOptions` / `StandardNavIconKey`): the canonical Politogy VRM menu — Dashboard, Contacts, Email Broadcast, SMS/MMS Blast, Calls to Action, Forms & Surveys, Support — encoded once in the shell with core-relative routes absolutized against `coreBaseUrl`. Apps map icon slots to their own icon library, and an app that owns an item nests its local pages via `contactsItem: { href, children }` (used verbatim, not absolutized) while everything else links out to VRM core. `supportItem` supplies the Support handler (`onClick`/`href`) or omits the row.

### Tests

- Group behavior: render-when-expanded, toggle, auto-expand on active child, single-open accordion (6 tests).
- `standardPolitogyNav`: order/wording, absolutization, href-less CTA/Forms parents, default vs local Contacts children, Support variants, icon mapping (7 tests).

## 0.6.0 — 2026-07-01

### Added (native chrome — all backward-compatible)

Chrome-parity upgrades to the `./native` module (`NavSidebar`/`NavTopBar`/`NavAppShell`) so the dependency-light chrome is a faithful twin of the main VRM app's Chakra chrome. No Chakra components touched.

- **`NavFooter`** gains optional `commitDate?: string` and `commitAuthor?: string`. The footer now renders the main app's two-row build block: row 1 is `[env chip] | {commit last-4} | v{version}` (env chip is a color-coded capsule via the extended `envChipClasses`), row 2 (only when date/author present) is `| {Mon D} | {firstName} |` in mono.
- **`NavOrg`** gains optional `id?: string | null`. When present, the "Organization" label row shows a right-aligned `...{last-8}` copy button that writes the full id to the clipboard (`navigator.clipboard.writeText`) with a brief "Copied" affordance.
- **`NavItem`** gains optional `onClick?: () => void` (`href` is now optional). onClick items render as a `<button>` styled identically to the link rows — used for a sidebar "Support" action.
- **`NavTopBarProps`** gains optional `actionsList?: NavTopBarAction[]` (new exported `NavTopBarAction` type). Each renders as a 32×32 circular icon button (20px icon) with an optional red count badge (`badge > 0`), `warning`/`danger` tones coloring the icon red, and `href` support (external links open in a new tab). Rendered before the existing `actions` ReactNode slot (kept for back-compat).
- **Nav hover gradient sweep**: inactive sidebar nav rows (links and buttons) animate a left→right `linear-gradient(90deg,#ea6a3a,#E63946)` width 0→100% over 300ms with white text on hover; active rows keep solid race-red. No layout shift.
- **Org pill default color** changed from dark slate `#2d2f36` to race red (`var(--color-race-red)`, `#E63946`), matching the main app's fallback.
- `envChipClasses` extended: production red, staging orange, local/dev green, unknown gray.

### Tests

- Added `__tests__/native.test.tsx` covering `actionsList` badge/href rendering, org-id copy, onClick nav items, footer rows, and `envChipClasses` tones (6 tests; suite now 49).

## 0.3.5 — 2026-05-14

### Fixed

- `ShellModeValue.getModeConfig` is now optional. If omitted, shell auto-resolves the active mode config via `modes.find(m => m.id === currentMode)`. Defangs the common `this`-binding mistake where consumers wrote `getModeConfig() { return this.modes[0] }` and shell internals destructured the function (losing `this`) and crashed the chrome.
- All internal call sites (`<ModePill>`, `<UserMenu>`, `<NavItem>`) now use a defensive `resolveModeConfig(mode)` helper that try/catches the consumer-supplied function and falls back to derivation. A broken `getModeConfig` no longer blanks the page.

## 0.3.4 — 2026-05-14

### Fixed

- `package.json` `exports` for `./css` and `./chrome.css` now ship a `types` entry pointing at a tiny ambient module declaration (`dist/css-modules.d.ts`). Fixes TS2882 errors in fresh consumers importing the side-effect CSS subpaths.

### Documentation

- README install command now pins peer-dep versions explicitly (`react@^18`, `@chakra-ui/react@^2.8`, etc.) so Vite-scaffolded apps on React 19 / Chakra v3 don't silently install incompatible versions.
- Clarified `@the-portland-company/devnotes` is optional.

## 0.3.3 — 2026-05-14

### Documentation

- Rewrote `README.md` to cover the v0.3.x chrome contract: every component / hook / helper / type, the `<ShellChrome>` binding pattern with a copy-pasteable bridge example, the `chrome.css` + `css` import paths, multi-SPA routing notes for the politogy edge router, and a pointer to `politogy-vrm/react/app/src/providers/ShellChromeBridge.tsx` as the reference implementation. No code changes.

## 0.3.2 — 2026-05-13

### Added

- `<ShellChrome userAvatarUrl />` (and matching `<ShellProvider userAvatarUrl />` prop) — app-supplied avatar URL override for the header `<UserMenu />` avatar. When provided, takes precedence over the avatar URL on the Supabase session's `user_metadata.avatar_url`.

### Fixed

- `<UserMenu />` was rendering only `user.raw.user_metadata.avatar_url`, which missed app-specific avatar sources like `profile.avatar_url`, memoji selections persisted to localStorage, and branded default URLs. Apps with these fallback chains were seeing the initials placeholder instead of the user's portrait. Pass the resolved URL via `userAvatarUrl` to restore parity with the legacy chrome.

## 0.3.1 — 2026-05-13

Closes the last two visual gaps in the shell-v3 chrome vs production.

### Fixed

- **Header icon order**: Removed the `devNotesMenu` slot from
  `<Header>`'s icon row. Previously the shell appended DevNotes (the
  "Task" icon) AFTER `headerIconsSlot`, forcing it to the rightmost
  position. That broke production order (Fuel → Stack → Bell → Task →
  Support → Avatar). Apps must now inline DevNotesMenu inside
  `headerIconsSlot` at the position they want. The `devNotesMenu` prop
  on `<ShellChrome>` is still accepted for backward compat but is
  ignored at render time.
- **Sidebar footer commit info**: Replaced the plain-text
  `"staging   v2.34.1   #51e4e3f"` row with a full port of the legacy
  production `CommitCopyButton` (env chip + last-4 SHA + version +
  optional diagnostics icon, plus a second-line byline `| Mon D |
  firstName |`). Clicking the env chip copies the full SHA. Hovering
  shows the full commit message body when `commitLog` is supplied.

### Added

- `<CommitCopyButton>` — new exported component. Ported from
  `react/app/src/layouts/AuthenticatedLayout.tsx::CommitCopyButton`
  (lines 3017–3284). Accepts `envNode` (pre-rendered chip),
  `environmentLabel` (default styled chip — green/orange/red for
  local/staging/production), `commit`, `version`, `commitDate`,
  `commitAuthor`, `commitLog`, and `onDiagnosticsClick`. Used by the
  shell's `<Sidebar>` footer; also exported for apps that want to mount
  it elsewhere.
- `ShellFooterValue.envNode?: ReactNode` — pre-rendered chip override
  (useful when the app already has its own `EnvironmentBanner`).
- `ShellFooterValue.onDiagnosticsClick?: () => void` — gates the
  diagnostics icon. When unset, the icon is omitted.

### Doc-only

- `ShellProviderProps.support` doc no longer claims the shell renders
  a `<SupportRequestButton />` automatically. It never did — apps wire
  their own support trigger via `headerIconsSlot`.

## 0.3.0 — 2026-05-13

Visual-parity rebuild. Ports the legacy production sidebar + header chrome
from `react/app/src/layouts/AuthenticatedLayout.tsx` (lines 1292–4192)
into the shell so any consuming SPA gets the full Politogy chrome
without rebuilding from a skeleton.

### Added

- `<Sidebar />` — full port of legacy `SidebarContent` (3289–4192). Renders
  brand logo, large org logo (when present), `<OrgPill />`,
  `<ModePill />`, the navItems list, and a footer with Privacy / Terms /
  Subscriptions links + commit/version display.
- `<Header />` — full port of legacy `MobileNav` (2545–2924). Renders
  hamburger (mobile), small brand logo (mobile), page title + breadcrumbs,
  headerActions slot, headerIconsSlot (FuelPopover, alerts, etc.), the
  DevNotesMenu slot, and `<UserMenu />`.
- `<NavItem />` — full port of legacy `NavItem` (1292–1730). Supports
  top-level rows, accordion children, active-state highlight, mode-aware
  hover gradient, brand icons, regular react-icons, badges, and sub-labels.
- `<OrgPill />` — port of the sidebar org switcher (3795–3957). New
  primary export; the v0.2.x `<OrgSelector />` export still works as an
  alias.
- `<ModePill />` — port of the mode selector (3959–4006).
- `<UserMenu />` (rewrite) — matches the legacy avatar menu (2680–2898).
  Sections: avatar trigger + name/email VStack + chevron; My Profile /
  Continue Onboarding (gated) / Organization Settings; ROLES &
  ORGANIZATIONS (current-org role Badge OR active-role Badge); ACCOUNTS
  (current account indicator + linkedAccounts list with inline remove +
  Add Account); Sign out.
- `<BrandLogo />` — non-draggable `<img>` that the app supplies the `src`
  for (mode-aware logo asset stays in the app's `public/` directory).
- `<BrandIcon name={...} />` — `<img>` keyed off `/brand/icons/<name>.svg`
  (with a configurable `basePath`).
- New chrome contexts and hooks:
  - `useShellMode()` → `{ currentMode, modes, switchMode, getModeConfig }`
  - `useShellNavItems()` → `{ items }`
  - `useShellNavigationPreference()` → `{ showSubMenu }`
  - `useShellRole()` → `{ activeRoleConfig, isSuperAdmin }`
  - `useShellFooter()` → `{ links, version, commit, releaseName, … }`
- Helpers (public exports): `normalizeHexColor`, `lightenHexColor`,
  `hexToRgba`, `getOrganizationBrandColor`,
  `getOrganizationBadgeLetters`, `getUserDisplayName`.
- `<ShellChrome>` gained props: `mode`, `navItems`, `navigationPreference`,
  `role`, `footer`, `brandLogoSrc`, `headerIconsSlot`,
  `organizationSettingsHref`, `showContinueOnboarding`,
  `onContinueOnboarding`, `pageTitle`, `breadcrumbs`, `headerActions`.
- New CSS subpath export: `@the-portland-company/shell/chrome.css` — the
  `:root` design-token CSS variables from `react/app/src/index.css`
  (`--app-color-brand-*`, `--app-btn-*`, `--app-tab-*`, `--mode-*`,
  `--form-control-*`).

### Changed

- **Breaking:** `<AppLayout>` no longer accepts `headerExtrasSlot`. The
  replacement is the new `headerIconsSlot` field on `<ShellChrome>` (passed
  through context so the `<Header>` can render it in the right place
  inside the icon row). `modalsSlot`, `notificationsSlot`, and
  `overlaySlot` are unchanged. `sidebarFooterSlot` is removed (footer is
  now data-driven via `useShellFooter()`).
- **Breaking:** `<UserMenu>` was rewritten. The v0.2.x version showed a
  generic Switch-account section; v0.3.0 matches the legacy production
  menu shape. Apps that depended on the old menu strings (`'Switch
  account'`, `'Add account'`) should update to the new strings
  (`'ACCOUNTS'`, `'Add Account'`).
- `<Sidebar>` no longer takes `entries` / `currentApp` / `footerSlot`
  props — it reads everything from shell contexts.
- `<Header>` no longer takes `extrasSlot` — it reads
  `headerActions` + `headerIconsSlot` from chrome context.

### Compat

- `<OrgSelector>` is still exported (now aliased to `<OrgPill>`).
- All v0.2.x ShellProvider props (`organization`, `linkedAccounts`,
  `support`, `devNotesMenu`, `myProfileHref`) still work.

### Peer dependency

- Adds `react-icons` `^4 || ^5` (used by `<NavItem>`, `<Header>`,
  `<UserMenu>` for the chevron / hamburger / X icons).

## 0.2.1 — 2026-05-13

### Added
- `<ShellChrome>` component — drops chrome data (organization, linkedAccounts, support, devNotesMenu, myProfileHref) into the shell from a position deep in the tree. Use this when the data lives in app contexts nested BELOW `<ShellProvider>`. Apps that have the data at the top can keep using `<ShellProvider>` props directly.
- Re-exported chrome context objects (`ShellOrgContext`, `ShellLinkedAccountsContext`, `ShellSupportProviderContext`, `ShellChromeContext`) so power users can write their own bindings.

## 0.2.0 — 2026-05-13

### Added
- Shared header chrome rendered by `<Header />` automatically when supplied via `ShellProvider`:
  - `<UserMenu />` — avatar dropdown with My Profile, color-mode toggle, Sign out, and optional Switch-account section.
  - `<OrgSelector />` — current org badge + dropdown of other orgs.
  - `<SupportRequestButton />` — life-buoy icon that opens a Support modal; submits via the host-supplied handler.
- `ShellProvider` accepts four new optional prop-driven contexts:
  - `organization?: ShellOrganizationValue` — drives `<OrgSelector />`.
  - `linkedAccounts?: ShellLinkedAccountsValue` — drives the UserMenu "Switch account" section.
  - `support?: ShellSupportValue` — drives `<SupportRequestButton />` and modal submission.
  - `devNotesMenu?: ReactNode` — rendered in the header (typically `<DevNotesMenu />` from `@the-portland-company/devnotes`).
  - `myProfileHref?: string` — UserMenu profile link target. Defaults to `/my-profile`.
- New hooks: `useShellOrganization`, `useShellLinkedAccounts`, `useShellSupport`, `useShellChrome`. Each returns `null` when the corresponding prop wasn't supplied, so chrome components opt out cleanly.
- New types: `ShellOrganization`, `ShellOrganizationValue`, `ShellLinkedAccount`, `ShellLinkedAccountsValue`, `ShellSupportContext`, `ShellSupportValue`.

### Changed
- `<Header />` now renders `<OrgSelector />`, `<SupportRequestButton />`, `devNotesMenu`, and `<UserMenu />` by default. The old hard-coded avatar menu inside Header was removed (its behavior is now inside `<UserMenu />`).

### Notes
- Backwards compatible: existing consumers passing only `currentApp` + `supabaseClient` continue to work; the new chrome simply renders nothing when its props aren't supplied.

## 0.1.0 — 2026-05-12

Initial public release.

### Added
- `ShellProvider`, `useShellAuth`, `useAppRegistry`, `useCurrentApp`
- `AppLayout` with optional slot props (`headerExtrasSlot`, `modalsSlot`, `notificationsSlot`, `sidebarFooterSlot`, `overlaySlot`)
- `Header`, `Sidebar`, `Footer` chrome primitives
- Pure layout components: `Card`, `PageContainer`, `PageHeader`, `BreadcrumbBar`, `HeaderTabBar`, `GlobalUiIdProvider`
- `politogyTheme` (Chakra theme)
- `registerShellPrecache()` and bundled service worker (exported at `@the-portland-company/shell/sw`)
- `buildSpeculationRules()` for cross-app prerendering
- View transitions CSS at `@the-portland-company/shell/css`
- Public TypeScript types: `ShellUser`, `ShellAuthStatus`, `AppRegistryEntry`, `ShellSlots`, `ShellProviderProps`, `ShellAuthValue`, `HeaderTabBarItem`
