Skip to content

fix: orphan subgraphs not shown as active on the header - #3086

Merged
wilsonrivera merged 7 commits into
mainfrom
wilson/eng-9867-studio-orphan-active-subgraph-doesnt-render-correctly
Jul 16, 2026
Merged

fix: orphan subgraphs not shown as active on the header#3086
wilsonrivera merged 7 commits into
mainfrom
wilson/eng-9867-studio-orphan-active-subgraph-doesnt-render-correctly

Conversation

@wilsonrivera

@wilsonrivera wilsonrivera commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added clearer identification of feature subgraphs via a dedicated flag on subgraph items.
  • Bug Fixes
    • Improved workspace dashboard behavior: subgraph selection/routing, command rendering, and subgraph search now consistently resolve subgraphs using stable target identifiers.
    • Updated workspace loading so federated-graph subgraph associations use the new target-id based shape across the app.
  • Tests
    • Updated workspace retrieval tests to validate the federated-graph subgraph association using target identifiers.

Checklist

Open Source AI Manifesto

This project follows the principles of the Open Source AI Manifesto. Please ensure your contribution aligns with its principles.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Workspace subgraph fields were revised across the proto contract, generated bindings, control-plane namespace assembly, Studio lookup components, and association tests. Federated graphs now carry subgraph target IDs, while namespace-level subgraph objects provide display and routing data.

Changes

Workspace subgraph migration

Layer / File(s) Summary
Workspace subgraph contracts
proto/wg/cosmo/platform/v1/platform.proto, connect/src/wg/cosmo/platform/v1/platform_pb.ts
Namespace subgraphs use the renamed field, federated-graph subgraphs use string references, and the feature-subgraph indicator is added to the schema and generated bindings.
Workspace namespace assembly
controlplane/src/core/services/WorkspaceService.ts, controlplane/test/workspace/get-workspace.test.ts
Namespaces load RBAC-filtered subgraphs before federated graphs; federated-graph relationships are resolved against namespace subgraphs and stored as target IDs, with tests updated for the new association shape.
Studio subgraph resolution
studio/src/components/dashboard/graph-command-group.tsx, studio/src/components/dashboard/workspace-command-wrapper.tsx, studio/src/components/dashboard/workspace-selector.tsx
Command search, graph rendering, active-subgraph selection, and base-subgraph lookup resolve references through namespace.subgraphs.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • wundergraph/cosmo#3063: Modifies the same workspace subgraph population flow and Studio namespace subgraph selection logic.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main fix: orphan subgraphs now show as active in the header.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Router image scan passed

✅ No security vulnerabilities found in image:

ghcr.io/wundergraph/cosmo/router:sha-2c8a0050eb0c603923b042a4de9ea77840346ee6

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.34043% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.30%. Comparing base (4a56b39) to head (d2bde1d).

Files with missing lines Patch % Lines
...o/src/components/dashboard/graph-command-group.tsx 0.00% 15 Missing ⚠️
...io/src/components/dashboard/workspace-selector.tsx 0.00% 5 Missing ⚠️
...components/dashboard/workspace-command-wrapper.tsx 0.00% 4 Missing ⚠️
controlplane/src/core/services/WorkspaceService.ts 97.14% 2 Missing ⚠️

❌ Your patch check has failed because the patch coverage (72.34%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3086       +/-   ##
===========================================
- Coverage   71.12%   43.30%   -27.83%     
===========================================
  Files         335     1070      +735     
  Lines       49350   139680    +90330     
  Branches     6038     7328     +1290     
===========================================
+ Hits        35100    60486    +25386     
- Misses      14224    77334    +63110     
- Partials       26     1860     +1834     
Files with missing lines Coverage Δ
controlplane/src/core/services/WorkspaceService.ts 96.83% <97.14%> (+5.26%) ⬆️
...components/dashboard/workspace-command-wrapper.tsx 0.00% <0.00%> (ø)
...io/src/components/dashboard/workspace-selector.tsx 0.00% <0.00%> (ø)
...o/src/components/dashboard/graph-command-group.tsx 0.00% <0.00%> (ø)

... and 733 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@proto/wg/cosmo/platform/v1/platform.proto`:
- Around line 2850-2857: Update the WorkspaceFederatedGraph message to reserve
field number 5 for the former subgraphs field, then assign repeated string
subgraphs a new unused field number. Preserve all existing field numbers and
names otherwise.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a56c8966-2cd2-425b-9159-0ef430b2824b

📥 Commits

Reviewing files that changed from the base of the PR and between f6ed7c9 and 7fbab81.

⛔ Files ignored due to path filters (1)
  • connect-go/gen/proto/wg/cosmo/platform/v1/platform.pb.go is excluded by !**/*.pb.go, !**/gen/**
📒 Files selected for processing (6)
  • connect/src/wg/cosmo/platform/v1/platform_pb.ts
  • controlplane/src/core/services/WorkspaceService.ts
  • proto/wg/cosmo/platform/v1/platform.proto
  • studio/src/components/dashboard/graph-command-group.tsx
  • studio/src/components/dashboard/workspace-command-wrapper.tsx
  • studio/src/components/dashboard/workspace-selector.tsx

Comment thread proto/wg/cosmo/platform/v1/platform.proto
Comment thread proto/wg/cosmo/platform/v1/platform.proto Outdated
Comment thread studio/src/components/dashboard/graph-command-group.tsx Outdated
Comment thread studio/src/components/dashboard/workspace-command-wrapper.tsx Outdated
@wilsonrivera
wilsonrivera requested a review from JivusAyrus July 16, 2026 16:31
@wilsonrivera
wilsonrivera merged commit 417c9e8 into main Jul 16, 2026
50 checks passed
@wilsonrivera
wilsonrivera deleted the wilson/eng-9867-studio-orphan-active-subgraph-doesnt-render-correctly branch July 16, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants