Skip to content

feat(ui): GCP org onboarding — Phase 1: canonical contract + lifecycle generalization#12114

Draft
pfe-nazaries wants to merge 5 commits into
feature/gcp-organization-ui-phase0from
feature/gcp-organization-ui-phase1
Draft

feat(ui): GCP org onboarding — Phase 1: canonical contract + lifecycle generalization#12114
pfe-nazaries wants to merge 5 commits into
feature/gcp-organization-ui-phase0from
feature/gcp-organization-ui-phase1

Conversation

@pfe-nazaries

Copy link
Copy Markdown
Contributor

Phase 1 — canonical organization contract + lifecycle generalization

Second PR in the GCP Organization Onboarding UI chain. Stacked on #12104 (Phase 0) — base branch is feature/gcp-organization-ui-phase0; review/merge #12104 first.

Migrates the organizations data layer to the canonical organization-nodes contract and generalizes the onboarding lifecycle by organization type. AWS behavior is visually unchanged; GCP support arrives in Phase 2.

What changes

  • Types — normalized OrgHierarchy (nodes + candidates, kind-discriminated), per-provider wire interfaces, secret/apply payload unions, canonical relation/counter names; dead enum values dropped.
  • Data layer — parameterized org_type, canonical /organization-nodes routes, per-type secret payload builders, discriminated applyDiscovery, degraded-fetch signal.
  • Store — persists the normalized hierarchy, candidate naming, discovery-resume fields (discoveryId + status at trigger), provider-agnostic tree rebuild, persist-version bump.
  • Rendering — org-type/kind-driven tree + table labels (no ID-prefix detection); providers page consumes canonical nodes for both org types (drops the hardcoded filter[org_type]=aws); non-blocking degraded-hierarchy notice.

Testing (integration-first)

  • Phase 0 AWS baseline suite stays green with untouched assertions.
  • New integration coverage: mixed AWS+GCP hierarchy display, degraded-view notice.
  • Canonical tripwire: MSW handlers stop serving the deprecated /organizational-units routes; suite stays green under onUnhandledRequest: "error", proving the UI is fully canonical.

Notes

  • No user-visible change in Phase 1 → no-changelog (the feature's changelog fragment lands once on the principal branch).
  • Merge-gated on the API canonical release being deployed (reads target /organization-nodes).

Spec: openspec/changes/gcp-organization-onboarding-ui (tasks 2.1–2.11).

Pablo F.G added 5 commits July 23, 2026 17:26
- Rename the browser-mode test suffix to .integration.test
- Run babel-plugin-react-compiler in the test build to match production
- Mock next/cache so server actions run under Vitest
- Serve deprecated organizational-units and canonical organization-nodes
  routes over shared fixtures, mirroring the transition-window API
- Cover organizations, secrets, discovery, apply, connection and deletion
- Page-level harness mounting the providers view with MSW wiring
- Semantic methods for the wizard flow and table row actions
- Cover onboarding happy path, blocked accounts, retry and skip
- Cover providers-page grouping, edit-name, credentials and deletion
…(Phase 1)

Migrate the organizations data layer to the canonical organization-nodes
contract and generalize the onboarding lifecycle by organization type,
keeping AWS behavior visually unchanged. GCP support arrives in Phase 2.

Implementation:
- types: normalized OrgHierarchy (nodes + candidates, kind-discriminated),
  per-provider wire interfaces, secret/apply payload unions, canonical
  relation/counter names; drop dead enum values
- actions: parameterize org_type, canonical /organization-nodes routes,
  per-type secret payload builders, discriminated applyDiscovery, and a
  degraded-fetch error flag
- store: persist the normalized hierarchy, candidate naming, discovery-resume
  fields (discoveryId + status at trigger), provider-agnostic tree rebuild,
  persist version bump
- lifecycle: org-type strategy dispatch in the setup submission chain,
  kind-driven tree/table rendering (no ID prefixes)
- providers page: consume canonical nodes for both org types (drop the
  hardcoded filter[org_type]=aws), org_type/kind-driven labels, explicit
  degraded-view signal with a non-blocking notice

Testing (integration-first):
- new integration coverage: mixed AWS+GCP hierarchy display and degraded-view
  notice; harness gains a hierarchyStatus mount option
- update the pure adapter/submission/store unit tests to the new API; remove
  unit tests now covered end-to-end by the integration suite
- canonical tripwire: MSW handlers stop serving the deprecated
  /organizational-units routes; full suite stays green

Refs: openspec/changes/gcp-organization-onboarding-ui tasks 2.1-2.11
@pfe-nazaries pfe-nazaries added the no-changelog Skip including change in changelog/release notes label Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7dc0f99f-ba46-47ec-8204-bb6e198cdac9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/gcp-organization-ui-phase1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pfe-nazaries
pfe-nazaries force-pushed the feature/gcp-organization-ui-phase0 branch from a41f159 to 8be8f6a Compare July 24, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Skip including change in changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant