Skip to content

Validate partition blocks are within disk bounds - #30

Merged
amolgautam25 merged 1 commit into
mainfrom
fix/partition-bounds-validation
May 16, 2026
Merged

Validate partition blocks are within disk bounds#30
amolgautam25 merged 1 commit into
mainfrom
fix/partition-bounds-validation

Conversation

@amolgautam25

Copy link
Copy Markdown
Owner

Summary

  • Computes boundsError inline in PartitionForm on every render from the current start/end inputs
  • Shows an amber "⚠ Out of Bounds" warning (styled consistently with the overlap warning) when start ≥ totalBlocks or end ≥ totalBlocks
  • Blocks Add/Update submission while the error is active

Closes #29

Test plan

  • Set disk to 250 GB, enter start block beyond disk end → amber warning appears immediately, Add button does nothing
  • Set end block beyond disk end → amber warning appears, Add blocked
  • Valid partition within bounds → no warning, adds normally
  • All 81 tests pass (npm test)

🤖 Generated with Claude Code

Shows an inline warning and blocks submission when start or end
block exceeds the total disk block count.

Closes #29

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@amolgautam25
amolgautam25 merged commit 678c0c4 into main May 16, 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.

No validation for out-of-bounds partition start/end blocks

1 participant