chore: integrate podtemplate/details endpoint into frontend - #1278
Open
andyatmiami wants to merge 1 commit into
Open
chore: integrate podtemplate/details endpoint into frontend#1278andyatmiami wants to merge 1 commit into
andyatmiami wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Migrate the workspace details drawer to fetch volumes, labels, and
annotations from the dedicated GET /workspaces/{ns}/{name}/podtemplate/details
endpoint (PR kubeflow#1119) instead of reading them from the list-item payload.
This prepares the frontend for PR kubeflow#1253, which removes pendingRestart,
podTemplate.podMetadata, and podTemplate.volumes from the list response.
New hook — useWorkspaceDetails:
- Follows the established useFetchState pattern (useCallback → useFetchState)
- Fetches DetailsWorkspaceDetails on-demand when a workspace is selected
- Returns [data, loaded, error, refresh] matching the standard tuple
Overview tab — labels from details endpoint:
- WorkspaceDetailsOverview now receives details/detailsLoaded props
- Labels read from details?.podMetadata.labels instead of the list item
- Shows a Spinner while the details request is in-flight
Resources tab — volumes from details endpoint:
- WorkspaceResources now receives details/detailsLoaded props
- Home volume and data volumes read from details?.volumes instead of
the list item, with Spinner placeholders during loading
Activity tab — pendingRestart computed from redirect chains:
- Removes direct use of workspace.pendingRestart (will be dropped by kubeflow#1253)
- Derives the same boolean from redirectChain length on podConfig and
imageConfig, which is semantically equivalent
Start/Stop modals — drop pendingRestart guard:
- workspacePendingUpdate condition simplified from
`workspace?.pendingRestart && (redirectChain checks)` to
`!!workspace && (redirectChain checks)`
- The !!workspace guard provides explicit null narrowing for TypeScript
Mock builders — backward-compatible refactoring:
- buildMockWorkspaceUpdateFromWorkspace accepts optional podMetadata
and volumes args, falling back to list-item fields when not provided,
so existing callers are unaffected
- New buildMockWorkspaceDetails builder for the details endpoint response
- mockNotebookApis details mock derives data from the workspace list
item for consistency with other mock endpoints
Cypress tests — details endpoint intercepts:
- Add interceptApi type overload for the podtemplate/details route
- Add details endpoint intercepts in setupWorkspaceActionTest and the
multi-workspace drawer switching test to prevent unhandled requests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Andy Stoneberg <astonebe@redhat.com>
andyatmiami
force-pushed
the
feat/frontend-details-endpoint-migration
branch
from
July 27, 2026 16:58
65cd845 to
3c5e7b9
Compare
andyatmiami
marked this pull request as ready for review
July 27, 2026 17:40
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.
Migrate the workspace details drawer to fetch volumes, labels, and annotations from the dedicated GET /workspaces/{ns}/{name}/podtemplate/details endpoint (PR #1119) instead of reading them from the list-item payload. This prepares the frontend for PR #1253, which removes pendingRestart, podTemplate.podMetadata, and podTemplate.volumes from the list response.
New hook — useWorkspaceDetails:
Overview tab — labels from details endpoint:
Resources tab — volumes from details endpoint:
Activity tab — pendingRestart computed from redirect chains:
Start/Stop modals — drop pendingRestart guard:
workspace?.pendingRestart && (redirectChain checks)to!!workspace && (redirectChain checks)Mock builders — backward-compatible refactoring:
Cypress tests — details endpoint intercepts: