Skip to content

fix(web): keep machine health visible for single-machine layouts - #1664

Open
yellowdog01 wants to merge 1 commit into
tiann:mainfrom
yellowdog01:fix/machine-health-single-machine
Open

fix(web): keep machine health visible for single-machine layouts#1664
yellowdog01 wants to merge 1 commit into
tiann:mainfrom
yellowdog01:fix/machine-health-single-machine

Conversation

@yellowdog01

Copy link
Copy Markdown

Problem

Since the v0.25.0 sidebar redesign, the machine filter bar is the only path for
machine CPU/RAM health and session counts into the UI, and it only renders with
2+ machines. On a single-machine setup (e.g. one VM accessed from both phone and
desktop, as in #1259) that means:

  • No CPU/RAM health anywhere, desktop or mobile
  • No per-machine/total session counts

Fixes #1259

Change

With exactly one machine there is nothing to filter, so chips would be
meaningless. This renders a compact, non-interactive MachineSummaryRow in the
filter bar's slot instead:

  • Machine label + session count, visible on all breakpoints
  • Inline CPU 12% · RAM 88% metrics (same inline format as the mobile filter
    menu) — no hover needed, so touch layouts are covered
  • Pointer users additionally get the full capacity popup
    (MachineHealthTooltipBody), same as the multi-machine filter chips

Multi-machine behavior is unchanged.

Testing

  • SessionList.machine-filter.test.tsx: the single-machine case now asserts the
    summary row (label, count, and inline health via machinesById) renders with
    no filter UI
  • MachineFilterBar.test.tsx: new MachineSummaryRow block — inline health,
    no filter button, hover popup parity with chips, stays visible below md
  • bun run test (2836 tests) and bun run typecheck pass

The sidebar redesign gated the machine filter bar behind >= 2 machines,
so a single-machine setup lost its only surface for machine CPU/RAM
health and session counts (tiann#1259).

With exactly one machine there is nothing to filter, so render a compact
non-interactive summary row in the bar's slot instead: machine label,
session count, and inline CPU/RAM metrics — visible on touch layouts too,
since no hover is needed. Pointer users additionally get the same
capacity popup as the filter chips.

Fixes tiann#1259

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
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.

regression(web): retain machine health and session counts for single-machine and touch layouts

1 participant