Repository navigation
Description
Summary
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 onesetNodeMarkup(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
selectDocumentEditingLockedundercomponents/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-dropcursor 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:
- R1 cascade has Word support (secondary: Texas HHS Word guide, "The Promote option takes a heading and its sub-sections up the heading hierarchy").
- D27 phone menu path has Google Docs support (primary source: Docs tabs, Android, "Move up or Move down").
- Heading size by section rank is already recorded (Revise the heading size scale to follow a documented typographic convention #369).
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:
- Rebuild the TOC drop hit test so folded rows and gaps land right #503: A (
no-dropcursor over the header row) and B (its catalog line, DS). - Run the TOC move hallway test before drop inside ships #509: HT1 (playground or real pad). HT2 (tag Edward) is ruled on Run the TOC move hallway test before drop inside ships #509, 2026-10-16. The deploy freeze is G1.
- Drop a section onto a TOC heading to put it inside #508: none beyond D5, D7 and D10. Its release follows G1.
- Design a fix for concurrent TOC section moves that duplicate sections #510: CM1 (design) and CM2 (where the hazard is recorded).
Child issues, in order
Each child names its own steps, Decisions and checks. Read this tracker first.
- Move a TOC section with its sub-headings and keep the Title fixed #500 — Step 1. One pure planner,
planMove, and one effect,applyMove, for every move. Ships R1 cascade, R4 squash, R2 capture, the R3 refusals, the same-slot no-op and the lock gate. No new visual. Depends on: none. - Add Move rows to Section options and open the menu from the grip #501 — Step 2. Four Move rows in Section options, and the grip opens the menu. Owns every grip rule: none on the Title row or a locked pad. Depends on: Move a TOC section with its sub-headings and keep the Title fixed #500.
- Rebuild the TOC drop hit test so folded rows and gaps land right #503 — Step 3. One rect-based zone model and one canonical gap name. Fixes the folded-row drop. A bug fix with no design gate. Depends on: Move a TOC section with its sub-headings and keep the Title fixed #500.
- Set the drag level from the row above and indent the drop line #504 — Step 4. Level from the row above (D1), offset and picker removed (D2), drop line indented (D8). Depends on: Rebuild the TOC drop hit test so folded rows and gaps land right #503, Add Move rows to Section options and open the menu from the grip #501, Build one preview of the new TOC move visuals for design-system rulings #502.
- Start a TOC drag from the whole row and cancel it safely #505 — Step 5. The whole row starts a drag on fine pointers (D30). A lock or a peer delete cancels the drag. Depends on: Rebuild the TOC drop hit test so folded rows and gaps land right #503, Add Move rows to Section options and open the menu from the grip #501.
- Show where a moved section landed after a TOC move #506 — Step 6. Wait for the rebuild, open the path, scroll, flash, and show the Undo toast (D15). Depends on: Set the drag level from the row above and indent the drop line #504, Add Move rows to Section options and open the menu from the grip #501, Build one preview of the new TOC move visuals for design-system rulings #502.
- Announce TOC move results and return focus after a move #507 — Step 7. One result-only live region, focus return and the TOC undo key. Can run beside Drop a section onto a TOC heading to put it inside #508. Depends on: Show where a moved section landed after a TOC move #506, Add Move rows to Section options and open the menu from the grip #501.
- Drop a section onto a TOC heading to put it inside #508 — Step 8. The inside zone, the inside highlight (D7), the H6 rule (D5) and spring-open (D10). The last code slice. Depends on: Set the drag level from the row above and indent the drop line #504, Show where a moved section landed after a TOC move #506, Build one preview of the new TOC move visuals for design-system rulings #502.
- Run the TOC move hallway test before drop inside ships #509 — Step 9. Seed pad, script, pass rule and release steps. The maintainer runs the sessions. Depends on: every code child above.
Beside the order:
- Build one preview of the new TOC move visuals for design-system rulings #502 — Parallel, from day one. One preview for the four DS rulings. No product code. Depends on: none.
- Design a fix for concurrent TOC section moves that duplicate sections #510 — Off the release path. Measures the concurrent-move duplicate on a real pad and proposes one design. No product code. Depends on: Move a TOC section with its sub-headings and keep the Title fixed #500.
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
isTitleflag onTocItemmarks its row. Row and zone code read only that flag. - Set. One heading plus its whole subtree (R6).
getDescendantIdsalready 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
Lof the dragged heading and clamps it to 1..6. Thend = 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,
Lfollows 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 = 0dispatches nothing. Withd ≠ 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 isT.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)
- No grip. The Title row has no grip and no
useSortable. Do not add a disabled-grip state; no recipe exists for one. - 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.
- 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 gate is
selectDocumentEditingLocked(isDocumentEditingLocked.ts:8-17). Never useeditor.isEditable, because phone read mode sets it to false. - On a locked pad: no grip on any row, the Move group is hidden, and the planner refuses
'locked'. - A lock that turns on mid-drag cancels the drag at once (Start a TOC drag from the whole row and cancel it safely #505).
- Delete section gets the same gate in Move a TOC section with its sub-headings and keep the Title fixed #500, because it shares the dispatch path.
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:
- Start a TOC drag from the whole row and cancel it safely #505 owns step 2 only. Step 3 belongs to Rebuild the TOC drop hit test so folded rows and gaps land right #503.
- Set the drag level from the row above and indent the drop line #504 owns no step. It builds parts of steps 1, 2, 3 and 9.
- Drop a section onto a TOC heading to put it inside #508 owns steps 4 to 6. It builds the inside-zone part of step 3.
- Announce TOC move results and return focus after a move #507 owns no step. It builds the live-region part of steps 9 and 16.
- Show where a moved section landed after a TOC move #506 owns steps 9 to 16.
- Build one preview of the new TOC move visuals for design-system rulings #502 and Run the TOC move hallway test before drop inside ships #509 own no step. They draw or observe the steps by number.
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 onmainfrom 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
mainuntil 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-leveltype ladder, no chat-open accent bar, no scroll-spy wash, no::beforeaccent. Tick rail rules stay. TOC presence overhang stays rejected. Keep theToc*names and thecomponents/toc/home. menu-activemeans chat open.menu-focusmeans 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.dragTocItemcallswindow._moveHeadingand 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.
- Move a TOC section with its sub-headings and keep the Title fixed #500: the y-undo effect of today's same-slot drop. The empty undo step is measured in prosemirror-history only. The pad sets
undoRedo: falseand usesY.UndoManager. - Move a TOC section with its sub-headings and keep the Title fixed #500: that
stopCapturing()splits quick moves in the app (measured only on the scratch copy). - Rebuild the TOC drop hit test so folded rows and gaps land right #503: the cause of the fold bug (inferred), and that the canonical gap rule fixes it in the browser.
- Set the drag level from the row above and indent the drop line #504: the real TOC nest step (about 16px, inferred from daisyUI
margin-inline-start: 1rem). - Start a TOC drag from the whole row and cancel it safely #505: whether a whole-row activator conflicts with the title-link click, text selection, or Firefox.
- Start a TOC drag from the whole row and cancel it safely #505: the synthetic
pointercancel(fallback: Escape withcode) for a lock mid-drag. It must go to the activator's owner document (read from code:core.esm.jsline 1448). Not run. - Start a TOC drag from the whole row and cancel it safely #505: whether Esc during a drag also closes the Find bar or a chat panel.
- Show where a moved section landed after a TOC move #506: that a drop never shows the set solid at its old place for one frame. This needs a screen recording.
- Announce TOC move results and return focus after a move #507: whether dnd-kit
restoreFocuslands on a stale node after a reparenting remount. - Add Move rows to Section options and open the menu from the grip #501: that the four Move rows reach every slot a drag reaches (inferred). If not, file the "Move section into…" dialog.
- Drop a section onto a TOC heading to put it inside #508: the real one-line row height (about 32-33px, inferred from
min-h-8) and wrapped-row heights. Its Step 0 measures them. Zone sizes depend on them. - Drop a section onto a TOC heading to put it inside #508: whether the 8px
INDICATOR_Y_HYSTERESISmakes its 8px zones hard to enter. - Drop a section onto a TOC heading to put it inside #508: whether the
toggleFoldeditor crinkle shifts the editor scroll mid-drag. - Drop a section onto a TOC heading to put it inside #508: that fold changes from a drag add no undo step.
- Run the TOC move hallway test before drop inside ships #509: whether gap capture (an H2 dropped between H3 rows) matches what people expect (task 10).
- Run the TOC move hallway test before drop inside ships #509: dnd-kit default auto-scroll speed (about 2000 px/s, inferred).
- Peers, not owned by a child: whether Word captures after an in-place Promote, and what Word Demote does at Heading 9. Whether Google Docs tabs block or flatten at their 3-level cap. Whether Notion's sidebar opens on hover during a drag.
- Edward's GitHub handle is
@edsaperia, confirmed by the HT2 ruling on Run the TOC move hallway test before drop inside ships #509. He was tagged once on this tracker. Do not tag him again until the sessions are scheduled.
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
previewMovehelper. Cut by the adviser. OnlyplanMovecomputes 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-ghostedrecipe. - 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.leveland the caphi = 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
- Phone move (D27): Add a phone path to move TOC sections (low priority, backlog) #511, a low-priority backlog issue (ruled 2026-10-16).
- Concurrent-move fix: Design a fix for concurrent TOC section moves that duplicate sections #510. Today's
moveSectionalready moves a section as one delete plus one insert (move-section.ts:8-26; read from code). So it does not gate this release. - Accessibility follow-up: a 24×24 grip hit area (SC 2.5.8), the grip shown at rest on coarse pointers, and a desktop-mode Android tablet check.
- Alt+Shift+arrow shortcuts on TOC rows (Word Outline keys): key conflicts not checked.
- A modifier key that turns off drop-inside: only if wrong inside drops are common.
- Auto-scroll tuning: a hallway tunable.
Acceptance criteria
- Every open Decision above is ruled, and each ruling comment is on its "Ruled on" issue.
- Every code child is closed.
- Run the TOC move hallway test before drop inside ships #509 posts
## Hallway test, <date>here with a pass. - The release follows G1 as ruled.
- Design a fix for concurrent TOC section moves that duplicate sections #510 has a ruling on CM1.
Close this tracker when all five hold.
Generated by Claude Code
Activity
HMarzban commentedon Oct 16, 2026
Maintainer ruling, 2026-10-15
These rulings override every earlier note, report and memory. The newest ruling wins over any child body.
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.
instruction-blocked) blocks the drop instead (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:
P.level + 1cap is kept.no-dropcursor over the header row is kept.Each ruling comment then records it.
END_RULING_COMMENT
Changes in this pass (all re-checked at 85295b8):
§Namereferences 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.pointercancel(fallback: Escape withcode)". The row-height item and the 8pxINDICATOR_Y_HYSTERESISitem moved from toc-drag-targets to toc-drop-inside. The row-height item now says its Step 0 measures them.TOC_SETTLE_FALLBACK_MS = 500(functional constant intoc/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.Notes for the main loop:
HMarzban commentedon Oct 16, 2026
Maintainer ruling update, 2026-10-16
HMarzban commentedon Oct 16, 2026
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.
HMarzban commentedon Oct 24, 2026
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.
HMarzban commentedon Nov 3, 2026
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:
HMarzban commentedon Nov 4, 2026
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.
moveHeading.tsanduseTocDrag.tshave no change since 2026-10-24.HMarzban commentedon Nov 4, 2026
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/):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.
HMarzban commentedon Nov 4, 2026
Maintainer ruling, 2026-11-04 (later the same day)
The 2026-10-24 hold is lifted for TOC drag only. The scope is:
primaryat 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.
feat(webapp): move a TOC section like a folder on drag
feat(webapp): nest a TOC section by dropping it on a row
HMarzban commentedon Nov 5, 2026
Status 2026-11-05: the drag part of this tracker is built and pushed to main.
Shipped (
dd287cbfb, thenf571c0829..e9d01ff2a)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.
HMarzban commentedon Nov 5, 2026
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.
fix(webapp): keep the TOC drag grip under the pointer