fix(docs): name the target note in the geocoding prompt so Peek can't mislead - #1813
Conversation
… mislead quickAddApi.inputPrompt allows Peek by default, so users can open other notes while the address prompt is parked. The script already writes to the note that was active when the macro started; show that note's name in the prompt header and document the behaviour. Co-authored-by: Christian Bager Bach Houmann <christian@bagerbach.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe address prompt displays the full path of the note active when the macro starts. The example documentation and test use a note path with a folder and file extension. The test changes the active note to one with the same basename. ChangesAddress prompt and note destination
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Feature Merge Risk: ⚪ Minimal · up to The prompt identifies the note that will receive the update, even if another note is opened while it is displayed. No actionable merge risk is evident. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit taps the path in view, Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 614afb9f0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Deploying quickadd with
|
| Latest commit: |
433b237
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cdc2bcfd.quickadd.pages.dev |
| Branch Preview URL: | https://fix-longlat-script-peek-targ.quickadd.pages.dev |
Notes in different folders can share a basename; the path keeps the target unambiguous after a peek. Amp-Thread-ID: https://ampcode.com/threads/T-01a0df48-b10a-71ff-bdb9-a74681bbf152 Co-authored-by: Christian Bager Bach Houmann <christian@bagerbach.com>
Summary
Follow-up to #1810. I was wrong in #1810 when I declined Macroscope's comment on the active-note lookup by saying "the prompt is a modal, so the user can't switch notes while it's open". That isn't true.
quickAddApi.inputPromptenables Peek at note by default (allowPeek: trueinsrc/api/promptApi.ts), and while peeking the user can open other notes.The script already does the right thing: it captures the note that is active when the macro starts and writes to it, so opening another note to copy an address doesn't redirect the write. What was missing was letting the user see that. This PR:
🏠 Address for Places/Home.md. After a peek the prompt still says which note gets the location, even when another folder has a note with the same name;processFrontMatterreceives the note that was active at the start, and checks the header. It fails against the fix(docs): write Map View lat,lng location without MetaEdit in geocoding example #1810 script (the header didn't name the note).I kept "capture before the prompt" instead of Macroscope's "resolve after". Resolving after would write to whichever note the user ended up on, for example the contact note they opened to copy the address.
Proof (real Obsidian 1.13.7, throwaway vault, made-up notes)
Steps: open
Places/Home.md→ runMapper→ Peek at note → openContacts/Home.md(same name, different folder) → chip Return → typeNotre-Dame de Paris→ Enter. Run against the final commit (433b237).After returning from the peek:
Contacts/Home.mdis active, and the prompt still namesPlaces/Home.md.For reference, the #1810 result in Map View (unchanged by this PR):
Checks
pnpm run test: 447 files / 5809 tests passed.pnpm run build-with-lint: passed;main.js,manifest.jsonandversions.jsonunchanged.docs/:pnpm run buildpassed; the built page contains the new sentence and the#peeklink.Release / migration impact
Docs only. Users who re-download the script get the note name in the prompt.
Note
Show target note path in
getLongLatFromAddressprompt so Peek can't misleadMacroscope summarized 433b237.
Summary by CodeRabbit