feat(FR-2827): make deployment tags clickable to filter the list#7274
Merged
graphite-app[bot] merged 1 commit intoMay 7, 2026
Conversation
Member
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
aac7cf4 to
d10bb0c
Compare
7 tasks
6 tasks
8df2e14 to
731574c
Compare
d10bb0c to
3438fb6
Compare
Contributor
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
Makes deployment tags interactive across the deployments surface so users can navigate to the deployment list with a tag filter pre-applied via the existing JSON filter query parameter.
Changes:
- Switch deployments list pages to treat
filteras a JSON query param (vianuqsparseAsJson) and plumb a structuredGraphQLFilterintoDeploymentList. - Introduce
DeploymentTagChipsand use it to render clickable tags in the deployments list table and the deployment detail overview. - Adjust
BAIGraphQLPropertyFiltercondition ID stability to avoid remount churn.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| react/src/pages/DeploymentListPage.tsx | Parses filter from the URL as JSON and passes a structured filter into the list + query variables. |
| react/src/pages/AdminDeploymentListPage.tsx | Same JSON-based filter query-param handling for the admin deployments list page. |
| react/src/components/DeploymentTagChips.tsx | New clickable/tag-chip renderer that navigates to the deployments list with a tag filter applied. |
| react/src/components/DeploymentList.tsx | Replaces inline tag rendering with DeploymentTagChips and changes filter prop types to GraphQLFilter. |
| react/src/components/DeploymentConfigurationSection.tsx | Uses DeploymentTagChips for the Overview “Tags” item and updates fragment selections accordingly. |
| packages/backend.ai-ui/src/components/BAIGraphQLPropertyFilter.tsx | Updates condition derivation / IDs to stabilize rendered tags across renders. |
3438fb6 to
bf47789
Compare
Merge activity
|
Resolves #7273(FR-2827) Stacked on #7272. ## Summary Deployment tags shown in the deployment list table and the detail Overview card are now interactive. Activating a tag (mouse click or keyboard Enter/Space) navigates to the deployment list with that tag pre-applied as a filter, so a tag becomes a one-click pivot to "find all deployments tagged X." The URL shape uses the existing `iContains` filter that the list page already understands: ``` /deployments?filter={"tags":{"iContains":"<tag>"}} ``` (URI-encoded in the actual link.) Activating a chip from the admin context routes to `/admin-deployments` instead so users stay within the admin list. ## Changes - `react/src/components/DeploymentTagChips.tsx` *(new)* — fragment-based component (`DeploymentTagChips_metadata` on `ModelDeploymentMetadata`) that renders all tag chips for a deployment. Wraps antd `<Tag>` with `role="button"`, `tabIndex={0}`, and Enter/Space `onKeyDown`. Owns the filter-URL contract inline (`buildDeploymentTagFilterUrl`) and uses `useLocation()` to keep admin-context activations on `/admin-deployments`. `stopRowClick` prop opts into `e.stopPropagation()` for use inside the table row; `fallback` prop renders when there are no tags. - `react/src/components/DeploymentList.tsx` — replaces the inline tag rendering with `<DeploymentTagChips metadataFrgmt={row.metadata} stopRowClick fallback={…} />`. Filter prop changed from `string` to `GraphQLFilter` object so callers no longer JSON-stringify. - `react/src/components/DeploymentConfigurationSection.tsx` — replaces the inline tag rendering in the Overview "Tags" descriptions item with `<DeploymentTagChips metadataFrgmt={deployment?.metadata ?? null} fallback={renderFallback()} />`. Spreads `DeploymentTagChips_metadata` in the page query. - `react/src/pages/DeploymentListPage.tsx` and `react/src/pages/AdminDeploymentListPage.tsx` — read `filter` as a `GraphQLFilter` object via `nuqs` `parseAsJson`, with a guard that falls back to `{}` for non-object payloads (null/array/primitive). Removes the page-local `parseFilter*` helpers. - `packages/backend.ai-ui/src/components/BAIGraphQLPropertyFilter.tsx` — derive `conditions` from `value` instead of holding it in `useState`. Reassigns sequential ids (`cond-${i}`) on derive so React keys stay stable; the previous random-id-per-call approach would have unmounted every Tag on every render once `conditions` was no longer a state. This is the bug surfaced when an external prop change (URL-driven query state) updated `value` but the rendered tags stayed on the stale state. ## Verification - `bash scripts/verify.sh`: Relay PASS, Lint PASS, Format PASS. Two pre-existing TypeScript failures (`packages/backend.ai-client/src/client.ts` implicit-any errors and `react/src/components/DeleteForeverVFolderModalV2.tsx` missing-`options` error) reproduce on the parent branch (PR #7272) without these changes — they are unrelated. - Manual: clicking and Enter/Space-activating a tag in both the list and the detail page navigate to the filtered list URL, the table reloads with only matching deployments, and the rendered filter tags reflect the URL value across re-renders. Activating a tag from `/admin-deployments` stays within the admin list. ## Notes - No backend changes — the `{ tags: { iContains: ... } }` filter shape is already handled by the list pages. - Detail-side splits comma-joined tag strings before render (preserved behavior); each individual tag becomes its own clickable chip. - The chip currently replaces the entire `filter` query param when activated. This matches the issue's "filter applied" requirement; merging with an already-applied filter is left as a future polish.
bf47789 to
4276682
Compare
agatha197
pushed a commit
that referenced
this pull request
May 18, 2026
Part of the recent main-branch docs catch-up plan (Work Item 11). New page documenting the Deployment Preset feature introduced over Q1–Q2 2026: - FR-2750 (#7091) feature spec - FR-2761 (#7125) admin create / edit / delete UI - FR-2762 (#7127) preset detail view in VFolderDeployModal - FR-2801 (#7224) pre-populate launcher fields from preset - FR-2805 (#7233) URLSearchParams in preset navigation - FR-2827 (#7274) clickable deployment tags filter the list - FR-2810 (#7242) batch image canonical names on admin preset list - FR-2773 (#7153) preserve auto-selected resourcePresetId New sections: 1. What is a Deployment Preset? 2. (Admin) Manage Deployment Presets — list, filter, create, edit, delete (typed-confirm) 3. Using a Preset when Deploying a Model — preset detail, auto/manual deploy paths 4. Pre-populated Launcher Fields 5. Filtering by Tags Also adds book.config.yaml navigation entries under the Model Serving category in all 4 languages. Updated in all 4 languages (en/ko/ja/th). Screenshots flagged with TODO markers for separate capture. Linked from model_serving.md (PR B) so PR B's cross-references now resolve.
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.

Resolves #7273(FR-2827)
Stacked on #7272.
Summary
Deployment tags shown in the deployment list table and the detail Overview card are now interactive. Activating a tag (mouse click or keyboard Enter/Space) navigates to the deployment list with that tag pre-applied as a filter, so a tag becomes a one-click pivot to "find all deployments tagged X."
The URL shape uses the existing
iContainsfilter that the list page already understands:(URI-encoded in the actual link.) Activating a chip from the admin context routes to
/admin-deploymentsinstead so users stay within the admin list.Changes
react/src/components/DeploymentTagChips.tsx(new) — fragment-based component (DeploymentTagChips_metadataonModelDeploymentMetadata) that renders all tag chips for a deployment. Wraps antd<Tag>withrole="button",tabIndex={0}, and Enter/SpaceonKeyDown. Owns the filter-URL contract inline (buildDeploymentTagFilterUrl) and usesuseLocation()to keep admin-context activations on/admin-deployments.stopRowClickprop opts intoe.stopPropagation()for use inside the table row;fallbackprop renders when there are no tags.react/src/components/DeploymentList.tsx— replaces the inline tag rendering with<DeploymentTagChips metadataFrgmt={row.metadata} stopRowClick fallback={…} />. Filter prop changed fromstringtoGraphQLFilterobject so callers no longer JSON-stringify.react/src/components/DeploymentConfigurationSection.tsx— replaces the inline tag rendering in the Overview "Tags" descriptions item with<DeploymentTagChips metadataFrgmt={deployment?.metadata ?? null} fallback={renderFallback()} />. SpreadsDeploymentTagChips_metadatain the page query.react/src/pages/DeploymentListPage.tsxandreact/src/pages/AdminDeploymentListPage.tsx— readfilteras aGraphQLFilterobject vianuqsparseAsJson, with a guard that falls back to{}for non-object payloads (null/array/primitive). Removes the page-localparseFilter*helpers.packages/backend.ai-ui/src/components/BAIGraphQLPropertyFilter.tsx— deriveconditionsfromvalueinstead of holding it inuseState. Reassigns sequential ids (cond-${i}) on derive so React keys stay stable; the previous random-id-per-call approach would have unmounted every Tag on every render onceconditionswas no longer a state. This is the bug surfaced when an external prop change (URL-driven query state) updatedvaluebut the rendered tags stayed on the stale state.Verification
bash scripts/verify.sh: Relay PASS, Lint PASS, Format PASS. Two pre-existing TypeScript failures (packages/backend.ai-client/src/client.tsimplicit-any errors andreact/src/components/DeleteForeverVFolderModalV2.tsxmissing-optionserror) reproduce on the parent branch (PR fix(FR-2826): polish deployment revision UX (terminology, env block, start command, applying-state polling) #7272) without these changes — they are unrelated./admin-deploymentsstays within the admin list.Notes
{ tags: { iContains: ... } }filter shape is already handled by the list pages.filterquery param when activated. This matches the issue's "filter applied" requirement; merging with an already-applied filter is left as a future polish.