Skip to content

Commit a0fe1ca

Browse files
chore: add 0.2.0 CHANGELOG with comprehensive release notes
- Complete feature list for version 0.2.0 - Link following system documentation - Navigation history features - Parent jump navigation - Cross-platform browser integration - Live file editing capabilities - App state enhancements - UI improvements - Event handling updates - Technical details of new parser module - File resolution strategy - Type-safe link handling
1 parent 4623ed6 commit a0fe1ca

1 file changed

Lines changed: 123 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,129 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.0] - 2025-01-13
9+
10+
### Added
11+
12+
- **Link Following System** - Complete markdown link navigation with visual feedback and multi-file support
13+
- Press `f` to enter link follow mode with interactive link picker popup
14+
- Navigate links with `Tab`/`Shift+Tab`, `j`/`k`, or arrow keys
15+
- Jump directly to links using number keys (`1-9`)
16+
- Visual popup shows all links in current section with highlighting
17+
- Selected link indicated with green arrow (▶), bold, and underline
18+
- Real-time status messages for all actions
19+
20+
- **Link Type Support** - Handles all markdown link formats
21+
- **Anchor links** - `[Go](#installation)` jumps to heading in current file
22+
- **Relative file links** - `[API](./docs/api.md)` loads markdown files
23+
- **File + anchor links** - `[Guide](./guide.md#usage)` loads file and jumps to section
24+
- **WikiLinks** - `[[README]]` and `[[README|docs]]` with Obsidian-style syntax
25+
- **External URLs** - `[GitHub](https://...)` opens in default browser + copies to clipboard
26+
27+
- **Navigation History** - Back/forward navigation between files
28+
- Press `b` or `Backspace` to go back to previous file
29+
- Press `Shift+F` to go forward in navigation history
30+
- Full state preservation (scroll position, selected heading)
31+
- Separate history stacks for back and forward navigation
32+
33+
- **Parent Jump** - Quick navigation to parent headings
34+
- Press `p` in normal mode to jump to parent heading in outline
35+
- Press `p` in link follow mode to jump to parent's links (stays in link mode)
36+
- Searches backwards for nearest heading with lower level
37+
- Status messages indicate when already at top-level
38+
39+
- **Cross-Platform Browser Integration** - Reliable URL opening
40+
- Uses `open` crate for macOS, Linux, Windows, and WSL support
41+
- Automatically opens external links in default browser
42+
- Fallback to clipboard if browser fails
43+
- User-friendly status messages for all outcomes
44+
45+
- **Live File Editing** - Edit files in default editor with auto-reload
46+
- Press `e` to open current file in editor (respects `$VISUAL` and `$EDITOR`)
47+
- Proper terminal suspension and restoration (follows ratatui best practices)
48+
- Auto-reloads file after editing with position preservation
49+
- Restores heading selection and scroll position when possible
50+
- Works with vim, nano, emacs, VS Code, or any configured editor
51+
- Uses `edit` crate for reliable cross-platform editor detection
52+
53+
### Changed
54+
55+
- **App State Enhancement** - Added comprehensive link following state management
56+
- New `AppMode` enum: `Normal`, `LinkFollow`, `Search`, `ThemePicker`, `Help`
57+
- `FileState` struct for navigation history with full document state
58+
- Link tracking: `links_in_view`, `selected_link_idx`, `file_history`, `file_future`
59+
- Temporary status message system with icons (✓, ⚠, ✗)
60+
61+
- **UI Enhancements** - Better visual feedback for all operations
62+
- Link navigator popup with styled content (80% width, 60% height)
63+
- Enhanced status bar shows current link details in link mode
64+
- Content title displays link count: `[Links: 3]`
65+
- Help screen updated with link following keybindings section
66+
67+
- **Event Handling** - New keyboard shortcuts for link navigation and editing
68+
- `f` - Enter link follow mode
69+
- `Tab`/`Shift+Tab` - Navigate links forward/backward
70+
- `j`/`k`/``/`` - Navigate links (vim-style + arrows)
71+
- `1-9` - Jump directly to link by number
72+
- `Enter` - Follow selected link
73+
- `Esc` - Exit link follow mode
74+
- `p` - Jump to parent (context-aware)
75+
- `b`/`Backspace` - Go back
76+
- `Shift+F` - Go forward
77+
- `e` - Edit current file in default editor
78+
79+
### Technical
80+
81+
- **New Parser Module** - `src/parser/links.rs` (320 lines)
82+
- `Link` struct with text, target, and byte offset
83+
- `LinkTarget` enum for type-safe link representation
84+
- `extract_links()` function with two-pass parsing
85+
- 10 comprehensive tests covering all link types
86+
- Custom wikilink regex parser for `[[filename]]` syntax
87+
88+
- **Link Detection** - Robust parsing using pulldown-cmark
89+
- First pass: Standard markdown links via pulldown-cmark events
90+
- Second pass: Custom regex for wikilink syntax
91+
- Extracts link text, target, and byte offset for each link
92+
- Handles malformed links gracefully
93+
94+
- **File Resolution** - Smart path and wikilink handling
95+
- Resolves relative file paths from current file location
96+
- Wikilink search in current directory (`.md` extension added automatically)
97+
- Anchor normalization (lowercase, dash-separated)
98+
- Error handling with descriptive messages
99+
100+
- **Visual Rendering** - Popup overlay system
101+
- `render_link_picker()` function (130 lines)
102+
- Centered popup with styled spans for each link
103+
- Color-coded elements (green/yellow/white/gray)
104+
- Scrollable for many links
105+
- Footer with keybinding hints
106+
107+
- **State Management** - Clean separation of concerns
108+
- Link mode completely separate from normal navigation
109+
- History stacks preserve full document state
110+
- Status messages cleared on next keypress
111+
- Mode transitions preserve relevant state
112+
113+
- **Terminal Management** - Proper TUI suspension for external programs
114+
- `run_editor()` function handles terminal state transitions
115+
- Suspends TUI: LeaveAlternateScreen → disable_raw_mode
116+
- Spawns editor with full terminal control
117+
- Restores TUI: EnterAlternateScreen → enable_raw_mode → clear
118+
- Follows official ratatui best practices for external process spawning
119+
- Prevents rendering artifacts and ANSI escape code leakage
120+
121+
- **Dependencies Added**
122+
- `open = "5.3"` - Cross-platform URL/file opening
123+
- `edit = "0.1"` - Cross-platform editor detection and invocation
124+
125+
- **Code Quality**
126+
- Zero clippy warnings
127+
- All 21 tests passing (18 unit + 3 doc tests)
128+
- Comprehensive documentation
129+
- Clean error handling throughout
130+
8131
## [0.1.7] - 2025-01-10
9132

10133
### Fixed

0 commit comments

Comments
 (0)