Conversation
Co-authored-by: busse <18599+busse@users.noreply.github.com>
- Add feature flag 'dataMirror' to enable/disable the feature - Add IPC handlers for mirror directory selection and sync - Add preload.js API methods for mirror feature - Implement automatic sync on data writes - Add UI in Settings modal for configuring mirror directory - Add tests for the data mirror feature - Update README with documentation Co-authored-by: busse <18599+busse@users.noreply.github.com>
…rallel file copy Co-authored-by: busse <18599+busse@users.noreply.github.com>
Co-authored-by: busse <18599+busse@users.noreply.github.com>
|
@copilot during UAT it was discovered that that data mirroring sync is writing json files, which is correct based on the earlier requirements. Obsidian natively supports Markdown (.md) files, so we need to add a setting option to the feature to "Sync as Markdown (.md)" and have that setting be enabled by default if the parent setting for the sync in enabled. Thusly, when that setting is enabled, the "mirrored" files are converted by the system to Markdown before being synced. The markdown files must have appropriate Obsidian properties https://help.obsidian.md/properties |
- Add syncAsMarkdown setting (enabled by default when dataMirror is enabled)
- Convert articles, feeds, and categories to Markdown with Obsidian frontmatter
- Create organized folder structure: articles/{feed}/, feeds/, categories/
- Add YAML frontmatter with title, link, author, pubDate, read status, tags
- Add toggle in Settings UI to switch between Markdown and JSON modes
- Add proper YAML string escaping to prevent injection issues
- Fix HTML stripping to handle nested/malformed tags safely
- Add 2 new tests for the Sync as Markdown toggle
- Update README with detailed Markdown sync documentation
Co-authored-by: busse <18599+busse@users.noreply.github.com>
Added "Sync as Markdown" option in commit 42b9800. When enabled (default), data is converted to Markdown files with Obsidian-compatible YAML frontmatter:
The toggle appears in the Data Mirror section of Settings and is enabled by default when the Data Mirror feature is enabled. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
- Convert block-level elements (p, div, h1-h6, li, tr, blockquote) to line breaks - Convert br tags to single newlines - Convert hr tags to markdown horizontal rules - Normalize multiple consecutive newlines to paragraph breaks - Trim each line while preserving paragraph structure Co-authored-by: busse <18599+busse@users.noreply.github.com>
|
... Fixed in commit 0131e8b. The Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 22
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| const readState = readStates[article.id]; | ||
| const mdContent = articleToMarkdown(article, feedTitle, readState); | ||
| const filename = sanitizeFilename(article.title || article.id) + '.md'; | ||
| await fs.writeFile(path.join(feedFolder, filename), mdContent, 'utf-8'); |
There was a problem hiding this comment.
Bug: Articles with similar titles can overwrite each other
The sanitizeFilename function can produce identical filenames for different articles, causing data loss. When generating article Markdown files, the filename is derived from article.title || article.id, but if two articles have non-empty titles that sanitize to the same string (e.g., "What: Now" and "What? Now" both become "What-Now.md"), the second article will silently overwrite the first. The article.id fallback only helps when the title is empty/null. Consider appending a unique identifier (like a hash of the article ID or a numeric suffix) to prevent collisions.

Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Note
Adds a Data Mirror feature that mirrors app data to a chosen directory, optionally converting to Obsidian-compatible Markdown, with full settings UI, IPC handlers, and tests.
index.htmlwith directory picker, "Sync as Markdown" toggle (default on), and "Sync Now" button.featureFlags.dataMirror, mirror directory, andsyncAsMarkdown; show/hide section based on flag.main.js):select-mirror-directory,get/set-mirror-directory,get/set-sync-as-markdown,sync-to-mirror.featureFlags.dataMirror: false; trigger background mirror sync after writes to feeds/categories/read-states/settings/articles/AI summaries.syncToMirror():*.jsonfiles to mirror.feeds/,categories/,articles/{feed-name}/.preload.js):README.mdwith Data Mirror feature, Markdown structure, and examples.tests/data-mirror.test.jscovering UI toggles, directory selection, sync, and visibility.dataMirrorflag and mirror APIs; adjust keyboard shortcut tests accordingly.Written by Cursor Bugbot for commit 830ce00. This will update automatically on new commits. Configure here.