Skip to content

dashboard: §10.21 — strip fixtures, fix cosmetic + behavioural gaps#32

Merged
mastermanas805 merged 2 commits into
mainfrom
fixture-removal-cosmetic-2026-05-12
May 12, 2026
Merged

dashboard: §10.21 — strip fixtures, fix cosmetic + behavioural gaps#32
mastermanas805 merged 2 commits into
mainfrom
fixture-removal-cosmetic-2026-05-12

Conversation

@mastermanas805
Copy link
Copy Markdown
Member

Summary

Closes the six fidelity gaps in RETRO-2026-05-12 §10.21:

  1. Removes the FIXTURE_ fallback layer* in src/api/index.tsgetStack, getStackLogs, fetchBilling 503 path, listInvoices 503 path, listVault catch, fetchActivity final catch all return honest empty/error results instead of mock data. src/api/fixtures.ts deleted.
  2. Avatar tooltip in AppShell.tsx reads ctx.me?.user?.email (was hardcoded aanya@acme.dev).
  3. PAGE_META /resources/:id no longer hardcodes flashcards-db — header renders the generic Resource until a dynamic per-resource title lands.
  4. 11 gaps badge on /app/contracts removed.
  5. /claim?t=<bad-jwt> renders an explicit invalid-or-expired banner + pricing CTA instead of a blank email form.
  6. OverviewPage "Recently active" rows render reliably; Link targets /app/resources/:id; data-testids + minWidth:0 fix grid overflow.

BillingPage now handles fetchBilling rejection — surfaces a real billing-unavailable banner instead of holding the skeleton.

Test plan

  • npx tsc --noEmit — exits 0
  • npm test -- --run — 168 passed, 3 skipped
  • grep -rn "FIXTURE_" src/ returns only commented references (no live imports)
  • Manual smoke against local agent API

🤖 Generated with Claude Code

mastermanas805 and others added 2 commits May 12, 2026 08:15
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 mastermanas805 merged commit 2782f19 into main May 12, 2026
1 of 2 checks passed
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant