Repository navigation
Release v2.0.0 - Polished and Running
MarkdownReader v2.0.0 — Polished and Running
This is a major stability and performance release. The app now opens instantly when double-clicking any .md file, with no hangs, no freezing, and no blank screens.
Critical Bug Fixes
Fixed: App freezes / never opens on startup (the big one)
The root cause was an infinite React render loop introduced by an inline onEditorReady callback prop. Every render created a new function reference, re-triggering the editor's useEffect, calling setTabs() (generating a new array each time), which triggered yet another render — indefinitely. This saturated the Chromium renderer thread at 100% CPU, leaving the window blank and blocking all IPC communication (including single-instance file-open events from Explorer).
Fix: onEditorReady, setUnsaved, and onSelectionUpdate are now stable useCallback references. The editor-ready effect fires exactly once per editor instance (guarded by lastReadyEditorRef). State updates now bail out early if nothing actually changed.
Fixed: Opening a file continuously wrote to disk
On every editor mount, the app was calling window.api.saveFile() to "normalize" content. Combined with the render loop, this resulted in thousands of writes per second to the opened file. Opening a file is now strictly read-only — auto-save handles persistence through the existing settings.autoSave path only.
Fixed: Duplicate Tiptap link extension warning
StarterKit now disables its built-in link extension (link: false) since tiptap-markdown already registers its own, eliminating the console warning.
Fixed: IPC listener leak on settings change
The onFileLoaded / onDirectoryLoaded / onWindowStateChange IPC listeners no longer re-register when settings.defaultMode changes. A settingsRef is used to capture the latest value without adding it as a useEffect dependency.
Fixed: Editor ref leak on tab close
editorsRef entries are now cleaned up when a tab is closed.
Fixed: Source mode sync
Switching to Source Mode now syncs the Tiptap editor's current markdown content into the tab state first, so the raw text editor always shows the latest content.
Performance
| Metric | Before | After |
|---|---|---|
| Startup time (no file) | Hangs indefinitely | ~600 ms |
Startup time (with .md file) |
Hangs indefinitely | ~650 ms |
| Idle CPU after load | 100% (infinite loop) | 0% |
| Disk writes on open | Thousands/sec | 0 |
| Window paint | Never | < 1 second |
Windows Integration (carried over from v1.3.x)
- Double-clicking any
.mdfile opens it instantly in MarkdownReader - Second
.mddouble-click while app is already open loads the file in a new tab (single-instance forwarding) - Desktop + Start Menu shortcuts
- File type icon associations
- Windows setup assistant popup (bottom-right corner) for first-run configuration
What's in the zip
| File | Description |
|---|---|
MarkdownReader.exe |
Main application (rename/run directly, no install needed) |
icon.ico |
App icon (used by Windows Explorer & shortcuts) |
resources/app.asar |
Packaged application code |
*.dll, locales/, etc. |
Chromium runtime (required, keep alongside the exe) |
Setup (first time)
- Extract
MarkdownReader-v2.0.0-win32-x64.zipanywhere (e.g.C:\Program Files\MarkdownReader\) - Run
MarkdownReader.exe - A setup assistant will appear in the bottom-right corner — click Fix to register
.mdfile associations and shortcuts - Done — double-click any
.mdfile to open it
Note for AVG/Avast users: The executable uses the unmodified official Electron runtime binary, which is already whitelisted in AVG/Avast cloud reputation databases. If AVG prompts on first run, select "Allow" and it will not prompt again.
Full Changelog
fix(renderer): eliminate infinite re-render loop inEditorComponent—onEditorReadynow fires exactly once per editor instancefix(renderer):handleEditorReady,handleSetUnsaved,handleSelectionUpdatewrapped inuseCallbackfor stable prop referencesfix(renderer): bail-out guard insetTabs— no state update ifisUnsavedis already correct valuefix(renderer): removewindow.api.saveFile()from editor mount pathfix(renderer):settingsRefdecouples IPC listener registration fromsettings.defaultModereactivityfix(renderer): clean upeditorsRef[id]when tab is closedfix(renderer): sync Tiptap content to tab state when entering Source Modefix(tiptap): disableStarterKitbuilt-inlinkextension to prevent duplicate registration withtiptap-markdownchore: bump version to2.0.0