ubiquitous-invention/apps/web/app/(app)/[workspaceSlug]
Randall Stillwell f64d307f72 feat(web): wire workspace-home dashboard to real tRPC queries
Path-A task 2/5. Replaces the hardcoded `stats` (24/8/12) and
hardcoded `recent` list on the workspace-home page with real
workspace-scoped data.

* server/routers/objects.ts: add two new procedures.
  - `objects.stats` returns { openTasks, containers }. Open-task count
    treats null status as open; only `done` and `closed` (per
    packages/shared object-statuses) are terminal. Container count
    aggregates project + space + group rows.
  - `objects.listRecent({ limit })` returns the N most-recently-updated
    rows, descending by updated_at. Excludes archived and excludes
    `workspace`/`group` from the activity feed (containers clutter
    "what did I just touch" recency).
  Both go through workspaceProcedure, so the workspace_id filter
  comes from the middleware-resolved ctx.workspace.id rather than
  any user input.

* app/(app)/[workspaceSlug]/page.tsx: rewrite to consume the new
  procedures via @trpc/react-query. Adds:
  - Skeleton loading state (no flash of zeros).
  - Empty state with a "New task" CTA on workspaces with no objects.
  - Real "X ago" labels on the recent feed.
  - Click-through links from recent rows to /{slug}/{id}.
  - A locally-mounted CreateObjectDialog instance independent of the
    global one in AppShell so the empty-state CTA can pre-seed
    defaultType="task" without coordinating shared state.

* components/ui/skeleton.tsx: new (standard shadcn pulse skeleton).
  Used by the dashboard but reusable across the app.

The scaffolded "Due this week" stat is dropped: `objects` has no
due_at column and the task explicitly preferred dropping a card to
schema-creep.

`pnpm lint && pnpm type-check` clean. Closes
plans/Plan-daily-driver-finish/Epic-shipping-the-shell/
Task-wire-workspace-home-dashboard.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-02 00:17:29 -05:00
..
[projectId] multi-tenancy: promote workspaces to top-level table 2026-05-06 23:02:55 -05:00
ai feat: ECHODO app shell, Coolify deploy, Authentik + Umami 2026-04-26 14:34:34 -05:00
docs multi-tenancy: promote workspaces to top-level table 2026-05-06 23:02:55 -05:00
forms multi-tenancy: promote workspaces to top-level table 2026-05-06 23:02:55 -05:00
planner multi-tenancy: promote workspaces to top-level table 2026-05-06 23:02:55 -05:00
settings multi-tenancy: promote workspaces to top-level table 2026-05-06 23:02:55 -05:00
teams multi-tenancy: promote workspaces to top-level table 2026-05-06 23:02:55 -05:00
whiteboards multi-tenancy: promote workspaces to top-level table 2026-05-06 23:02:55 -05:00
layout.tsx feat: Full project management application scaffold 2026-03-26 22:39:16 -05:00
page.tsx feat(web): wire workspace-home dashboard to real tRPC queries 2026-06-02 00:17:29 -05:00