Skip to content

Omit app-specific metadata from generic daily Obsidian notes#892

Merged
SeoFood merged 9 commits into
TypeWhisper:mainfrom
MineraleYT:fixobsidian
Jul 14, 2026
Merged

Omit app-specific metadata from generic daily Obsidian notes#892
SeoFood merged 9 commits into
TypeWhisper:mainfrom
MineraleYT:fixobsidian

Conversation

@MineraleYT

@MineraleYT MineraleYT commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR ensures that application-specific metadata fields (app, bundleId, and url) are omitted from the YAML frontmatter of Obsidian daily notes if the note is configured as a shared/generic note (i.e. the filename template does not contain the {{APP}} placeholder).

Problem

When the daily note format is configured globally for the day (e.g. {{DATE}} instead of {{DATE}} {{APP}}), it represents a shared daily log. Currently, the first transcription of the day writes the active app details into the file's YAML frontmatter. Subsequent transcriptions from other apps append blocks to this file but cannot change the frontmatter, leaving incorrect and misleading app metadata at the top of the shared note.

Solution

  • Checked if the _dailyNoteFormat contains the {{APP}} placeholder.
  • If it does not contain {{APP}}, we pass nil to buildFrontmatter(...) for appName, bundleId, and url, preserving only the date, language, and tags.

Test Plan

  • Ran scripts/pr-preflight.sh
  • Built and ran locally
  • Tested the changed functionality manually (Added testAutoExportDailyNoteOmitsAppMetadataWhenFormatDoesNotContainApp to verify the frontmatter generation)
  • No regressions in existing features

Verification

Run the plugin SDK tests locally:

swift test --package-path TypeWhisperPluginSDK


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Bug Fixes**
  * Daily notes no longer include app name, bundle ID, or URL metadata unless the selected daily note format includes the app placeholder.
  * Preserved language, date, tags, and transcription content in exported daily notes.
  * Improved Settings → “Detected Vaults” picker to show when a custom vault path exists, including a selectable entry for non-detected vault paths.
* **Tests**
  * Added coverage to verify app metadata is omitted when the daily note format does not include the app placeholder.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

@MineraleYT MineraleYT requested a review from SeoFood as a code owner July 14, 2026 16:55
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6563d04d-e8d1-476f-b3e3-b0fbf53ea2ee

📥 Commits

Reviewing files that changed from the base of the PR and between b107b02 and c29372b.

📒 Files selected for processing (1)
  • TypeWhisperPluginSDK/Plugins/ObsidianPlugin/ObsidianPlugin.swift

📝 Walkthrough

Walkthrough

Obsidian daily notes now conditionally include app metadata, while settings preserve and display custom vault paths. An async test verifies metadata omission when {{APP}} is absent.

Changes

Obsidian plugin updates

Layer / File(s) Summary
Conditional metadata and export coverage
TypeWhisperPluginSDK/Plugins/ObsidianPlugin/ObsidianPlugin.swift, TypeWhisperPluginSDK/Plugins/ObsidianPlugin/Tests/ObsidianPluginTests.swift
Daily-note frontmatter includes app metadata only when {{APP}} is configured; the export test verifies omitted app fields and retained language and transcription content.
Custom vault picker entries
TypeWhisperPluginSDK/Plugins/ObsidianPlugin/ObsidianPlugin.swift
The vault picker appears for an existing vaultPath and adds a custom entry when that path is not detected automatically.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: seofood

Poem

I twitch my nose at notes anew,
No app crumbs peek where they shouldn’t do.
Custom vaults now hop in sight,
While words and dates stay tucked just right.
Hop, hop—the plugin’s bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: omitting app metadata from generic daily Obsidian notes.
Description check ✅ Passed The description includes the required Summary and Test Plan sections and fills in the expected verification details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@MineraleYT MineraleYT marked this pull request as draft July 14, 2026 17:36
@MineraleYT

Copy link
Copy Markdown
Contributor Author

Fix Manual Vault Selection Path in Settings:
If a user manually selects a custom folder path via the "Browse..." button that is not part of the auto-detected vaults, the Vault picker would display as blank/empty. We now dynamically append the manually selected path to the picker options, ensuring it is correctly selected and visible in the settings UI.

@MineraleYT MineraleYT marked this pull request as ready for review July 14, 2026 18:02

@SeoFood SeoFood left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved. The frontmatter change is correct, the merge with current main is clean, and the focused Obsidian tests pass.

Non-blocking: the custom-vault picker change broadens the PR beyond the title and handwritten summary and has no dedicated regression test. The Verification code fence in the PR description is also left open. Please keep future changes scoped and make the full test command render correctly.

@SeoFood SeoFood merged commit 0f11837 into TypeWhisper:main Jul 14, 2026
8 checks passed
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.

2 participants