Skip to content

Fix underflow bugs, silent error, dead code, and path sanitization#38

Merged
Digiyang merged 4 commits intomainfrom
improvements/bug-fixes
Feb 16, 2026
Merged

Fix underflow bugs, silent error, dead code, and path sanitization#38
Digiyang merged 4 commits intomainfrom
improvements/bug-fixes

Conversation

@Digiyang
Copy link
Owner

Summary

  • Fix arithmetic underflow bugs: Use saturating_sub(1) for scroll state when details are empty, and add early returns in next()/previous() for empty lists to prevent panics
  • Fix silent success on mismatched passwords: edit_password now returns an error when new passwords don't match instead of silently succeeding
  • Remove dead popup field and fix typo: Remove unused popup: bool from App, fix "it will be able" → "it will be available" in help text
  • Integrate space removal into sanitize_for_path: Move space replacement into the helper so callers don't need a separate .replace(" ", "") step

Use saturating_sub for scroll state when details are empty, and add
early returns in next()/previous() for empty lists to prevent panics.
Return an error when new passwords don't match instead of silently
succeeding without changing anything.
Remove unused popup: bool field from App (popup state is tracked via
key_details). Fix "it will be able" -> "it will be available".
Move space replacement into sanitize_for_path so callers don't need
to remember the extra .replace(" ", "") step. Update mirrored helper
in tests accordingly.
@Digiyang Digiyang merged commit fe2747c into main Feb 16, 2026
5 checks passed
@Digiyang Digiyang deleted the improvements/bug-fixes branch February 16, 2026 11:41
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