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.

Align frontend safety controls with live ages and hard log deadlines

pulse-triage[bot]0dd0d87c2aea
diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
index 95d7e08e7d..e8015c4f0e 100644
--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts
@@ -1575,10 +1575,15 @@ describe('settings architecture guardrails', () => {
// The displayed verdict can come from the 24h localStorage cache, so the
// Up to date state must carry the age of the check it came from through
// the shared presentation helper, or a stale verdict reads as a live
- // comparison (#1601). The copy stays in the presentation owner, never
- // inline in the panel shell.
+ // comparison (#1601). The shared clock must keep that age moving while
+ // the panel stays mounted. The copy stays in the presentation owner,
+ // never inline in the panel shell.
expect(updatesSettingsPanelSource).toContain(
- 'getUpdateCheckedLabel(updateStore.lastCheckedAt())',
+ "import { useRelativeTimeNow } from '@/utils/relativeTimeClock';",
+ );
+ expect(updatesSettingsPanelSource).toContain('const now = useRelativeTimeNow();');
+ expect(updatesSettingsPanelSource).toContain(
+ 'getUpdateCheckedLabel(updateStore.lastCheckedAt(), now())',
);
expect(updatesSettingsPanelSource).toContain('!props.versionInfo()?.isSourceBuild');
expect(updatesPresentationSource).toContain("return 'Not checked yet'");
diff --git a/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts b/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts
index 84734c07be..85e6935c94 100644
--- a/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts
+++ b/frontend-modern/src/features/docs/__tests__/truenasErrorGuide.test.ts
@@ -107,7 +107,13 @@ describe('shipped TrueNAS error diagnosis', () => {
const commands = [...target.querySelectorAll('pre code')].map((node) => node.textContent!);
expect(commands).toHaveLength(2);
for (const command of commands) {
- expect(command).toContain('--signal=TERM --kill-after=1s 8s');
+ // The deadline covers the entire reader/byte-limiter pipeline, including
+ // readers that ignore TERM. Do not restore the old termination grace.
+ expect(command).toContain('timeout --signal=KILL 8s bash -o pipefail');
+ expect(command).not.toMatch(/--signal=TERM|--kill-after/);
+ expect(command).toContain('head -c 262145');
+ expect(command).toContain('"$pulse_log_bytes" -gt 262144');
+ expect(command).toContain('excerpt exceeds 256 KiB');
expect(command).toContain('no partial excerpt shown');
expect(command).toContain('no unbounded fallback');
expect(command).not.toMatch(/grep|--follow|restart|curl/);
@@ -124,7 +130,8 @@ describe('shipped TrueNAS error diagnosis', () => {
'no request ID is required',
'inside the Pulse container',
'not on the Proxmox host or the TrueNAS appliance',
- 'eight-second deadline and one-second termination grace',
+ 'eight-second hard deadline',
+ '256 KiB byte limit',
'record limit alone does not bound a hung reader',
'do not use an unbounded substitute',
'only after a successful read',