Skip to content

Conversation

@dannysmith
Copy link
Owner

@dannysmith dannysmith commented Jan 16, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Vault now automatically reinitializes when directory paths or ignore pattern settings change, keeping vault configuration synchronized with preferences.
  • Improvements

    • User interface is now disabled during vault reinitialization to prevent concurrent operations.
    • Enhanced error handling with clearer messaging when vault reload fails.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This pull request adds vault reinitialization functionality to the desktop application. When vault directory paths change in preferences, the system detects the change, persists the preferences, clears session state, and reinitializes the vault. The implementation includes new service functions, navigation store reset capability, development/production preference file separation, and localization support.

Changes

Cohort / File(s) Summary
Localization
tdn-desktop/locales/en.json
Added toast error message toast.error.vaultReinitialize for vault reload failures
Vault Service Core
tdn-desktop/src/services/vault.ts, tdn-desktop/src/services/vault.test.ts
Introduced reinitializeVault() function to clear session state and reinitialize vault; added vaultConfigChanged() function to detect vault-related preference changes with comprehensive test coverage
Navigation Store
tdn-desktop/src/store/navigation-store.ts, tdn-desktop/src/store/navigation-store.test.ts
Added resetNavigation() method to reset navigation state to default and clear history/future stacks with test validation
Preferences UI Integration
tdn-desktop/src/components/preferences/panes/VaultPane.tsx
Integrated vault reinitialization workflow: detects config changes, saves preferences, conditionally reinitializes vault, disables inputs during operations, and shows toast notifications for errors/success
Preferences Command
tdn-desktop/src-tauri/src/commands/preferences.rs
Introduced development/production separation for preferences file path based on build configuration

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #8: Provides the foundational AppPreferences fields and CLI/dummy-vault bindings used by the vault reinitialization logic in this PR
  • PR #24: Related vault API additions and localization modifications that integrate with the reinitialization workflow introduced here

Suggested labels

product/desktop

Poem

🐰 A vault once lived all scattered and lost,
But now when paths shift, no data is tossed!
We clear the stale state with a hop and a bound,
Reinitialize fresh—let the vault be sound!

✨ Finishing touches
  • 📝 Generate docstrings


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7c3f4c9 and aa82576.

⛔ Files ignored due to path filters (5)
  • tdn-desktop/docs/developer/data-persistence.md is excluded by !**/*.md
  • tdn-desktop/docs/tasks-done/task-2026-01-15-1-preferences-vault-reinitialization.md is excluded by !**/*.md
  • tdn-desktop/docs/tasks-todo/task-x-multiple-task-select.md is excluded by !**/*.md
  • tdn-desktop/docs/tasks-todo/task-x-quick-capture-pane-llm-processing.md is excluded by !**/*.md
  • tdn-desktop/docs/tasks-todo/task-x-undo.md is excluded by !**/*.md
📒 Files selected for processing (7)
  • tdn-desktop/locales/en.json
  • tdn-desktop/src-tauri/src/commands/preferences.rs
  • tdn-desktop/src/components/preferences/panes/VaultPane.tsx
  • tdn-desktop/src/services/vault.test.ts
  • tdn-desktop/src/services/vault.ts
  • tdn-desktop/src/store/navigation-store.test.ts
  • tdn-desktop/src/store/navigation-store.ts

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dannysmith dannysmith merged commit d3b06ff into main Jan 16, 2026
3 of 4 checks passed
@dannysmith dannysmith deleted the desktop-app-ui branch January 16, 2026 19:00
dannysmith added a commit that referenced this pull request Jan 16, 2026
* Turn future tasks into GH Issues

* Update task doc

* Vault Switching WIP

* Sort vault switching

* Complete vault switching work
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