Problem Description
There is an issue with opening Markdown files in the Windows packaged version of the Tauri app.
When a user clicks or double-clicks a .md file in Windows and the file is associated with the app, the app does not correctly open the Markdown file in the editor.
The problem appears to be specific to the packaged Windows build and should be investigated from the perspective of Tauri's Windows file association, application startup arguments, single-instance handling, and file-path/event delivery.
Steps to Reproduce
- Install the packaged Tauri app on Windows.
- Create or locate a
.md Markdown file.
- Double-click the
.md file in Windows File Explorer.
- Open it with the app.
- Observe whether the file is loaded into the editor.
Current Behavior
When a .md file is opened from Windows:
- The app may launch or become active, but the Markdown file is not correctly opened.
- The file content is not loaded into the editor.
- The user cannot open the Markdown file directly in the editor by double-clicking it.
Expected Behavior
When a user double-clicks a .md file in Windows:
- The Tauri app should launch if it is not already running.
- The app should correctly receive the path of the file being opened.
- The file path should be passed to the frontend.
- The frontend should load the corresponding Markdown file.
- The editor should open automatically and display the file contents.
If the app is already running, double-clicking another .md file should send the new file path to the existing app instance and open that file directly in the editor.
Areas to Investigate
1. Tauri File Association
Check the Windows file association configuration in the Tauri packaging setup.
Please verify:
.md is correctly registered as a supported file type;
- Windows correctly associates
.md files with the application;
- Windows actually passes the selected file path to the Tauri application.
2. Windows Startup Arguments
Check how the application receives file paths when launched through Windows file association.
Please verify:
- The arguments passed to the application on Windows;
- How Tauri exposes those arguments to the application;
- Whether the packaged production build behaves differently from development mode;
- Whether Windows file paths are parsed correctly.
3. Tauri Single-Instance Handling
If the project uses Tauri's single-instance functionality, verify both cases:
- App is not running when the
.md file is opened;
- App is already running when another
.md file is opened.
Please verify that:
- The file path is received correctly;
- The existing app instance receives the new file-open request;
- The existing instance triggers the correct file-opening logic;
- The second file does not simply activate the app without opening the document.
4. Rust → Frontend / WebView Communication
Please inspect the full file-opening flow:
Windows double-click .md
→ Tauri receives file path
→ Rust
→ Tauri event / IPC
→ Frontend
→ Editor
→ Load Markdown file
Verify that the file path is reliably delivered across the Rust/frontend boundary.
Also check for startup timing issues. For example, the Rust side may emit the file-open event before the frontend listener has been initialized, causing the event to be lost.
5. Windows Path Handling
Test and verify support for:
- Normal English paths;
- Paths containing spaces;
- Paths containing Chinese or other Unicode characters;
- Paths containing special characters;
- Deep/nested directory paths.
The full Windows path should remain intact when passed between Tauri, Rust, and the frontend.
6. Development vs. Production Differences
Because the issue appears to occur in the packaged Windows application, compare:
tauri dev;
- Windows production build / installer.
Please check for differences in:
- File association registration;
- Startup arguments;
- Resource paths;
- App initialization;
- Single-instance behavior;
- File-open event handling.
Verification Requirements
After the fix, please verify at least the following:
- Double-clicking a
.md file when the app is not running launches the app and opens the file in the editor.
- Double-clicking another
.md file while the app is already running opens the new file in the existing app instance.
- Multiple Markdown files can be opened sequentially.
- Markdown files in paths containing spaces can be opened correctly.
- Markdown files in paths containing Chinese/Unicode characters can be opened correctly.
- The packaged Windows production build works correctly.
- The opened file can be edited and saved normally.
- Existing file-opening behavior on macOS/Linux is not broken by the fix.
Acceptance Criteria
Problem Description
There is an issue with opening Markdown files in the Windows packaged version of the Tauri app.
When a user clicks or double-clicks a
.mdfile in Windows and the file is associated with the app, the app does not correctly open the Markdown file in the editor.The problem appears to be specific to the packaged Windows build and should be investigated from the perspective of Tauri's Windows file association, application startup arguments, single-instance handling, and file-path/event delivery.
Steps to Reproduce
.mdMarkdown file..mdfile in Windows File Explorer.Current Behavior
When a
.mdfile is opened from Windows:Expected Behavior
When a user double-clicks a
.mdfile in Windows:If the app is already running, double-clicking another
.mdfile should send the new file path to the existing app instance and open that file directly in the editor.Areas to Investigate
1. Tauri File Association
Check the Windows file association configuration in the Tauri packaging setup.
Please verify:
.mdis correctly registered as a supported file type;.mdfiles with the application;2. Windows Startup Arguments
Check how the application receives file paths when launched through Windows file association.
Please verify:
3. Tauri Single-Instance Handling
If the project uses Tauri's single-instance functionality, verify both cases:
.mdfile is opened;.mdfile is opened.Please verify that:
4. Rust → Frontend / WebView Communication
Please inspect the full file-opening flow:
Windows double-click .md→
Tauri receives file path→
Rust→
Tauri event / IPC→
Frontend→
Editor→
Load Markdown fileVerify that the file path is reliably delivered across the Rust/frontend boundary.
Also check for startup timing issues. For example, the Rust side may emit the file-open event before the frontend listener has been initialized, causing the event to be lost.
5. Windows Path Handling
Test and verify support for:
The full Windows path should remain intact when passed between Tauri, Rust, and the frontend.
6. Development vs. Production Differences
Because the issue appears to occur in the packaged Windows application, compare:
tauri dev;Please check for differences in:
Verification Requirements
After the fix, please verify at least the following:
.mdfile when the app is not running launches the app and opens the file in the editor..mdfile while the app is already running opens the new file in the existing app instance.Acceptance Criteria
.mdfile directly by double-clicking it..mdfiles when launched from Windows file association..mdopen requests when an instance is already running.