Ferrite v0.2.3 is a polish release focused on editor productivity features, platform compatibility improvements, and Mermaid diagram enhancements. This release makes the editor feel more complete with essential editing shortcuts while improving Linux support and Mermaid UX.
After v0.2.2 addressed critical bugs and CLI improvements, users expect standard editor productivity features that are missing:
- Missing editor shortcuts - No Go to Line, duplicate line, or move line features
- Friction in markdown editing - Manual bracket closing and link formatting
- Linux compatibility - Cursor flicker bug and glibc dependency limits portability
- Mermaid UX gaps - No easy way to insert diagrams or learn syntax
- Readability - No option to limit line width for comfortable reading
- Power users who rely on keyboard shortcuts for productivity
- Markdown writers who want smoother editing experience
- Linux users on various distributions (including musl-based like Alpine)
- Users creating Mermaid diagrams who need syntax help
- Add essential editor productivity shortcuts (Go to Line, Duplicate, Move)
- Improve markdown editing flow with auto-close and smart paste
- Fix Linux-specific bugs and add musl build for maximum compatibility
- Enhance Mermaid UX with insertion toolbar and syntax help
- Add configurable line width for readability
- Custom editor widget replacement (v0.3.0)
- Mermaid crate extraction (v0.3.0)
- Wikilinks/backlinks support (v0.3.0)
- New diagram types
- Feature: Quick navigation to specific line number
- Shortcut:
Ctrl+G(standard across most editors) - UI: Small modal dialog with line number input
- Behavior:
- Show current line number as placeholder
- Accept line number, press Enter or click Go
- Jump to line and center it in viewport
- Close dialog on Escape or clicking outside
- Files:
src/editor/widget.rs,src/ui/dialogs.rs(new dialog) - Testing: Press Ctrl+G, type line number, verify cursor moves to that line
- Feature: Duplicate current line or selection
- Shortcut:
Ctrl+Shift+D - Behavior:
- No selection: duplicate entire current line below cursor
- With selection: duplicate selected text immediately after selection
- Preserve cursor position relative to duplicated content
- Files:
src/editor/widget.rs - Testing:
- Place cursor on line, Ctrl+Shift+D → line duplicated below
- Select text, Ctrl+Shift+D → selection duplicated after
- Feature: Move current line or selected lines up/down
- Shortcuts:
Alt+Up,Alt+Down - Behavior:
- Single line: swap with line above/below
- Multiple lines selected: move entire block
- Maintain selection after move
- Stop at document boundaries (don't wrap)
- Files:
src/editor/widget.rs - Testing:
- Move single line up/down
- Select 3 lines, move them as a block
- Try to move past top/bottom of document (should stop)
- Feature: Automatically insert closing character when typing opener
- Characters:
(),[],{},"",'',``,**,__ - Behavior:
- Type
(→ insert()with cursor between - Type
[→ insert[]with cursor between - Type
"→ insert""with cursor between (if not already inside quotes) - With selection: wrap selection (type
(with "hello" selected →(hello)) - Typing closing char when next char is same → just move cursor (skip over)
- Type
- Settings: Add
auto_close_bracketstoggle in Editor settings (default: true) - Files:
src/editor/widget.rs,src/config/settings.rs,src/ui/settings.rs - Testing:
- Type each opener, verify closer appears
- Select text, type opener, verify wrapping
- Type closer when cursor is before same char, verify skip-over
- Feature: Paste URL on selected text to create markdown link
- Behavior:
- Select text "Click here", paste
https://example.com - Result:
[Click here](https://example.com) - If no selection and paste URL: insert URL as-is (normal paste)
- Detect URL by checking for
http://,https://, or common patterns
- Select text "Click here", paste
- Bonus: Paste image URL → insert as
if no selection - Files:
src/editor/widget.rsor paste handling code - Testing:
- Select "example", paste URL → verify link syntax created
- No selection, paste URL → verify plain URL inserted
- Paste non-URL → verify normal paste behavior
- Feature: Limit text width for improved readability
- Setting:
max_line_widthin Settings > Editor - Options:
- Off (no width limit)
- 80 characters
- 100 characters (default)
- 120 characters
- Custom pixel width
- Behavior:
- Center text column when width is limited
- Apply to Raw, Rendered, and Split views
- Zen mode should respect this setting
- Files:
src/config/settings.rs,src/ui/settings.rs,src/editor/widget.rs,src/markdown/editor.rs - Testing:
- Set to 80 chars, open long-line document
- Verify text wraps at ~80 chars and is centered
- Toggle between settings, verify immediate update
- Feature: Statically-linked Linux binary using musl libc
- Benefit: Works on any Linux distro without glibc dependency (Alpine, old distros, etc.)
- Implementation:
- Add new CI job
build-linux-musl - Use
rust-musl-builderDocker image or install musl target - Target:
x86_64-unknown-linux-musl - Artifact:
ferrite-linux-musl-x64.tar.gz
- Add new CI job
- Files:
.github/workflows/release.yml - Testing:
- Build succeeds in CI
- Binary runs on Alpine Linux container
- Binary runs on Ubuntu without any shared library dependencies
- Problem: Cursor rapidly switches between pointer/move/resize near window close button on Linux (Mint)
- Root Cause: Likely conflicting hit-test zones between custom title bar and window resize areas
- Solution: Investigate cursor handling in custom window frame code
- Files:
src/ui/window.rs,src/app.rs(title bar rendering) - Testing:
- On Linux Mint (or similar), move cursor near close button
- Verify cursor stays stable (no rapid flickering)
- Verify close button still works
- Verify window resize still works from corners/edges
- Problem: Complex diagrams (50+ nodes) can be slow to render
- Solution: Profile and optimize hot paths
- Areas to investigate:
- Parsing: reuse buffers, avoid repeated allocations
- Layout: cache computations, avoid O(N²) loops
- Rendering: batch draw calls, reuse shape objects
- Implementation:
- Add lightweight caching keyed by mermaid source hash
- Only recompute for modified code blocks
- Files:
src/markdown/mermaid.rs - Testing:
- Create diagram with 50+ nodes
- Measure render time before/after optimization
- Verify visual output unchanged
- Problem: Large monolithic file with unused code warnings
- Solution:
- Run
cargo clippyand fix warnings - Remove dead code or mark with
#[allow(dead_code)]+ comment - Add documentation comments to public functions
- Optionally split into submodules:
parser.rs,layout.rs,render.rs
- Run
- Files:
src/markdown/mermaid.rs→ potentiallysrc/markdown/mermaid/ - Testing:
cargo clippypasses with no warnings in mermaid codecargo docbuilds successfully- All diagram types still render correctly
- Feature: Ribbon button to insert mermaid code block templates
- UI: Dropdown menu from a "Diagram" or "Mermaid" button in ribbon
- Templates:
Flowchart, Sequence, Class, State, ER, Gantt, Pie, Mindmap, Timeline, Git Graph, User Journey
- Behavior:
- Click template → insert fenced code block with basic example
- Example for Flowchart:
```mermaid flowchart TD A[Start] --> B{Decision} B -->|Yes| C[Action] B -->|No| D[End] ```
- Files:
src/ui/ribbon.rs, new templates in code or resource file - Testing:
- Click Flowchart in dropdown
- Verify code block inserted at cursor
- Verify diagram renders in preview
- Feature: Add Mermaid reference to Help panel
- Content:
- List of supported diagram types
- Basic syntax example for each type
- Link to official Mermaid documentation
- UI: New section in Help panel (Ctrl+? or Help menu)
- Files:
src/ui/about.rs(Help panel) - Testing:
- Open Help panel
- Verify Mermaid section is present
- Verify examples are readable and accurate
All features can be implemented with existing crates.
- Manual test all new keyboard shortcuts
- Test auto-close with various character combinations
- Test smart paste with URLs and non-URLs
- Test musl binary on Alpine Linux container
- Test Mermaid changes don't break existing diagrams
- All new features have sensible defaults
auto_close_brackets: default true (opt-out)max_line_width: default off (current behavior)- Existing config.json files work unchanged
- Go to Line (Ctrl+G)
- Duplicate Line (Ctrl+Shift+D)
- Move Line Up/Down (Alt+↑/↓)
- Auto-close Brackets & Quotes
- Smart Paste for Links
- Configurable Line Width
- Linux Musl Build
- Linux Close Button Cursor Flicker
- Mermaid Rendering Performance
- Mermaid Code Cleanup
- Diagram Insertion Toolbar
- Mermaid Syntax Hints in Help
- Ctrl+G opens Go to Line dialog and navigates correctly
- Ctrl+Shift+D duplicates lines
- Alt+↑/↓ moves lines
- Typing
(produces()with cursor in middle - Pasting URL on selection creates markdown link
- Line width setting limits text column width
- Musl binary runs on Alpine Linux
- No cursor flicker on Linux near close button
- Mermaid diagrams render faster for complex examples
- Ribbon has diagram insertion dropdown
- Help panel includes Mermaid syntax reference
| Issue | Title | Task |
|---|---|---|
| #4 | Mermaid toolbar & syntax hints | Tasks 4.3, 4.4 |
| #15 | Configurable line width | Task 2.1 |
| - | Linux cursor flicker | Task 3.2 |
src/editor/widget.rs # Go to Line, Duplicate, Move, Auto-close, Smart Paste
src/config/settings.rs # max_line_width, auto_close_brackets
src/ui/settings.rs # Settings UI for new options
src/ui/dialogs.rs # Go to Line dialog (new or extend)
src/ui/ribbon.rs # Diagram insertion dropdown
src/ui/about.rs # Mermaid syntax hints in Help
src/ui/window.rs # Linux cursor flicker fix
src/markdown/editor.rs # Line width in rendered view
src/markdown/mermaid.rs # Performance, cleanup
.github/workflows/release.yml # Musl build job| Shortcut | Action |
|---|---|
Ctrl+G |
Go to Line |
Ctrl+Shift+D |
Duplicate Line/Selection |
Alt+Up |
Move Line Up |
Alt+Down |
Move Line Down |