Skip to content

feat(platform): settings permissions, admin, billing attribution#5545

Open
icecrasher321 wants to merge 10 commits into
stagingfrom
fix/invite-bug
Open

feat(platform): settings permissions, admin, billing attribution#5545
icecrasher321 wants to merge 10 commits into
stagingfrom
fix/invite-bug

Conversation

@icecrasher321

Copy link
Copy Markdown
Collaborator

Summary

Keep organization activation server-owned so failed membership checks cannot clear a valid session context.

Type of Change

  • Bug fix

Testing

N/A

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Keep organization activation server-owned so failed membership checks cannot clear a valid session context.
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 11, 2026 11:23pm

Request Review

@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches invite acceptance and session org context; org switching may now rely entirely on server/redirect behavior for org-member invites.

Overview
Stops the invite accept flow from calling client.organization.setActive after a successful accept, so accepting an external workspace invite no longer switches the user’s active organization away from their home org.

Accept still invalidates subscription/org queries and redirects via the API’s redirectPath. A new jsdom test asserts setActive is not invoked when accepting an external workspace invitation.

Reviewed by Cursor Bugbot for commit 8183314. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR keeps invite acceptance from changing the active organization on the client. The main changes are:

  • Removed the client-side organization.setActive call after invite acceptance.
  • Left query invalidation and redirect handling in the invite accept flow.
  • Added a jsdom regression test for external workspace invites.

Confidence Score: 4/5

The changed flow looks mergeable after checking the external workspace redirect context.

  • Server-owned activation still covers organization-joining invite paths.
  • External workspace invites now preserve the previous active organization.
  • The redirect can still depend on workspace pages not using stale session organization state.

apps/sim/app/invite/[id]/invite.tsx

Important Files Changed

Filename Overview
apps/sim/app/invite/[id]/invite.tsx Removes client-owned organization activation after accepting an invite.
apps/sim/app/invite/[id]/invite.test.tsx Adds a regression test that asserts external workspace invites do not call client-side organization activation.

Reviews (1): Last reviewed commit: "fix(invites): preserve active organizati..." | Re-trigger Greptile

Comment thread apps/sim/app/invite/[id]/invite.tsx
Remove locally generated migrations so they can be regenerated against the latest staging schema without preserving stale snapshots or numbering.
Resolve storage, webhook, Jupyter, workspace-layout, and API-validation conflicts while preserving both staging updates and billing durability changes.
Remove this branch's generated migrations so they can be regenerated against the latest staging schema with fresh numbering.
Resolve mothership executor, upload-test mocks, and regenerate tool schemas from the copilot staging catalog.
@icecrasher321 icecrasher321 changed the title fix(invites): preserve active organization for external access feat(platform): settings permissions, admin, billing attribution Jul 11, 2026
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