Commit d0d5410
feat(studio): GitHub/Vercel-style tabs for project detail page
Before, the project detail page was a single ~990-line route that piled
overview stats, recent revisions, endpoints, database info, members,
credential, hostname editor, visibility editor and a danger zone into
one scrolling surface. It read more like a settings dump than a project
page — and as we added members/visibility/revisions/etc. it kept
getting busier.
Refactor to the convention used by GitHub repo pages and Vercel project
pages: a shared, sticky header (breadcrumb + name + status badges +
Refresh) followed by a tab bar that links to dedicated routes:
Overview · Revisions · Packages · Members · Settings
What moved:
- new apps/studio/src/components/projects/project-header.tsx
Renders the breadcrumb, title row (name + status + visibility
+ project-id chip + Refresh action) and the 5-tab nav. Used by
every project-scoped surface so the header stays consistent
across tabs. The active tab is driven by an explicit `active`
prop rather than route-matching to keep the underline stable
during route transitions.
- new apps/studio/src/routes/projects.$projectId.members.tsx
Members tab. Hosts MembersPanel (invite / role / remove).
- new apps/studio/src/routes/projects.$projectId.settings.tsx
Settings tab. Hosts the previously-overview sections:
Visibility editor (Select with private/public + explainer),
Custom domain editor, Credential status + rotate, and the
typed-confirmation Danger zone.
- edit apps/studio/src/routes/projects.$projectId.index.tsx
Overview tab. Slimmed from 991 → ~510 LOC. Drops the inline
visibility control / hostname editor / credential card / danger
zone (now in Settings) and the MembersPanel (now in Members).
Adds the shared ProjectHeader at the top. Keeps: 4 at-a-glance
stat cards (current commit, visibility, members count, packages
count), recent revisions, endpoints panel + CLI publish hint,
compact Project info + Database + Domain summary cards.
- edit apps/studio/src/routes/projects.$projectId.revisions.tsx
Removed the bespoke header (back button + inline title +
visibility badge) in favour of ProjectHeader. The page now
opens with the same header layout as every other tab and only
scopes its own "Published revisions" sub-heading + table.
- edit apps/studio/src/routes/projects.$projectId.packages.tsx
Mounts ProjectHeader at the top via a small wrapper that
skips rendering for the platform pseudo-project (no real
project row exists).
- gen apps/studio/src/routeTree.gen.ts (auto-regenerated by the
TanStack Router plugin to register the two new routes).
Behaviour verified end-to-end in the browser: created a fresh
`Tabs Demo` project, confirmed each of the four tabs (Overview /
Settings / Members / Revisions) navigates and shows the correct
underline highlight. Build + 100/100 tests still green.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 6594015 commit d0d5410
7 files changed
Lines changed: 1133 additions & 823 deletions
File tree
- apps/studio/src
- components/projects
- routes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 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 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
112 | 120 | | |
113 | 121 | | |
114 | 122 | | |
| |||
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
124 | 138 | | |
125 | 139 | | |
126 | 140 | | |
| |||
180 | 194 | | |
181 | 195 | | |
182 | 196 | | |
| 197 | + | |
183 | 198 | | |
184 | 199 | | |
| 200 | + | |
185 | 201 | | |
186 | 202 | | |
187 | 203 | | |
| |||
203 | 219 | | |
204 | 220 | | |
205 | 221 | | |
| 222 | + | |
206 | 223 | | |
207 | 224 | | |
| 225 | + | |
208 | 226 | | |
209 | 227 | | |
210 | 228 | | |
| |||
230 | 248 | | |
231 | 249 | | |
232 | 250 | | |
| 251 | + | |
233 | 252 | | |
234 | 253 | | |
| 254 | + | |
235 | 255 | | |
236 | 256 | | |
237 | 257 | | |
| |||
258 | 278 | | |
259 | 279 | | |
260 | 280 | | |
| 281 | + | |
261 | 282 | | |
262 | 283 | | |
| 284 | + | |
263 | 285 | | |
264 | 286 | | |
265 | 287 | | |
| |||
281 | 303 | | |
282 | 304 | | |
283 | 305 | | |
| 306 | + | |
284 | 307 | | |
285 | 308 | | |
| 309 | + | |
286 | 310 | | |
287 | 311 | | |
288 | 312 | | |
| |||
307 | 331 | | |
308 | 332 | | |
309 | 333 | | |
| 334 | + | |
310 | 335 | | |
311 | 336 | | |
| 337 | + | |
312 | 338 | | |
313 | 339 | | |
314 | 340 | | |
| |||
439 | 465 | | |
440 | 466 | | |
441 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
442 | 475 | | |
443 | 476 | | |
444 | 477 | | |
| |||
453 | 486 | | |
454 | 487 | | |
455 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
456 | 496 | | |
457 | 497 | | |
458 | 498 | | |
| |||
543 | 583 | | |
544 | 584 | | |
545 | 585 | | |
| 586 | + | |
546 | 587 | | |
547 | 588 | | |
| 589 | + | |
548 | 590 | | |
549 | 591 | | |
550 | 592 | | |
551 | 593 | | |
552 | 594 | | |
553 | 595 | | |
| 596 | + | |
554 | 597 | | |
555 | 598 | | |
| 599 | + | |
556 | 600 | | |
557 | 601 | | |
558 | 602 | | |
| |||
0 commit comments