diff --git a/CHANGELOG.md b/CHANGELOG.md index cc4c30d..bb83bf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Generated section is appended on release tag via `git-cliff` (see `.gitea/workfl ## [Unreleased] ### Added +- feat(signup): M12.1 — public /start form creates a trial tenant via POST /v1/tenants (KC adapter provisions the org + invites the admin); dashboard renders a trial-days-left banner when status=trial +- feat(catalog): M11.1 — /[slug]/catalog renders the live catalog, gates owned products, server-action 'Request' (POST /v1/catalog/request) + 'Start 14-day trial' (POST /v1/catalog/trial-request) - feat(test): M5.3 — Playwright e2e harness (apex / tenant / dev-stack-health specs). pnpm e2e + make e2e. CI e2e job gated behind RUN_E2E variable until stage exists. - feat(app): M5.2 — customer-area route shells (settings, billing, audit, support, catalog, products, projects, settings/{users,api-keys,integrations}); shared Nav component reads session.org_roles and shows only what each role can see; backstage stub at /__backstage__; dashboard renders product tiles from session.products - chore(deps): bump next + eslint-config-next to 16.2.6 to clear trivy CVEs (CVE-2025-29927 critical + 7 highs in next 15.0.3) diff --git a/src/app/[slug]/dashboard/page.tsx b/src/app/[slug]/dashboard/page.tsx index f413124..59e11b1 100644 --- a/src/app/[slug]/dashboard/page.tsx +++ b/src/app/[slug]/dashboard/page.tsx @@ -1,6 +1,7 @@ import { auth, signIn, signOut } from "@/auth"; import { ShellEmpty } from "@/components/ShellEmpty"; import type { SessionWithExtras } from "@/lib/session"; +import { fetchTenantBySlug } from "@/lib/tenant-registry"; export default async function Dashboard({ params, @@ -43,10 +44,20 @@ export default async function Dashboard({ await signOut({ redirectTo: `/${slug}/dashboard` }); } + const tenant = await fetchTenantBySlug(slug); const products = session.products ?? []; + const trialDaysLeft = computeTrialDaysLeft(tenant?.trial_ends_at); return (
+ {tenant?.status === "trial" && tenant.trial_ends_at && ( + + )} +

Dashboard

Welcome, {session.user?.name ?? session.user?.email ?? "user"}. Signed in @@ -61,7 +72,15 @@ export default async function Dashboard({ milestone="M11.1" /> ) : ( -