fix: manual fix not working - #7
Open
edabe wants to merge 6 commits into
Open
Conversation
- Add console logging for plugin load and sync operations - Show informative message when no new recordings to sync - Include checkpoint timestamps in console logs - Improve user experience for incremental sync behavior
- Add edit_time field to PlaudFileSummary interface - Simplify shouldSyncFile to use only edit_time for sync decisions - Simplify checkpoint logic to track only edit_time - Keep start_time for display purposes (filenames, dates) - Fixes issue where transcribed notes were not detected by manual sync
Owner
|
Thanks for the detailed root-cause write-up. Switching incremental sync to Plaud Minimum fixes:
I verified |
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.
PR Description: Fix incremental sync to detect transcribed notes
Problem
The incremental sync feature was not detecting notes that were transcribed after the initial sync. When a user transcribed an existing recording in the Plaud app, running "Plaud Sync: sync now" in Obsidian would show
selected: 0and skip the transcribed note entirely.Root Cause
The sync logic only checked
start_time(the original recording timestamp) to determine if a file had changed. When a note is transcribed:start_timeremains unchanged (original recording time)start_time <= lastSyncCheckpointSolution
Use the
edit_timefield from the Plaud API to track when files were last modified. The API provides two timestamps with different purposes:edit_time(seconds): When the file was last modified (creation OR transcription)start_time(milliseconds): When the recording was made (for display/filename)Changes
edit_timefield toPlaudFileSummaryinterfaceshouldSyncFile()to use onlyedit_timefor sync decisionsedit_timeinstead ofstart_timestart_timefor display purposes (filenames, frontmatter dates)Benefits
Testing
Tested with the following scenario:
Before Fix
After Fix
Files Changed
src/plaud-api.ts: Addededit_time?: numbertoPlaudFileSummarysrc/plaud-sync.ts: Updated sync logic to useedit_timeBackward Compatibility
Fully backward compatible - existing vaults will continue to work. The checkpoint will naturally transition to using
edit_timeon the next sync.