Summary
View previous versions of a file from git history and compare any two versions side by side, similar to GitHub's Markdown diff viewer.
Motivation
When working with versioned Markdown files, users often need to see how a document has evolved — what was added, removed, or reworded. Currently this requires switching to a terminal or GitHub web UI. An integrated git history viewer with visual diff would keep users in their flow.
Proposed Behavior
History Browser
- View the git log for the current file
- Select any commit to view that version of the file (rendered or source)
- Show commit metadata (author, date, message)
Diff Viewer
- Compare any two versions of a file (e.g. current vs. a past commit, or two arbitrary commits)
- Side-by-side or unified diff view
- Markdown-aware rendering: show diffs on the rendered output (like GitHub's rich diff), not just raw text
- Highlight added / removed / changed sections with color coding
Technical Considerations
- Use
git log --follow to track file renames
- Use
git show <commit>:<path> to retrieve historical content
- Diff algorithm: operate on rendered Markdown (HTML diff) or source lines, or both
- Performance: lazy-load commit list for files with long history
- UI: could reuse the tab system to open historical versions as read-only tabs
Summary
View previous versions of a file from git history and compare any two versions side by side, similar to GitHub's Markdown diff viewer.
Motivation
When working with versioned Markdown files, users often need to see how a document has evolved — what was added, removed, or reworded. Currently this requires switching to a terminal or GitHub web UI. An integrated git history viewer with visual diff would keep users in their flow.
Proposed Behavior
History Browser
Diff Viewer
Technical Considerations
git log --followto track file renamesgit show <commit>:<path>to retrieve historical content