Files
yaoweiprc 88c84ee3a9 feat(konnect): move Konnect projects into a global Control Planes organization
The Konnect PAT is stored per-account, but the projects it synced were created
with `parentId: organizationId`, so the same PAT could be synced independently
under several organizations.

Konnect projects now live in a hardcoded local-only organization,
`org_konnect_<accountId>`, displayed as "Control Planes" in the organization
dropdown. The Projects/Konnect tab split in the navigation sidebar is gone —
the sidebar switches its header controls based on the active organization
instead.

- Add `getKonnectOrganizationId` / `isKonnectOrganizationId` /
  `isLocalOrganizationId` / `buildKonnectOrganization` to the organization model.
- Aggregate the per-organization `konnectSync` feature flag into an account-wide
  value cached in localStorage, refreshed once per app start via a new
  `AsyncTask.SyncKonnectFeature`.
- Guard every organization-scoped API call for local-only organizations:
  features, storage rules, collaborators, invites, member roles, team projects,
  git project count, real-time presence and the SSE stream.
- Migrate existing Konnect projects on startup. A single source organization is
  migrated silently; multiple source organizations prompt the user to pick one,
  and the rest are deleted.
- Reject dragging a collection workspace between Konnect projects, which would
  orphan its `konnectServiceId`.
- Decouple the Konnect sync trigger from the sidebar so the settings modal no
  longer needs it passed down as a ref.

Also fixes a pre-existing bug where `syncProjects` issued `fetchTeamProjects`
before checking whether the organization was local.
2026-07-30 18:10:54 +08:00
..