Unify note path resolution across CLI commands, et. al - #15
Merged
Merged
Conversation
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
Adds unified note resolution:
park reclassifynow accepts a bare basename or a literal path the waypark showalways did, and closes the findings from a full codebase review (a tilde-expansion gap in--from-file, duplicated error construction, dead exports, and keybinding drift risk).What's new
park reclassifyaccepts a bare basename (searched across every configured category folder, archive included) or a literal path (absolute, or relative to the working directory), matchingpark show.store.ResolvePathtreats any value containing a path separator as a literal path and never joins it onto a category folder.park new --from-fileexpands~/$HOMEexactly once, innote.IngestFile, so parsing, form preview, and source removal all see the same path; quoted~/note.mdpaths previously failed at parse time.Config.UnknownCategoryErrorowns the "unknown category" message for all CLIBeforehooks and domain packages (8 hand-written copies removed).Updatefrom the samekey.Bindingvalues that render help (categoryBindingpairs each category name with its binding).Usage
park reclassify <file> -c <category><file>accepts a bare basename or a literal pathpark new -f <path><path>may use~/$HOMEBehavior changes / guardrails
os.ErrNotExist; bare basenames still search every category folder.new --categoryflag error now uses the shared unknown-category message.note.Note.HasCompleteMetadata,config.DefaultConfigPath,config.CategoryByKey. Allconfig.Configmethods now use pointer receivers; TUI constants renamed tomaxWidth/defaultHeight.Testing
make checkruns fmt, vet, lint, and tests; all green.