Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

dashboard-next: complete prompt set (07-12) for parallel agent workflow

nirholas31d503aa67fd
diff --git a/prompts/dashboard-next/01-home.md b/prompts/dashboard-next/01-home.md
deleted file mode 100644
index 271417c42..000000000
--- a/prompts/dashboard-next/01-home.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# 01 — Home / Overview page
-
-**Read `prompts/dashboard-next/_shared.md` first.** It contains the project rules, foundation paths, atomic classes, smoke-test recipe, and commit instructions. Then build the slice below.
-
-## Your slice
-
-Build the Overview page at **`/dashboard-next/`**. This replaces the placeholder at [src/dashboard-next/pages/home.js](src/dashboard-next/pages/home.js) with the real product.
-
-This is the page users land on when they hit `/dashboard-next`. It is the hero of the redesign — it must feel premium and 3D-native, not like a generic admin panel.
-
-## Layout (top to bottom)
-
-1. **Hero heading row** — `<h1 class="dn-h1">` with the user's first name + greeting that varies by time-of-day ("Good morning, …", "Good evening, …"). One-line subheading underneath.
-
-2. **3D avatar strip** — horizontally-scrolling rail of the user's most-recent **5–8 avatars**, each rendered as a live `<threews-avatar avatar-id="…" hide-chrome bg="transparent">` web component inside a 240×320 portrait card. The web component is loaded by including `<script src="/embed.js"></script>` once in the page HTML. Each card shows the avatar name underneath and is clickable → navigates to `/avatars/<id>` (the existing avatar-page route, not `/dashboard-next/avatars/<id>`). Empty state: the `.dn-empty` block with CTA "Create your first avatar" → `/create`.
-
-3. **KPI row** — four `.dn-panel` cards in a CSS grid (`repeat(auto-fit, minmax(180px, 1fr))`):
- - **Avatars** (count) — `/api/avatars?limit=1` returns `total` or count the page; fall back to length
- - **Widgets** (count) — `/api/widgets`
- - **30-day revenue** (`formatUsdc`) — `/api/billing/revenue?from=<30d ago iso>&to=<now iso>&granularity=day`, sum the points
- - **Active subscriptions** (count) — pick the cheapest endpoint that returns this; if none exists, leave the KPI labelled "Subscriptions" with `—` and a tooltip explaining no endpoint yet
- Each card has a tiny sparkline at the bottom built from the relevant series (revenue card uses the revenue series directly; counts can show a 7-bar microbar from past activity — if no per-day series exists, omit the sparkline rather than fake one).
-
-4. **Quick actions grid** — six small cards in two rows, each a CSS-grid item:
- - "Create avatar from selfie" → `/create/selfie`
- - "Upload a GLB" → `/create` (or `/dashboard-next/avatars` once that lands)
- - "Make a widget" → `/widget-studio`
- - "Issue an API key" → `/dashboard-next/api`
- - "Set up an agent" → `/dashboard-next/account`
- - "View revenue" → `/dashboard-next/monetize`
- Use the inline-SVG icons already in `src/dashboard-next/nav.js` (`ICONS`).
-
-5. **Recent activity preview** — a `.dn-panel` showing the **last 6 events** from `/api/events?limit=6` (or the dashboard.js endpoint that already powers Activity). Each row: icon, plain-English summary, `relTime(iso)`. Empty state inside the panel says "No activity yet — your first widget view will show up here." Link at the bottom: "Open full activity →" which dispatches `window.dispatchEvent(new CustomEvent('dn:drawer:toggled', { detail: { open: true } }))` *and* sets the topbar drawer toggle. Simpler: read `localStorage.setItem('dn:drawer:open', '1')` then click the toggle button programmatically.
-
-## Files you create / modify
-
-- **Replace** `src/dashboard-next/pages/home.js` (already exists as placeholder)
-- **Modify** `pages/dashboard-next/index.html` — add `<script src="/embed.js"></script>` before the home.js module script
-- That's it. Do not touch any other file.
-
-## Data wiring rules
-
-- Use `requireUser()` first. If the user has zero avatars, render the empty-state CTA in the 3D strip rather than empty cards.
-- KPI cards each fetch independently and show their own `.dn-skeleton` until data lands.
-- A single failed KPI fetch must not break the others — wrap each in `try/catch` and show `—` with a tiny "couldn't load" tooltip via `title="…"`.
-- Hide the activity panel entirely (don't show an error) if `/api/events` returns 404 — that's a known unbuilt endpoint, not an error worth surfacing.
-
-## Visual quality bar
-
-- The hero 3D strip is the visual signature of the page. Each card should have a soft inner glow (`box-shadow: inset 0 -40px 60px -30px var(--nxt-accent-soft)`) and a 1px stroke (`--nxt-stroke`). Rounded corners `var(--nxt-radius)`. On hover, scale to 1.02 over 200ms.
-- KPI numbers in `--nxt-ink`, 28px, font-weight 600, letter-spacing -0.02em. The label above in `--nxt-ink-dim`, 11.5px, uppercase, letter-spacing 0.08em.
-- Quick-action cards have a subtle hover treatment (`background: rgba(255,255,255,0.04)` → `0.07` on hover). Icon left-aligned in `--nxt-accent`, label right.
-
-## Verification
-
-Smoke-test screenshot at `/tmp/dn-home.png` per the recipe in `_shared.md`. Open the image and verify:
-- 3D avatars actually render (you'll see faces / models, not just empty cards)
-- KPIs show real numbers (or `—` if no data, never `NaN` or `undefined`)
-- Quick-action grid is six items, no broken icons
-- Activity panel either shows real events or is hidden
-
-Then `npx vite build` must succeed, and `npx vitest run tests/api/widgets.test.js tests/api/widget-knowledge-helpers.test.js` must pass (defensive check that you didn't break anything).
-
-## Commit message
-
-`dashboard-next: overview page — 3D avatar strip + KPIs + activity preview`
diff --git a/prompts/dashboard-next/07-account.md b/prompts/dashboard-next/07-account.md
new file mode 100644
index 000000000..a43d814e4
--- /dev/null
+++ b/prompts/dashboard-next/07-account.md
@@ -0,0 +1,92 @@
+# 07 — Account page
+
+**Read `prompts/dashboard-next/_shared.md` first.** Then build the slice below.
+
+## Your slice
+
+Build the Account page at **`/dashboard-next/account`** — consolidates profile, wallets, SNS domains, delegation, action log, and settings.
+
+## Layout
+
+1. **Header** — `.dn-h1` "Account" / `.dn-h1-sub` "Profile, wallets, and the audit trail."
+
+2. **Profile section** — `.dn-panel`:
+ - Avatar / initials circle (use `initialsOf(me)`) on the left
+ - Display name (editable inline — pencil hover → input → blur saves via `PATCH /api/auth/me`)
+ - Handle (`@…`), email (verified chip if `email_verified`)
+ - Member since (`relTime(created_at)`) and current plan name (link to `/dashboard-next/monetize`)
+ - Sign-out button (`.dn-btn.ghost`) on the right → POST `/api/auth/logout` then redirect to `/`
+
+3. **Wallets section** — `.dn-panel`:
+ - Subtitle: "Linked addresses that can claim royalties, pay for subscriptions, or sign as you."
+ - Table: chain (chip — `.dn-tag` Solana / Base / Ethereum / Polygon, color-coded) · address (mono, truncated `0x123…abc` with copy-on-click) · linked when (`relTime`) · primary chip (if `is_primary`) · disconnect button
+ - "+ Link wallet" → opens chain picker → fires the existing connect flow (read `src/wallet/connect-button.js` and `src/wallet-auth.js` for the sign-in handshake — match it)
+ - "Make primary" action on rows that aren't primary
+
+4. **SNS / handle domains** — `.dn-panel`:
+ - List the user's SNS (Solana name service) domains owned + which point at this account
+ - Each row: domain · status (`.dn-tag.success` "Active" / `.dn-tag.warn` "Pending") · expiry
+ - "+ Register a domain" → links to `/vanity-wallet` or the existing SNS flow under `public/dashboard/sns.html` — match that page's behavior
+
+5. **Delegation** — `.dn-panel`:
+ - Subtitle: "Let another wallet sign on behalf of one of your agents."
+ - Per-agent delegation row: agent name · delegate address · expires · revoke
+ - "+ New delegation" → modal with agent dropdown + delegate address + expiry
+
+6. **Action log** — `.dn-panel`:
+ - Table of last 50 events: when · category (Auth · Avatar · Widget · Payment · Settings) · description · IP (truncated) · agent string (truncated)
+ - "Export full log (CSV)" button → triggers download via `GET /api/audit-log?format=csv` (or the existing path)
+ - Pagination: cursor or "Load older"
+
+## Files you create
+
+- `pages/dashboard-next/account.html`
+- `src/dashboard-next/pages/account.js`
+
+Do not modify any other file.
+
+## API endpoints
+
+Read these existing files for the canonical patterns:
+- `public/dashboard/account.html` (profile + sign-out)
+- `public/dashboard/wallets.html` (wallet list/link)
+- `public/dashboard/sns.html` (SNS domains)
+- `public/dashboard/delegation.html` (delegation)
+- `public/dashboard/actions.html` (action log)
+- `src/wallet-auth.js`, `src/wallet/connect-button.js` (wallet linking handshake)
+
+Likely:
+- `GET /api/auth/me`, `PATCH /api/auth/me`, `POST /api/auth/logout`
+- `GET /api/wallets` / `POST /api/wallets` / `DELETE /api/wallets/:id`
+- `GET /api/sns/domains?owner=me`
+- `GET /api/agents/:id/delegations` / `POST /api/agents/:id/delegations` / `DELETE /api/agents/:id/delegations/:delegateId`
+- `GET /api/audit-log?cursor=…&limit=50` / `GET /api/audit-log?format=csv`
+
+## Empty / loading / error states
+
+- No wallets: `.dn-empty` inside the section with "+ Link wallet" CTA
+- No delegations: short prose explainer with CTA
+- Action log empty: `.dn-empty` "Audit log will appear here as you make changes."
+
+## Visual quality bar
+
+- Chain chips color-coded: Solana purple, Base blue, Ethereum gray, Polygon magenta, Optimism red — use semi-transparent accents over the panel background
+- Wallet addresses use `font-family: 'JetBrains Mono', ui-monospace, monospace`, copy-on-click with toast "Copied"
+- "Primary" badge is a small star icon left of the chain chip
+
+## Verification
+
+```bash
+node scripts/_dn-shot.mjs http://127.0.0.1:3010/dashboard-next/account /tmp/dn-account.png
+```
+Verify:
+- Profile loads with real user data
+- Wallets table renders or empty state
+- Action log shows real events
+- No console errors
+
+`npx vite build` passes.
+
+## Commit message
+
+`dashboard-next: account page — profile + wallets + SNS + delegation + action log`
diff --git a/prompts/dashboard-next/08-palette.md b/prompts/dashboard-next/08-palette.md
new file mode 100644
index 000000000..df13fae2b
--- /dev/null
+++ b/prompts/dashboard-next/08-palette.md
@@ -0,0 +1,130 @@
+# 08 — Command palette (full replace)
+
+**Read `prompts/dashboard-next/_shared.md` first.** Rules, helpers, smoke-test recipe, and commit guidance all live there.
+
+## Your slice
+
+Replace the foundation stub at **`src/dashboard-next/components/palette.js`** with a full-featured command palette. The stub already handles open/close/keyboard and basic filtering — you're upgrading it with fuzzy search, recent history, action handlers beyond navigation, and keyboard accessibility polish.
+
+## Files you own
+
+- `src/dashboard-next/components/palette.js` — **full replace** (the stub comment says "Prompt #8 replaces this")
+
+Do not modify any other file. The shell.js imports this via `mountPaletteBehavior()` — keep that export name.
+
+## What the palette does
+
+### Trigger
+- Keyboard: ⌘K / Ctrl+K (already wired in `topbar.js`)
+- Event: `window.dispatchEvent(new CustomEvent('dn:palette:open'))` (keep this working)
+- Close: Escape, click outside, or selecting an item
+
+### Items (five types)
+
+**1. Navigation** — every route from `nav.js`. Show: icon (from `ICONS`), label, group name right-aligned. Selecting navigates via `location.href`.
+
+**2. Recent pages** — last 6 pages visited, stored in `localStorage` under `dn:recent`. Each visit to a dashboard-next route pushes its `path` + `label` + `timestamp`. Show a "Recent" section above navigation when query is empty. Selecting navigates.
+
+**3. Actions** — hardcoded shortcuts that fire JS, not navigation:
+| Label | Group | Action |
+|---|---|---|
+| "Upload a GLB" | Create | `location.href = '/create'` |
+| "Create from selfie" | Create | `location.href = '/create/selfie'` |
+| "New widget" | Distribute | `location.href = '/widget-studio'` |
+| "Issue API key" | Distribute | fires `window.dispatchEvent(new CustomEvent('dn:action:new-api-key'))` |
+| "Sign out" | Account | `POST /api/auth/logout` then redirect `/` |
+
+**4. Avatar quick-jump** — when the user types more than 2 chars, search their avatars: `GET /api/avatars?q=<query>&limit=5`. Show avatar name + "Open avatar" label. Selecting goes to `/a/<handle>` or `/avatar-page.html?id=<id>`. Show a loading spinner next to the input while the fetch is in flight (debounce 200ms).
+
+**5. Help / docs** — static list of doc links visible when query is empty or matches:
+- "Docs home" → `/docs`
+- "ERC-8004 spec" → `https://eips.ethereum.org/EIPS/eip-8004`
+- "API reference" → `/docs/api`
+
+### Rendering
+
+```
+┌─────────────────────────────────────────────────────────────┐
+│ 🔍 Search or jump to… ⌘K │
+├─────────────────────────────────────────────────────────────┤
+│ RECENT │
+│ 🏠 Overview Create 2m ago │
+│ 💰 Monetize Monetize 18m ago │
+├─────────────────────────────────────────────────────────────┤
+│ NAVIGATION │
+│ 👤 Avatars Create │
+│ 📚 Library Create │
+│ … │
+├─────────────────────────────────────────────────────────────┤
+│ ACTIONS │
+│ ⬆ Upload a GLB Create │
+│ … │
+└─────────────────────────────────────────────────────────────┘
+```
+
+Sections with no matching items are hidden entirely. When query is non-empty, collapse the "Recent" section and merge all matching items (nav + actions + avatar results) into a single flat list sorted by: actions first, then nav, then avatar results.
+
+### Keyboard navigation
+
+- Arrow Up / Down: move the highlight. Wrap around.
+- Enter: activate highlighted item.
+- The highlighted item scrolls into view.
+- Tab: move focus within the input / list (standard browser behavior — don't intercept it).
+
+### Fuzzy matching
+
+Use a simple scorer — no library:
+```js
+function score(query, text) {
+ const q = query.toLowerCase();
+ const t = text.toLowerCase();
+ if (t === q) return 3;
+ if (t.startsWith(q)) return 2;
+ if (t.includes(q)) return 1;
+ // character-walk fuzzy
+ let qi = 0;
+ for (const c of t) { if (c === q[qi]) qi++; }
+ return qi === q.length ? 0.5 : 0;
+}
+```
+Items with `score === 0` are hidden.
+
+### Visual spec
+
+- Overlay: `position:fixed; inset:0; z-index:100; background:rgba(2,3,6,0.6); backdrop-filter:blur(8px)`. Fade in 120ms.
+- Dialog: `width: min(580px, 92vw)`. `background: linear-gradient(180deg, rgba(28,29,39,0.97), rgba(18,19,26,0.97))`. `border: 1px solid var(--nxt-stroke-strong)`. `border-radius: var(--nxt-radius)`. `box-shadow: 0 30px 80px rgba(0,0,0,0.6)`.
+- Input: 16px, `color: var(--nxt-ink)`, no border, transparent bg, `padding: 16px 18px`, border-bottom `1px solid var(--nxt-stroke)`.
+- Section header: `font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nxt-ink-fade); padding: 10px 12px 4px`.
+- Item: `display:flex; align-items:center; gap:12px; padding: 10px 12px; border-radius: 8px; font-size: 13.5px; cursor:pointer`. Highlighted: `background: var(--nxt-accent-soft)`.
+- Icon: 16×16 SVG from `ICONS` dict, or a Unicode glyph fallback. Color `var(--nxt-accent)` when highlighted.
+- Group label right-aligned: `font-size: 11px; color: var(--nxt-ink-fade)`.
+- Recent timestamp right-aligned: `font-size: 11px; color: var(--nxt-ink-fade)`.
+- Loading spinner next to the input: a 12px CSS spinner (`border: 2px solid var(--nxt-stroke); border-top-color: var(--nxt-accent); animation: spin 0.7s linear infinite`) shown only during the avatar fetch.
+
+## Smoke test
+
+Open the page at `http://127.0.0.1:3010/dashboard-next`, press ⌘K (simulate via `p.keyboard.press('Meta+k')`):
+```bash
+cat > scripts/_dn-palette-shot.mjs << 'EOF'
+import { chromium } from 'playwright';
+const b = await chromium.launch({ args: ['--use-gl=swiftshader','--no-sandbox'] });
+const p = await (await b.newContext({ viewport: { width: 1440, height: 900 } })).newPage();
+const errs = [];
+p.on('pageerror', e => errs.push(e.message.slice(0,200)));
+p.on('console', m => { if (m.type()==='error') errs.push(m.text().slice(0,200)); });
+await p.goto('http://127.0.0.1:3010/dashboard-next', { waitUntil: 'networkidle', timeout: 60000 });
+await p.keyboard.press('Meta+k');
+await p.waitForSelector('#dn-palette[style*="flex"]', { timeout: 5000 });
+await p.screenshot({ path: '/tmp/dn-palette.png' });
+console.log('saved /tmp/dn-palette.png');
+if (errs.length) { errs.forEach(e => console.log('ERR', e)); process.exit(1); }
+await b.close();
+EOF
+node scripts/_dn-palette-shot.mjs
+rm scripts/_dn-palette-shot.mjs
+```
+`Read /tmp/dn-palette.png` — verify the overlay renders, sections visible, no console errors. `npx vite build` passes.
+
+## Commit message
+
+`dashboard-next: command palette — fuzzy search, recent history, action shortcuts, avatar jump`
diff --git a/prompts/dashboard-next/09-activity-drawer.md b/prompts/dashboard-next/09-activity-drawer.md
new file mode 100644
index 000000000..cda89182e
--- /dev/null
+++ b/prompts/dashboard-next/09-activity-drawer.md
@@ -0,0 +1,106 @@
+# 09 — Activity drawer — live feed
+
+**Read `prompts/dashboard-next/_shared.md` first.** Then build the slice below.
+
+## Your slice
+
+Replace the **stub** at [src/dashboard-next/components/drawer.js](src/dashboard-next/components/drawer.js) with a real activity feed: live events streamed from the server (SSE if available, otherwise polling), grouped by day, with filter chips and a relative-time formatter that auto-updates.
+
+## Behaviour spec
+
+- Drawer slot, design, and open/close plumbing already exist. Topbar toggle and ⌘K command (after prompt #08 lands) both fire `dn:drawer:toggled` events.
+- When the drawer is open, fetch and render. When closed, pause the stream (don't fetch in background — wasteful).
+- Persist filter selection in `localStorage` under `dn:drawer:filters`.
+
+## Layout (inside the existing `<aside class="dn-drawer">`)
+
+1. **Header** (already in place — preserve the title + close button structure)
+
+2. **Filter chip row** — under the header, scrollable horizontally if it overflows:
+ - All · Widget views · Chat turns · Payments · Avatar edits · Withdrawals · Sign-ins
+ - Multi-select (click toggles). Empty selection = All.
+
+3. **Event list** — scrollable, grouped by day:
+ ```
+ ── Today ─────────────────
+ [icon] Widget viewed · wdgt_abc · 2m ago
+ [icon] Payment received · $0.50 · 17m ago
+ [icon] Chat turn · "What's the weather?" · 28m ago
+ ── Yesterday ────────────
+ [icon] Avatar updated · Bunny v2 · 1d ago
+ ...
+ ```
+ - Each row shows: icon (per category, color-coded), title, secondary subtitle (when relevant), relative time on the right
+ - Click expands the row inline to show full details + a link "Open in viewer" / "Open transcript" / "Open payment" depending on category
+ - Use `relTime(iso)` from `api.js`. Re-render `relTime` every 30 seconds for visible rows (use a single `setInterval` while the drawer is open, clear on close)
+
+## Stream / poll strategy
+
+1. **Check for SSE first.** Try opening `new EventSource('/api/events/stream')`. If it connects (one event received within 5s), use that. Subscribe to event types: `widget.view`, `widget.chat_turn`, `payment.received`, `avatar.updated`, `withdrawal.completed`, `auth.signin`.
+
+2. **Fallback to polling.** If SSE not available (404 / connection error), poll `GET /api/events?since=<lastEventTs>&limit=20` every 8 seconds. Use `If-None-Match`-style cursor: pass the latest event id you've seen.
+
+3. **Backoff on error.** If polling fails 3 times in a row, double the interval up to 60s. Surface a tiny "Reconnecting…" chip at the top of the drawer (replace with checkmark when next request succeeds).
+
+4. **Optimistic insertion.** New events get inserted at the top with a 200ms slide-down + brief accent highlight (animate `background` from `--nxt-accent-soft` to transparent).
+
+## Files you create / replace
+
+- **Replace** `src/dashboard-next/components/drawer.js`
+- Optionally add `src/dashboard-next/components/drawer-stream.js` for the SSE/poll logic if it gets large
+
+Do not modify any other file.
+
+## Event icons (inline SVG, ~16px)
+
+| Category | Icon |
+|---|---|
+| `widget.view` | eye |
+| `widget.chat_turn` | speech bubble |
+| `payment.received` | dollar sign |
+| `avatar.updated` | edit pencil |
+| `withdrawal.completed` | arrow-down-circle |
+| `auth.signin` | shield-check |
+| (unknown) | dot |
+
+Use `--nxt-accent` for payments and withdrawals, `--nxt-success` for sign-ins, neutral `--nxt-ink-dim` for the rest.
+
+## Empty / loading / error states
+
+- First load: skeleton rows (4 of them) inside the list
+- No events ever: `.dn-empty` "No activity yet. Embed a widget or issue an API key — events will land here as they happen."
+- Stream / poll failure: tiny "Reconnecting…" chip at the top of the drawer, never a full error blanking the panel
+
+## Endpoints
+
+Inspect `src/dashboard/dashboard.js` and `public/dashboard/actions.html` for the existing event endpoint shape. If the endpoint is named differently (e.g. `/api/audit-log` or `/api/activity`), use that — the API endpoint and event shape are whatever the existing code uses. **Do not invent a new endpoint.** If no event endpoint exists, render only the empty state with a one-line "Live activity is coming soon — wire it up at /api/events when ready."
+
+## Visual quality bar
+
+- Day separators: 11px uppercase `--nxt-ink-fade`, with a 1px stroke line on either side
+- Event rows: 12px vertical padding, hover background `rgba(255,255,255,0.03)`, click to expand
+- Expanded detail block: monospace font for ids, soft accent background card
+
+## Verification
+
+```bash
+node scripts/_dn-shot.mjs "http://127.0.0.1:3010/dashboard-next?drawer=open" /tmp/dn-drawer.png
+```
+The drawer is closed by default — in the screenshot script, before taking the shot, open it:
+```js
+await p.evaluate(() => {
+ localStorage.setItem('dn:drawer:open', '1');
+});
+await p.reload({ waitUntil: 'networkidle' });
+await p.waitForSelector('.dn-drawer[aria-label="Activity"]', { state: 'visible' });
+```
+Verify:
+- Drawer renders with filter chips + event rows OR empty state
+- No console errors
+- A `Failed to load: /api/events/stream` 404 is acceptable IF the page then successfully starts polling
+
+`npx vite build` passes.
+
+## Commit message
+
+`dashboard-next: drawer — live activity stream (SSE+poll) with filters and day grouping`
diff --git a/prompts/dashboard-next/10-polish-pass.md b/prompts/dashboard-next/10-polish-pass.md
new file mode 100644
index 000000000..4f9e224ab
--- /dev/null
+++ b/prompts/dashboard-next/10-polish-pass.md
@@ -0,0 +1,127 @@
+# 10 — Polish pass (motion, focus, mobile, perf, a11y)
+
+**Read `prompts/dashboard-next/_shared.md` first.** Then build the slice below.
+
+## Your slice
+
+A cross-cutting polish pass over `/dashboard-next`. This prompt **assumes the other slices have landed**, so you'll be touching shell CSS, JS, and reviewing the existing pages. If a page doesn't exist yet because its prompt hasn't run, skip checks against it — just leave any CSS rules that would apply to it in place (they'll activate when the page lands).
+
+This is the "make it feel premium" pass.
+
+## Scope
+
+### 1. Motion + micro-interactions
+
+Add subtle, performant motion in `public/dashboard-next/shell.css`:
+- Page-load fade-in (200ms ease-out) on `.dn-main-inner` (single transform/opacity, no layout shift)
+- Hover lift on `.dn-panel` (translateY(-1px) + soft accent shadow, 160ms)
+- Active-state press on `.dn-btn` (scale(0.98), 100ms)
+- Sidebar collapse / expand: animate the grid-template-columns change (use the `transition` shorthand on `.dn-shell`)
+- Drawer open / close: 220ms ease-out slide-in from the right
+- Subtle accent pulse on the topbar drawer toggle when the drawer receives a new event (listen for `dn:drawer:new-event` window event — if prompt #9 dispatched it; otherwise add a comment that it'll wire up later)
+
+All motion should respect `prefers-reduced-motion: reduce` — wrap each `@keyframes` / transition rule in a media query that flips it off.
+
+### 2. Focus rings + keyboard nav
+
+- Every interactive element gets a visible focus ring (`outline: 2px solid var(--nxt-accent); outline-offset: 2px;`)
+- Sidebar items are keyboard-navigable in DOM order (no `tabindex="-1"` traps)
+- `Tab` from the input inside the palette doesn't escape the overlay (focus trap — capture and cycle within the palette)
+- `Esc` closes the palette and any open popover / modal
+- Skip-link at the top of the shell: `<a href="#dn-main" class="dn-skip">Skip to content</a>`, hidden until focused, then jumps to the main content slot
+
+### 3. Mobile / responsive QA
+
+The shell.css already has a `@media (max-width: 880px)` block. Verify and tighten:
+- Sidebar collapses into a bottom tab bar at ≤880px (icons + tiny labels, 4–5 items max — pick the most important from each group: Overview · Avatars · Widgets · Money · Account)
+- Topbar shrinks: hide the breadcrumb, keep search button and user chip
+- Drawer becomes a full-screen sheet at ≤640px (slides up from bottom)
+- All page grids reflow to single column at ≤640px
+- Tap targets ≥44px tall
+
+Test at 375px (iPhone SE), 768px (iPad portrait), 1024px (iPad landscape), 1440px (desktop). Take a screenshot at each breakpoint.
+
+### 4. Performance
+
+- `<threews-avatar>` and iframe widgets MUST be lazy-loaded (IntersectionObserver, root margin 200px). If a prompt-2 or prompt-3 page didn't do this, fix it.
+- Verify all images use `loading="lazy"` and `decoding="async"`
+- No blocking webfonts: ensure `font-display: swap` in `public/fonts/fonts.css` (only edit if it's missing — leave existing rules untouched otherwise)
+- Lighthouse-equivalent: open `/dashboard-next` in headless Chrome, capture performance metrics via CDP — log FCP and LCP. Document the numbers in the commit message.
+
+### 5. Accessibility audit
+
+- Every interactive element has an accessible name (`aria-label` or visible text)
+- Color contrast ≥4.5:1 for text (the palette already passes; verify by spot-checking the cards)
+- Screen reader smoke: open `/dashboard-next` and check that the sidebar is announced as a `<nav aria-label="Dashboard sections">`, the main area as `<main>`, the drawer as `<aside aria-label="Activity">` (foundation already does this — verify)
+
+### 6. Empty-state quality pass
+
+Walk through every page and verify the empty state matches the bar:
+- A short title (max 5 words)
+- A one-sentence explainer
+- A single primary CTA
+- Optional secondary CTA only when there's genuinely a second path
+
+## Files you may create / modify
+
+- **Modify** `public/dashboard-next/shell.css` (additions only — don't remove existing rules)
+- **Modify** `src/dashboard-next/shell.js` (add skip-link if missing, focus trap for any modal helpers)
+- **Modify** `src/dashboard-next/components/palette.js` (focus trap — only if prompt #8 didn't already add it)
+- **Modify** individual page files **only** to fix obvious bugs you encounter (e.g. missing `loading="lazy"`); document each modification in the commit body. Do NOT redesign pages.
+
+Do not modify `nav.js`, `api.js`, `tokens.css`.
+
+## Verification
+
+Take screenshots at four widths:
+```bash
+cat > scripts/_dn-shot-mobile.mjs <<'EOF'
+import { chromium } from 'playwright';
+const url = process.argv[2]; const out = process.argv[3]; const w = Number(process.argv[4]);
+const b = await chromium.launch({ args: ['--use-gl=swiftshader','--no-sandbox'] });
+const p = await (await b.newContext({ viewport: { width: w, height: 900 } })).newPage();
+const errs = [];
+p.on('pageerror', e => errs.push('PAGEERROR ' + e.message.slice(0,200)));
+p.on('console', m => { if (m.type() === 'error') errs.push('[err] ' + m.text().slice(0,200)); });
+await p.goto(url, { waitUntil: 'networkidle', timeout: 60000 });
+await p.waitForSelector('.dn-shell', { timeout: 20000 });
+await p.screenshot({ path: out, fullPage: true });
+console.log('saved', out);
+if (errs.length) { console.log('errors:'); for (const e of errs) console.log(' ' + e); process.exit(1); }
+await b.close();
+EOF
+
+for w in 375 768 1024 1440; do
+ node scripts/_dn-shot-mobile.mjs http://127.0.0.1:3010/dashboard-next /tmp/dn-polish-$w.png $w
+done
+rm scripts/_dn-shot-mobile.mjs
+```
+Open all four. Verify:
+- 375px: bottom tab bar, single-column content, all tap targets reachable
+- 768px: bottom tab bar still, content uses available width
+- 1024px: sidebar visible, content in 2-column grid where appropriate
+- 1440px: full three-column shell (if drawer is open) — drawer can be opened in the script via `localStorage.setItem('dn:drawer:open', '1')` before navigation
+
+Lighthouse-equivalent perf:
+```js
+// in headless playwright, after page load:
+const metrics = await p.evaluate(() => JSON.stringify(performance.getEntriesByType('navigation')));
+console.log('nav:', metrics);
+const lcp = await p.evaluate(() => new Promise(r => new PerformanceObserver(l => r(l.getEntries().pop()?.startTime ?? null)).observe({ type: 'largest-contentful-paint', buffered: true })));
+console.log('lcp:', lcp);
+```
+Document FCP / LCP in the commit body.
+
+`npx vite build` and `npx vitest run` must both pass.
+
+## Commit message
+
+```
+dashboard-next: polish pass — motion, focus rings, mobile QA, perf, a11y
+
+- Motion: page-load fade-in, panel hover lift, button press, drawer slide
+- Focus: visible rings, skip-link, palette focus trap
+- Mobile: bottom-tab nav ≤880px, full-sheet drawer ≤640px
+- Perf: lazy 3D + iframes (LCP <Xms / FCP <Yms on /dashboard-next)
+- A11y: aria labels, contrast pass
+```
diff --git a/prompts/dashboard-next/11-mobile-nav.md b/prompts/dashboard-next/11-mobile-nav.md
new file mode 100644
index 000000000..b47ca25c5
--- /dev/null
+++ b/prompts/dashboard-next/11-mobile-nav.md
@@ -0,0 +1,296 @@
+# 09 — Mobile bottom navigation
+
+**Read `prompts/dashboard-next/_shared.md` first.** Rules, helpers, smoke-test recipe, and commit guidance all live there.
+
+## Your slice
+
+The shell CSS already converts the sidebar to a bottom nav bar at ≤880px (the rail becomes `position:fixed; bottom:0; height:64px; flex-direction:row`). But it spills all 7 nav items into a horizontal scroll which is cramped. This prompt upgrades the mobile nav to show exactly **5 items max** in the bar with a "More" item that opens a bottom sheet for the rest.
+
+## Files you own
+
+- `public/dashboard-next/shell.css` — add/replace only the `@media (max-width: 880px)` block (lines ~413–455). Do not change anything above it.
+- `src/dashboard-next/components/sidebar.js` — add mobile-specific rendering logic (a `renderMobileNav()` helper and a `mountMobileNavBehavior(shellEl)` function). Do not change `renderSidebar` or `mountSidebarBehavior`.
+- `src/dashboard-next/shell.js` — call `renderMobileNav()` and `mountMobileNavBehavior()` on the shell element, conditional on viewport width. Do this **after** the existing `mountSidebarBehavior` call.
+
+Do not modify any other file. In particular: do not change `tokens.css`, `nav.js`, `api.js`, or any page JS file.
+
+## Behaviour
+
+### Bottom bar (≤880px)
+
+Show the **first 4 nav items** from `NAV` plus a "More" item as the 5th slot:
+
+| Slot | Item |
+|---|---|
+| 1 | Overview (home icon) |
+| 2 | Avatars (avatar icon) |
+| 3 | Widgets (widget icon) |
+| 4 | Monetize (coin icon) |
+| 5 | "More" (three-dots icon, see SVG below) |
+
+Each tab: icon 22×22, label 10.5px below. Active tab: `background: var(--nxt-accent-soft)`, icon and label in `var(--nxt-accent)`. Tap area min 56px wide.
+
+"More" icon SVG:
+```html
+<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><circle cx="4" cy="10" r="1.2" fill="currentColor" stroke="none"/><circle cx="10" cy="10" r="1.2" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1.2" fill="currentColor" stroke="none"/></svg>
+```
+
+### "More" bottom sheet
+
+Tapping "More" slides up a bottom sheet (a `<div>` that translates from `translateY(100%)` to `translateY(0)` over 240ms `cubic-bezier(0.2,0.8,0.2,1)`), overlaying a semi-transparent backdrop.
+
+The sheet contains:
+- A drag handle bar (32×4px pill, centered, `background: var(--nxt-stroke-strong)`)
+- Remaining nav items: Library, API & Embed, Account — same row format as the sidebar items (icon + label)
+- A divider
+- "Collapse sidebar" is hidden on mobile; replace with "Settings" → `/settings`
+- "⌘K Command palette" button → fires `window.dispatchEvent(new CustomEvent('dn:palette:open'))`
+
+Close the sheet on: backdrop click, swipe-down drag ≥60px, Escape key.
+
+### Swipe-to-close
+
+Track `touchstart` / `touchmove` / `touchend` on the sheet. If the user drags down by ≥60px before lifting, animate the sheet back down and remove it.
+
+### No horizontal scroll
+
+The existing mobile CSS uses `overflow-x: auto` on `.dn-rail-scroll`. Replace this so the bar never scrolls — it always shows exactly 5 fixed-width slots.
+
+## CSS changes (inside `@media (max-width: 880px)`)
+
+Replace the existing block with:
+
+```css
+@media (max-width: 880px) {
+ .dn-shell,
+ .dn-shell[data-rail-collapsed='true'] {
+ grid-template-columns: 1fr;
+ grid-template-rows: var(--dn-topbar-h) 1fr 64px;
+ grid-template-areas: 'topbar' 'main' 'rail';
+ }
+ .dn-rail {
+ flex-direction: row;
+ position: fixed;
+ bottom: 0; left: 0; right: 0;
+ height: 64px;
+ border-right: none;
+ border-top: 1px solid var(--nxt-stroke);
+ background: var(--nxt-glass-strong);
+ backdrop-filter: blur(16px);
+ -webkit-backdrop-filter: blur(16px);
+ z-index: 20;
+ }
+ .dn-rail-head, .dn-rail-foot, .dn-rail-group-label { display: none; }
+ .dn-rail-scroll {
+ display: grid;
+ grid-template-columns: repeat(5, 1fr);
+ padding: 0;
+ gap: 0;
+ overflow: hidden;
+ }
+ /* hide all nav items except the 5 mobile slots injected by JS */
+ .dn-rail-group { display: none; }
+ .dn-rail-mobile-slot {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 3px;
+ font-size: 10.5px;
+ color: var(--nxt-ink-dim);
+ padding: 6px 4px;
+ cursor: pointer;
+ border: none;
+ background: transparent;
+ font-family: inherit;
+ text-decoration: none;
+ transition: color 0.12s, background 0.12s;
+ min-width: 0;
+ }
+ .dn-rail-mobile-slot:hover,
+ .dn-rail-mobile-slot[aria-current='page'],
+ .dn-rail-mobile-slot.active {
+ color: var(--nxt-accent);
+ background: var(--nxt-accent-soft);
+ }
+ .dn-rail-mobile-slot svg {
+ width: 22px; height: 22px; flex-shrink: 0;
+ }
+ .dn-rail-mobile-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
+ /* bottom sheet */
+ .dn-mobile-sheet-backdrop {
+ position: fixed; inset: 0; z-index: 40;
+ background: rgba(0,0,0,0.5);
+ backdrop-filter: blur(4px);
+ -webkit-backdrop-filter: blur(4px);
+ }
+ .dn-mobile-sheet {
+ position: fixed; bottom: 64px; left: 0; right: 0; z-index: 41;
+ background: var(--nxt-bg-1);
+ border-top: 1px solid var(--nxt-stroke-strong);
+ border-radius: 18px 18px 0 0;
+ padding: 8px 0 env(safe-area-inset-bottom,0) 0;
+ transform: translateY(100%);
+ transition: transform 240ms cubic-bezier(0.2,0.8,0.2,1);
+ touch-action: none;
+ }
+ .dn-mobile-sheet.open { transform: translateY(0); }
+ .dn-mobile-sheet-handle {
+ width: 32px; height: 4px;
+ background: var(--nxt-stroke-strong);
+ border-radius: 99px;
+ margin: 6px auto 12px;
+ }
+ .dn-mobile-sheet-item {
+ display: flex; align-items: center; gap: 14px;
+ padding: 13px 20px;
+ color: var(--nxt-ink-dim);
+ font-size: 14.5px;
+ cursor: pointer;
+ border: none; background: transparent; font-family: inherit;
+ text-decoration: none; width: 100%; text-align: left;
+ transition: color 0.12s, background 0.12s;
+ }
+ .dn-mobile-sheet-item:hover,
+ .dn-mobile-sheet-item[aria-current='page'] {
+ color: var(--nxt-ink); background: rgba(255,255,255,0.04);
+ }
+ .dn-mobile-sheet-item svg { width: 20px; height: 20px; color: var(--nxt-ink-fade); flex-shrink: 0; }
+ .dn-mobile-sheet-divider {
+ height: 1px; background: var(--nxt-stroke); margin: 6px 0;
+ }
+ .dn-main-inner { padding: 18px 16px 80px; } /* extra bottom padding so content isn't under the nav */
+}
+```
+
+## JS changes in `sidebar.js`
+
+Add at the bottom of the file (do not alter existing functions):
+
+```js
+const MOBILE_NAV_ROUTES = ['/dashboard-next', '/dashboard-next/avatars', '/dashboard-next/widgets', '/dashboard-next/monetize'];
+const SHEET_ROUTES = NAV.filter(r => !MOBILE_NAV_ROUTES.includes(r.path));
+
+export function renderMobileNav(pathname) {
+ const here = currentRoute(pathname)?.path;
+ const slots = MOBILE_NAV_ROUTES.map(path => {
+ const r = NAV.find(n => n.path === path);
+ if (!r) return '';
+ const active = r.path === here ? ' aria-current="page"' : '';
+ return `<a href="${esc(r.path)}" class="dn-rail-mobile-slot"${active}>
+ <span aria-hidden="true">${ICONS[r.icon] || ''}</span>
+ <span class="dn-rail-mobile-label">${esc(r.label)}</span>
+ </a>`;
+ }).join('');
+ const moreActive = SHEET_ROUTES.some(r => r.path === here) ? ' active' : '';
+ const moreBtn = `<button type="button" class="dn-rail-mobile-slot${moreActive}" data-action="mobile-more" aria-haspopup="true">
+ <span aria-hidden="true"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><circle cx="4" cy="10" r="1.2" fill="currentColor" stroke="none"/><circle cx="10" cy="10" r="1.2" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r="1.2" fill="currentColor" stroke="none"/></svg></span>
+ <span class="dn-rail-mobile-label">More</span>
+ </button>`;
+ return `<div class="dn-rail-scroll" role="tablist" aria-label="Main navigation">${slots}${moreBtn}</div>`;
+}
+
+export function mountMobileNavBehavior(shellEl, pathname) {
+ if (window.innerWidth > 880) return;
+ // Replace the existing rail scroll with the 5-slot mobile bar
+ const rail = shellEl.querySelector('.dn-rail');
+ if (!rail) return;
+ rail.innerHTML = `
+ <div class="dn-rail-head" style="display:none"></div>
+ ${renderMobileNav(pathname)}
+ <div class="dn-rail-foot" style="display:none"></div>
+ `;
+ rail.querySelector('[data-action="mobile-more"]')?.addEventListener('click', openSheet);
+}
+
+function openSheet() {
+ const here = currentRoute(location.pathname)?.path;
+ const backdrop = document.createElement('div');
+ backdrop.className = 'dn-mobile-sheet-backdrop';
+ const sheet = document.createElement('div');
+ sheet.className = 'dn-mobile-sheet';
+ sheet.innerHTML = `
+ <div class="dn-mobile-sheet-handle" aria-hidden="true"></div>
+ ${SHEET_ROUTES.map(r => `<a href="${esc(r.path)}" class="dn-mobile-sheet-item"${r.path===here?' aria-current="page"':''}>
+ <span aria-hidden="true">${ICONS[r.icon]||''}</span>
+ <span>${esc(r.label)}</span>
+ </a>`).join('')}
+ <div class="dn-mobile-sheet-divider"></div>
+ <a href="/settings" class="dn-mobile-sheet-item">
+ <span aria-hidden="true"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6"><circle cx="10" cy="10" r="2.5"/><path d="M10 2v2M10 16v2M2 10h2M16 10h2M4.2 4.2l1.4 1.4M14.4 14.4l1.4 1.4M4.2 15.8l1.4-1.4M14.4 5.6l1.4-1.4"/></svg></span>
+ <span>Settings</span>
+ </a>
+ <button type="button" class="dn-mobile-sheet-item" onclick="window.dispatchEvent(new CustomEvent('dn:palette:open'))">
+ <span aria-hidden="true"><svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"><circle cx="8.5" cy="8.5" r="5"/><path d="M15 15l2.5 2.5"/></svg></span>
+ <span>Command palette ⌘K</span>
+ </button>
+ `;
+ document.body.appendChild(backdrop);
+ document.body.appendChild(sheet);
+ requestAnimationFrame(() => sheet.classList.add('open'));
+ const close = () => {
+ sheet.classList.remove('open');
+ backdrop.style.opacity = '0';
+ setTimeout(() => { sheet.remove(); backdrop.remove(); }, 260);
+ };
+ backdrop.addEventListener('click', close);
+ window.addEventListener('keydown', function onKey(e) { if (e.key === 'Escape') { close(); window.removeEventListener('keydown', onKey); }});
+ // Swipe-to-close
+ let startY = 0, currentY = 0;
+ sheet.addEventListener('touchstart', e => { startY = e.touches[0].clientY; }, { passive: true });
+ sheet.addEventListener('touchmove', e => {
+ currentY = e.touches[0].clientY;
+ const dy = currentY - startY;
+ if (dy > 0) sheet.style.transform = `translateY(${dy}px)`;
+ }, { passive: true });
+ sheet.addEventListener('touchend', () => {
+ if (currentY - startY >= 60) { close(); }
+ else { sheet.style.transform = ''; }
+ startY = 0; currentY = 0;
+ });
+}
+```
+
+## JS changes in `shell.js`
+
+After the existing `mountSidebarBehavior(shell)` call, add:
+
+```js
+import { mountMobileNavBehavior } from './components/sidebar.js';
+// …
+mountMobileNavBehavior(shell, location.pathname);
+```
+
+The import already exists at the top of `shell.js` — just add `mountMobileNavBehavior` to the named import list.
+
+## Smoke test
+
+Resize the Playwright viewport to 375×812 (iPhone 14 size) and take a screenshot:
+```bash
+cat > scripts/_dn-mobile-shot.mjs << 'EOF'
+import { chromium } from 'playwright';
+const b = await chromium.launch({ args: ['--use-gl=swiftshader','--no-sandbox'] });
+const p = await (await b.newContext({ viewport: { width: 375, height: 812 }, isMobile: true })).newPage();
+const errs = [];
+p.on('pageerror', e => errs.push(e.message.slice(0,200)));
+p.on('console', m => { if (m.type()==='error') errs.push(m.text().slice(0,200)); });
+await p.goto('http://127.0.0.1:3010/dashboard-next', { waitUntil: 'networkidle', timeout: 60000 });
+await p.screenshot({ path: '/tmp/dn-mobile.png' });
+await p.click('[data-action="mobile-more"]');
+await p.waitForSelector('.dn-mobile-sheet.open', { timeout: 3000 });
+await p.screenshot({ path: '/tmp/dn-mobile-sheet.png' });
+if (errs.length) { errs.forEach(e => console.log('ERR', e)); process.exit(1); }
+await b.close();
+EOF
+node scripts/_dn-mobile-shot.mjs
+rm scripts/_dn-mobile-shot.mjs
+```
+`Read /tmp/dn-mobile.png` and `/tmp/dn-mobile-sheet.png`. Verify:
+- Bottom bar shows exactly 5 slots, no horizontal scroll
+- Sheet slides up when "More" is tapped
+- No console errors
+`npx vite build` passes.
+
+## Commit message
+
+`dashboard-next: mobile nav — 5-slot bottom bar + slide-up sheet for overflow items`
diff --git a/prompts/dashboard-next/12-production-wiring.md b/prompts/dashboard-next/12-production-wiring.md
new file mode 100644
index 000000000..895861082
--- /dev/null
+++ b/prompts/dashboard-next/12-production-wiring.md
@@ -0,0 +1,153 @@
+# 10 — Production wiring
+
+**Read `prompts/dashboard-next/_shared.md` first.** Rules, helpers, smoke-test recipe, and commit guidance all live there.
+
+## Your slice
+
+The `/dashboard-next` prototype pages are built. This prompt wires the prototype into the production URL space so users can try it, and adds a discovery banner to the old dashboard.
+
+**This prompt runs after all other prompts are complete.** If you see placeholder pages at any `/dashboard-next/*` route, that's expected — ship the wiring anyway so routes resolve.
+
+## Files you own
+
+- `vercel.json` — add routing rules for the new pages
+- `public/dashboard/index.html` — add a "Try the new dashboard" banner
+- `public/dashboard-next/shell.css` — add an "⬅ Production dashboard" escape hatch link in the rail foot (≥880px only)
+
+Do not modify `nav.js`, `shell.js`, any page JS, or any other file.
+
+---
+
+## 1. vercel.json routing
+
+Read the existing `vercel.json` to understand the routing pattern. The file already has these two entries (lines ~413–466 per the summary):
+
+```json
+{ "src": "/dashboard-next", "dest": "/dashboard-next/index.html" },
+{ "src": "/dashboard-next/", "dest": "/dashboard-next/index.html" }
+```
+
+Add entries for each sub-page (after the existing two):
+
+```json
+{ "src": "/dashboard-next/avatars", "dest": "/dashboard-next/avatars.html" },
+{ "src": "/dashboard-next/avatars/", "dest": "/dashboard-next/avatars.html" },
+{ "src": "/dashboard-next/library", "dest": "/dashboard-next/library.html" },
+{ "src": "/dashboard-next/library/", "dest": "/dashboard-next/library.html" },
+{ "src": "/dashboard-next/widgets", "dest": "/dashboard-next/widgets.html" },
+{ "src": "/dashboard-next/widgets/", "dest": "/dashboard-next/widgets.html" },
+{ "src": "/dashboard-next/api", "dest": "/dashboard-next/api.html" },
+{ "src": "/dashboard-next/api/", "dest": "/dashboard-next/api.html" },
+{ "src": "/dashboard-next/monetize", "dest": "/dashboard-next/monetize.html" },
+{ "src": "/dashboard-next/monetize/", "dest": "/dashboard-next/monetize.html" },
+{ "src": "/dashboard-next/account", "dest": "/dashboard-next/account.html" },
+{ "src": "/dashboard-next/account/", "dest": "/dashboard-next/account.html" }
+```
+
+Insert these **inside the existing `/dashboard-next` route block** in `vercel.json`, not at the end of the file. Read the file first to find the right insertion point.
+
+**Important**: if any of the `.html` files don't exist yet (because that prompt hasn't run), the route still needs to be added — Vercel will 404 gracefully and the route will start working as soon as the page is deployed.
+
+---
+
+## 2. "Try the new dashboard" banner — `public/dashboard/index.html`
+
+Read `public/dashboard/index.html` first. Add a banner **inside the `<body>` tag, before `<header>`**:
+
+```html
+<div id="dn-next-banner" style="
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 12px;
+ padding: 9px 20px;
+ background: linear-gradient(90deg, rgba(154,124,255,0.12), rgba(255,92,168,0.08));
+ border-bottom: 1px solid rgba(154,124,255,0.25);
+ font-size: 13px;
+ color: #c8bfff;
+">
+ <span>
+ ✦ The redesigned dashboard is in preview —
+ <a href="/dashboard-next" style="color:#b39bff;font-weight:600;text-decoration:underline">try it now</a>
+ </span>
+ <button onclick="document.getElementById('dn-next-banner').remove();localStorage.setItem('dn-next-dismissed','1')"
+ style="background:none;border:none;color:#888;font-size:18px;cursor:pointer;line-height:1;padding:0 2px"
+ aria-label="Dismiss">&times;</button>
+</div>
+<script>
+ if (localStorage.getItem('dn-next-dismissed') === '1') {
+ document.getElementById('dn-next-banner').style.display = 'none';
+ }
+</script>
+```
+
+The banner is dismissible (× button), persists the dismiss in `localStorage`, and does not require a server round-trip. Place the `<script>` tag immediately after the banner div so it runs synchronously and avoids flash.
+
+---
+
+## 3. "⬅ Back to production" link in `shell.css` rail foot
+
+In `public/dashboard-next/shell.css`, find `.dn-rail-foot` or the rail footer section. The `shell.js` renders a "Collapse" button there. Add a second link below it (visible only on ≥880px) by injecting it via shell.js — but since this prompt owns shell.css not shell.js, add a CSS rule that shows a styled `<a>` when it appears in `.dn-rail-foot`:
+
+Actually: edit `public/dashboard-next/shell.css` to add:
+
+```css
+.dn-rail-foot-back {
+ display: block;
+ padding: 8px 16px;
+ font-size: 11px;
+ color: var(--nxt-ink-fade);
+ text-decoration: none;
+ transition: color 0.12s;
+}
+.dn-rail-foot-back:hover { color: var(--nxt-ink-dim); }
+@media (max-width: 880px) { .dn-rail-foot-back { display: none; } }
+```
+
+Then edit `src/dashboard-next/components/sidebar.js` **only** to add the link to the `renderSidebar` footer:
+
+```js
+// inside the .dn-rail-foot div, after the collapse button:
+`<a href="/dashboard" class="dn-rail-foot-back">← Production dashboard</a>`
+```
+
+Find the exact line in `renderSidebar` where `.dn-rail-foot` is built and insert the anchor after the existing collapse button.
+
+---
+
+## Smoke test
+
+After applying changes, verify:
+
+```bash
+# 1. Build succeeds
+npx vite build
+
+# 2. Dev server responds to all new routes
+nohup npx vite --port 3010 --host 127.0.0.1 > /tmp/dn-dev.log 2>&1 &
+until curl -sf -o /dev/null http://127.0.0.1:3010/dashboard-next; do sleep 2; done
+
+for route in "" /avatars /library /widgets /api /monetize /account; do
+ status=$(curl -s -o /dev/null -w "%{http_code}" "http://127.0.0.1:3010/dashboard-next${route}")
+ echo "/dashboard-next${route} → HTTP $status"
+done
+```
+
+All routes should return 200. Then take screenshots:
+
+```bash
+node scripts/_dn-shot.mjs http://127.0.0.1:3010/dashboard /tmp/dn-production-banner.png
+node scripts/_dn-shot.mjs http://127.0.0.1:3010/dashboard-next /tmp/dn-next-home.png
+```
+
+`Read /tmp/dn-production-banner.png` — verify the purple/pink "Try the new dashboard" banner appears at the top of the old dashboard.
+
+`Read /tmp/dn-next-home.png` — verify the "← Production dashboard" link is visible in the sidebar rail footer.
+
+No console errors. `npx vite build` clean.
+
+---
+
+## Commit message
+
+`dashboard-next: production wiring — vercel routes + try-new-dashboard banner + back link`