Repository navigation
fix(quick-capture): save desktop quick capture tasks with one checkbox - #729
Merged
Merged
Conversation
The desktop quick capture window formats each line of its input as a task ("- [ ] text"), and WriteAPI.createTask / createTaskInDailyNote add "- [ ] " to the content again, so captured tasks were saved as "- [ ] - [ ] text". Split the first line's list marker and checkbox off before calling the write API; a checked box ("[x]") is saved as completed. Later lines of a multi-line capture keep their markers and stay separate tasks.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The desktop quick capture window, the separate Electron window opened from the tray or global shortcut, formats each line of its input as a task (
- [ ] text).WriteAPI.createTaskandcreateTaskInDailyNotethen add- [ ]to the content again, so captured tasks were saved as- [ ] - [ ] text.Fix:
handleSaveTasknow splits the first line's list marker and checkbox off (splitCapturedTaskLine) before calling the write API.[x]) is saved as completed.Verified in Obsidian (obdev vault): capturing two lines from the window now saves
- [ ] acceptance-qc-fix singleand- [ ] acceptance-qc-fix second line. Before the fix, the same capture produced- [ ] - [ ] ….Tests:
src/__tests__/capturedTaskLine.test.tscovers the plain, list, numbered, checked, multi-line and bare-marker cases.