Skip to content

refactor: flatten capture choice executor#1207

Open
chhoumann wants to merge 5 commits into
engine-flat/03-template-choicefrom
engine-flat/04-capture-choice
Open

refactor: flatten capture choice executor#1207
chhoumann wants to merge 5 commits into
engine-flat/03-template-choicefrom
engine-flat/04-capture-choice

Conversation

@chhoumann
Copy link
Copy Markdown
Owner

Summary

  • Converts CaptureChoiceEngine into a flat executor using the extracted services/evaluator seams.
  • Preserves capture append/prepend/create behavior while hardening merge guards and folder-scoped custom paths.
  • Adds regression coverage for raw custom path validation and formatter-skip semantics.

Stack

  1. engine-flat/01-vault-frontmatter-services
  2. engine-flat/02-formatter-template-services
  3. engine-flat/03-template-choice
  4. This PR
  5. engine-flat/05-macro-cutover

Validation

  • bun run lint
  • bun run test
  • bun run build
  • Obsidian dev vault plugin reload and e2e validation

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b7ffd877-a234-41a3-a9b3-25957d1e1112

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch engine-flat/04-capture-choice

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 375bc8a332

ℹ️ 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".

Comment on lines +609 to +610
if (!captureAnywhereInVault && !filePaths.includes(targetFilePath)) {
return await this.formatCustomFolderCapturePath(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve already-prefixed custom folder paths

When capturing to a folder, any custom input not present in filePaths is treated as a relative path and sent to formatCustomFolderCapturePath. If a user types a full vault path that already includes the selected folder prefix (for example Folder/New Note while targeting Folder/), this branch still runs and the folder gets prepended again, producing Folder/Folder/New Note.md. Before this change, the startsWith(folderPathSlash) path handled this correctly, so this is a regression that can create notes in the wrong location.

Useful? React with 👍 / 👎.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying quickadd with  Cloudflare Pages  Cloudflare Pages

Latest commit: 375bc8a
Status: ✅  Deploy successful!
Preview URL: https://ad6b2912.quickadd.pages.dev
Branch Preview URL: https://engine-flat-04-capture-choic.quickadd.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant