fix(web): keep machine health visible for single-machine layouts - #1664
Open
yellowdog01 wants to merge 1 commit into
Open
fix(web): keep machine health visible for single-machine layouts#1664yellowdog01 wants to merge 1 commit into
yellowdog01 wants to merge 1 commit into
Conversation
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>
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.
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:
Fixes #1259
Change
With exactly one machine there is nothing to filter, so chips would be
meaningless. This renders a compact, non-interactive
MachineSummaryRowin thefilter bar's slot instead:
CPU 12% · RAM 88%metrics (same inline format as the mobile filtermenu) — no hover needed, so touch layouts are covered
(
MachineHealthTooltipBody), same as the multi-machine filter chipsMulti-machine behavior is unchanged.
Testing
SessionList.machine-filter.test.tsx: the single-machine case now asserts thesummary row (label, count, and inline health via
machinesById) renders withno filter UI
MachineFilterBar.test.tsx: newMachineSummaryRowblock — inline health,no filter button, hover popup parity with chips, stays visible below
mdbun run test(2836 tests) andbun run typecheckpass