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
|
||
|---|---|---|
| .. | ||
| Plan-agent-coordination | ||
| Plan-daily-driver-finish | ||
| Plan-multitenant-cursor-sync | ||
| Plan-multitenant-saas-hardening | ||
| README.md | ||
Plans directory
Human- and agent-oriented backlog. Structure:
plans/
Plan-<plan-slug>/
Plan-<plan-slug>.md
Epic-<epic-slug>/
Epic-<epic-slug>.md
Task-<task-slug>.md
Task-<other-task>.md
- Slug: lowercase, hyphenated, stable across renames of display title when possible.
- Templates: copy from
docs/templates/. - Chunking: keep each Task small enough for one Cursor agent or subagent to own; use Epics for milestones that need several tasks.
See docs/Glossary.md and config/CursorSync.md.
Import to database: from the repo root, with DATABASE_URL and your workspace UUID:
pnpm --filter @tasks/database watch:markdown-backlog
Set MARKDOWN_BACKLOG_WORKSPACE_ID (and optionally MARKDOWN_BACKLOG_REPO_ROOT). This runs an initial sync and watches plans/ for changes.