Handoff: Agent 2, Cockpit app + Tasks cross-workspace controls¶
URL: https://mkdocs.justinsforge.com/memory/handoffs/creatortrack-cockpit-and-tasks-controls-2026-07-06/
Date: 2026-07-06
For: dedicated worker agent (Justin will drive interactively)
Repo: ~/creatortrack (main, prod :3070). Dev slot via forge_creatortrack_agent_bootstrap.sh <branch> <port>; commit often, merge ONCE; teardown after merge.
Context (decided in the 2026-07-06 session)¶
Workspaces are the business containers (Personal / JustinWieb / Gus the Bass / Gus Outdoor Co / Sip 'n' Serve; Gus workspaces shared with Michael). Principle: data lives in exactly one workspace; views may span every workspace you're a member of. Two deliverables fall out of that:
Deliverable 1: Tasks cross-workspace controls¶
The Tasks app ALREADY aggregates tasks from all the user's workspaces: lib/tasks.ts unions member workspaces and stores EXCLUSIONS at core.users.prefs.tasks_app.excluded_workspaces (Settings -> Workspaces page in TasksSettingsModal.tsx). What's missing is assignment awareness once a second user exists:
- Assignee on tasks: nullable
assigned_to(user id) on the tasks table + picker in the task editor (members of the task's workspace only). Unassigned stays the default. - Aggregate-view controls (Settings and/or a filter chip row): per Justin, "what if tasks in other workspaces are assigned to someone else or not assigned to you":
- Show: My tasks (assigned to me) / Unassigned / Assigned to others, each toggleable per the whole aggregate (default: mine + unassigned ON, others OFF).
- Keep the existing per-workspace exclusion checkboxes; the new toggles compose with them.
- In a task's OWN workspace view, everything shows regardless of assignment (the workspace backlog is the workspace's business); the toggles govern only the cross-workspace aggregate.
Deliverable 2: Cockpit app¶
New installable app, id cockpit (name TBD with Justin: "Cockpit" / "HQ"), category: "essentials", ownerOnly for now, intended home = Personal workspace. Read-only aggregation across every workspace the viewer is a member of; it stores NOTHING of its own. Per-user by construction: Michael installing it would see only his memberships.
Panels (v1, one page):
- Tasks: my tasks everywhere, grouped by workspace (reuse the Deliverable-1 query; don't fork logic).
- Sales pipelines: per workspace with the sales app installed: pipeline value by stage, overdue follow-ups count (reuse lib/sales-crm.ts reads; see reference_creatortrack_sales_crm, LIVE on prod since 2026-07-06).
- Campaigns: subscriber/send/open summary from campaigns.* (read copy, see reference_creatortrack_campaigns_app).
- Each panel links into the owning workspace's app. No writes anywhere except "Log touch" style pass-throughs if trivial.
Watch-points¶
- Every cross-workspace query is just RLS + membership (the pattern already exists in
lib/tasks.ts); filter workspace_id explicitly per query, same as everywhere. lib/apps.tscatalog entry: category + (initially)preview: trueso it lands in Early access until Justin promotes it.- Don't build cross-workspace NOTES search or live sharing here; sharing has its own design: https://github.com/JustinWieb/creatortrack/issues/2
- Justin's stated build philosophy: he wants to USE things and then grow them; ship the smallest correct version of each panel and iterate with him live on the dev slot.
[Claude Code]