dashboard: §10.21 — strip fixtures, fix cosmetic + behavioural gaps#32
Merged
Conversation
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>
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>
mastermanas805
added a commit
that referenced
this pull request
May 12, 2026
…re removal PR #33 (caching layer §10.20) and PR #32 (fixture removal §10.21) both edited BillingPage.tsx in different places. Merge resolution keeps: - fetchBillingUsage() from #33 for the Usage panel (server-side cached 30s with singleflight) - billingErr + billingLoading state from #32 for honest error rendering when fetchBilling rejects (no more fixture-fallback lie) Drop the now-unused listResources() call in the useEffect — usage data comes from fetchBillingUsage now, not client-side aggregation. Update BillingPage.test.tsx — the two §10.21 error-state tests need to mock fetchBillingUsage too (was previously mocking listResources, which is no longer called by the page). Test gate: 172 passed, 3 skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the six fidelity gaps in RETRO-2026-05-12 §10.21:
src/api/index.ts—getStack,getStackLogs,fetchBilling503 path,listInvoices503 path,listVaultcatch,fetchActivityfinal catch all return honest empty/error results instead of mock data.src/api/fixtures.tsdeleted.AppShell.tsxreadsctx.me?.user?.email(was hardcodedaanya@acme.dev)./resources/:idno longer hardcodesflashcards-db— header renders the genericResourceuntil a dynamic per-resource title lands.11 gapsbadge on/app/contractsremoved./claim?t=<bad-jwt>renders an explicit invalid-or-expired banner + pricing CTA instead of a blank email form./app/resources/:id; data-testids +minWidth:0fix grid overflow.BillingPagenow handlesfetchBillingrejection — surfaces a real billing-unavailable banner instead of holding the skeleton.Test plan
npx tsc --noEmit— exits 0npm test -- --run— 168 passed, 3 skippedgrep -rn "FIXTURE_" src/returns only commented references (no live imports)🤖 Generated with Claude Code