Conversation
…lt entries - Fix heading level calculation: root entries now use level 2 (##) instead of level 1 (#) by changing formula from scope_parts.len() to scope_parts.len() + 1 - Fix blank line formatting for first entry after root header to prevent format corruption - Add context-aware formatting with format_entry_with_context() method - Add post-save validation to detect corruption immediately - Add comprehensive test suite with 7 new tests for multiple root entry scenarios These fixes ensure vault files with multiple root-level entries can be saved and loaded reliably without data loss or corruption.
- Add TOML parser module with flexible parsing behavior - Support implicit parent node creation - Preserve custom fields for forward compatibility - Add format auto-detection (Markdown vs TOML) - Update VaultEntry to include custom_fields HashMap - Add comprehensive test suite for TOML functionality - Update service layer to use appropriate parser based on content - Maintain backward compatibility with Markdown format
- Remove all alphabetical sorting from TOML parser - Maintain exact file order when reading/writing vault files - Implement smart group insertion: new entries are added at the end of their group - Example: with [a.a2], [b.a2], adding [a.a11] results in [a.a2], [a.a11], [b.a2] - Groups are determined by top-level prefix (e.g., all a.* entries stay together) - Add comprehensive tests for insertion order preservation - Update documentation to reflect the new behavior This ensures vault entries maintain their original organization and new entries are logically grouped with related items rather than appended to the end.
- Remove alphabetical sorting from TOML parser - Maintain exact file order when reading/writing vaults - Add smart group insertion: new entries append to their group - Example: [a.a2], [b.a2] + [a.a11] → [a.a2], [a.a11], [b.a2] - Groups determined by top-level prefix (all a.* stay together) This ensures vault entries maintain logical organization with related items grouped together rather than scattered.
- Update README to reflect TOML format instead of Markdown - Add documentation about insertion order preservation - Fix list commands to maintain vault file order (no sorting) - Remove alphabetical sorting from list_scopes and list operations This ensures the list output matches the order in the TOML file.
- Format code according to Rust standards - Ensure CI passes with cargo fmt and cargo clippy
- Use direct variable interpolation in format strings
- Change format!("{}", var) to format!("{var}")
- Ensures CI passes with cargo clippy -- -D warnings
- Fix format string in main.rs for vault creation - Fix format string in toml_parser.rs for custom fields - Ensures all clippy warnings are resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a significant update to the
vaultifyproject, transitioning the vault format from Markdown to TOML. The changes improve the readability, structure, and extensibility of vault files while updating the CLI and interactive modes to reflect the new format. The most important changes are grouped below by theme.Transition to TOML format:
vault.md→vault.toml) (README.md,src/cli.rs,src/interactive.rs,src/main.rs,Cargo.toml, [1] [2] [3] [4].VaultEntrymodel to support custom fields using TOML's key-value structure and replaced slash-separated scopes with dot-separated scopes for better alignment with TOML syntax (src/models.rs, src/models.rsR4-R26).CLI and interactive mode updates:
vault.md→vault.toml) (src/cli.rs, [1] [2] [3].personal.emailinstead ofpersonal/email) (src/cli.rs, src/cli.rsL683-R690).Codebase simplifications:
src/parser.rs) and added a new TOML parser module (src/toml_parser.rs) (src/lib.rs, src/lib.rsL10-R13).VaultEntrymodel, such asheading_leveland line-based metadata, which are no longer relevant in the TOML format (src/models.rs, src/models.rsR4-R26).Test updates:
src/cli.rs,src/interactive.rs,src/gpg.rs, [1] [2] [3].Version bump:
0.2.7to0.3.0inCargo.tomlto signify the breaking change in vault format (Cargo.toml, Cargo.tomlL3-R3).