Skip to content

Commit b67d44f

Browse files
docs: clarify /dashboard?tab= links are stable, not legacy (#430)
## Summary Adds documentation comments clarifying that the `/dashboard?tab=<tab>` links are **not legacy** and must keep working forever. These links are stable public entrypoints crosslinked from emails, docs, and the CLI, so removing tabs or changing the redirect contract would break those external references. No behavior change — comments only. - `src/configs/dashboard-tab-url-map.ts`: doc comment on `TAB_URL_MAP` explaining the links are stable public entrypoints and must not be removed. - `src/app/dashboard/route.ts`: doc comment on the `GET` handler describing the `/dashboard?tab=keys` → `/dashboard/<team-slug>/keys` redirect behavior and that it must keep working. Context: Slack thread where Ben confirmed these are not legacy; Jakub asked to add a comment so they aren't accidentally removed. Link to Devin session: https://app.devin.ai/sessions/a908d9ec7fd24404ab77b44622e4f716 Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: jakub@e2b.dev <jakub@e2b.dev>
1 parent e8e6577 commit b67d44f

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/app/dashboard/route.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ function getTabRedirectPath(tab: string | null, teamSlug: string) {
1818
return PROTECTED_URLS.SANDBOXES(teamSlug)
1919
}
2020

21+
/**
22+
* `/dashboard?tab=<tab>` resolves the user's default team and redirects to the
23+
* team-scoped page (e.g. `/dashboard/keys` -> `/dashboard/<team-slug>/keys`).
24+
*
25+
* This is NOT legacy: these links are stable public entrypoints crosslinked
26+
* from emails, docs, and the CLI, so this route must keep working. See
27+
* `TAB_URL_MAP` for the supported tabs.
28+
*/
2129
export async function GET(request: NextRequest) {
2230
const searchParams = request.nextUrl.searchParams
2331
const tab = searchParams.get('tab')

src/configs/dashboard-tab-url-map.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import { PROTECTED_URLS } from './urls'
22

3+
/**
4+
* Maps `/dashboard?tab=<tab>` query values to team-scoped dashboard URLs.
5+
*
6+
* These `?tab=` links are NOT legacy: they are stable public entrypoints used
7+
* to crosslink into the dashboard from outside (emails, docs, the CLI, etc.).
8+
* They must keep working forever — do not remove tabs or change this contract
9+
* without coordinating with the places that link here.
10+
*/
311
export const TAB_URL_MAP: Record<string, (teamSlug: string) => string> = {
412
sandboxes: (teamSlug) => PROTECTED_URLS.SANDBOXES(teamSlug),
513
templates: (teamSlug) => PROTECTED_URLS.TEMPLATES(teamSlug),

0 commit comments

Comments
 (0)