Skip to content

Version Data + TUI Polish#36

Merged
Sajjon merged 11 commits intomainfrom
tui_polish
Feb 22, 2026
Merged

Version Data + TUI Polish#36
Sajjon merged 11 commits intomainfrom
tui_polish

Conversation

@Sajjon
Copy link
Copy Markdown
Owner

@Sajjon Sajjon commented Feb 22, 2026

  • dont error on missing data, instead hint that you should run klirr data init
  • Add Versioning of data, add CTA for when user lack data directory.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds data schema versioning to support future migrations and improves user experience by providing helpful hints when data is missing or needs migration, rather than showing cryptic errors.

Changes:

  • Introduced Version enum (V0 for testing, V1 for production) with automatic version tracking in data files
  • Added user-friendly error messages that guide users to run klirr data init when setup is missing
  • Implemented migration guide system with embedded documentation for version transitions

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
docs/migration/v0.md Documents that V0 is test-only and not used by end users
docs/migration/v1.md Provides migration instructions from V0 to V1
crates/core-invoice/src/models/error.rs Adds MissingDataVersionFile and DataVersionMismatch error variants with helper functions and tests
crates/core-invoice/src/models/data/data.rs Introduces Version enum with V0 and V1 variants, adds version field to Data struct with validation
crates/core-invoice/src/logic/read_write_data/read_data_from_disk.rs Implements version file persistence, auto-migration for missing version files, and version validation during data loading
crates/cli/src/run.rs Adds migration guide system with embedded documentation, improved error handling with helpful hints for missing setup or version mismatches
crates/cli/src/dispatch_command.rs Updates validate_data command to handle missing data directory gracefully and suppress migration-related error logs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sajjon and others added 6 commits February 22, 2026 13:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI added a commit that referenced this pull request Feb 22, 2026
…ve dead MissingDataVersionFile, require explicit migration

Co-authored-by: Sajjon <864410+Sajjon@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 22, 2026

Codecov Report

❌ Patch coverage is 96.87500% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.06%. Comparing base (eeef801) to head (77180c5).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...e/src/logic/read_write_data/read_data_from_disk.rs 95.45% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   95.03%   95.06%   +0.02%     
==========================================
  Files         101      101              
  Lines        2176     2208      +32     
==========================================
+ Hits         2068     2099      +31     
- Misses        108      109       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sajjon Sajjon merged commit b2196ad into main Feb 22, 2026
7 checks passed
@Sajjon Sajjon deleted the tui_polish branch February 22, 2026 20:08
@Sajjon Sajjon changed the title tui polish Version Data + TUI Polish Feb 22, 2026
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.

2 participants