Skip to content

fix: resolve TypeScript errors in system metrics#2

Merged
simonCatBot merged 2 commits intomasterfrom
fix/typescript-errors
Mar 27, 2026
Merged

fix: resolve TypeScript errors in system metrics#2
simonCatBot merged 2 commits intomasterfrom
fix/typescript-errors

Conversation

@simonCatBot
Copy link
Copy Markdown
Owner

This PR fixes TypeScript compilation errors that were causing CI failures.

Changes

  • Fix potential undefined values in network stats calculations using nullish coalescing
  • Add proper null checks for CPU data access (cpus array and speed property)
  • Fix GPU MetricRow props in SystemMetricsDashboard (removed unsupported name prop, integrated into label)
  • Use loose null checks (!= null) for GPU properties to handle both null and undefined

Testing

  • npx tsc --noEmit now passes without errors
  • All type safety issues resolved

Fixes CI workflow failures on master branch.

OpenClaw Bot and others added 2 commits March 26, 2026 22:23
- Fix potential undefined values in network stats calculations

- Add null checks for CPU data access

- Fix GPU metric row props in SystemMetricsDashboard

- Use loose null checks (== null) for GPU properties
Replace the overly defensive nested-conditionals + double as-cast with
clean optional chaining. cpuData.cpus?.[0]?.speed is readable and
correct — no behavioral change.
@simonCatBot simonCatBot merged commit 796b7d9 into master Mar 27, 2026
@simonCatBot simonCatBot deleted the fix/typescript-errors branch March 27, 2026 05:44
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