Skip to content

fix(ui): record history entry after driver scan so dashboard highlights completion#116

Merged
dbfx merged 1 commit intomainfrom
fix/driver-scan-dashboard-highlight
Apr 5, 2026
Merged

fix(ui): record history entry after driver scan so dashboard highlights completion#116
dbfx merged 1 commit intomainfrom
fix/driver-scan-dashboard-highlight

Conversation

@dbfx
Copy link
Copy Markdown
Contributor

@dbfx dbfx commented Apr 5, 2026

Summary

  • The dashboard health score tracks the "drivers" tool via history entries, but a history entry was only created when stale packages were cleaned — never after a scan-only check
  • Scanning for driver updates (even successfully with no updates needed) left the dashboard showing drivers as incomplete
  • Now handleScan records a drivers history entry after successful completion, so the dashboard correctly highlights drivers as done

Test plan

  • Run a driver scan from the Driver Manager page with no updates available
  • Navigate to the dashboard and verify the drivers tool is highlighted as done in the health score
  • Run a driver scan with updates available — verify dashboard still highlights as done
  • Clean stale packages — verify a second history entry is created (existing behavior preserved)

🤖 Generated with Claude Code

…ts completion

The dashboard health score tracks the "drivers" tool via history entries,
but a history entry was only created when stale packages were cleaned —
never after a scan-only check. This meant scanning for driver updates
(even successfully with no updates needed) left the dashboard showing
drivers as incomplete.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added the ui label Apr 5, 2026
@dbfx dbfx merged commit 0501600 into main Apr 5, 2026
7 of 8 checks passed
@dbfx dbfx deleted the fix/driver-scan-dashboard-highlight branch April 5, 2026 15:49
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68a4074b8c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

final.setHasScanned(true)

// Record scan in history so dashboard reflects completion
if (staleResult.status === 'fulfilled' || updateResult.status === 'fulfilled') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid logging a successful scan when one scan branch failed

This condition records a drivers history entry even when only one of the two scans succeeds, but the entry is written as a clean success (errorCount: 0), so the dashboard/history can report the driver tool as completed despite a visible scan failure toast. In a partial-failure run (e.g., stale scan fails, update scan succeeds), this produces inaccurate completion and reliability signals; the history write should require full success or include the failure in the recorded result.

Useful? React with 👍 / 👎.

totalItemsSkipped: 0,
totalSpaceSaved: 0,
categories: [
...(staleCount > 0 ? [{ name: 'Stale Drivers', itemsFound: staleCount, itemsCleaned: 0, spaceSaved: staleSize }] : []),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep scan-only history from inflating recovered-space analytics

Using staleSize as spaceSaved for a scan-only entry reports unrecovered bytes as recovered bytes. HistoryPage aggregates category.spaceSaved into category charts, so these entries can incorrectly rank “Stale Drivers” as recovered space even when no cleanup happened (totalSpaceSaved is 0). For scan entries, category spaceSaved should remain 0 to keep history metrics consistent.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant