Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds vault-relative path detection and duplicate-folder-prefix stripping to TemplateChoiceEngine path resolution; updates run flow to choose between vault-rooted and folder-scoped writes; adds comprehensive tests for many destination-path scenarios and mocks Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Engine as TemplateChoiceEngine
participant Vault
participant TemplateSvc as TemplateService
User->>Engine: request create with formattedName + folderPath + settings
Engine->>Engine: stripDuplicateFolderPrefix(formattedName, folderPath)
Engine->>Engine: shouldTreatFormattedNameAsVaultRelativePath(formattedName, strippedPrefix)
alt treat as vault-relative
Engine->>Vault: resolve vault-relative file path (use fileName, ignore default folder)
else not vault-relative
Engine->>Vault: ensure target folderPath exists (createFolder if needed)
Vault-->>Engine: folder exists/created
Engine->>Vault: construct full path (folderPath + fileName)
end
Engine->>TemplateSvc: createFileWithTemplate(resolvedPath, template, props)
TemplateSvc->>Vault: write file at resolvedPath
Vault-->>User: file created
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 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. Comment |
Deploying quickadd with
|
| Latest commit: |
5131b8f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2a9824f1.quickadd.pages.dev |
| Branch Preview URL: | https://1116-bug-macros-created-note.quickadd.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bfd41b32f
ℹ️ 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".
|
🎉 This PR is included in version 2.12.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
Fix template choice destination path resolution when
Create in folderis disabled andFile name formatalready includes folders.QuickAdd was always prepending Obsidian's resolved default note folder (
getNewFileParent) to the formatted filename. If the formatted name was already a vault-relative path, this produced duplicated/incorrect prefixes.This change:
Closes #1116.
Before / After Repro Evidence
Before fix (confirmed)
03_Aufgabenmanagement/ToDos/W-Tanso/...03_Aufgabenmanagement/ToDos/W-Work/this_is_a_task/Issue1116-before-{{DATE:YYYY-MM-DD}}.excalidraw03_Aufgabenmanagement/ToDos/W-Tanso/03_Aufgabenmanagement/ToDos/W-Work/this_is_a_task/Issue1116-before-2026-02-23.excalidraw.mdTemplateEngine.createFileWithTemplate.After fix (confirmed)
Same setup now creates:
03_Aufgabenmanagement/ToDos/W-Work/this_is_a_task/Issue1116-after-current-2026-02-23.excalidraw.mdWith Obsidian default note location set to fixed folder (
00_Journaling/Daily_Notes), same format now creates:03_Aufgabenmanagement/ToDos/W-Work/this_is_a_task/Issue1116-after-daily-2026-02-23.excalidraw.mdNo runtime errors were captured via
obsidian vault=dev dev:errors.Tests
Added regression coverage in
src/engine/TemplateChoiceEngine.notice.test.ts:Executed:
bun run test src/engine/TemplateChoiceEngine.notice.test.tsbun run testbun run build-with-lintSummary by CodeRabbit
Tests
Bug Fixes