Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep all-scope mobile filter labels meaningful

rcourtmand755c61f6a6c
diff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
index e99b7ba92b..eea7a91896 100644
--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md
+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md
@@ -3370,6 +3370,9 @@ owns variant resolution plus disabled selection/change runtime, and
variant class catalog, compact-label policy, and segmented button class
selection. Future filter-button-group work should extend those owners instead
of pushing label truncation or segmented variant policy back into the shell.
+Compact labels that begin with `All` must preserve that scope word rather than
+collapsing to a trailing noun such as `time`; feature-owned `compactLabel`
+overrides remain authoritative when a domain needs different concise copy.
Pressed/unpressed selector pills follow the same primitive rule.
`frontend-modern/src/components/shared/SelectablePillButton.tsx` owns the
pressed button shell and `aria-pressed` wiring, while
diff --git a/frontend-modern/browser-verification.json b/frontend-modern/browser-verification.json
index 7c72ea930c..350cf7c4f2 100644
--- a/frontend-modern/browser-verification.json
+++ b/frontend-modern/browser-verification.json
@@ -1,21 +1,16 @@
{
"version": 1,
- "base_sha": "c35ab1ad1cbb5bbf651d8c961eb78cd60a116943",
- "verified_at": "2026-08-03T08:37:35Z",
+ "base_sha": "419385ccfa9aed0ddf59587b1bdce9f62871f2c3",
+ "verified_at": "2026-08-03T09:19:12Z",
"result": "passed",
"changed_paths": [
- "frontend-modern/src/components/Alerts/ThresholdsTable.tsx"
+ "frontend-modern/src/components/shared/filterButtonGroupModel.ts"
],
"content_sha256": {
- "frontend-modern/src/components/Alerts/ThresholdsTable.tsx": "c214d9b68db6b68ae6ad0c1528de31bfdf1af9c29e0bb57bce7cb181386d38aa"
+ "frontend-modern/src/components/shared/filterButtonGroupModel.ts": "affe61eeb2db0bc247b124c9ddff77b55dbc5b4ec477ea121ed6bb9368fc6548"
},
"routes": [
- "/alerts/thresholds/proxmox",
- "/alerts/thresholds/docker",
- "/alerts/thresholds/kubernetes",
- "/alerts/thresholds/truenas",
- "/alerts/thresholds/vmware",
- "/alerts/thresholds/systems"
+ "/alerts/history"
],
"viewports": [
{
@@ -28,19 +23,15 @@
}
],
"states": [
- "Desktop Proxmox threshold tab active with platform icon and Virtualization Hosts table rendered",
- "Desktop Docker threshold tab active with ignored container prefixes and container update alert sections",
- "Desktop Kubernetes threshold tab active with the Clusters section rendered",
- "Desktop TrueNAS threshold tab active with the Systems and Pools sections rendered",
- "Desktop vSphere threshold tab active with the Hosts section rendered",
- "Desktop Machines threshold tab active with the Machines table rendered",
- "Phone-width horizontally scrollable platform tab strip with icons and the active underline indicator"
+ "Desktop Alert History period selector with full Last 24h, Last 7d, Last 30d, and All time labels",
+ "Phone-width Alert History with the filter shell collapsed",
+ "Phone-width expanded period and severity filters with the compact period labels 24h, 7d, 30d, and All"
],
"interactions": [
- "Clicked each of the six platform subtabs in turn and confirmed the icon, label, and active underline moved with the selection",
- "Confirmed each subtab swapped the threshold body to that platform's sections rather than leaving the previous platform rendered",
- "Confirmed the per-tab platform icons still render after the map callback stopped destructuring its argument",
- "Tapped the Docker subtab at 390 pixels and confirmed the active indicator and Docker content applied on the narrow layout",
- "Read the browser console after exercising every tab and confirmed no errors or Solid reactivity warnings"
+ "Expanded the phone-width filter shell and confirmed All time renders as the meaningful compact label All instead of time",
+ "Selected All time and confirmed its full accessible label, visible compact label, pressed state, and unclipped width",
+ "Restored Last 7d and confirmed the selected state moved back correctly",
+ "Confirmed the phone-width document has no horizontal overflow and the desktop selector retains its full labels",
+ "Read the browser console after the responsive interaction pass and confirmed no warnings or errors"
]
}
diff --git a/frontend-modern/src/components/shared/FilterButtonGroup.test.tsx b/frontend-modern/src/components/shared/FilterButtonGroup.test.tsx
index c739160e89..a155eedc32 100644
--- a/frontend-modern/src/components/shared/FilterButtonGroup.test.tsx
+++ b/frontend-modern/src/components/shared/FilterButtonGroup.test.tsx
@@ -5,6 +5,7 @@ import { FilterButtonGroup } from './FilterButtonGroup';
import filterButtonGroupSource from './FilterButtonGroup.tsx?raw';
import filterButtonGroupModelSource from './filterButtonGroupModel.ts?raw';
import filterButtonGroupStateSource from './useFilterButtonGroupState.ts?raw';
+import { getFilterButtonGroupCompactLabel } from './filterButtonGroupModel';
describe('FilterButtonGroup', () => {
afterEach(() => {
@@ -35,6 +36,14 @@ describe('FilterButtonGroup', () => {
expect(filterButtonGroupModelSource).toContain('inline-flex items-center gap-1');
});
+ it('keeps all-scope options meaningful in compact layouts', () => {
+ expect(getFilterButtonGroupCompactLabel({ label: 'All time' })).toBe('All');
+ expect(getFilterButtonGroupCompactLabel({ label: 'Last 24h' })).toBe('24h');
+ expect(getFilterButtonGroupCompactLabel({ label: 'All time', compactLabel: 'Any time' })).toBe(
+ 'Any time',
+ );
+ });
+
it('renders the active option as pressed and routes selection changes', () => {
const onChange = vi.fn();
diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
index c8a2f8e0aa..e878939085 100644
--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts
@@ -470,6 +470,7 @@ describe('shared primitive guardrails', () => {
expect(filterButtonGroupModelSource).toContain('touch-scroll');
expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupButtonClass');
expect(filterButtonGroupModelSource).toContain('getFilterButtonGroupCompactLabel');
+ expect(filterButtonGroupModelSource).toContain("option.label.startsWith('All ')");
expect(generalSettingsPanelSource).toContain('FilterButtonGroup');
expect(generalSettingsPanelSource.match(/<FilterButtonGroup/g) ?? []).toHaveLength(4);
expect(generalSettingsPanelSource).toContain('getLocalePreferenceOptions');
diff --git a/frontend-modern/src/components/shared/filterButtonGroupModel.ts b/frontend-modern/src/components/shared/filterButtonGroupModel.ts
index 5087493fb6..cea112db4c 100644
--- a/frontend-modern/src/components/shared/filterButtonGroupModel.ts
+++ b/frontend-modern/src/components/shared/filterButtonGroupModel.ts
@@ -130,5 +130,6 @@ export function getFilterButtonGroupCompactLabel(
option: Pick<FilterOption<string | number>, 'label' | 'compactLabel'>,
): string {
if (option.compactLabel) return option.compactLabel;
+ if (option.label.startsWith('All ')) return 'All';
return option.label.split(' ').pop() ?? option.label;
}