Commit Graph
2 Commits
Author SHA1 Message Date
Alaister YoungandAlaister Young d2eb58a0e7 [FE-3106] (part 3) – refactor(studio): move account and top-level page bodies (#53212)
Moves the account and top-level app page bodies (`/account/*`,
`/organizations`, `/new`, `/new/$slug`, `/join`, `/claim-project`,
`/aws-marketplace-onboarding`, `/stripe-atlas-application`,
`/support/new`, `/support/link`, `/integrations/github|vercel/*`) from
`pages/**` into their TanStack route files and deletes the pages. Part
of the final pass of the TanStack migration (FE-3106). Part 3 of the
stack, and the first page-move PR.

**Depends on:** #53202

**Changed:**
- `routes/_app/account/**`,
`routes/_app/{organizations,new/index,support/*}.tsx`,
`routes/{new/$slug,join,claim-project,aws-marketplace-onboarding,stripe-atlas-application}.tsx`,
`routes/integrations/**` – page bodies inlined.
`next/router`/`next/link`/`next/head` → `useNavigate`, `Link`,
`<Navigate>` and inline `<title>`. `getLayout` dropped; every old
`getLayout` was checked against the route tree and matches
- `routes/aws-marketplace-onboarding.tsx` – reads `buyer_id` through
`validateSearch` + `Route.useSearch()`
- `tests/lib/route-render.tsx` – new `renderRoute(Route, { routeId, url
})` helper that mounts a file route in a memory router (with the app's
search serializers) so route components can be tested; used by the moved
tests
- `tests/lib/route-mock.ts` – the `next/router` mock now derives its
dynamic-route patterns from `routes/**` instead of globbing `pages/**`,
so tests keep parsing params as pages disappear
- `tests/routes/**` – page tests moved from `tests/pages/**` and
rendered through the route
- `.github/CODEOWNERS` – `pages/new/index.tsx` owner moved to
`routes/_app/new/index.tsx`

**Removed:**
- 19 files under `pages/account/**`, `pages/new/**`,
`pages/support/{new,link}.tsx`, `pages/integrations/**` and the
top-level pages listed above

Addresses
[FE-3106](https://linear.app/supabase/issue/FE-3106/move-page-bodies-into-route-files-and-delete-pages).

## To test

- Open `/account/me`, `/account/security`, `/account/tokens`,
`/account/audit` – same Account layout, header title and sidebar as
before
- Open an old email-change link (`/account/me#message=...`) – lands on
`/account/security` with the hash
- `/account/tokens/scoped` – redirects to `/account/tokens`
- `/organizations` and `/new/<org>` – render with the same layout; "New
organization" links work
- Vercel install/marketplace flows – navigation keeps `?…` params

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
2026-11-17 14:46:37 +09:00
7d3f72ec7d feat(studio): TanStack project routes — data surfaces (stack 5.1/6, from #46424) (#47117)
**Stack 5.1/6** of the TanStack Start migration (#46424). The original
S5 (174 files) was over CodeRabbit's 150-file review cap, so it's split
into 5.1 + 5.2 by product. Stacked on **#47113** (S4).

> [!NOTE]
> Thin route wrappers rendering the existing pages-router components via
compat shims. Next-safe (full Next build run). The TanStack app isn't
functional end-to-end until 5.2 + the matrix flip.

## What's in this PR
- **Data-cluster project routes:** database, editor, sql, storage,
realtime, branches.
- **Top-level / onboarding routes:** `authorize`, `join`, `logout`,
`redeem`, `verify-email`, `claim-project`, aws-marketplace,
Vercel/GitHub integration entrypoints; `_app`/`_auth` layout shells;
`/org/_` + `/project/_` catch-alls.
- **Supporting edits:** hoist `BranchesPageWrapper` out of `getLayout`,
`ConnectStepsSection` `import.meta.glob`, `api/server.js`.
- `routeTree.gen.ts` regenerated for the routes present so far.

## Verification
On top of S1–S4: `studio` typecheck ✓, lint (0 errors) ✓, **Next build ✓
(181/181 pages)**.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Restructured application routing infrastructure for improved code
organization and maintainability.
* Extracted and refactored layout wrapper components for enhanced
reusability across different sections of the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-07-03 21:22:06 +08:00