Skip to content

feat(teams): org-scope projects + active-org context (Phase 5)#9

Merged
PolGuixe merged 1 commit into
stagingfrom
feat/teams-resource-scoping
Jun 7, 2026
Merged

feat(teams): org-scope projects + active-org context (Phase 5)#9
PolGuixe merged 1 commit into
stagingfrom
feat/teams-resource-scoping

Conversation

@PolGuixe

@PolGuixe PolGuixe commented Jun 7, 2026

Copy link
Copy Markdown
Member

Backfill (migration 0003) + projects scoped to the active org (team-wide visibility) + X-Org-Id active-org context on the frontend. Switching org re-scopes the app. shared_with retained transitionally. Backend+frontend typecheck clean. Applied 0003 to staging already.

- migration 0003: backfill org_id/team_id on existing projects/workflows/
  reviews/chats/subfolders to each owner's personal org + default team
  (so nothing disappears once listing is org-scoped). Applied to staging.
- backend lib/tenancy: resolveActiveOrg (X-Org-Id header or personal org) +
  accessibleOrgIds helper
- backend projects: POST stamps org_id/team_id; GET lists all projects in the
  active org (team-wide visibility) plus legacy shared_with (transitional)
- frontend: X-Org-Id header from active org (mikeApi), OrgContext provider
  wired into the (pages) layout, org page drives the shared active-org state
  so switching org re-scopes the whole app

shared_with retained during transition (retire after parity). Other resource
types (workflows/reviews/chats standalone listing) still use the prior model
and will be scoped next. Backend tsc + frontend tsc clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PolGuixe PolGuixe merged commit 8b6ce95 into staging Jun 7, 2026
5 checks passed
@PolGuixe PolGuixe deleted the feat/teams-resource-scoping branch June 7, 2026 05:44
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