Skip to content

feat: ctrl org management UI #88

@ssilvius

Description

@ssilvius

Goal

Build organization management UI in settings.

Requirements

  • apps/ctrl/src/routes/_ctrl/settings/org.tsx: org tab
  • Member table: avatar, name, email, role badge, joined date. Admins see "Change Role" dropdown and "Remove" button
  • Role selector component: dropdown with admin/member/viewer options. PATCH on change, optimistic update
  • Invite dialog: email input + role dropdown. Submit creates invitation. Success toast
  • Pending invitations list: email, role, expiry date, revoke button
  • Remove member: confirmation dialog with "This cannot be undone"
  • Error states: cannot remove last admin, cannot change own role

Out of Scope

  • Permission matrix display (separate issue)
  • Multi-org switching

Complete when: Member list renders, role changes work, invitations can be sent/revoked, safety checks enforced.

Dev Workflow

Each step is mandatory. No exceptions. No skipping steps. No committing to main. No solo merges.

  1. Branch -- Create feat/<issue#>-<description> from main. Use git worktrees for parallel work.
  2. Implement -- Write the feature. Write tests alongside code. Run pnpm test, pnpm check (oxlint + oxc-format). All must pass.
  3. Commit -- Commit to the feature branch. Descriptive message focused on the "why."
  4. Simplify -- Run /simplify on all changed files. Accept structural improvements, flatten unnecessary abstractions, remove dead code. Commit the result.
  5. PR -- Create the PR. Reference this issue number.
  6. PR Review -- Run /review-pr which launches parallel review agents (code review, silent failure hunter, type design analysis). Fix every issue found. Re-run tests after fixes.
  7. Team Review -- Post PR to the legion bullpen. Get consensus from the team before merging.
  8. Request Merge -- Only after consensus. Never merge your own PR without review.

Platform Rules

  • No any -- use unknown and narrow
  • No emoji in code, comments, or commits
  • UUIDv7 for all identifiers
  • Zod is source of truth for schemas
  • Wrangler owns all D1 migrations (never drizzle-kit)
  • pnpm only (never npm/yarn)
  • Tests in tests/ mirroring source tree, never colocated

Done When

  • Feature branch created
  • All tests pass
  • Simplify pass completed and committed
  • PR created and linked to this issue
  • PR review completed and issues fixed
  • Team consensus on the bullpen
  • Merge requested (not self-merged)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ctrlctrl dashboard surfaceenhancementNew feature or requestphase-5Dashboard home + notifications

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions