Expandable Heading Structure — outline nav panel + heading breadcrumb

Renders a heading nav/outline panel alongside the document, plus a sticky "current heading" breadcrumb, in CardMirror (the editor behind /reason-editor).

  • Route: /reason-editor (and every other CardMirror-hosted surface)
  • Package: debate-editor

What it shows

Nav panel — every heading-anchored node in the live document, indented by level, with collapse, drag-and-drop reordering, multi-select, a per-level filter, and caret-follow highlighting. Defaults to visible on every CardMirror host except /reason-editor, which renders its own file-tree/Open-Tabs sidebar beside the editor and therefore starts the nav pane hidden — the left-edge pull-tab or the View-menu toggle re-shows it there.

Tag rows wrap to two compact lines of small text, with the card's cite (author and year) in bold underneath, so the author is visible without hovering. Every pocket, hat and block row has a copy button (shown on hover); it and the row's right-click menu offer Copy all tags (every tag under that heading, one per line) and Copy tags, cites & highlighted text (each card's tag, cite and highlighted text).

Heading breadcrumb — a sticky one-line ancestor trail (e.g. "Case › Advantage 1 › Uniqueness") for whichever heading is at the top of the current scroll position, each segment clickable.

Data flow

editor/headings.ts → collectHeadings(doc)
editor/nav-panel.ts (NavigationPanel)
editor/heading-breadcrumb.ts → computeBreadcrumbPath(headings, pos)
editor/heading-breadcrumb-bar.ts (HeadingBreadcrumbBar)
editor/multi-pane-shell.ts → one HeadingBreadcrumbBar per pane, scoped to
                              that pane's own .pmd-pane-body scroller/view

Known gaps

The breadcrumb now has one instance per multi-pane pane too (multi-pane-shell.ts mounts its own HeadingBreadcrumbBar scoped to that pane's scroller), on top of the original single-doc one. Multi-window still doesn't have one.