Skip to content

feat(desktop): link Markdown files and folders alongside Vault copies - #262

Open
Kechos23 wants to merge 2 commits into
ThisIs-Developer:mainfrom
Kechos23:codex/linked-markdown-workspace
Open

Kechos23 wants to merge 2 commits into
ThisIs-Developer:mainfrom
Kechos23:codex/linked-markdown-workspace

Conversation

@Kechos23

@Kechos23 Kechos23 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This adds a desktop linked-source workflow alongside the existing Workspace (Vault) copies:

  • Open Markdown files as links to their original filesystem paths, deduplicate repeat opens, keep drafts in the app, and write to the original only on Ctrl+S. An external change is detected without silently replacing a local draft.
  • Link a Markdown folder and monitor it for external additions/changes. The Explorer groups these under Linked Locations.
  • Make linked sources visually and operationally distinct from Vault copies: separate commands/icons, source-path and reload actions, Remove link (does not delete the original), and Convert to Workspace copy (leaves the original unchanged). The browser keeps its ordinary Workspace label.

The Neutralino launch-file bridge passes the original path into this model. Existing copy-import remains available. This PR does not change native drag-and-drop behavior or the Neutralino runtime.

Validation

  • Windows x64 desktop workflow manually tested in the custom build; macOS/Linux desktop behavior has not been verified.
  • Focused linked-source Playwright tests: 4 passed. Unit tests: 22 passed. Updated menu assertions: 2 passed.
  • Full Chromium run before the final assertion update: 214/220 passed. Two menu expectations were updated and then passed separately. The other failures were the pre-existing stale sitemap check, missing prepared Markmap assets in this isolated worktree, a Trash test assuming a pre-existing document, and a GitHub PAT test that passed on serial rerun. No SEO, asset-generation, or Trash changes are included here.

Demo GIF:
markdown-viewer-win_x64_hKfPQHZ0QV

Possible desktop follow-ups

The linked-file model could later support a desktop drag-and-drop choice between Link original and Import to Workspace. In my Windows prototype, reliable native file paths across WebView require the fix proposed in Neutralino PR #1845, or a custom Neutralino build until it is available upstream.

Another possible improvement is reusing the existing desktop window when a Markdown file is opened from the OS, forwarding that file to the running app instead of opening multiple windows. My Windows prototype currently needs a custom Neutralino runtime. I intend to explore a general upstream solution around Neutralino issue #901.

These are possible future contributions, not requirements for reviewing this PR. Both prototypes were validated on Windows only; I would welcome your view on equivalent behavior on other platforms. If this desktop direction does not fit the project, please feel free to decline it or suggest a smaller scope; I am happy to maintain the Windows-specific work separately.

@vercel

vercel Bot commented Sep 29, 2026

Copy link
Copy Markdown

@Kechos23 is attempting to deploy a commit to the BS Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
markdown-viwer Ready Ready Preview Sep 29, 2026 2:23pm UTC

This comment was marked as outdated.

@ThisIs-Developer

Copy link
Copy Markdown
Owner

Really a great idea, man. I tried and tested the linked files/folders workflow, and overall it works really well. This is a very useful feature for Markdown Viewer. 🙌

I have a few update requests that I think would make the feature more polished and consistent:

  1. Linked file/folder icons
    Please use the Lucide icons file-symlink for linked files and folder-symlink for linked folders. This will make them visually different from normal Workspace files and folders.

  2. Ctrl + S success notification
    After saving a linked file using Ctrl + S, the “Original file updated” toast appears without a proper success icon (Screenshot 1). Please make it consistent with the existing Import complete notification style shown in Screenshot 2, with a proper success/status icon.

    Original file updated notification Import complete notification
  3. Update the WORKSPACES structure
    Instead of having a separate Linked Locations section, I would prefer everything grouped under WORKSPACES in this order:

    • Workspace (Vault)
    • Linked Workspace
    • Secret Workspace

    Please refer to the AI-generated screenshot I shared as a UI reference.

    Proposed Workspaces structure
  4. Restore the Welcome document
    Inside Workspace (Vault), the default Welcome to Markdown document should still be available. Currently, it appears to be missing.

  5. Linked Workspace guide file
    Please add a simple default guide/demo Markdown file inside Linked Workspace explaining how linked files and linked folders work. It can be very basic for now—I can improve the content later.

  6. Separate linked recovery storage from the normal Vault storage
    Currently, recovery copies for linked files appear to be created inside the normal Workspace/Vault storage location.

    Please create a separate physical storage folder for Linked Workspace recovery files. Then:

    • Linked source recovery copies → stored under the Linked Workspace storage folder.
    • Normal Workspace files → remain under the normal Workspace/Vault folder.
    • When Convert to Workspace copy is used, the document should be moved/copied from the Linked Workspace recovery area into the normal Workspace folder.

    Screenshot 4 shows the current storage behavior for reference.

    Current linked recovery storage behavior
  7. Linked file/folder context menu cleanup

    • For a linked file, rename “Remove link from Workspace” to “Remove linked file”.
    • For a linked folder, the current “Remove linked folder” label is already correct and can remain as it is.
    • Both Remove linked file and Remove linked folder should use the same red/danger text color as the remove/delete actions in the normal Workspace (Vault) context menu, so the UI stays consistent.
    • Copy source path: please check whether this action is really useful for the workflow. If it is not necessary, it can be removed. This part is optional.

These requests are a little detailed, so please take your time with them. The core feature itself is really good, and I appreciate the effort you’re putting into making Markdown Viewer better. 🚀

@ThisIs-Developer
ThisIs-Developer self-requested a review September 29, 2026 19:47

@ThisIs-Developer ThisIs-Developer left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks again for this contribution. I’ve already tested the feature and shared my detailed requested updates in this comment:
#262 (comment)
Please follow the points mentioned there before the final update. Take your time with the changes, as some of them involve the Workspace structure and linked-file storage behavior.

This branch was successfully deployed

1 active deployment
Preview — 7859e8ac Deployed Sep 29, 2026 by vercel[bot]
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.

3 participants