Skip to content

feat(overview): dismissible fleet alert rows with a small x - #374

Open
yr75myjnqx-tech wants to merge 1 commit into
MiaAI-Lab:mainfrom
yr75myjnqx-tech:dismiss-memory-warning
Open

yr75myjnqx-tech wants to merge 1 commit into
MiaAI-Lab:mainfrom
yr75myjnqx-tech:dismiss-memory-warning

Conversation

@yr75myjnqx-tech

Copy link
Copy Markdown

Problem

On boxes that are expected to run their unified memory tight (e.g. a GB10 serving an FP4 model that intentionally holds ~93 of 121 GB), the Overview page shows a persistent "Unified memory is running low — 2.7 GB available" strip row. The condition is by-design, so the alert is noise — but the row can't be cleared, and it sits at the top of the Overview indefinitely.

Change

Adds a small x dismiss button to each FleetAlertStrip row:

  • Session-only dismissal — component state, deliberately not persisted. A page refresh restores the warning, so nothing can be permanently silenced and a fresh session re-surfaces the condition.
  • Re-fire aware — dismissed keys are pruned whenever the underlying condition is no longer active, so if the alert clears and later fires again, the row reappears without a refresh.
  • Throttle alerts are not dismissible — they're treated as safety-relevant elsewhere in this component (showExceptions filtering), so the x is omitted for them.
  • The existing Open button remains the row's first button, so existing keyboard/automation flows that target the primary action are unchanged.
  • New overview:alerts.dismiss i18n key (en + zh-CN) and .ov-alert__dismiss styles (24px hit target, muted color, hover state).

Tests

  • 4 new cases in FleetAlertStrip.test.tsx: dismiss hides the row; remount (refresh) restores it; clear-then-refire restores it without a refresh; throttle rows render no dismiss button.
  • FleetAlertStrip.test.tsx: 11/11 passing. Full suite: 900/900 tests passing.
  • Note: 10 test files fail to collect on a clean upstream/main checkout (missing src/shared/mainFilesystem imported by SparkCard.tsx) — pre-existing on main, unrelated to this PR; the same files fail identically with and without this change.

Adds a compact dismiss (x) button to each FleetAlertStrip row so a noisy
but known alert (e.g. 'Unified memory is running low' on a box that is
expected to run its unified memory tight) can be cleared without losing
the strip for everyone.

- Dismissal is session-only component state: a page refresh restores the
  warning, so nothing is ever permanently silenced.
- If the underlying condition clears and later fires again, the row
  reappears without a refresh (dismissed keys are pruned when inactive).
- Throttle alerts are safety-relevant and get no dismiss button.
- New overview:alerts.dismiss i18n key (en + zh-CN) and .ov-alert__dismiss
  styles; the existing Open button stays first so keyboard/automation
  flows that target the row's primary action are unchanged.
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.

1 participant