Commit 2782f19
dashboard: §10.21 — strip fixtures, fix cosmetic + behavioural gaps (#32)
* dashboard: strip dev API banners + retire /stacks dupe + hide /team nav
User-facing dashboard had ContractBanner blocks ("GET /api/v1/resources ·
returns {ok: true, items: Resource[]} · Backed by resourcesH.List() ...")
on every page — that's internal dev docs that shouldn't ship to users.
Stripped from ResourcesPage, BillingPage, DeploymentsPage,
DeployDetailPage, ResourceDetailPage, TeamPage. ContractsPage keeps
them — that page IS the design-ref artifact and is meant for internal use.
Other cleanup landing in this same PR:
• Delete /app/stacks duplicate route + StacksPage.tsx — same data as
/app/deployments. UI calls them "Deployments" (user language); API
stays /api/v1/stacks (existing). One page, one route.
• Hide /app/team NavRow from sidebar — team-management features
(invitations, role changes) haven't fully shipped yet. The route
still resolves for direct-URL access.
• Replace PAGE_META /resources/:id hardcoded "flashcards-db" title
with the generic "Resource" so the H1 isn't a lie.
• Replace PAGE_META /deployments/:id hardcoded "flashcards" title
with the generic "Deployment".
Tests: 162/165 pass (3 pre-existing skips), tsc clean.
The three FIXTURE_BILLING / FIXTURE_INVOICES fallback tests in
api/index.test.ts were updated to assert error propagation instead of
fallback behavior — concurrent §10.21.1 work removed those fallbacks
from src/api/index.ts and the tests now describe reality.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* dashboard: §10.21 finish — delete fixtures.ts + close behavioural gaps
Removes the remaining FIXTURE_* fallback layer, deletes
src/api/fixtures.ts, and closes the six dashboard fidelity gaps from
RETRO-2026-05-12 §10.21:
1. fixtures.ts deleted. test-only data is inlined into
BillingPage.test.tsx — no runtime module ships mock identities.
2. avatar tooltip now reads ctx.me?.user?.email (previously hardcoded
"aanya@acme.dev"). landed in cb485cb.
3. PAGE_META /resources/:id no longer hardcodes "flashcards-db" —
header is the generic "Resource" until a per-resource dynamic
title lands. landed in cb485cb.
4. "11 gaps" badge on /contracts removed. landed in cb485cb.
5. /claim?t=<bad-jwt> renders an explicit invalid/expired banner +
pricing CTA instead of a blank email form. landed in cb485cb.
6. OverviewPage "Recently active" rows render reliably for any
resources.length >= 1; Link now targets /app/resources/:id; added
data-testids + minWidth:0 to fix grid overflow. NEW here.
BillingPage now handles the post-§10.21.1 reality where fetchBilling
can reject — surfaces a real billing-unavailable banner with the API
error message + a support mailto, instead of holding the skeleton
forever or rendering with fixture data.
Tests:
- src/pages/BillingPage.test.tsx: +2 (billing-error banner state +
error-message surfacing).
- src/pages/ClaimPage.test.tsx: +1 (claim-invalid state when ?t is
malformed).
- src/pages/OverviewPage.test.tsx: +3 (recently-active rows render,
name + type, link target is /app/resources/:id).
168 passed, 3 skipped, tsc clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b13b8ee commit 2782f19
7 files changed
Lines changed: 237 additions & 296 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
17 | 60 | | |
18 | 61 | | |
19 | 62 | | |
| |||
132 | 175 | | |
133 | 176 | | |
134 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
135 | 205 | | |
136 | 206 | | |
137 | 207 | | |
| |||
0 commit comments