Skip to content

feat(deployment): show a gpu interconnect indicator on deployment views - #3571

Open
baktun14 wants to merge 2 commits into
mainfrom
feat/deployment-gpu-interconnect-indicator
Open

feat(deployment): show a gpu interconnect indicator on deployment views#3571
baktun14 wants to merge 2 commits into
mainfrom
feat/deployment-gpu-interconnect-indicator

Conversation

@baktun14

@baktun14 baktun14 commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Why

Once a deployment is running, users should be able to see at a glance that GPU interconnect is active — the same way we already surface confidential compute (TEE). This reads from authoritative on-chain deployment data, so no stored SDL is required.

Closes CON-691

What

Surfaces a GPU interconnect indicator on the deployment detail and list views when the deployment's on-chain group requirements include the interconnect capability, reflecting the pinned fabric when present.

Mirrors the existing Confidential Compute read pattern (pure reader → thin hook → DI-injected badge rendered next to ConfidentialComputeBadge):

  • utils/gpuInterconnect.ts — reads the on-chain placement requirement capabilities/gpu-interconnect: "true" from group_spec.requirements.attributes (the same array the TEE badge reads for tee/type) and derives the pinned fabric from any capabilities/gpu-interconnect/fabric/<fabric> pin. Reuses the constants already defined in utils/sdl/gpuInterconnect.ts; ignores orphan fabric pins; never throws on missing/malformed data.
  • hooks/useDeclaredGpuInterconnect.ts — memoized wrapper over the deployment's groups.
  • components/shared/GpuInterconnectBadge.tsx — one badge, two forms: full-text (GPU Interconnect (InfiniBand)) on the detail view, and a compact icon + tooltip chip on the narrow list-row name cell. Fabric shown when pinned (InfiniBand/RoCE), otherwise provider-chosen.

Behavior

  • A deployment that opted into interconnect shows the indicator on its detail and list views.
  • The fabric is reflected when pinned.
  • Non-interconnect deployments show nothing.

Notes

  • Ungated (no feature flag), matching the ConfidentialComputeBadge precedent and the authoritative-on-chain rationale — it also catches raw-SDL interconnect deployments.
  • No query/DTO changes: both views already carry groups through the shared deploymentToDto mapper.
  • The fabric-write UI (CON-692) isn't on main yet, but the reader already handles pinned fabrics produced by a hand-written/raw interconnect SDL.

Tests: unit specs for the reader, hook, and badge (all label/fabric/compact/disabled variants, malformed-input safety), driven off realistically seeded on-chain groups.

Summary by CodeRabbit

  • New Features

    • Added GPU interconnect indicators to deployment list rows and detail views.
    • Displays supported interconnect types and selected fabrics through compact badges and tooltips.
    • Handles deployments with unavailable or incomplete interconnect information safely.
  • Tests

    • Added coverage for interconnect detection, fabric labels, aggregation, malformed data, and badge display states.

Surface GPU interconnect on the deployment detail and list views, derived from
the on-chain group placement requirement (capabilities/gpu-interconnect),
mirroring how confidential compute (tee/type) is surfaced. Reflects the pinned
fabric (InfiniBand/RoCE) when present. No query or DTO changes.

Closes CON-691
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 86aa6c72-9a68-4f26-a671-e73cd84d7f66

📥 Commits

Reviewing files that changed from the base of the PR and between 14a23d9 and bb46f65.

📒 Files selected for processing (2)
  • apps/deploy-web/src/utils/gpuInterconnect.spec.ts
  • apps/deploy-web/src/utils/gpuInterconnect.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/deploy-web/src/utils/gpuInterconnect.ts

📝 Walkthrough

Walkthrough

The PR adds GPU interconnect parsing, aggregation, and display support. Deployment details and list rows now show badges for enabled interconnects and selected fabrics.

Changes

GPU interconnect display

Layer / File(s) Summary
Interconnect parsing and aggregation
apps/deploy-web/src/utils/gpuInterconnect.ts, apps/deploy-web/src/utils/gpuInterconnect.spec.ts
Added safe parsing and aggregation of GPU interconnect capabilities and pinned fabrics. Added fabric label formatting and utility coverage.
Interconnect hook and badge
apps/deploy-web/src/hooks/useDeclaredGpuInterconnect.ts, apps/deploy-web/src/hooks/useDeclaredGpuInterconnect.spec.ts, apps/deploy-web/src/components/shared/GpuInterconnectBadge.tsx, apps/deploy-web/src/components/shared/GpuInterconnectBadge.spec.tsx
Added a memoized deployment hook and a badge with compact, full, fabric, and tooltip rendering modes.
Deployment view integration
apps/deploy-web/src/components/deployments/DeploymentDetail.tsx, apps/deploy-web/src/components/deployments/DeploymentListRow.tsx, apps/deploy-web/src/components/deployments/DeploymentSubHeader.tsx
Displayed enabled GPU interconnect badges in deployment details and list rows. Updated DeploymentSubHeader to accept interconnect data.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: stalniy

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/deployment-gpu-interconnect-indicator

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/deploy-web/src/utils/gpuInterconnect.spec.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

apps/deploy-web/src/utils/gpuInterconnect.ts

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.


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

@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.36170% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.56%. Comparing base (6822a25) to head (bb46f65).
⚠️ Report is 3 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...b/src/components/deployments/DeploymentListRow.tsx 0.00% 2 Missing and 1 partial ⚠️
...eb/src/components/deployments/DeploymentDetail.tsx 0.00% 1 Missing ⚠️
...src/components/deployments/DeploymentSubHeader.tsx 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3571      +/-   ##
==========================================
- Coverage   75.90%   75.56%   -0.35%     
==========================================
  Files        1159     1047     -112     
  Lines       30270    27295    -2975     
  Branches     7529     6920     -609     
==========================================
- Hits        22976    20625    -2351     
+ Misses       6432     5868     -564     
+ Partials      862      802      -60     
Flag Coverage Δ *Carryforward flag
api 88.92% <ø> (ø) Carriedforward from 14a23d9
deploy-web 66.26% <89.36%> (+0.43%) ⬆️
log-collector ?
notifications 93.84% <ø> (ø) Carriedforward from 14a23d9
provider-console 81.38% <ø> (ø) Carriedforward from 14a23d9
provider-inventory ?
provider-proxy 88.17% <ø> (ø) Carriedforward from 14a23d9
tx-signer ?

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...web/src/components/shared/GpuInterconnectBadge.tsx 100.00% <100.00%> (ø)
...deploy-web/src/hooks/useDeclaredGpuInterconnect.ts 100.00% <100.00%> (ø)
apps/deploy-web/src/utils/gpuInterconnect.ts 100.00% <100.00%> (ø)
...eb/src/components/deployments/DeploymentDetail.tsx 0.00% <0.00%> (ø)
...src/components/deployments/DeploymentSubHeader.tsx 0.00% <0.00%> (ø)
...b/src/components/deployments/DeploymentListRow.tsx 3.75% <0.00%> (+0.05%) ⬆️

... and 148 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 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: 2

🤖 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 `@apps/deploy-web/src/components/shared/GpuInterconnectBadge.tsx`:
- Around line 53-57: Update the compact branch of GpuInterconnectBadge so it
renders only the Waypoints icon visibly, while retaining “Interconnect” as an
sr-only accessible label. Adjust the compact-mode test to assert that the label
is not visible and preserve the non-compact rendering behavior.

In `@apps/deploy-web/src/utils/gpuInterconnect.ts`:
- Around line 54-55: Update the fabricAttribute selection in the GPU
interconnect utility to accept only attributes whose key is a string, starts
with GPU_INTERCONNECT_FABRIC_PREFIX, and has a non-empty suffix, while retaining
the ENABLED_VALUE check. Add regression tests covering a non-string key and an
empty suffix preceding a valid fabric attribute.
🪄 Autofix

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 454f579e-cdf7-420b-88cc-798b3d40e091

📥 Commits

Reviewing files that changed from the base of the PR and between 6822a25 and 14a23d9.

📒 Files selected for processing (9)
  • apps/deploy-web/src/components/deployments/DeploymentDetail.tsx
  • apps/deploy-web/src/components/deployments/DeploymentListRow.tsx
  • apps/deploy-web/src/components/deployments/DeploymentSubHeader.tsx
  • apps/deploy-web/src/components/shared/GpuInterconnectBadge.spec.tsx
  • apps/deploy-web/src/components/shared/GpuInterconnectBadge.tsx
  • apps/deploy-web/src/hooks/useDeclaredGpuInterconnect.spec.ts
  • apps/deploy-web/src/hooks/useDeclaredGpuInterconnect.ts
  • apps/deploy-web/src/utils/gpuInterconnect.spec.ts
  • apps/deploy-web/src/utils/gpuInterconnect.ts

Comment thread apps/deploy-web/src/components/shared/GpuInterconnectBadge.tsx
Comment thread apps/deploy-web/src/utils/gpuInterconnect.ts Outdated

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — a well-scoped, additive UI indicator that closely mirrors the existing ConfidentialCompute read pattern.

What was reviewed:

  • The on-chain attribute reader (getGroupGpuInterconnect/getDeclaredGpuInterconnect) — capability/fabric parsing, orphan-fabric-pin handling, and malformed-input safety, all backed by matching unit tests.
  • The hook and badge wiring into DeploymentDetail, DeploymentSubHeader, and DeploymentListRow — confirmed groups is already present on the DTOs used by both views, so no query/DTO changes were needed.
  • The compact vs. full badge rendering paths, verified against the spec's label/fabric/compact/disabled variants.
Extended reasoning...

Overview

This PR adds a GPU interconnect indicator to the deployment detail and list views, following the same pure-reader → memoized-hook → DI-injected-badge pattern already used for the Confidential Compute (TEE) badge. New files: utils/gpuInterconnect.ts (reader), hooks/useDeclaredGpuInterconnect.ts (hook), components/shared/GpuInterconnectBadge.tsx (badge), plus specs for each. Existing files (DeploymentDetail.tsx, DeploymentSubHeader.tsx, DeploymentListRow.tsx) are updated only to wire the new hook/badge in alongside the existing TEE badge.

Security risks

None identified. This is a pure read-only UI feature over already-fetched on-chain deployment data (group_spec.requirements.attributes), with no new network calls, no user input, no auth/permission logic, and no DTO/query changes.

Level of scrutiny

Low-to-moderate is appropriate: this is presentation-layer code that mirrors an established, already-shipped pattern (ConfidentialComputeBadge) almost exactly. The reader functions are pure, defensively coded against malformed/missing data (verified by tests), and ungated by design (matching the TEE precedent and the PR's stated on-chain-authoritative rationale).

Other factors

Test coverage is thorough: the reader, hook, and badge each have dedicated specs covering enabled/disabled, single/multiple fabrics, compact mode, and malformed-input cases. The diff is small and self-contained (9 files, mostly new), doesn't touch CODEOWNER-sensitive or critical backend paths, and the wiring into the three consuming components is minimal and consistent with how teeTypes/ConfidentialComputeBadge are already threaded through. No outstanding review comments exist on this PR.

Guard the fabric-pin lookup against a non-string attribute key (which would
throw on startsWith) and against an empty fabric suffix matching before a valid
pin. Keeps the reader's never-throws contract and picks the real fabric.

Ref CON-691

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Straightforward, well-tested feature that mirrors the existing ConfidentialComputeBadge read pattern.

What was reviewed: the on-chain attribute parsing/aggregation in utils/gpuInterconnect.ts, the memoized hook, the badge's compact/full/fabric rendering variants, and the wiring into DeploymentDetail, DeploymentListRow, and DeploymentSubHeader. Checked CodeRabbit's flagged malformed-fabric-key concern against the current code — the typeof and non-empty-suffix guards are already in place, so it's not live. Also checked CodeRabbit's compact-badge-should-be-icon-only suggestion — the compact chip intentionally shows a short visible "Interconnect" label (not icon-only), which is asserted by its own test, so this is a design choice rather than a bug.

Extended reasoning...

Overview

The PR adds a GPU interconnect indicator to the deployment detail and list views, mirroring the existing Confidential Compute (TEE) badge pattern: a pure reader (utils/gpuInterconnect.ts) that parses on-chain group_spec.requirements.attributes for the capabilities/gpu-interconnect flag and any pinned fabric, a thin memoized hook (useDeclaredGpuInterconnect), and a presentational badge component with compact/full variants. Three existing view components (DeploymentDetail, DeploymentListRow, DeploymentSubHeader) are updated to thread the new data through and render the badge. No API/DTO changes — the views already carry groups via the existing deploymentToDto mapper.

Security risks

None identified. This is a pure read/display feature over data the client already has (on-chain deployment groups); there's no new data fetching, no auth/permission logic, and no user input parsing beyond defensively reading attribute arrays that already exist in the app's type surface.

Level of scrutiny

Low-to-moderate. It's an additive, ungated UI feature (no feature flag, matching the TEE badge precedent) touching non-critical display code, not a core transaction or auth path. The reader functions are defensive (never throw on malformed/missing input) and this is verified with explicit malformed-input tests.

Other factors

Patch coverage is 100% on all three new files (reader, hook, badge) per Codecov, with tests covering label/fabric/compact/disabled variants and malformed attribute edge cases (non-string key, empty fabric suffix, orphaned fabric pin). CodeRabbit raised two automated suggestions: one (malformed fabric key guard) is already satisfied by the shipped code, and the other (compact badge should be icon-only) reflects a debatable a11y preference rather than a functional bug — the current behavior is deliberate and test-covered. No outstanding unaddressed human or bot review comments block this PR.

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.

1 participant