Skip to content

feat(vmm): add a status filter to the console instance list - #1193

Merged
Leechael merged 2 commits into
nextfrom
feat/vmm-ui-status-filter
Sep 15, 2026
Merged

Leechael merged 2 commits into
nextfrom
feat/vmm-ui-status-filter

Conversation

@Leechael

@Leechael Leechael commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Problem

The VMM console can search instances by keyword, but not by lifecycle status. The list is paginated server-side, so a client-only filter would only cover the current page and would report the wrong total.

Fix

  • Add StatusRequest.status (running, stopped, exited, stopping, removing). Empty keeps the previous all-status behavior.
  • Apply the filter in list_vms before pagination, using the same status values already shown in the Status column.
  • Share status computation through vm_runtime_status so the filter and the list agree.
  • Add a toolbar select next to search. Changing it resets to page 1, matching page-size changes.

Old clients omit the field, so existing Status callers are unchanged.

Verification

  • npm run build in dstack/vmm/ui
  • cargo check -p dstack-vmm-rpc
  • prek on the changed files

@kvinwang kvinwang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

The console could search by keyword but not by lifecycle status. The
list is paginated server-side, so a client-only filter would only
cover the current page and would report the wrong total.

Add StatusRequest.status and apply it in list_vms before pagination,
using the same running/stopped/exited/stopping/removing values already
shown in the Status column. Empty status keeps the previous all-status
behavior. The toolbar select resets to page 1, matching page-size
changes.

Status computation is shared through vm_runtime_status so the filter
and the list agree.

Verified with `npm run build` in dstack/vmm/ui, `cargo check -p
dstack-vmm-rpc`, and prek on the changed files.
@Leechael
Leechael force-pushed the feat/vmm-ui-status-filter branch from ab4ca7d to 3b75a4c Compare September 15, 2026 07:24
prek and cargo fmt --check failed on the four-item use super line
introduced while resolving the rebase conflict.
@Leechael
Leechael merged commit b7ed51b into next Sep 15, 2026
12 checks passed
@Leechael
Leechael deleted the feat/vmm-ui-status-filter branch September 15, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants