Skip to content

Latest commit

 

History

History
307 lines (226 loc) · 12.8 KB

File metadata and controls

307 lines (226 loc) · 12.8 KB

SideMark Roadmap

v0.1.0 — Functional Application

Status: Complete

Core

  • Electron app scaffold (main process, renderer, preload, IPC)
  • Vite build setup for renderer
  • electron-builder config with macOS signing
  • Application menu (File, Edit, View, Window, Help)
  • Settings persistence (JSON store)
  • Window bounds save/restore
  • Multi-window support (Cmd+Shift+N)
  • Cmd+W closes tab (not window)
  • New window (Cmd+Shift+N) opens fresh (empty Untitled tab, no restored state)
  • Multi-window session restore (all open windows preserved and restored on quit/relaunch)
  • Dirty check on window close (prompt to save unsaved tabs before closing window)
  • Close Window shortcut (Cmd+Shift+W)

Editor

  • CodeMirror 6 markdown editor
  • Markdown syntax highlighting
  • Formatting toolbar (bold, italic, strikethrough, headings, lists, code, links, images, hr)
  • Toolbar works with selection (wrap) and without (insert markers)
  • Formatting toggle: wrap buttons (bold, italic, etc.) remove formatting if already applied
  • Heading buttons cycle: recognize existing heading, shift level, toggle off if same
  • List buttons: multi-line support (apply to all selected lines, toggle off on re-click)
  • Numbered lists: continue numbering from preceding list items
  • List buttons: swap type (e.g. bullet → numbered) when re-clicking with different type
  • Line numbers (toggleable)
  • Search and replace (Cmd+F, Cmd+H)

File Management

  • File browser pane (left sidebar)
  • File browser: expand/collapse directories, double-click to set root
  • File browser: path navigation with back button, defaults to home directory
  • File browser: only markdown files are openable
  • Open file from file browser
  • Open file from menu / dialog
  • Open folder for file browser
  • Save / Save As
  • Duplicate file
  • Recent files in menu
  • Tab bar with open files
  • Tab close, new tab, switch tabs
  • Dirty indicator on tabs (unsaved changes dot)
  • Save-before-close confirmation for dirty files
  • File watching (detect external changes)
  • External change diff view with resolve options
  • File browser auto-refresh on file system changes (including subdirectories)
  • File browser: reveal and highlight active file when switching tabs
  • File browser: right-click context menu (new markdown file, new folder, rename)
  • File browser: inline rename for files and folders
  • Session restore (persist open tabs, active tab, folder path across restarts)
  • File browser: delete file (move to trash) via context menu
  • File browser: "Show in Finder" context menu option

Preview

  • Live markdown preview (right pane)
  • Section-based bidirectional synchronized scrolling (editor ↔ preview)
  • GitHub Flavored Markdown rendering
  • Relative image path resolution in preview (local-resource:// protocol)

Settings

  • Theme: dark / light / system
  • Accent color picker (7 colors)
  • Font size selector (applies to editor)
  • Editor font family selector (system monospace fonts)
  • Fix: editor font family setting not applying to CodeMirror
  • Preview font family selector (system fonts)
  • Theme selector: segmented control (Dark / Light / System)
  • Toggle: line numbers
  • About section with links to mipyip.com and GitHub
  • Settings gear in file browser footer

Build

  • App icon (SVG source, icns generation script)
  • macOS entitlements plist
  • Release script (build + sign + GitHub release)
  • Generate .icns from icon SVG
  • First successful build (unsigned)
  • First successful signed build
  • Test on clean macOS install

Auto-Updates

  • electron-updater integration
  • Check for updates on launch and periodically (every 4 hours)
  • Check for Updates menu item
  • Update available dialog with release notes and download button
  • Download progress bar
  • Update downloaded dialog (Restart & Install)
  • "What's New" dialog shown after update restart

v0.1.11–0.1.22 — Security Hardening

Status: Complete (Critical, High, Medium all resolved) Source: Adversarial code review (The_Adversary/reviews/markdown_editor/REPORT.md)

Critical (Attack Chain: malicious .md → full filesystem compromise)

  • C1. XSS via unsanitized markdown preview — added DOMPurify before dangerouslySetInnerHTML
  • C2. Unrestricted filesystem access via IPC — added isPathAllowed() validation (home + /Volumes, blocks .ssh/.gnupg/.aws etc.)
  • C3. Path traversal in local-resource:// protocol — restricted to image extensions under home/Volumes
  • C5. shell.openExternal arbitrary schemes — allowlisted https:, http:, mailto: only

High

  • H1. Bypassable regex sanitizer in UpdateDialog.jsx — replaced with DOMPurify
  • H2. sandbox: false on main BrowserWindow — enabled sandbox: true (chokidar runs in main, not preload)
  • H3. Missing CSP on settings window — removed dead standalone entry; tightened update dialog CSP
  • H4. file:resolve-path exposed path.resolve() — removed (was never called from renderer)
  • H5. Entitlements: verified all 3 (allow-jit, unsigned-executable-memory, disable-library-validation) are required for Electron
  • H6. No debounce on preview rendering — added 150ms debounce

Medium (Code Quality)

  • M1. Duplicate CSS button styles — extracted to shared buttons.css
  • M2. Test artifact Architecture_test_second_save.md — deleted
  • M3. Unused settings standalone entry point — removed index.html + index.jsx
  • M4. release.sh git add -A — replaced with explicit package.json package-lock.json staging
  • M5. buildAnchorMap() rebuilt on every scroll — cached in ref, rebuilt only on content change

Low / Deferred

  • L1. No test framework — add Vitest
  • L2. No linting — add ESLint + Prettier
  • M8/M9. Decompose App.jsx (643 lines) and FileBrowser.jsx (505 lines) into custom hooks

v0.1.23–0.1.24 — Preview Header & Scroll Fix

Status: Complete

  • Preview pane header bar: show full file path in the empty space above the preview (mirrors toolbar height), with "Show in Finder" and "Copy Path" buttons
  • Scroll sync fix: when scrolling editor to the very top, preview should also scroll to top — snaps to 0 when sourceScroll ≤ 0

v0.2.0 — Favorites, Keyboard Shortcuts & Clickable Links

Status: In Progress

Favorites

  • Favorites panel above file browser (pin files and folders for quick access)
  • Click favorite folder → opens in file browser; click file → opens in editor
  • Drag-and-drop reordering within favorites
  • Stale path detection (muted/italic for missing paths)
  • Right-click context menu: "Add to Favorites" / "Remove from Favorites" in file tree
  • Right-click context menu: "Remove from Favorites" in favorites panel
  • "Copy Path" context menu option for files and folders in file tree

Resizable Panes

  • Draggable resize handle between file browser and editor (6px visible bar, col-resize cursor)
  • Draggable resize handle between editor and preview panes
  • Editor/preview handle snaps to center with 4px buffer zone
  • File browser width constrained to 120–360px range
  • Both resize positions persist to settings and sync across windows

Keyboard Shortcuts

  • Bold (Cmd+B)
  • Italic (Cmd+I)
  • Strikethrough (Cmd+Shift+X)
  • Inline code (Cmd+E)
  • Code block (Cmd+Shift+C)
  • Heading cycle (Cmd+Shift+H) — cycles none → H1 → H2 → H3 → none
  • Bullet list (Cmd+Shift+L)
  • Numbered list (Cmd+Shift+O)
  • Link (Cmd+K)
  • Horizontal rule (Cmd+Shift+-)
  • Blockquote (Cmd+Shift+.)

Bug Fixes

  • Tab scroll/cursor position: save and restore per-tab scroll offset and cursor when switching tabs
  • File browser refresh: increase watcher depth from 1 to 5 for nested subdirectories
  • File browser refresh: reload tree on window focus to catch changes missed by FS events
  • Per-document undo history: Cmd+Z currently shares undo state across all tabs — each tab should have its own independent undo/redo stack

Clickable Links

  • File browser: delete folder (move to trash) via context menu
  • Preview pane: clickable links to local .md files open in new tab
  • Link resolution: handle relative paths
  • Link resolution: handle directory traversal (../, ./)
  • Link resolution: handle paths relative to open folder root
  • Visual distinction for local vs external links in preview

v0.3.0 — Toolbar Dialogs & Polish

Status: Planned

  • Link button: dialog to enter URL
  • Image button: dialog with "Insert from file" and "Insert URL" options
  • Editor: bracket/quote auto-pairing
  • Auto-save option (with configurable delay)
  • File browser: drag to resize width
  • Export to HTML / PDF
  • Performance: large markdown files crash or freeze the app (editor + preview rendering)

Bug Fixes

  • Tab bar: auto-scroll to newly opened/active tab when it's off-screen

Search Enhancements

  • Search: highlight matches in preview pane (read-only, mirrors editor matches) — in progress: code in place but highlights not visually appearing
  • Search: "Find in Folder" via right-click context menu — search file names and content within selected folder (depth-limited, ignore patterns, relative path display)

v0.4.0 — Focus Mode, Export & Auto-Save

Status: Complete

Focus Mode

  • Distraction-free fullscreen editing window (toolbar + editor only, centered at comfortable column width)
  • Enter via right-click tab > "Open in Focus Mode" or ⌘⇧F (View menu)
  • Auto-saves content in background (500ms debounce) — parent window stays in sync via file watcher
  • ESC to exit focus mode
  • Parent tab shows "in focus mode" placeholder with "Switch to Focus Window" button

Export

  • Export to PDF (File > Export As > PDF) — uses Electron's printToPDF via hidden offscreen window
  • Export to HTML (File > Export As > HTML) — standalone document with inline light-theme styles

Auto-Save

  • Auto-save toggle in Settings (off by default) with configurable delay (1s, 2s, 5s, 10s)

Collaborative Editing (v0.4.1–v0.4.3)

  • Three-way merge: non-overlapping external edits merge seamlessly via createPatch/applyPatch with fuzz factor
  • Interactive per-hunk diff view: click change blocks to toggle mine/theirs, bulk select, mixed merge via "Apply Selection"
  • Hunk grouping: short context gaps (1-2 lines) absorbed so heading+body toggle as one block
  • Empty content guard: never accept empty/truncated file reads (mid-write protection)
  • Focus mode skips file watcher (auto-save owns the file)
  • External file deletion detection: dialog prompts close tab or re-save

v1.0.0 — SideMark Rebrand

Status: Complete

  • Rename from "Simple Markdown Editor" to "SideMark"
  • Git gutter markers (added/modified/deleted vs last commit)
  • Toast notifications for silent merge success
  • Copy with context (⌘⌥C) — file path + line numbers for AI chat windows
  • Editor right-click context menu (cut, copy, paste, copy with path)
  • Enhanced markdown syntax highlighting (theme-aware colors)
  • Task list checkboxes in preview (custom styled, DOMPurify-safe)
  • Session persistence flush-on-quit (no session loss during updates)
  • Find in Folder keyboard shortcut (⌘⇧G)

v1.0.4 — Text Transforms & Editor Polish

Status: Complete

  • Text Transforms submenu (Edit > Text Transforms): Unicode Italic, Bold, Bold Italic, Small Caps, Monospace, Strikethrough, Upside Down, UPPERCASE, lowercase, Title Case
  • Keyboard shortcuts for Unicode Italic (⌘⌥I) and Unicode Bold (⌘⌥B)
  • Scroll past end in editor (no more jarring jumps when editing at the bottom)

v1.0.5 — Tab Reorder & Session Fix

Status: Complete

  • Tab drag-and-drop reordering
  • Window drag spacer in title bar (60px, always draggable even with many tabs)
  • Session persistence fix: remove renderer debounce, simplify update-restart quit path
  • Beta release channel (npm run release:beta, prerelease versions, allowPrerelease auto-detection)

v1.0.6 — File Browser Dates

Status: Complete

  • "Show dates" setting in Settings > File Browser
  • Column headers (Name / Date) with clickable sort cycling (Modified ↓/↑, Created ↓/↑)
  • Relative timestamps on files and folders (just now, 2m ago, 3d ago, Mar 23)
  • Age-based color gradient: accent → muted grey over 30 days

See Issues for what's next.