Skip to content

Conversation

@v8vito
Copy link
Member

@v8vito v8vito commented Oct 28, 2025

Resolves #29

Problem

Notes were not saved automatically to the persistence file, resulting in potential loss of information if VSCode exited unexpectedly.

Solution

  • Persist the local database immediately whenever saveNoteComment runs, so file autosaves after every new note, reply, or status change.
  • After syncing remote state (syncNoteMapWithRemote) or receiving remote updates via RethinkDB subscriptions, write the updated note map to disk to keep local and collaborative data aligned.
  • Remove the helper dependency in utils/index.ts by reading the security-notes.localDatabase setting directly from the VS Code configuration, avoiding circular imports.

@v8vito v8vito requested a review from ggabarrin October 28, 2025 19:01
@v8vito v8vito added the enhancement New feature or request label Oct 28, 2025
@v8vito v8vito merged commit 3a67477 into main Oct 30, 2025
@v8vito v8vito deleted the 29-add-autosave branch October 30, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Save Notes to Database When Created/Modified

3 participants