Skip to content

[Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499

Closed

Description

@HMarzban

Summary

Image

Edward asked us to move TOC sections the way a file explorer moves folders. His words, verbatim:

"I have been thinking about headings in the toc and how you move them around at the moment; currently we have it like a full 2D selector, but I think it should work more like moving folders around in a file system. When you drag one handle, all the ones below move along with it. And you don't have full freedom to make it any heading; you get a smaller headin by putting it "inside" another a larger heading.
I think if it works the way filesystems work people will get it immediately because they're familiar with that"

Screenshot: the maintainer attaches Edward's folder-tree image.

What the TOC does today, at commit 85295b8cf:

  • A drag writes the new level to the dragged heading alone. So a demote ejects its sub-headings (measured on a scratch copy: case 1b gives H3:A H3:A1 H3:A2). The write is one setNodeMarkup (moveHeading.ts:99-112; read from code).
  • The Title row can be dragged. A drop above the Title replaces it (measured: case 5a gives H1:B b0 H1:Title t0).
  • The level comes from a sideways offset, with no check of the row above (utils.ts:59-72; read from code).
  • A drop on the lower half of a folded row lands inside the fold (measured).
  • No menu row moves a section, so a drag is the only path (TocContextMenu.tsx:17-71; read from code).
  • The TOC move never checks the editing lock (read from code: no selectDocumentEditingLocked under components/toc/).

After this set, a section moves with its whole subtree. A drop on a heading puts the section inside it. The Title stays fixed. Section options gets four Move rows, so a move needs no drag.

Claim tags in this set: measured means run on a scratch copy on 2026-10-15 or 2026-10-16. Read from code means read at the pinned commit, not run. Primary source gives a URL and a short exact quote. Secondary / inferred is a guide, a forum post or a deduction.

Maintainer rulings, 2026-10-15

These rulings are authoritative. They override every earlier note, report and memory. The newest ruling wins over any child body.

  • R1. When a drag changes the level of the dragged heading by delta d, every heading in its section (its sub-headings) shifts by the same d. DEMO.md:229 ("The new level is written to the dragged heading alone, so sub-headings keep the levels they had") is overturned.
  • R2. Think like a flat document. A level change is a level change; the section logic derives the tree. So after a promote (or any drop at a level), headings that follow at the new level or deeper fall inside it ("capture"). Do not add a rule that blocks capture.
  • R3. The first H1 of the document is the Title. Its TOC row has no drag grip. Nothing can be dropped above it. Its level never changes.
  • R4. Never block a move because of depth. A sub-heading whose shifted level would pass H6 stays at H6 (squash). Do not look at the children to decide whether a drop is allowed.
  • R5. Design "drop ON a heading = put it inside" now (Edward's folder gesture), with its full micro-interactions: hit zones, inside highlight, hover delay, auto-expand of a folded heading, drop and settle animation. A short hallway test (Edward plus 2-4 new users) runs before release.
  • R6. A "set" is one heading plus its whole subtree. There is no multi-select.

Note: the overturned line is DEMO.md:229 (read from code). #500 rewrites that page in the same change as R1.

The maintainer's own words (lightly edited for spelling):

"the docs.plus editor is built for tree sections, hierarchy, so moving the heading must follow the tree"

"do not look at the children, just change the heading level, the other logics do the rest of the jobs in background. Think like flat documents."

Peer exceptions

AGENTS.md:151 says behaviour follows Google Docs, Word and Notion. When the maintainer keeps a ruling with no peer support, the ruling comment "records it as a deliberate exception" (read from code). These rulings are kept on purpose. Do not "fix" them toward a peer.

Kept exceptions, ruled 2026-10-15:

  • R2 capture. No Google Docs, Word or Notion page states it. Parity is only inferred from their flat headings (secondary / inferred). Outliners split: Logseq captures by default, and Dynalist and Workflowy do not (secondary / inferred; the research notes cite their help pages).
  • R4 squash at H6. No peer squashes. The one peer pattern found blocks the drop with a warning look: Atlassian instruction-blocked (secondary / inferred). Word's behaviour at its Heading 9 cap is unknown.
  • R5 drop on a heading puts it inside. None of Google Docs, Word or Notion does this for headings. Google Docs tabs and Notion sidebar pages do it for tabs and pages only (secondary / inferred).

Recorded only if ruled that way (not exceptions yet):

  • D1 cap at P.level + 1. No primary source shows whether Word caps a dragged heading's level. Word's Navigation pane keeps the level on a drag (secondary). This needs the maintainer's word before it is posted as an exception.
  • D2 sideways offset, only if ruled "keep". None of the three peers sets a level by a sideways drag (secondary / inferred).
  • D7 inside highlight, only if kept. Google Docs and Word do not drop a heading inside a heading, so they have no inside highlight (secondary / inferred). Notion highlights a sidebar page only (primary source: Notion help, "You'll see the selected page highlight blue").
  • D15 part 3, the Undo toast, only if kept. No Google Docs, Word or Notion help page shows an Undo toast after a heading move (secondary / inferred). Non-peer support: Apple HIG, "Prefer letting people undo a drag-and-drop operation" (primary source).
  • D18 grip as a menu button. DS (confirm Unify every context menu on one design-system menu recipe #391). Only Notion has a grip. Word and Google Docs show none, so they state no rule for a grip click (secondary / inferred). The ruling says whether Notion counts as peer support.
  • D23 TOC undo key (Ctrl/Cmd+Z with focus in the TOC). Kept: the Move a TOC section with its sub-headings and keep the Title fixed #500 ruling of 2026-10-16 took the recommended answer, so this is now a deliberate exception. No primary source was checked for what the three peers do with that key in their outline (secondary / inferred). Apple HIG supports undo of a drag, but Apple is not a peer.
  • Rebuild the TOC drop hit test so folded rows and gaps land right #503 Decision A, the no-drop cursor over the header row. No Google Docs, Word or Notion source was checked for this cursor (secondary / inferred).

Peers disagree (the maintainer rules, per AGENTS.md:151):

  • D30 drag start. Word moves a section by its heading (primary source: Microsoft support, "select the heading and drag it to a new location"). Notion drags a block by its grip (primary source: Notion help, "use the ⋮⋮ icon that appears as a handle to drag it around"). The D30 recommendation follows Word.

Not exceptions:

Decisions still open

The recommended answer comes first. The owner of every Decision is the maintainer. DS marks a design-system ruling (design-system.md:9-25). "Ruled on" names the child where the ruling comment goes. "Built by" names the child that ships it.

Id Question Recommended Ruled on Built by
D1 What level does a set take at a gap? Keep the source level, capped at P.level + 1 (P = the row above). On the source's own two gaps, no cap, so a release in place is a no-op. Alternative: no cap, as today. #504 #504
D2 Drop the sideways level offset and the level pickers? DS Drop the offset, TocLevelPicker and the grip-hover preview picker. Cost: a drag alone cannot take a set out to the slot right after its parent. Menu Move section down, then Promote, can. #502 #504
D3 How do extra H1s after the Title behave? They are normal sections. They can move, and Promote on a child of the Title makes an H1. #500 (ruled 2026-10-16: recommended) #500, #501
D4 Where does a drop inside a heading put the set? The first child, at T.childStart, as HT.level + 1. It lands under the pointer (measured safe: cases 4b and 5c). Alternative: the last child. #500 (ruled 2026-10-16: recommended) #500, #508
D5 Does an H6 row have an inside zone? No. It splits 50/50 into before and after. #508 #508
D7 How does the inside highlight look? DS Class is-drop-inside: the context-menu-active fill plus outline: var(--focus-ring-soft); outline-offset: -2px. Instant. #502 #508
D8 Indent the drop line to the landing depth? DS Yes. Keep the 2px line and the 10px dot. No tween. #502 #504
D10 Spring-open rules? After 500ms in the inside zone of a folded row, open it with toggleFold. It stays open after the drag. #508 #508
D15 Settle feedback? DS An 80ms card fade on every release. A flash on the moved row and the captured rows. An Undo toast when rows were captured or squashed. #502 #506
D18 Make the grip a menu button? DS Yes. A press under 5px of travel opens Section options. Tooltip: "Drag to move, click for options". #501 #501
D20 Add a Move group to Section options? Yes: Move section up, Move section down, Promote section, Demote section. Hidden on the Title row and on a locked pad. #501 #501
D22 One TOC live region for move results? Yes, results only. Silence the dnd-kit announcements. #507 #507
D23 Undo from the TOC, with quick moves kept apart? Yes. Ctrl/Cmd+Z in the TOC runs the editor undo. Each move calls stopCapturing() before and after. #500 (ruled 2026-10-16: recommended) #500, #507
D26 Do editor-side level controls cascade? No. Block style, the phone stepper and Mod-Alt-1..6 change one line. Only TOC moves cascade. #500 none (no change)
D27 A phone path for moves? A later issue: a sheet with the four Move rows, and no drag. It overturns #391 ruling 9, so it needs a new ruling. this tracker (ruled 2026-10-16: not needed yet) #511 (backlog)
D30 Where can a drag start? With a mouse, the whole row, after 5px. With touch, only the grip. Always draggable={false} on the title link. Peers disagree; see Peer exceptions. #505 #505
R2r How to read R2 "at the new level or deeper"? "Deeper than the new level". A heading at the same level starts a new sibling section (read from code: compute-section.ts:7-34). #500 (ruled 2026-10-16: recommended) #500
G1 How does the release wait for the hallway test? See Shared rules, Release gate. this tracker #509

One preview for D2, D7, D8 and D15. #502 builds one standalone HTML preview in Notes/previews/ with the real tokens. The maintainer rules D2, D7, D8 and D15 in one comment there. D18, also DS, is ruled on #501 with the #391 confirmation. #504, #506 and #508 wait for it.

Local Decisions live on their child and are not repeated here:

Child issues, in order

Each child names its own steps, Decisions and checks. Read this tracker first.

Beside the order:

Shared rules

Children point here instead of repeating these.

Names

One name per thing, in every child.

  • Title. The heading at doc child index 0, always an H1. A new isTitle flag on TocItem marks its row. Row and zone code read only that flag.
  • Set. One heading plus its whole subtree (R6). getDescendantIds already computes it.
  • Section. The flat range that holds a set. It runs from the heading to the next heading at its level or higher.
  • Gap. The drop place between two visible rows, or below the last visible row.
  • Inside. A drop on a row's inside zone. The set lands as that heading's first child (D4).
  • Capture. Following headings that fall inside the moved heading because they are deeper than its new level (R2).
  • Squash. A sub-heading whose shifted level would pass 6 stays at 6 (R4).
  • Settle. Everything after a successful move: wait for the rebuild, open the path, scroll, flash, announce.

The level rule

  • The planner finds the new level L of the dragged heading and clamps it to 1..6. Then d = L - source.level.
  • Every heading in the set gets clamp(level + d, 1, 6) (R1, R4). A level above 6 stays at 6 (squash). Nothing is refused.
  • Capture is never computed in advance. It follows from the flat document (R2). The planner result reports it after the move.
  • At a gap, L follows D1. Inside a row T, L = min(T.level + 1, 6).
  • The planner never reads the row below a gap and never reads the children to refuse a drop (R2, R4).
  • A same-slot drop with d = 0 dispatches nothing. With d ≠ 0 (menu Promote and Demote), it emits markup steps only.
  • Every move keeps every toc-id (measured). Chat rooms, folds and unread counts follow the heading.

The safe drop-inside placement

  • Invariant. Every insert position is the start of a heading node, or the document end. So no body paragraph ever changes owner.
  • An inside drop lands at T.childStart. That is after T's body and before T's first child heading. With no child heading, it is T.sectionTo.
  • Measured on a scratch copy: a drop right after T's heading node moves T's body into the dropped set (case 4a, unsafe). The planner never makes that placement.
  • Measured safe: after T's body (case 4b), the end of T's section (case 4c), and inside the Title as first child (case 5c).
  • The planner refuses any insert position before the end of the Title node (R3).

The Title guard (R3)

  1. No grip. The Title row has no grip and no useSortable. Do not add a disabled-grip state; no recipe exists for one.
  2. No zone above it. The Title row is one inside zone. Until Drop a section onto a TOC heading to put it inside #508 lands, its whole height is its after zone (Rebuild the TOC drop hit test so folded rows and gaps land right #503). The header row is never a target.
  3. The planner refuses. The Title as a source, and any insert before the end of the Title node.

enforceH1Title stays as a last net (title-document.ts:11-35; read from code). With the guards, it never fires on a move.

The read-only gate

The drag timeline

This tracker holds the one numbered timeline for the set. It holds no spec sections. So every child drops each numbered spec reference (§0 to §11) and each "spec" or "tracker spec" wording. Keep §Name references to AGENTS.md, CLAUDE.md and skill sections. A child cites a step as "Drag timeline step N on #499", and a rule by its Shared rules heading. A child states any other rule (zone sizes, hysteresis, phrases, focus return) in its own body.

Each step has one owner. Other children may build a named part of a step. Sub-rows such as 3b or 6b are parts of their step. Tokens and values are in the motion token map below. Existing tokens and helpers are read from code. New constants (TOC_SPRING_OPEN_MS, TOC_SETTLE_FALLBACK_MS) and the 5px whole-row pickup are targets set by the Decisions. Nothing here is measured.

# Step What happens Owner Parts built by
1 Grip hover The grip shows (existing reveal). Cursor grab. Tooltip "Drag to move, click for options" (D18). #501 #504: no preview picker (D2).
2 Pickup After 5px of travel, the card shows at once. Body cursor grabbing. The set stays in place as the ghost. #505 #504: no picker; the card x stays 0.
3 Move The row and zone come from the rect cache. The drop line or the inside highlight shows, never both. Instant. #503 #504: the line depth (D1, D8). #508: the inside zone.
4 Inside highlight Class is-drop-inside on the target row (D7). The drop line hides. Instant. #508 none
5 Spring-open wait 500ms in the inside zone of a folded row with children. Any zone change stops the timer. #508 none
6 Spring-open fire toggleFold opens the row; it stays open (D10). The rect cache rebuilds before paint. #508 none
7 Auto-scroll dnd-kit defaults. The hit test re-runs on a scroll. #503 none
8 No-drop area Header row: cursor no-drop (Decision A), no line. Ghost: no line, cursor stays grabbing. #503 none
9 Release, no change Esc, a release with no target, or a planner NoOp. No transaction. The card fades out. The ghost clears. #506 #504: the own-gap NoOp. #505: the lock and peer-delete cancels. #507: the cancel line.
10 Release, success One transaction. The card fades out. The ghost stays until settle. #506 #500: applyMove.
11 Settle wait Settle on the first change to items. Fallback after TOC_SETTLE_FALLBACK_MS. #506 none
12 Open the path toggleFold each folded ancestor, and a folded inside target. #506 none
13 TOC scroll scrollTocRowIntoView, instant, nearest. #506 none
14 Flash The moved row and every captured row (D15). #506 none
15 Editor scroll Scroll the editor to the moved heading. #506 none
16 Announce and toast The Undo toast when rows were captured or squashed (D15). One polite result line (D22). #506 #507: the live-region line and focus return.

Each child aligns its Micro-interactions section to this table:

The motion token map

Read from code: _entry.scss:4-12 and motion.ts:1-18. No new token.

Moment Token or value Reduced motion Owner
Drop line, inside highlight, zone change Instant. No tween. Same. #503, #504 (D8 line depth), #508
Card fade on every release (D15) --motion-overlay-out 80ms, --motion-ease-exit ease-in; JS MOTION_OVERLAY_OUT_MS. Opacity only. Stays (opacity is not motion). #506
Row flash (D15) msg-card-flash keyframes on a row ::after, over --motion-flash-hold 2200ms. Static primary 16% tint for the same hold. #506
Flash clear A timer on MOTION_FLASH_HOLD_MS, moved into utils/motion.ts from MESSAGE_HIGHLIGHT_MS (messageJumpTiming.ts:1-2). Never animationend. Same timer. #506
Spring-open wait (D10) TOC_SPRING_OPEN_MS = 500, a functional constant in toc/dnd/types.ts. Not a motion token. Keeps its timing. #508
Chevron turn on spring-open Existing 160ms caret. Existing rule. #508
TOC scroll at settle Instant scrollTocRowIntoView, nearest. Same. #506
Editor scroll at settle Smooth. prefersReducedMotion() ? 'auto' : 'smooth'. #506
Undo toast (D15) The existing toast, house default 4000ms. Existing. #506
Settle fallback TOC_SETTLE_FALLBACK_MS = 500, a functional constant in toc/hooks/useTocMoveSettle.ts. Not a motion token. Keeps its timing. #506

Never use transition-all, animate-pulse or pulse keyframes. Never tween a transform on .toc-drag-wrapper; its static translate is load-bearing. No new z-tier. No live region inside .ProseMirror. Never edit the locked globals.scss.

Release gate (Decision G1)

#508 and #509 both follow this one rule. This tracker asks the maintainer to rule it.

  • Recommended. Each code child commits on local main, as the maintainer approves. No app-deploying (build): commit goes on main from the first code child commit until the hallway test passes (Run the TOC move hallway test before drop inside ships #509).
  • Reason. A deploy reads only the pushed tip, and the tip must start with (build): (read from code: AGENTS.md:415, parse-build-trigger.sh:30-34). The tip holds every earlier commit, so an unrelated hotfix deploy would ship the untested move (secondary / inferred).
  • Cost. It also freezes hotfix deploys. So run every session within one week of the last code child commit.
  • Alternative. Push and deploy children as they land, and hold only Drop a section onto a TOC heading to put it inside #508 off pushed main until the pass. Cascade, the menu and the new drag level then ship before the test.

Other shared rules

  • Pinned commit. Every code link in this set is pinned to 85295b8cf2fc8f78efd5a3eaa4ecc05af413c2b2.
  • Settled rules stay. No TOC channel-map rework: no data-level type ladder, no chat-open accent bar, no scroll-spy wash, no ::before accent. Tick rail rules stay. TOC presence overhang stays rejected. Keep the Toc* names and the components/toc/ home.
  • menu-active means chat open. menu-focus means scroll-spy. Neither gets a second meaning.
  • Design system is locked. Every new visual reuses an existing recipe and motion token, and is a DS Decision. Each child updates its own catalog rows and docs in the same change.
  • Tests are opt-in (AGENTS.md:102-109). The planner has dense branching, so a unit test there is allowed. Prove each test by sabotage.
  • Bun only. No commits inside plan execution. Work on main.
  • cy.dragTocItem calls window._moveHeading and skips dnd-kit. It proves planner results, not zones, waits or motion. Browser checks drive real pointer events in a visible tab.

Unverified before ship

Each line names the child that checks it. None of these is measured yet.

Rejected

  • A second TOC behind a setting (an old-style 2D drag beside the folder move). It keeps two move models and two sets of rules alive, and every child would branch on it. R1-R6 already define one behaviour (secondary / inferred).
  • Multi-select. R6 rules it out: a set is one heading plus its whole subtree.
  • A "Move section into…" dialog. Cut by the adviser. It returns only if the Add Move rows to Section options and open the menu from the grip #501 reachability check fails.
  • A live capture bracket, a squash caption and a previewMove helper. Cut by the adviser. Only planMove computes capture and squash, so a result can never disagree with a preview. Settle shows the result. They return only if hallway tasks 4 or 5 fail, each with a DS ruling.
  • D9 set collapse during a drag. Cut. The ghost rows stay in place with the locked is-ghosted recipe.
  • D11 fold-back after spring-open. Cut. D10 follows the peers: the opened row stays open.
  • D14 cancel fly-back. Merged into D15. One 80ms opacity fade serves every release.
  • Thirteen spoken phrases. Cut to results only. No pick-up, target-change or spring-open lines.
  • A separate docs child. Cut. Each child updates its own docs and catalog rows.
  • The old floor lo = next.level and the cap hi = min(hi, 6 - span). Overturned by R2 and R4.
  • Old hard cases 2, 4 and 6 (no capture, block on depth, no drop inside a leaf). Overturned by R2, R4 and R5.
  • Menu Promote that moves the section to the end of its parent. Promote now re-levels in place and captures (R2).

Deferred, not rejected

Acceptance criteria

Close this tracker when all five hold.


Generated by Claude Code

Activity

  1. added
    Toc
    on Oct 16, 2026
  2. HMarzban commented on Oct 16, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-10-15

    These rulings override every earlier note, report and memory. The newest ruling wins over any child body.

    • R1. When a drag changes the level of the dragged heading by delta d, every heading in its section (its sub-headings) shifts by the same d. DEMO.md:229 ("The new level is written to the dragged heading alone, so sub-headings keep the levels they had") is overturned.
    • R2. Think like a flat document. A level change is a level change; the section logic derives the tree. So after a promote (or any drop at a level), headings that follow at the new level or deeper fall inside it ("capture"). Do not add a rule that blocks capture.
    • R3. The first H1 of the document is the Title. Its TOC row has no drag grip. Nothing can be dropped above it. Its level never changes.
    • R4. Never block a move because of depth. A sub-heading whose shifted level would pass H6 stays at H6 (squash). Do not look at the children to decide whether a drop is allowed.
    • R5. Design "drop ON a heading = put it inside" now (Edward's folder gesture), with its full micro-interactions: hit zones, inside highlight, hover delay, auto-expand of a folded heading, drop and settle animation. A short hallway test (Edward plus 2-4 new users) runs before release.
    • R6. A "set" is one heading plus its whole subtree. There is no multi-select.

    "the docs.plus editor is built for tree sections, hierarchy, so moving the heading must follow the tree"

    "do not look at the children, just change the heading level, the other logics do the rest of the jobs in background. Think like flat documents."

    Deliberate peer exceptions (AGENTS.md:151)

    These rulings have no Google Docs, Word or Notion support. They are kept on purpose. Do not "fix" them toward a peer.

    • R2 capture. No Google Docs, Word or Notion page states it. Parity is only inferred from their flat headings (secondary / inferred).
    • R4 squash at H6. No peer squashes. The one peer pattern found (Atlassian instruction-blocked) blocks the drop instead (secondary / inferred).
    • R5 drop on a heading = put it inside. None of the three peers does this for headings. Google Docs tabs and Notion sidebar pages do it for tabs and pages only (secondary / inferred).

    Not exceptions: R1 has Word support (secondary: a Word guide says Promote "takes a heading and its sub-sections up the heading hierarchy"). Heading size by section rank stays recorded on #369.

    Seven open items become exceptions only if ruled this way:

    Each ruling comment then records it.

    END_RULING_COMMENT

    Changes in this pass (all re-checked at 85295b8):

    1. Timeline and spec references. I did both. I added a numbered "The drag timeline" (steps 1-16) under Shared rules, with one owner per step and a "Parts built by" column. I also told every child to drop each numbered spec reference (§0 to §11) and each "spec" or "tracker spec" wording. §Name references to AGENTS.md, CLAUDE.md and skill sections stay. The step values come from the spec timeline. New constants are tagged as targets, not measured.
    2. Children must align their Micro-interactions sections. The tracker states this list:
      • toc-drag-start owns step 2 only. It now claims "steps 2 and 3"; step 3 belongs to toc-drag-targets.
      • toc-drag-level owns no step. It builds parts of steps 1, 2, 3 and 9. Its table rows stay, relabelled as parts.
      • toc-drop-inside owns steps 4 to 6. It builds the inside-zone part of step 3. It now says "steps 3 to 6". Its rows 3b, 6b and 10 stay as parts.
      • toc-move-a11y owns no step. It builds the live-region part of steps 9 (cancel line) and 16. It now says "owns step 16".
      • toc-move-settle owns steps 9 to 16. Its text "except the live region in step 16" already fits.
      • toc-drag-targets owns steps 3, 7 and 8. It now cites "steps 3 and 8 (spec §3)"; add step 7 and drop "spec §3".
      • toc-move-preview and toc-hallway-test own no step. Replace "spec §3", "§2.4", "§4.5", "§6", "§7" with tracker headings or step numbers, or state the rule in the body.
      • Other § references to strip: toc-concurrent-moves §1.9; toc-drag-start §1.8 and §3; toc-drag-targets §1.10, §2.1, §2.3, §3, §9; toc-move-a11y §3, §4.5, §4.6; toc-move-menu §4.3; toc-move-settle §4.5; toc-hallway-test §1, §3, §6.
    3. Unverified list. The toc-drag-start line now says "the synthetic pointercancel (fallback: Escape with code)". The row-height item and the 8px INDICATOR_Y_HYSTERESIS item moved from toc-drag-targets to toc-drop-inside. The row-height item now says its Step 0 measures them.
    4. Title guard 2 adds "Until Drop a section onto a TOC heading to put it inside #508 lands, its whole height is its after zone (Rebuild the TOC drop hit test so folded rows and gaps land right #503)."
    5. D2 cost now reads "Menu Move section down, then Promote, can."
    6. Motion map. I added a row for TOC_SETTLE_FALLBACK_MS = 500 (functional constant in toc/hooks/useTocMoveSettle.ts, owner toc-move-settle; the file name comes from the toc-move-settle body). The drop-line row now names toc-drag-level (D8 line depth) as an owner.
    7. Peer exceptions. I deleted "D10 fold-back after spring-open", because Rejected cuts it as D11. Under "Recorded only if ruled that way", I added D7, D15 part 3, D18 (marked DS, confirm Unify every context menu on one design-system menu recipe #391), the D23 TOC undo key, and toc-drag-targets Decision A. Each line is tagged. D7 quotes Notion help, and D15 part 3 quotes Apple HIG; both quotes are taken from the toc-move-preview body. The Decision A line says no peer source was checked, because the toc-drag-targets body has none.
    8. D18 is now marked DS in the Decisions table. The preview note heading is now "One preview for D2, D7, D8 and D15". It says that D18 is ruled on toc-move-menu with the Unify every context menu on one design-system menu recipe #391 confirmation.
    9. The ruling comment is updated. "Three Decisions" became "Seven open items", D10 is gone, and D7, D15 part 3, D18, D23 and Decision A are added.

    Notes for the main loop:

    • The scratch body of toc-drag-targets says "Decisions: None open". The tracker still lists its local Decisions A and B, as the fix list asked. Check that the filed toc-drag-targets body states A and B.
    • Labels: Toc, Feature, UI. House trackers [Tracking] Stuck-Online users and the presence review follow-ups #496 and [Tracking] Repository review 2026-10-14 fixes #479 carry area labels only, so I chose those three from the repo label list (read with gh, read-only).
    • The title is unchanged; it uses the house "[Tracking]" prefix.
    • Permalinks: all 14 links are pinned to 85295b8. I checked every line range with git show. This pass added no new code permalink. The body is about 33.3 KB.
    • Scratch files: /private/tmp/claude-501/-Users-macbook-workspace-docsy/d693f212-93c6-4751-bcb2-602cbc009827/scratchpad/issues-run/tracker/tracker.v2.md and ruling-comment.v2.md. No repo file was changed, and no gh write command ran.
  3. HMarzban commented on Oct 16, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling update, 2026-10-16

  4. HMarzban commented on Oct 16, 2026

    @HMarzban
    CollaboratorAuthor

    Hi @edsaperia 👋 This tracker is your "move headings like folders" idea, turned into a build plan. Thank you for it!

    In short: a heading now moves with everything under it, and you can drop a heading onto another heading to put it inside. A folded heading opens while you hover over it during a drag. Section options also gets Move up / Move down / Promote / Demote, so a move needs no drag.

    Before the drop-inside part ships, we'd like to run a short hallway test: about 10–15 minutes of real moves on a test document (#509). You'd be the first session, since it's your idea. 🙂 Would you be up for it? Any thoughts on the plan are welcome here too.

  5. added this to the v2.3.0 milestone on Oct 19, 2026
  6. HMarzban commented on Oct 24, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-10-24

    The TOC section move set lands at the end of milestone v2.3.0. It is not fully ready yet.

  7. HMarzban commented on Nov 3, 2026

    @HMarzban
    CollaboratorAuthor

    Status, 2026-11-03. The 2026-11-03 push (a9b0c69e8..8e25e83df) is deployed. It carries no code from this set. Every child, #500 to #510, is still open, and the 2026-10-24 hold on code children still stands.

    Left:

  8. HMarzban commented on Nov 4, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-04

    The TOC section move set (#499–#510) stays on milestone v2.3.0. This confirms the 2026-10-24 ruling after the v2.3.0 open-issue review.

  9. HMarzban commented on Nov 4, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-04

    After a fresh-eyes research round on making the TOC work like a file manager (local report: Notes/local-docs/2026-11-04-toc-file-manager/):

    • Hold. The 2026-10-24 hold on code children still stands. The set stays research only for now.
    • R2 is overturned for TOC moves only. A TOC move never changes the parent of a heading outside the moved set. The drop slot (parent and index) decides where the set lands, and the planner derives the level from that slot. Editor level controls (Block style, the phone stepper, Mod-Alt-1..6) stay flat and still capture, as in Word and Google Docs.
    • D26: no. Editor level controls change one line only. This pins the TOC-only scope of the R2 overturn.
    • D2: yes. Remove the sideways level offset, the level picker and its chips.
    • Build order, when the hold lifts: cleanup, then the outline model and the address planner (today's drag wired to it), then menu moves and settle, then the keyboard tree, then the drag rebuild, then the collab repair, then keyboard moves with Cut and Paste, then drop inside (held until Run the TOC move hallway test before drop inside ships #509 passes).

    Lines in "Rejected" that this overturn brings back: the old floor lo = next.level (the new floor contains it), "Menu Promote that moves the section to the end of its parent" (tree Promote is that move), and "old hard case 2 (no capture)" (it is now the rule for TOC moves).

    This deviates from no Google Docs, Word or Notion majority: no peer has a primary source for moving headings in an outline pane, except Word.

  10. HMarzban commented on Nov 4, 2026

    @HMarzban
    CollaboratorAuthor

    Maintainer ruling, 2026-11-04 (later the same day)

    The 2026-10-24 hold is lifted for TOC drag only. The scope is:

    • The address planner. One function places a moved section from a slot (parent and position) and derives its level (R2 overturned for TOC moves, as ruled earlier today). The section moves with its sub-headings (R1), and their levels shift together, stopping at H6 (R4).
    • Drag is wired to it. A gap between two visible rows means "before the lower row, in its parent". The gap below the last row means "after that row, in its parent". Folded rows are skipped whole.
    • D2. The sideways level offset, the level picker and its chips are removed.
    • The Title is fixed (R3). It has no grip, and nothing can land above it. A Read-only or locked pad refuses moves.
    • The caret follows a moved section when it sits inside it (Take y-tiptap 3.0.10 so a remote change stops rebuilding the paragraphs below it #520 finding). The move is one transaction, delete first.
    • DS-12 destination rail. While a gap is targeted, the landing list's nest rail turns primary at full opacity.

    Out of scope, unchanged: the Section options context menu, Move to…, the keyboard tree, cut and paste, drop inside and spring-open (#508, still behind #509), and the phone TOC.

  11. HMarzban commented on Nov 5, 2026

    @HMarzban
    CollaboratorAuthor

    Status 2026-11-05: the drag part of this tracker is built and pushed to main.

    Shipped (dd287cbfb, then f571c0829..e9d01ff2a)

    • A drag moves the section with its sub-headings. The slot sets the level, every sub-heading shifts by the same step (capped at H6), and no heading after the section is pulled in (R2 overturned for TOC moves).
    • Drop onto the middle half of a row to nest the section inside it, as its last child. The row gets a primary ring, and a folded row opens after the drop.
    • A drop back in the section's own slot changes nothing.
    • An empty heading has a placeholder TOC row ("Heading N").
    • The level picker and the sideways offset are gone. The destination rail (DS-12) shows the landing list.
    • One outline walk (outline.ts) and one move module (tocMove.ts) serve the drag, the Cypress hatch and the section actions.

    Closed: #500, #503, #611.
    Partly done: #504, #508 (notes on each).
    Still open: #501 (the maintainer kept the current menu for now), #502, #505, #506, #507, #509, #510, #511.

  12. HMarzban commented on Nov 5, 2026

    @HMarzban
    CollaboratorAuthor

    Tracker closed (maintainer ruling 2026-11-05): the current TOC drag is the version we keep. Done: #500, #503, #504, #508, #611. Not planned: #501, #502, #505, #506, #507, #509, #511. Still open on purpose: #510 (concurrent moves can duplicate a section) waits for a maintainer decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureTocUI

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions