No description
Find a file
Randall Stillwell 7ec2ede7ca feat(web): land authed users on their oldest workspace home by slug
Path-A task 4/5. The root landing logic in apps/web/app/page.tsx was
redirecting to `/${workspaceId}` (UUID, ugly) and using no ORDER BY
(so two sessions could land on different workspaces). It also looped
zero-workspace users through `/sign-in`.

Changes:

* Inner-join workspaceMembers with workspaces to fetch the slug, not
  just the id. Order by membership createdAt ascending so users
  consistently hit their oldest workspace.
* Redirect to /{slug} (slug, not UUID).
* Removed the unused `objects` / `and` imports that were lint
  warnings.
* Zero-workspace branch redirects to /sign-in?error=no_workspace as a
  defensive fallback; documented inline that this is unreachable for
  fresh sign-ins post `ensureUserHasWorkspace` in apps/web/lib/auth.ts.

The dashboard at /{slug}/ is no longer a mockup (post commit f64d307
which wired it to objects.stats and objects.listRecent), so landing
there now shows real state.

Filed plans/Plan-daily-driver-finish/Epic-shipping-the-shell/
Task-onboarding-zero-workspace-flow.md (P2) as the follow-up that
turns the defensive fallback into a proper welcome flow with a
shared workspace-provisioning helper.

`pnpm lint && pnpm type-check` clean. Closes
plans/Plan-daily-driver-finish/Epic-shipping-the-shell/
Task-pick-workspace-landing-route.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 00:25:48 -05:00
.cursor/rules docs: add AGENTS.md and Cursor rules 2026-05-06 22:14:16 -05:00
apps feat(web): land authed users on their oldest workspace home by slug 2026-06-02 00:25:48 -05:00
config feat: ECHODO app shell, Coolify deploy, Authentik + Umami 2026-04-26 14:34:34 -05:00
docker docker: raise web build V8 heap to 5 GB to match 8 GB host 2026-04-28 13:33:46 -05:00
docs feat: ECHODO app shell, Coolify deploy, Authentik + Umami 2026-04-26 14:34:34 -05:00
packages chore(lint+types): green pnpm lint && pnpm type-check from a clean clone 2026-06-02 00:11:52 -05:00
plans feat(web): land authed users on their oldest workspace home by slug 2026-06-02 00:25:48 -05:00
.env.example feat: ECHODO app shell, Coolify deploy, Authentik + Umami 2026-04-26 14:34:34 -05:00
.gitignore feat: ECHODO app shell, Coolify deploy, Authentik + Umami 2026-04-26 14:34:34 -05:00
AGENTS.md docs: add AGENTS.md and Cursor rules 2026-05-06 22:14:16 -05:00
package.json feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
pnpm-lock.yaml feat(web): wire AI chat page to streaming /api/chat handler 2026-06-02 00:23:21 -05:00
pnpm-workspace.yaml feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
tsconfig.json feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
turbo.json feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00