mirror of
https://github.com/R0m1k3/EveFlow.git
synced 2026-10-14 10:46:44 +02:00
chore: hotfix versioning 2.0.0.1 and honest telemetry placeholders when the bridge is missing
- Version numbers gain a fourth hotfix component (2.0.0.1); the workflow maps it to the Windows file build number. - The system panel shows dashes instead of 0% until real measurements arrive from the main process. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Wn5VX9HNbJ7N54hR24u9Y
This commit is contained in:
4 files changed
+12
-6
No files matched your search
@@ -4,6 +4,8 @@ import { bridge } from '../lib/bridge';
|
||||
|
||||
export interface LiveMetrics extends SystemMetrics {
|
||||
fps: number;
|
||||
/** false until the main process delivered real measurements */
|
||||
live: boolean;
|
||||
}
|
||||
|
||||
const EMPTY: LiveMetrics = {
|
||||
@@ -16,7 +18,8 @@ const EMPTY: LiveMetrics = {
|
||||
memUsedPct: 0,
|
||||
memTotalGb: 0,
|
||||
uptimeSec: 0,
|
||||
fps: 60
|
||||
fps: 60,
|
||||
live: false
|
||||
};
|
||||
|
||||
export function useMetrics(enabled = true, intervalMs = 2000): LiveMetrics {
|
||||
@@ -43,7 +46,7 @@ export function useMetrics(enabled = true, intervalMs = 2000): LiveMetrics {
|
||||
const api = bridge();
|
||||
const poll = () => {
|
||||
if (!api) return;
|
||||
api.system.metrics().then((m) => setMetrics((prev) => ({ ...prev, ...m }))).catch(() => undefined);
|
||||
api.system.metrics().then((m) => setMetrics((prev) => ({ ...prev, ...m, live: true }))).catch(() => undefined);
|
||||
};
|
||||
poll();
|
||||
const timer = setInterval(poll, intervalMs);
|
||||
|
||||
Reference in new issue
Block a user