fix(ui): distinguish AI Runway integration from runtime install status#294
Open
robert-cronin wants to merge 4 commits into
Open
fix(ui): distinguish AI Runway integration from runtime install status#294robert-cronin wants to merge 4 commits into
robert-cronin wants to merge 4 commits into
Conversation
kaito-project#244) When a provider integration (e.g. the KAITO shim) is registered but the underlying runtime operator and CRDs are not installed, the Settings → Runtimes page only reflected the underlying runtime probe results, leaving users confused about which side of the integration was actually healthy. Surface the integration state independently so the UI can show both at once: * Add 'shimRegistered', 'shimConnected', 'shimLastHeartbeat' to the shared RuntimeStatus and InstallationStatus types. * Compute shim status in the backend from the InferenceProviderConfig 'status.ready' and 'status.lastHeartbeat' fields, treating the integration as connected only when a heartbeat has arrived within 3x the controller heartbeat interval (3 minutes). * Render an 'AI Runway integration: Connected / Not heartbeating' row on each runtime card and in the installation detail panel for runtimes that require an upstream operator (LLM-D and vLLM keep their existing CRD-less treatment unchanged). * Add a short clarifying sentence in the detail panel describing that the CRD / Operator rows refer to the underlying runtime. The reported behaviour (PR kaito-project#175) of accurately showing red X icons and the Install button when the upstream operator is missing is preserved; this change makes it explicit why the integration can still report healthy while the runtime itself is not yet installed. Tested with backend (697/697) and frontend (121/121) suites; added unit tests for the new heartbeat-freshness helper, a regression test for the user's scenario, and frontend tests covering the new card and detail-panel rows. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses confusion on Settings → Runtimes by separating the status of the AI Runway provider integration (shim heartbeat) from the status of the underlying runtime installation (operator + CRDs), so users can tell whether to click Install or troubleshoot integration connectivity.
Changes:
- Added optional
shimRegistered,shimConnected, andshimLastHeartbeatfields to runtime and installation status types and API responses. - Implemented
computeShimStatus()in the backend and wired it into both runtimes status and provider installation status endpoints. - Updated the Settings UI to show a distinct “AI Runway integration” status line and added regression tests for the #244 scenario.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| shared/types/settings.ts | Extends RuntimeStatus with optional shim integration status fields. |
| shared/types/installation.ts | Extends InstallationStatus with optional shim integration status fields. |
| backend/src/services/kubernetes.ts | Adds computeShimStatus() and includes shim fields in getRuntimesStatus(). |
| backend/src/services/kubernetes-runtime-status.test.ts | Adds unit tests for computeShimStatus() and regression/integration tests for getRuntimesStatus(). |
| backend/src/routes/installation.ts | Exposes shim fields from /providers/:providerId/status. |
| backend/src/routes/installation.test.ts | Tests that the installation status route includes shim fields. |
| frontend/src/pages/SettingsPage.tsx | Adds “AI Runway integration” status rendering (card + detail panel) and heartbeat age formatting. |
| frontend/src/pages/SettingsPage.test.tsx | Adds UI tests covering Connected and Not heartbeating rendering paths and the #244 regression scenario. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…iveTime Signed-off-by: robert-cronin <robert.owen.cronin@gmail.com>
Signed-off-by: Robbie Cronin <robert.owen.cronin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On Settings → Runtimes, the page didn't distinguish AI Runway's integration with a runtime (the provider shim's heartbeat) from the underlying runtime being installed (operator + CRDs in the cluster). When a user looked at KAITO they couldn't tell whether to click Install or troubleshoot the AI Runway side — a single mixed signal was driving multiple unrelated states.
This PR splits those concepts into two clearly-labelled, independently-evaluated statuses, with plain-language copy aimed at users who aren't familiar with Kubernetes (per
AGENTS.md).AI Prompt (Optional)
🤖 AI Prompt Used
AI Tool: Claude (GitHub Copilot CLI)
Type of Change
Related Issues
Fixes #244
Changes Made
Shared types (
shared/types/settings.ts,shared/types/installation.ts)RuntimeStatusandInstallationStatus:shimRegistered— anInferenceProviderConfigexists for the runtimeshimConnected—status.ready === trueandlastHeartbeatis within 3 minutes (3× the shim's 1-minute interval)shimLastHeartbeat— raw timestamp for UI displayBackend (
backend/src/services/kubernetes.ts,backend/src/routes/installation.ts)computeShimStatus()helper with aSHIM_HEARTBEAT_FRESHNESS_MS = 3 * 60 * 1000window. Boundary uses<=; future heartbeats are treated as fresh (defensive against clock skew).getRuntimesStatus()and/providers/:providerId/statusso both surfaces emit the new fields.Frontend (
frontend/src/pages/SettingsPage.tsx)Testing
bun run test) — 697/697 backend, 121/121 frontendkindcluster with the AI Runway shim + KAITO toggled in/out viahelm upgrade --install/helm uninstall)New test coverage:
backend/src/services/kubernetes-runtime-status.test.ts— +7 unit tests forcomputeShimStatus(3-min boundary, future heartbeats, missing fields, invalid timestamps) + 2 integration tests ingetRuntimesStatus(regression for the user's exact scenario + stale-heartbeat case)backend/src/routes/installation.test.ts— +1 test verifying the installation route exposes the new fieldsfrontend/src/pages/SettingsPage.test.tsx— +2 tests covering the Connected and Not heartbeating rendering pathsManual repro of the original #244 scenario:
Reload Settings → Runtimes. The KAITO card now shows Not Installed with AI Runway integration: Connected alongside it, and the Install KAITO button is surfaced — the user knows exactly what to do.
All four meaningful state combinations were walked through end-to-end during manual testing:
Checklist
bun run lint(pre-existing ESLint config issue in the repo prevents the script from running — unrelated to this change)Screenshots
After (original #244 scenario — shim heartbeating, KAITO operator/CRD absent):
The card shows Not Installed with AI Runway integration: Connected clearly separated, and the detail panel offers the Install KAITO button alongside the explanatory copy.
Additional Notes
SHIM_HEARTBEAT_FRESHNESS_MSinkubernetes.ts) — easy to tune in one place if the heartbeat interval changes.shimRegistered, the integration row simply doesn't render and the page degrades to the previous behaviour.