chore: add /console and /dashboard redirects#89
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
The redirects are correct for the exact root paths, but they likely won’t cover common variants like trailing slashes or nested routes (e.g., /console/settings). If the intent is to forward console/dashboard traffic broadly, add path-preserving wildcard redirects to avoid broken deep links.
Additional notes (1)
- Maintainability |
next.config.ts:245-254
Both/consoleand/dashboardpoint to the same destination. If this is expected, it’s fine, but it can be easy for these to diverge or for one to get updated while the other is forgotten. Consider consolidating via a small helper/constant (or a short comment) to make the shared intent obvious and reduce maintenance risk.
Summary of changes
What changed
- Added two new Next.js
redirectsentries innext.config.ts:/console→https://console.tambo.co/dashboard→https://console.tambo.co
- Both redirects are configured as temporary (
permanent: false, i.e., 302/307 depending on Next.js behavior).
Files touched:
next.config.ts(redirects array)
next.config.ts
Outdated
| { | ||
| source: '/console', | ||
| destination: 'https://console.tambo.co', | ||
| permanent: false, | ||
| }, | ||
| { | ||
| source: '/dashboard', | ||
| destination: 'https://console.tambo.co', | ||
| permanent: false, | ||
| }, |
There was a problem hiding this comment.
These redirects only match the exact paths (/console and /dashboard). Requests like /console/ or /console/some/path will not be redirected, which is a common source of "it works for me" issues in production (trailing slashes, deep links, bookmarks). If you intend to forward the whole console/dashboard subtree to console.tambo.co, you should add wildcard redirects as well.
Suggestion
Consider adding path-preserving redirects for both routes, and optionally handle trailing slashes explicitly. For example:
{ source: '/console/:path*', destination: 'https://console.tambo.co/:path*', permanent: false }{ source: '/dashboard/:path*', destination: 'https://console.tambo.co/:path*', permanent: false }
If you only want the root pages, consider also covering '/console/' and '/dashboard/' (depending on your trailingSlash setting). Reply with "@CharlieHelps yes please" if you'd like me to add a commit with these redirect rules.
There was a problem hiding this comment.
Do this just for dashboard. @CharlieHelps
There was a problem hiding this comment.
Expand this to see my work.
- Re-read the review comment on PR #89 to confirm the request is to scope the redirect change to
/dashboardonly innext.config.ts. - Reviewed and updated the redirect rules in
next.config.tsso the new logic applies only to/dashboard, leaving/consolebehavior unchanged, and consolidated to a singlesource: '/dashboard/:path*'rule pointing tohttps://console.tambo.co/:path*. - Validated the updated
redirects()export shape innext.config.tsand rangit diffto confirm the only change is the consolidated/dashboard/:path*redirect entry. - Ran
bun run lint(Biome) and confirmed it completed successfully with 191 files checked and no fixes needed, covering thenext.config.tschange. - Ran
bun run typecheckand confirmed TypeScript reported no type errors after the redirect config update. - Ran
bun run buildand confirmed the Next.js production build completed successfully, indicating the new/dashboard/:path*redirect config is valid. - Edited the body of PR #89 to replace non-printable arrow characters with plain
->arrows in the Summary and Test plan sections so the description renders cleanly. - Re-ran
bun run buildafter removing the redundant bare/dashboardrule to rely solely onsource: '/dashboard/:path*', confirming the app still builds cleanly. - Smoke-tested the redirects by running
bun run starton port 3011 and usingcurlto confirm/dashboard→https://console.tambo.coand/dashboard/settings→https://console.tambo.co/settingsvia the consolidated wildcard rule. - Updated the PR #89 description to explicitly document that
/consoleremains a root-only redirect while/dashboard/:path*is path-preserving, matching the reviewer request to apply the wildcard only to/dashboard.
There was a problem hiding this comment.
Updated this to do wildcard forwarding only for /dashboard, per your note. /dashboard/:path* now redirects to https://console.tambo.co/:path* (so deep links work), and /console remains root-only.
Change is in c8b3539e086c16f4d5cb63bfe7ba4d3f101f573d.
Verification
# Biome: no issues
$ bun run lint
# TypeScript: no errors
$ bun run typecheck
# Next.js: build succeeded
$ bun run buildThere was a problem hiding this comment.
The redirects are generally correct and match the stated intent, but there are a couple of edge cases worth addressing: /console won’t match /console/, and the wildcard /dashboard/:path* may redirect /dashboard to https://console.tambo.co/ (with a trailing slash) rather than the canonical https://console.tambo.co. Neither is a blocker, but both can cause production inconsistencies depending on client/proxy behavior.
Summary of changes
Redirect rules added
Updated next.config.ts to add two new Next.js redirect entries:
source: '/console'→destination: 'https://console.tambo.co'(temporary)source: '/dashboard/:path*'→destination: 'https://console.tambo.co/:path*'(temporary, path-preserving)
These live alongside the existing /start and /x redirects in the redirects() configuration.
Summary
/consoleredirect ->https://console.tambo.co(root path only)/dashboard/:path*redirect ->https://console.tambo.co/:path*(covers/dashboard+ deep links)Note:
/consoleis intentionally root-only; the wildcard redirect was requested only for/dashboard.Test plan
tambo.co/consoleand verify redirect toconsole.tambo.cotambo.co/dashboardand verify redirect toconsole.tambo.cotambo.co/dashboard/settingsand verify redirect toconsole.tambo.co/settings