Repository navigation
Add a temporary Console / Work gate to the organization home - #1102
Conversation
Visitors who signed up for the Console products (AI Gateway, FX) landed on grida.co/<org>, the legacy projects home whose empty state is "Create your first project". The organization home now opens on a bare two-card gate: - Console links to the organization's AI Gateway page in the Console. It is never remembered, so /<org> never becomes a redirect off grida.co. - Work renders the existing projects home and is remembered per organization and browser in a cookie scoped to /<org>. The URL never changes and the server picks the view, so nothing flashes. The workspace chrome (sidebar, header, help, command palette) moves from the [org] layout into WorkspaceShell, applied by the Work home and the project page, so the gate renders without it. Console is also linked from the workspace sidebar (above Settings) and the organization settings sidebar. Outbound Console URLs now come from lib/platform/console-links.ts, which the AI Gateway landing page's "Get API key" button also uses. It prefers the configured Console origin and falls back to console.grida.co. The gate is a stopgap until the product catalogue and its links are reorganized; every touchpoint is marked TODO(org-home-gate), with the removal checklist in home-gate.tsx. Manual TC: test/workspace-org-home-gate.md.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe organization root now presents Console and Work choices. Selecting Work saves an organization-scoped cookie and displays the workspace. Console links use generated AI Gateway URLs in the organization home, workspace navigation, settings, and AI Gateway page. ChangesOrganization home and Console navigation
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant OrganizationHomePage
participant OrgHome
participant HomeGate
participant ConsoleLinks
participant Router
OrganizationHomePage->>OrgHome: Check the organization cookie with isWork
alt Work cookie is set
OrganizationHomePage->>OrganizationHomePage: Render WorkHome in WorkspaceShell
else Work cookie is not set
OrganizationHomePage->>ConsoleLinks: Build the organization AI Gateway URL
OrganizationHomePage->>HomeGate: Render with consoleHref
HomeGate->>OrgHome: Build the Work cookie on selection
HomeGate->>Router: Refresh after writing the cookie
end
Merge Risk: ⚪ Minimal · up to The organization home gate and workspace navigation have no established merge-blocking issue. The universal Console destination remains unverified because its application is outside this repository. Pre-merge checks ·
|
Why
People who sign up for the Console products, AI Gateway and FX, still land on
grida.co/<org>. That is the legacy projects home (projects, forms, databases), and its empty state tells them to "Create your first project", which has nothing to do with what they came for.Rebuilding the organization home is a larger job that belongs with a cleanup of the product catalogue and its links. This PR is a deliberately small, removable stopgap until then.
What
A two-card gate at
/<org>. The page renders only the cards, with no sidebar, header, help button or command palette. The URL never changes.<console>/organizations/<org>/ai-gatewaygrida-org-home=work; Path=/<org>The server reads the cookie, so the right view renders directly with no flash. Nothing is stored in the database.
Console stays one click away once Work is chosen: there's a Console item above Settings in the workspace sidebar, and one pinned to the bottom of the organization settings sidebar.
One source for Console URLs.
lib/platform/console-links.ts(ConsoleLinks.aiGateway) builds the outbound Console links. It uses the configured Console origin when there is one and falls back tohttps://console.grida.co, as in local development. The AI Gateway landing page's "Get API key" button now uses it instead of a hardcoded URL. Billing links still come fromconsoleBillingUrl, which keeps failing closed, and the module points to it and toorganizationRoute.Layout split. The workspace chrome moved from
(workspace)/[org]/layout.tsxinto aWorkspaceShellcomponent. The Work home and the project page (through a new[proj]/layout.tsx) apply it; the gate doesn't. The org layout still handles sign-in, the org lookup and the sharedWorkspacestate. One visible side effect: moving from the org home into a project now redraws the sidebar. Its open or collapsed state is still kept.Not changed
/dashboardrouting, the workspace data route, the sharedWorkspacestate, the Console org-creation handoff (GRIDA-SEC-010), billing handoffs, and the(workbench)project console./dashboardstill sends people with a recent project straight to/<org>/<project>, so the gate mostly reaches new and project-less users. That is the onboarding gap this targets.Temporary
Every touchpoint is marked
TODO(org-home-gate). The header comment inhome-gate.tsxhas the removal checklist:rg "TODO\(org-home-gate\)" editorTesting
lib/platform/console-links.test.ts: org page vs universal entry, and origin fallback.test/workspace-org-home-gate.md(TC-WORKSPACE-HOME-001).pnpm --filter editor typecheck,vitest.platform.config.ts(483 tests), oxlint and oxfmt all pass.