Conversation
Squash fork history: main was diverged from upstream only by these config files (plus a file-mode fix), so this replaces the tangled merge history with a single commit on top of upstream/main. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The "metadata-index" GitHub Release this workflow uploads to only exists on qownnotes/scripts; forks don't inherit Releases via git, so every push to main here failed with "release not found". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…#300) note.fileCreated == "Invalid Date" was used to detect a brand-new note, but it also reads "Invalid Date" the first time a pre-existing, not-yet-indexed note file is edited and saved -- it marks "new DB row", not "new file on disk". This made the script wrongly prompt for a file name on existing notes. Replace it with a one-shot flag set in handleNewNoteHeadlineHook, which only fires for genuine new-note creation, immediately before handleNoteTextFileNameHook. Bump to 0.0.5 and update CLAUDE.md's documented (and now disproven) assumption about fileCreated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Member
|
This PR changes more than just the script! Please create separate PRs to discuss the changes! |
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.
Summary
Fixes #300.
handleNoteTextFileNameHookusednote.fileCreated == "Invalid Date"to detect a brand-new note. That signal actually marks "first DB row for this note", not "new file on disk" — it also reads"Invalid Date"the first time a pre-existing, not-yet-indexed note file is edited and saved (e.g. right after pointing QOwnNotes at a folder with existing.mdfiles). That made the script wrongly prompt for a file name on existing notes, as reported in #300.Fix
fileCreatedcheck with a one-shot_isNewNoteflag, set only inhandleNewNoteHeadlineHook(which fires exclusively for genuine new-note creation, immediately beforehandleNoteTextFileNameHookper the documented hook order) and consumed right after use.0.0.5and added aCHANGELOG.mdentry.Test plan
just test(info.json/CHANGELOG version check passes fornew-note-namer)