Skip to content

feat: add admin dashboard ui for pending memory review and approval - #71

Merged
Hrithik-Gavankar merged 2 commits into
mainfrom
Add-Admin-dashboard-UI
Sep 8, 2026
Merged

Hrithik-Gavankar merged 2 commits into
mainfrom
Add-Admin-dashboard-UI

Conversation

@tejas161

@tejas161 tejas161 commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Built the admin-only Team Brain review inbox at /admin/review in the existing dashboard/ Vite app.

What shipped -
Route: Root.tsx switches between the engineer dashboard (/) and admin review (/admin/review) — no new router dependency.

RPC layer (dashboard/src/team-brain/):

  • rpc.ts — same Supabase REST pattern as CLI (list_pending_memories, approve_pending_memory, reject_pending_memory, list_initiatives, list_recent, tb_whoami)
  • session.ts — tb_… key in sessionStorage; optional VITE_TEAM_BRAIN_SUPABASE_* env vars
  • types.ts — typed payloads matching migration contracts

UI (dashboard/src/admin/):

  • Credentials form (admin API key + Supabase config)
  • Initiative + status filters
  • Pending cards with conflict reason, author, matches, timestamps
  • Side-by-side diff when target_capture_id is set (proposed body_preview vs live body from list_recent)
  • Approve / Reject with optional review note (admin-only; non-admins see read-only view of their own submissions)

Docs:

  • dashboard/README.md — new “Team Brain admin review queue” section
  • docs/team-brain-memory.md §7c — links to dashboard; roadmap row updated

How to run

cd dashboard
export VITE_TEAM_BRAIN_SUPABASE_URL=https://xxxx.supabase.co
export VITE_TEAM_BRAIN_SUPABASE_ANON_KEY=eyJ...
npm run dev
# → http://localhost:5173/admin/review
Connect with a crew admin tb_… key. Build verified with npm run build.

closes #69

@Hrithik-Gavankar Hrithik-Gavankar added the enhancement Feature update or enhancement label Sep 8, 2026

@Hrithik-Gavankar Hrithik-Gavankar left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM!

@Hrithik-Gavankar
Hrithik-Gavankar merged commit 664a29b into main Sep 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature update or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(team-brain): admin dashboard UI for pending memory review and approval

2 participants