Skip to content

Show N/A for invalid GPU wattage readings - #86

Merged
apyfz merged 2 commits into
mainfrom
fix/gpu-power-invalid-readings
Oct 19, 2026
Merged

apyfz merged 2 commits into
mainfrom
fix/gpu-power-invalid-readings

Conversation

@apyfz

@apyfz apyfz commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

A v2.2.18 feedback screenshot shows GPU power as 65,413 W. The overlay currently renders the sensor value without validation.

Validate that the configured reading is a power sensor on the selected GPU, finite, nonnegative, and no greater than a generous 2,000 W corruption ceiling. Missing or invalid samples display N/A; subsequent valid readings recover automatically. Valid watt values are preserved without guessing a unit conversion.

This prevents bogus output but does not establish why the driver produced the reported value: the supplied diagnostics contain no raw power samples or selected sensor ID.

Validation: 74 tests passed across GPU power, GPU selection, and settings-store GPU suites; production frontend build and git diff --check passed. Full TypeScript checking still has existing errors in unchanged files. Verification on the affected laptop remains pending.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 35d1f418-8cd3-4bfd-81e6-09206482cfd3
📥 Commits

Reviewing files that changed from the base of the PR and between abe8933 and e82d174.

📒 Files selected for processing: 2
  • tauri-app/src/lib/gpu-power.test.ts
  • tauri-app/src/lib/gpu.ts

Included review availability: This review used your included allowance. 5 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

📝 Walkthrough

The overlay now validates GPU power readings before display. It shows “N/A” for rejected readings and formats valid readings.

Changes: GPU power display

Layer / File(s) Summary
Validate and render GPU power
tauri-app/src/lib/gpu.ts, tauri-app/src/components/overlay/GpuSection.tsx, tauri-app/src/lib/gpu-power.test.ts
readGpuPower rejects missing or non-power sensors, mismatched GPU identifiers, and values outside the finite 0–2,000 W range. The overlay displays “N/A” for rejected readings and formats valid values. Tests cover validation, wattage preservation, and display updates.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to e82d1

Invalid GPU power readings display as N/A, while valid readings remain visible. The supplied review evidence indicates no unresolved risk requiring a merge hold.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: displaying N/A for invalid GPU wattage readings.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description directly matches the changes. It explains GPU power validation, invalid readings, recovery behavior, unit handling, and reported test results.
  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 369c28cb-8f0c-4939-86cd-ae1c309a705b
📥 Commits

Reviewing files that changed from the base of the PR and between 0eb9f7c and abe8933.

📒 Files selected for processing: 3
  • tauri-app/src/components/overlay/GpuSection.tsx
  • tauri-app/src/lib/gpu-power.test.ts
  • tauri-app/src/lib/gpu.ts

Included review availability: This review used your included allowance. 6 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour.

Comment thread tauri-app/src/lib/gpu.ts Resolved
@apyfz
apyfz merged commit e1d6596 into main Oct 19, 2026
4 checks passed
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