feat(studio): return the resolved deployment from useModelDeploymentStatus - #1882
Draft
aray12 wants to merge 1 commit into
Draft
feat(studio): return the resolved deployment from useModelDeploymentStatus#1882aray12 wants to merge 1 commit into
aray12 wants to merge 1 commit into
Conversation
Contributor
|
aray12
force-pushed
the
deployment-identity-hook/alray
branch
from
September 9, 2026 19:17
696311c to
abccfdf
Compare
aray12
removed this pull request from stack #1883
September 9, 2026 19:18
aray12
changed the base branch from
models-naming/alray
to
deployments-tab-order/alray
September 9, 2026 19:18
aray12
added this pull request to stack #1909
September 9, 2026 19:19
…tatus
The hook already walked model_providers -> ModelProvider -> ModelDeployment
and fetched the whole deployment object, then returned only
`{ status, isLoading }`. Nothing in Studio could name the deployment serving a
model, because the one place that knew threw it away.
That gap is why the only "where is it deployed" affordance that ships today
(FilesetMetadataPanel) links to the deployments *list* and leaves the user to
find the row, and why `getWorkspaceDeploymentDetailsRoute` — which needs a
deployment name — has no caller reachable from a model.
Adds `deployment` and `deploymentRef` to the return value. No new request:
both come from data the hook had already resolved. `deploymentRef` mirrors the
arguments the deployment query was issued with, so a caller building a link
cannot drift from what was actually fetched, and it is populated as soon as
the provider names a deployment — before the deployment itself has loaded — so
a link can render without waiting.
Both existing consumers (useModelChatAvailability, DeploymentIndicator)
destructure only `status` and `isLoading`, so they are unaffected.
Wires up ModelPanel's `deployment` prop from the Base Models route. The prop
has existed since the panel was written and drives a status dot and a Status
row, but no caller ever passed it, so that UI was dead. It now renders.
Adds the hook's first test file, covering the no-providers case, the full
walk, the provider-named-no-deployment case, a cross-workspace deployment
reference, and the render-early contract for `deploymentRef`.
Signed-off-by: Alex Ray <alray@nvidia.com>
aray12
removed this pull request from stack #1909
September 9, 2026 20:11
aray12
force-pushed
the
deployment-identity-hook/alray
branch
from
September 9, 2026 20:11
abccfdf to
c62e450
Compare
aray12
added this pull request to stack #1914
September 9, 2026 20:12
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.
Summary
useModelDeploymentStatusalready walkedmodel_providers → ModelProvider → ModelDeploymentand fetched the whole deployment object, then returned only{ status, isLoading }. Nothing in Studio could name the deployment serving a model, because the one place that knew threw it away.This returns the deployment alongside its status. No new request — both additions come from data the hook had already resolved.
Changes
deploymentanddeploymentRefto the hook's return value.ModelPanel'sdeploymentprop from the Base Models route.Why this matters
The only "where is it deployed" affordance that ships today (
FilesetMetadataPanel) links to the deployments list page and leaves the user to find the row.getWorkspaceDeploymentDetailsRouteneeds a deployment name, and no hook surfaced one — so no model-side UI could link to a specific deployment.deploymentRefmirrors the arguments the deployment query was issued with, so a caller building a link cannot drift from what was actually fetched. It is populated as soon as the provider names a deployment — before the deployment itself has loaded — so a link can render without waiting on the second request.Dead UI now renders
ModelPanelhas accepted adeployment?: ModelDeployment | nullprop since it was written, driving a status dot and aStatusrow. No caller ever passed it, so that UI was unreachable. The Base Models route now supplies it.Backward compatibility
Both existing consumers —
useModelChatAvailabilityandDeploymentIndicator— destructure onlystatusandisLoading, so they are unaffected.Base
Targets
maindirectly. This is the bottom of stack #1914 — the only genuine dependency edge in the original series. Both #1893 (Deploy CTA) and #1894 (Deployment column) fail to compile without thedeploymentRefthis PR adds:Note that #1893 and #1894 depend on this PR but not on each other — they touch no file in common, and #1894 typechecks and passes its tests with only this PR applied. They are stacked sequentially for convenience, not necessity, and can be reviewed in either order.
Type of Change
Quality Gates
New
useModelDeploymentStatus/index.test.tsxcovers: the no-providers case, the full provider→deployment walk, a provider naming no deployment, a cross-workspace deployment reference, and the render-early contract fordeploymentRef.Verification
Signed-off-by:traileruv run pre-commit run -apasses, or any blocked checks are identified belowTargeted validation:
pnpm --filter nemo-studio-ui test src/hooks/useModelDeploymentStatus— 5 tests passed (new file)pnpm --filter nemo-studio-ui test src/hooks src/routes/WorkspaceBaseModelsRoute src/components/dataViews/CustomModelsDataView src/components/sidePanels/ModelPanels— 10 files, 72 tests passedpnpm --filter nemo-studio-ui typecheck— cleanpnpm --filter nemo-studio-ui lint:fix— cleanuv run pre-commit run -anot run in full; the commit-scoped pre-commit hooks ran and passed on commit.