# Features Comprehensive catalog of what `mdview` does today (post Phase 2, May 2026). ## Layout & navigation | Feature | Implementation | |---------|----------------| | 3-pane shell (file tree / content / outline) | CSS grid in `layout.css` | | Collapsible sidebars with thin label rails when collapsed | `useUiState`, persisted in `localStorage` (`mdview-tree-collapsed`, `mdview-outline-collapsed`); collapse buttons live inside each pane (no duplicate header toggles) | | **Resizable sidebars** with drag handles | `Resizer.tsx` — pointer-driven, pointer-capture, persisted widths (`mdview-tree-width`, `mdview-outline-width`); collapses below threshold | | **Wide layout toggle** — relaxes the reading-column cap (70ch → 100ch) | `useUiState` (`mdview-wide-layout`), `data-wide` attribute, View menu toggle, `w` shortcut | | Folder tree with folder/file icons, expand/collapse | `FolderTree.tsx` | | Outline sidebar with depth indentation, scroll-spy, per-node fold | `Outline.tsx`, `useScrollSpy.ts` | | **Outline level filter (2-thumb range slider)** | `Outline.tsx` head + `useOutlineLevels.ts` + `lib/outline-filter.ts`; min/max persisted via `mdview-outline-min-level` + `mdview-outline-max-level`; visible set derived as `{min..max}` via a computed signal | | Breadcrumbs reflecting current heading; clickable segments | `Breadcrumbs.tsx` | | Cross-file `[link](other.md)` navigation inside the SPA | `tagInternalLinks` server-side + `wireInternalLinks` client-side | | Per-heading anchor URLs (refresh keeps your spot) | `markdown-it-anchor` + hash-restore in `App.tsx` | | Quick file switcher (`⌘P`) with fuzzy search | `CommandPalette.tsx` + `lib/file-search.ts` | | Reading-progress bar at bottom of header | `ReadingProgress.tsx` | | Doc stats strip below H1 (reading time / words / headings) | `lib/doc-stats.ts` | | **Last-updated timestamp on the doc** ("Updated N ago" + absolute tooltip) | `RenderedFile.lastModified` (server stat) + `shared/relative-time.ts` | ## Reading modes | Feature | Implementation | |---------|----------------| | **Focus mode — dims everything except the section under your eyes** | `lib/focus-mode.ts` (`applyFocus` / `clearFocus`) driven by `focusedHeadingId` from `useScrollSpy`. Distinct from `activeHeadingId` (used by breadcrumb/outline/minimap): focus uses a **top-third reading band** (`FOCUS_BAND_FRACTION = 0.35`) so the highlight rolls forward to a new section the moment its title enters the natural reading zone, instead of clinging to a heading that scrolled off-screen pages ago. Navigation indicators still answer "where am I in the doc?" (top edge); focus answers "what am I reading right now?" (reading zone). Toggled by `f` or the View menu. | | **Minimap rail with viewport indicator** | `Minimap.tsx`; bars per heading, click/drag to scroll; toggled by `m` or header button | | **Collapsible sections** — every heading folds its trailing content | `lib/collapsible-sections.ts` wire. For each top-level heading in `.markdown-content`, a chevron `