Skip to content

feat(disk): add dedicated Disk Repair page with CHKDSK support#81

Merged
dbfx merged 4 commits intomainfrom
feat/disk-repair-page
Mar 26, 2026
Merged

feat(disk): add dedicated Disk Repair page with CHKDSK support#81
dbfx merged 4 commits intomainfrom
feat/disk-repair-page

Conversation

@dbfx
Copy link
Contributor

@dbfx dbfx commented Mar 26, 2026

Summary

  • Extract repair tools (DISM, SFC) from the Disk Analyzer page into a new standalone Disk Repair page
  • Add CHKDSK /scan as a third repair tool for checking file system errors
  • Add "Disk Repair" as a menu item under Disk Tools in the sidebar
  • Redesign tool cards to use full-width horizontal layout (header/description on the left, run button on the right)

Changes

  • New file: DiskRepairPage.tsx — standalone page with DISM, SFC, and CHKDSK cards
  • DiskAnalyzerPage.tsx — removed all repair-related code (view mode, handlers, UI)
  • Sidebar.tsx — added Disk Repair entry with Wrench icon under Disk Tools flyout
  • App.tsx — added /disk-repair route, import, and page title
  • disk-analyzer.ipc.ts — added runChkdsk() backend handler + IPC registration
  • channels.ts — added DISK_REPAIR_CHKDSK channel
  • types.ts — extended tool union to include 'chkdsk'
  • disk-store.ts — added chkdskResult state and setter
  • preload/index.ts — added diskRepairChkdsk API binding
  • disk.json — added CHKDSK localization strings

Test plan

  • Verify Disk Analyzer page no longer shows the Repair tab
  • Navigate to Disk Repair via sidebar Disk Tools → Disk Repair
  • Verify all three tool cards render with correct layout (info left, button right)
  • Run DISM, SFC, CHKDSK as admin and verify progress bar, results, and log viewer work
  • Run without admin and verify the admin-required toast appears
  • On non-Windows, verify the "Windows Only" empty state shows

🤖 Generated with Claude Code

Extract repair functionality (DISM, SFC) from Disk Analyzer into its own
Disk Repair page under the Disk Tools sidebar menu. Add CHKDSK /scan as
a new repair tool for checking file system errors. Cards use a full-width
horizontal layout with the run button on the right.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@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: eaefda3e1a

ℹ️ 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".

CHKDSK uses exit codes 0-2 for successful completions (no errors,
errors fixed, cleanup performed). Only code 3+ indicates failure.
Previously all nonzero codes were treated as failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dbfx
Copy link
Contributor Author

dbfx commented Mar 26, 2026

Re: P1 (CHKDSK exit codes) — Fixed in 697f605. CHKDSK exit codes 0–2 are now treated as successful completions, with explicit summary messages for code 1 (errors found & fixed) and code 2 (cleanup performed). Only code 3+ marks as failed.

Re: P2 (environment IPC endpoints) — Those lines are not part of this PR. They're pre-existing uncommitted changes in the working directory from another branch of work. The diff on GitHub shows them because the remote branch picked up a rebase — only the diskRepairChkdsk addition in preload/index.ts is from this PR.

These endpoints were accidentally included via a stash/rebase cycle
and belong to a separate branch of work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dbfx dbfx merged commit d6288cb into main Mar 26, 2026
9 checks passed
@dbfx dbfx deleted the feat/disk-repair-page branch March 26, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant