Skip to content

feat(cloud): add team management page - #157

Merged
RhysSullivan merged 12 commits into
mainfrom
feat/team-management
Apr 10, 2026
Merged

feat(cloud): add team management page#157
RhysSullivan merged 12 commits into
mainfrom
feat/team-management

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

Summary

  • Custom team management page at /team using WorkOS organization membership API
  • Effect API layer with typed endpoints: list members, list roles, invite, remove, change role
  • Server-side admin role check on write operations (invite, remove, role change) — returns 403 for non-admins
  • Client-side UI matching existing app design: member list with avatar, name, email, role, last active, and actions dropdown
  • Invite dialog with role selector
  • Role change via submenu in member actions dropdown
  • Toast notifications via sonner using promiseExit from effect-atom
  • Sonner toaster fixed to use theme="system" instead of next-themes (removed next-themes dep)
  • Effect-based test suite with typed stubs via Proxy pattern — 10 tests covering list, roles, and admin guard for all write operations

Test plan

  • Navigate to /team — should show team members list
  • Click "Invite member" — dialog with email + role selector
  • As admin: invite, remove, and change role should work with toast feedback
  • As member: remove and role change should fail with 403
  • vitest run src/team/handlers.test.ts — 10 tests pass
  • Light/dark mode both render correctly

Custom team page using WorkOS API for listing members, inviting,
removing, and changing roles. Admin-gated write operations with
server-side role checks. Uses Effect API layer pattern with
typed endpoints and effect-atom for client-side state.

Also fixes Sonner toaster to use system theme detection instead
of next-themes, removes next-themes dependency.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
executor-cloud 57394ec Apr 10 2026, 09:41 AM

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
executor-marketing 1cac434 Apr 10 2026, 09:42 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 10, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing dc9493b Commit Preview URL

Branch Preview URL
Apr 10 2026, 10:10 AM

@RhysSullivan
RhysSullivan merged commit ec8d886 into main Apr 10, 2026
5 of 6 checks passed
RhysSullivan added a commit that referenced this pull request May 31, 2026
* feat(cloud): add team management page with WorkOS org members

Custom team page using WorkOS API for listing members, inviting,
removing, and changing roles. Admin-gated write operations with
server-side role checks. Uses Effect API layer pattern with
typed endpoints and effect-atom for client-side state.

Also fixes Sonner toaster to use system theme detection instead
of next-themes, removes next-themes dependency.

* style: format

* chore: remove unused widget token endpoint and getWidgetToken

* fix: remove any types from team handler tests

* style: format

* fix: add @types/node to storage-postgres for tsgo compat

* fix: resolve merge conflict in test file

* style: format

* fix: resolve tsgo typecheck errors in billing and test files

* fix: add explicit Plan types for tsgo compatibility

* style: format

* fix: cast empty array for tsgo type inference
@RhysSullivan
RhysSullivan deleted the feat/team-management branch June 11, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant