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.

Make safety-notice actions touch-sized and keyboard-visible

pulse-triage[bot]e583557b61d7
diff --git a/frontend-modern/browser-tests/inline-notice-access.cjs b/frontend-modern/browser-tests/inline-notice-access.cjs
index 2c43acfb5f..52aff38c41 100644
--- a/frontend-modern/browser-tests/inline-notice-access.cjs
+++ b/frontend-modern/browser-tests/inline-notice-access.cjs
@@ -72,8 +72,15 @@ async function run(variant) {
try {
assert.match(result.source, /^[a-f0-9]{40}$/);
assert.equal(result.playwright, JSON.parse(fs.readFileSync(root + '/tests/integration/package-lock.json')).packages['node_modules/@playwright/test'].version);
- for (const [file, digest] of Object.entries(binding.sources))
- assert.equal(hash(fs.readFileSync(frontend + '/' + file)), digest, file);
+ for (const [file, digest] of Object.entries(binding.sources)) {
+ // The parent variant is compiled in the proof VM from an explicit,
+ // hash-bound original primitive input. Do not replace assigned source
+ // or pretend the final primitive supplied those parent pixels.
+ const input = variant === 'parent' && file === 'src/components/shared/InlineNotice.tsx'
+ ? root + '/tmp/inline-notice-access/parent-runtime.tsx'
+ : frontend + '/' + file;
+ assert.equal(hash(fs.readFileSync(input)), digest, file);
+ }
const docHash = hash(fs.readFileSync(root + '/docs/VM_DISK_MONITORING.md'));
assert.equal(binding.artifacts['docs/VM_DISK_MONITORING.md'], docHash);
result.doc_sha256 = docHash;
diff --git a/frontend-modern/browser-tests/inline-notice-access.tsx b/frontend-modern/browser-tests/inline-notice-access.tsx
index a6db3daa01..120e74b4c3 100644
--- a/frontend-modern/browser-tests/inline-notice-access.tsx
+++ b/frontend-modern/browser-tests/inline-notice-access.tsx
@@ -3,7 +3,7 @@
import { createSignal, For, Show } from 'solid-js';
import { render } from 'solid-js/web';
import { Router, Route } from '@solidjs/router';
-import { DarkModeContext } from '../src/contexts/appRuntime';
+import { DarkModeContext, WebSocketContext, type WebSocketStore } from '../src/contexts/appRuntime';
import { useWorkloads } from '../src/hooks/useWorkloads';
import { GuestRow } from '../src/components/Workloads/GuestRow';
import { GuestDrawer } from '../src/components/Workloads/GuestDrawer';
@@ -15,6 +15,15 @@ import Docs from '../src/pages/Docs';
import type { Resource } from '../src/types/resource';
import '../src/index.css';
+// ResourceDetailDrawerOverviewTab reads the real context, not a mocked drawer.
+// This transport is inert and cannot open a connection or send a command.
+const socket = {
+ activeAlerts: {}, state: { resources: [], activeAlerts: [], recentlyResolved: [] },
+ connected: () => false, initialDataReceived: () => true, resourceSnapshotReceived: () => false,
+ resourceChange: () => ({ version: 0, changedIds: null, changedKeys: null }),
+ changedResourceMetaSince: () => null, changedResourceIdsSince: () => null, shutdown: () => {},
+} as unknown as WebSocketStore;
+
const resource: Resource = {
id: 'fixture:pve1:101', type: 'vm', name: 'safety-guest', displayName: 'safety-guest',
platformId: 'fixture', platformType: 'proxmox-pve', platformScopes: ['proxmox-pve'],
@@ -74,9 +83,9 @@ function RecoveryFixture() {
}
render(() => <DarkModeContext.Provider value={() => document.documentElement.classList.contains('dark')}>
- <Router>
+ <WebSocketContext.Provider value={socket}><Router>
<Route path="/docs/*docPath" component={Docs} />
<Route path="/recovery-fixture" component={RecoveryFixture} />
<Route path="*" component={GuestFixture} />
- </Router>
+ </Router></WebSocketContext.Provider>
</DarkModeContext.Provider>, document.getElementById('root')!);
diff --git a/frontend-modern/src/components/shared/InlineNotice.tsx b/frontend-modern/src/components/shared/InlineNotice.tsx
index c7db692417..ad8643d154 100644
--- a/frontend-modern/src/components/shared/InlineNotice.tsx
+++ b/frontend-modern/src/components/shared/InlineNotice.tsx
@@ -43,7 +43,7 @@ const INLINE_NOTICE_ICON_CLASS =
const INLINE_NOTICE_CONTENT_CLASS = 'min-w-0 flex-1 space-y-1';
const INLINE_NOTICE_ACTION_BASE_CLASS =
- 'inline-flex items-center gap-1 text-xs font-semibold underline-offset-2 hover:underline';
+ 'inline-flex min-h-11 min-w-11 max-w-full items-center gap-1 rounded-sm text-left text-xs font-semibold underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current sm:min-h-0 sm:min-w-0';
export const INLINE_NOTICE_ACTION_TONE_CLASSES: Record<InlineNoticeTone, string> = {
danger: 'text-red-800 dark:text-red-100',