Skip to content

Run the TOC move hallway test before drop inside ships #509

Closed as not planned

Description

@HMarzban

Part of #499. Read the parent first. Step 9. Owner: the maintainer.

Run this on a dev build, with every code child committed as G1 (ruled on the tracker) says. Under the recommended G1 gate, no app-deploying (build): commit goes on main until this test passes.

Summary

R5 asks for a short hallway test before the new TOC move ships. The cohort is Edward plus 2-4 new users. Three rulings have no Google Docs, Word or Notion support: R2 capture, R4 squash and R5 drop inside (secondary / inferred; see the peer table on #499). AGENTS.md:151 asks that such a ruling be recorded as a deliberate exception (read from code). User evidence is the best check that those exceptions still feel obvious (secondary / inferred).

This issue owns the seed pad, the script, the pass rule and the release steps. It writes no product code. The maintainer runs the sessions. Claude can prepare the seed pads and the script, but it never runs a session and never deploys.

Maintainer rulings that bind this issue

The full text is on #499. One line each:

  • R1. A level change of d on the dragged heading shifts every sub-heading in its section by the same d.
  • R2. Think like a flat document. Following deeper headings fall inside the moved heading ("capture"). No rule blocks capture.
  • R3. The first H1 is the Title. Its row has no grip, nothing drops above it, and its level never changes.
  • R4. Never block a move because of depth. A sub-heading that would pass H6 stays at H6 ("squash").
  • R5. A drop on a heading puts the set inside it. A hallway test (Edward plus 2-4 new users) runs before release. This issue is that test.
  • R6. A set is one heading plus its whole subtree. There is no multi-select.

Depends on / Blocks

Current behaviour

  • No hallway test has run. No seed pad or script exists in the repo (read from code: no match for "hallway" under apps/webapp).
  • The public demo text still states the old drag. docs/DEMO.md:224 says: "Drag it sideways to set the depth. Each 24px step is one level". Line 229 says: "The new level is written to the dragged heading alone, so sub-headings keep the levels they had." The caption at line 227 says "Sideways sets the depth", under the image /demo-assets/d7-drag.png at line 226. Line 100 names "Its drag grip" on the locked demo page (read from code). Move a TOC section with its sub-headings and keep the Title fixed #500 rewrites line 229; the release step 0 below checks the rest.
  • The grip is drag-only today. Its tooltip and name are "Drag to reorder" (TocItemBody.tsx:116-146; read from code). The children change this before the test runs.
  • No automated test can stand in for these sessions. cy.dragTocItem calls window._moveHeading and skips dnd-kit (cypress/support/commands.ts:957-996; read from code). It proves planner results, not hit zones, waits or motion.
  • The drag uses only a pointer sensor with a 5px distance (useTocDrag.ts:73; read from code). So a person with a real mouse or trackpad is the only full check.
  • Console seed tools exist only in the editor playground. window._createDocumentFromStructure, window._moveHeading and window._store are set in EditorPlayground.tsx:78-101 (read from code). A real pad can be seeded through "Replace with a file", which takes a .md file (ImportExportSection.tsx:148, "Replace document" at line 305; read from code). A visitor gets a sign-in dialog instead.
  • /editor returns 404 in production unless NEXT_PUBLIC_E2E is 'true' (editor.tsx:12-25; read from code). So the playground runs on a dev build only.
  • The playground TOC column is w-64, which is 256px (EditorPlayground.tsx:121-127; read from code). Its TOC scroller is a plain overflow-y-auto div, not the pad ScrollArea (EditorPlayground.tsx:124; read from code). A real pad opens the wide TOC at 320px when no width is stored (apps/webapp/CLAUDE.md:283-285; read from code). See Decision HT1.
  • The TOC has a sticky header row (toc__header, TocHeader) above the Title row (TocDesktop.tsx:83-87). It shows the store's metadata.title (TocHeader.tsx:69). The store starts with no title (workspace.ts:53-55). So in the playground the header row is blank unless the facilitator sets a title (read from code).
  • The seed helper makes every sections[] entry an H1 (createDocumentFromStructure.ts:70-93). Nested contents keep their own levels (:15-38). So the seed is one section, the Title, with everything nested inside it (read from code).
  • The seed calls setContent (createDocumentFromStructure.ts:108; read from code). With localYdoc set, the editor uses Collaboration and its Yjs undo (TipTap.tsx:244-253; read from code). So the seed itself is one undo step, and an extra Ctrl/Cmd+Z can empty the pad (secondary / inferred).
  • The schema allows more H1 headings after the Title: the doc content is heading block* (title-document.ts:14; read from code). So the task words below avoid "top-level", which could mean H1.
  • The helper has no fold option. Fold state is saved per viewer in localStorage, keyed by the document id (editor-folds-<documentId>), as a list of toc-ids (fold-storage.ts:19-41; read from code). In the playground the document id is docName (TipTap.tsx:155-157; read from code). A fresh docName starts with no folds (read from code). Fold Plan by hand after each seed.
  • The playground has no theme control. The theme defaults to light and persists in localStorage docsplus-theme (themeStore.ts:88, :101; read from code). Settings has an Appearance section that sets it (AppearanceSection.tsx:158; read from code).
  • A deploy reads only the pushed tip commit, and the tip must start with (build): (AGENTS.md:415; read from code). So if G1 (ruled on the tracker) keeps the recommended freeze, it holds every deploy from main, not only TOC work. See Decisions, G1.

Target behaviour

  • The maintainer runs one concept session with Edward and 2-4 new-user sessions. Four new users is the recommended count.
  • Every session uses the same seed pad, the same ten tasks and the same scoring.
  • The notes go on [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499 as one comment headed ## Hallway test, <date>, with the pass table and quotes.
  • A pass unblocks the release steps. A failed line leads to a recorded ruling and a new or reopened child. This issue never changes code.

Micro-interactions

This issue owns no slice of the timeline. It observes the whole Drag timeline on #499 as the children built it. The facilitator watches these moments. The values are read from that timeline, not measured.

Moment What the person should see Value, as built
Grip hover Grip and tooltip "Drag to move, click for options" (D18) Existing tooltip tier
Pickup Drag card after 5px of travel, with the +N badge; the set stays as a ghost Instant
Gap The drop line, indented to the landing depth (D8) Instant
Inside zone The is-drop-inside highlight, and the drop line hides (D7) Instant
Spring-open A folded row opens after a wait in its inside zone (D10) TOC_SPRING_OPEN_MS = 500ms
TOC header row (toc__header, above the Title row) No line and no highlight. Cursor no-drop, if #503 Decision A holds Instant
Release The card fades out in place (D15) --motion-overlay-out 80ms, ease-in
Settle The path opens, the moved row scrolls into view and flashes, and so do captured rows (D15) --motion-flash-hold 2200ms
Capture or squash An Undo toast with the result phrase (D15) Existing toast
Undo Ctrl/Cmd+Z with focus in the TOC reverts one move (D23) —

Note each moment the person misses, or calls wrong, in their own words.

Implementation steps

These are maintainer steps, except where a step says Claude can prepare it. No step writes product code.

Step 0. Entry gate

  1. Check that all eight code children are committed as G1 (ruled on the tracker) says, with evidence posted on each child. Under the recommended G1 gate, each one is on local main only. Children stay open until the push (see "Release steps after a pass").
  2. Check that the tracker Decisions these children use are ruled: D1, D2, D3, D4, D5, D7, D8, D10, D15, D18, D20, D22, D23, D26, D30 and R2r. Also check the local Decisions on the children: Rebuild the TOC drop hit test so folded rows and gaps land right #503 Decisions A and B, and Announce TOC move results and return focus after a move #507 D22 parts (a) to (c).
  3. Check that HT1 and HT2 are ruled on this issue, each in a comment headed Maintainer ruling, <date>. Check that G1 (ruled on the tracker) has its ruling comment on [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499.
  4. Check that the design-system preview in Build one preview of the new TOC move visuals for design-system rulings #502 is approved.
  5. With no dev server running (AGENTS.md:110-111), run bun run check:ci. Then run rm -rf apps/webapp/.next. check-ci.ts deletes .next after build:ci (scripts/check-ci.ts:5; read from code). The rm -rf is a safety check.
  6. Start make dev-local. Read the WEBAPP line for the port. It is usually 3000. "Next shifts to the next free port if 3000 is busy" (scripts/dev-local-preflight.ts:318; read from code). Below, <port> is that port.
  7. Run the editor E2E suite: BASE_URL=http://localhost:<port> bash scripts/run-tests.sh --e2e --scope editor. It must pass. It runs every spec under cypress/e2e/editor (run-tests.sh:52-60; read from code). run-tests.sh defaults to port 3001, so pass BASE_URL (run-tests.sh:22; read from code).

Step 1. Dry run by the facilitator

Run all ten tasks yourself, with a real mouse, in a visible tab, at 1440×900. Do it once in light theme and once in dark theme. Prepare each tab as in Step 3, with docName pattern hallway-dry-t<NN>. Each end state must match the table in Step 5. If one does not, stop and reopen the child that owns it (Step 7). The sessions do not start on a build that fails its own script.

Set dark theme in Settings, Appearance, on any page of the same origin. It persists in localStorage docsplus-theme. Set it back to light before Step 3.

Step 2. Recruit the cohort

  • Edward. His session is a concept check: "Does this match my idea?" It does not count toward the pass.
  • New users, 2-4; 4 is recommended. Each has never used docs.plus and uses Google Docs or Word every week. At least one uses a trackpad.
  • Name new users P1 to P4 in every note. The tracker is a public GitHub issue, so never post a new user's real name.
  • Tag Edward on GitHub only as ruled in Decision HT2.

The source idea, in Edward's words, for his concept check:

"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"

Step 3. Prepare the seed pads (Claude can prepare this step)

Setup: 1440×900, light theme, a visible tab. Use the surface ruled in HT1. The steps below are for the recommended surface, the editor playground.

The seed outline:

H1 Project brief                 (Title)
  H2 Plan                        (folded)
    H3 Goals
    H3 Risks
    H3 Timeline
  H2 Budget
    H3 Costs
  H2 Team
    H3 Roles
    H3 Hiring
  H2 Notes
    H3 Research
      H5 Sources
  H2 Appendix
    H3 Detail A
      H4 Detail B
        H5 Detail C
  1. Before each session, open one fresh tab per task: http://localhost:<port>/editor?localPersistence=true&docName=hallway-<P>-t<NN> (for example hallway-p1-t01). Use hallway-ed-t<NN> for Edward and hallway-dry-t<NN> for the dry run. A fresh docName gives a fresh IndexedDB document (EditorPlayground.tsx:60-75; read from code). The seed itself is one undo step (secondary / inferred).

  2. In each tab, paste this into the DevTools console. Chrome may ask you to type allow pasting first. The seed call must return true.

    const p = (t) => ({ type: 'paragraph', content: t })
    const h = (level, title, ...kids) => ({ type: 'heading', level, title, contents: [p(`${title} notes.`), ...kids] })
    window._createDocumentFromStructure({ sections: [{ title: 'Project brief', contents: [
      p('A short project brief.'),
      h(2, 'Plan', h(3, 'Goals'), h(3, 'Risks'), h(3, 'Timeline')),
      h(2, 'Budget', h(3, 'Costs')),
      h(2, 'Team', h(3, 'Roles'), h(3, 'Hiring')),
      h(2, 'Notes', h(3, 'Research', h(5, 'Sources'))),
      h(2, 'Appendix', h(3, 'Detail A', h(4, 'Detail B', h(5, 'Detail C'))))
    ] }] })

    Then run window._store.getState().setWorkspaceSetting('metadata', { documentId: undefined, title: 'Project brief' }) so the header row is not blank (read from code: workspace.ts:70, TocHeader.tsx:69).

  3. Fold Plan with its chevron in the TOC. Check the fold again right before each task. Tasks 3 and 10 are the exceptions (item 6).

  4. Do not reuse a tab, and do not re-seed a used tab. A re-seed is a local edit, so Y.UndoManager may record it (secondary / inferred). That would break task 9.

  5. Task 9 runs in task 8's tab, with no reset. Task 9 undoes the person's own last move from task 8.

  6. Before tasks 3 and 10, open Plan with its chevron, in that task's fresh tab.

  7. Close DevTools before the person sits down. Then the tab shows the app only.

Step 4. Run Edward's session

Run the same ten tasks. After each task, ask: "Does this match the folder idea?" Quote his answers. Do not score his session.

Step 5. Run each new-user session

Script rules:

  • Do not explain the gestures. Ask the person to think aloud.
  • Each task has a 2-minute limit. A hint counts as a failure.
  • Read the task words exactly as written.
# Task (read exactly) Expected end state Watch for
1 "Put Budget before Plan." Budget{Costs} sits between the Title and Plan. Gap line. First-try success.
2 "Make Budget a part of Plan." Then: "Where did it go?" Plan opens. Budget is its first sub-heading as H3, and Costs is H4. Finds the inside zone. Spring-open.
3 "Make Risks its own section, at the same level as Plan, right after Plan." Plan{Goals, Timeline}, then H2 Risks, then Budget. Menu Move down plus Promote, or two drags. Tests D2.
4 "Make Roles its own section, at the same level as Team." Then: "What changed?" H2 Roles{Hiring} after Team. Hiring was captured. Names Hiring, or undoes. Sees the flash and toast.
5 "Make Budget a part of Detail C." Then: "What happened to Costs?" Detail C{H6 Budget, H6 Costs}. Names the flatten, or undoes.
6a "Try to move the document's title." Nothing changes. Finds no grip.
6b "Put a section above the title." Nothing lands above the Title. A drop on the Title row puts the section first under the Title, as H2. Reads the no-drop cue on the TOC header row, if #503 Decision A holds.
7 "Start moving Budget, then change your mind and leave it where it was." Nothing changes. Esc, or a release in place.
8 "Make Team a part of Notes without dragging." Notes{Research{Sources}, Team{Roles, Hiring}}. Grip menu or right-click, then Move down and Demote.
9 "Undo your last move." (Do the task 9 setup below first.) The last move of task 8 is reverted. Ctrl/Cmd+Z with focus in the TOC.
10 "Put Budget between Goals and Risks." Then: "What changed?" Plan{Goals}, then H2 Budget{Costs, Risks, Timeline}. Names the capture, or undoes. Says whether Budget was expected to join Plan.

Scoring notes for other valid paths. These follow from the planner rules (secondary / inferred, not measured):

  • Tasks 3 and 4. An H1 result counts as a wrong result.
  • Task 2 by menu. Demote on Budget makes it the last sub-heading of Plan, as H3. Count it as success.
  • Task 3 by drag. Two drags work: inside the Title row first, then the gap after Plan.
  • Task 3 by menu, Promote first. Promote on Risks in place makes Timeline fall inside Risks (R2 capture). Score the task as failed, and record the cause as "Promoted first, then Timeline was captured" (Step 7).
  • Task 4 by drag. A drop inside the Title row makes H2 Roles the first section under the Title. Nothing is captured. Count the task as success. Score its "consequence" line as passed, because there was nothing to name.
  • Task 6b. The whole Title row is an inside zone, so a drop there is the expected result. Nothing lands above the Title. Note whether the person expected "above".
  • Task 9 setup (facilitator, before you read the words). If task 8 made no move, run Move down on Team from the menu first. If an undo empties the pad, stop the task and open a fresh tab.
  • Task 9. If one undo reverts both task 8 moves, score the task as passed. File the merged undo item on Announce TOC move results and return focus after a move #507, because D23 asks each move to stay one undo step.

Measures per person and task:

  • Success without help, and first-try success. A hint counts as a failure.
  • Wrong drops: a drop the person undoes, or calls wrong, within 10 seconds.
  • A 1-7 Single Ease Question after each task.
  • The first grab point: the grip, the title or the row.
  • Every word of confusion, quoted exactly.

Step 6. Score the pass

For each line below, all but one new user must pass, and at least two must pass. With two new users, both must pass. With three, two must pass. With four, three must pass.

Pass line P1 P2 P3 P4 Needed Met?
Completes tasks 1, 2, 3 and 8 unaided
Names the consequence on tasks 4, 5 and 10, or undoes on their own
Makes at most one wrong drop on tasks 1 and 2

Step 7. Apply the re-open rules

Each change needs a recorded ruling on #499 (## Maintainer ruling, <date>). The change then lands in the child that owns it.

Tunables. The test may change these, each with a recorded ruling:

After any change, run the failed task again with one new person before you call the line passed.

Step 8. Post the output

Post one comment on #499 headed ## Hallway test, <date>. It holds:

  • The cohort: Edward plus P1 to P4, with input device (mouse or trackpad) and the Google Docs or Word habit.
  • The pass table from Step 6.
  • One row per person and task: success, first try, wrong drops, the Single Ease Question score and the first grab point.
  • Quotes, exactly as said. Edward's concept-check answers go in their own block.
  • Each failed line, with its ruling and the new or reopened child. For task 3, the cause per person.
  • The tunables, each with its old value, its new value and its ruling.

Release steps after a pass (maintainer only)

Agents never run these steps.

  1. Check that docs/DEMO.md §Moving a section (lines 222-231) and line 100 match R1, D1, D2 and the grip menu (docs/DEMO.md:222-231). Check that /demo-assets/d7-drag.png shows the new drag. If not, stop and reopen the child that owns the docs.
  2. Push main with a (build): front tip commit to deploy. Only the tip commit decides a deploy (AGENTS.md:415). The maintainer makes the tip commit, for example git commit --allow-empty -m "(build): front", then pushes. Agents never run this.
  3. Close or tick each code child only after the push. A fix commit link does not resolve while it exists only on local main (AGENTS.md:160).
  4. Open the Context7 library page for docs.plus and press Refresh: https://context7.com/docs-plus/docs.plus. docs/DEMO.md changed, and Context7 does not re-crawl on push (AGENTS.md:394).
  5. Add the root CHANGELOG.md entry at the next product release, through the release-product skill §1 Changelogs (release-product/SKILL.md:62-69). Link each item to its issue.

Out of scope

Decisions

Owner: the maintainer. The recommended answer comes first. The ruling is posted as a comment headed Maintainer ruling, <date>.

  1. HT1. Run the sessions on the editor playground or on a real pad? Recommended: the playground at /editor. Reason: a console seed is the fastest seed, and a fresh docName gives a fresh pad per task. Cost: its TOC is 256px wide, not 320px, so hit zones and the drop-line indent sit a little closer (read from code, not measured). Its TOC scroller is a plain div, not the pad ScrollArea (read from code, EditorPlayground.tsx:124). Settle scroll may differ (secondary / inferred). It also shows dev toolbars. Alternative: a real pad from /new, with a signed-in facilitator account. Seed each pad with a prepared .md file through Replace with a file (read from code, ImportExportSection.tsx:148). Fold Plan by hand afterwards. Not a design-system ruling.
  2. HT2. Tag Edward on [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499? Ruled 2026-10-16 (comment below): yes. The handle @edsaperia is confirmed. He was tagged once on [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499. Do not tag him again until the sessions are scheduled.
  3. G1 (ruled on the tracker). The release gate. This is not a local Decision. It is ruled once on [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499, §Shared rules, Release gate. This test follows G1 as ruled. Under the recommended gate, run all sessions within one week of the last code child commit, because the gate also holds hotfix deploys (secondary / inferred).

Acceptance criteria

  • Step 0 passed: children committed as G1 (ruled on the tracker) says, the tracker and local Decisions ruled, HT1 and HT2 ruled, preview approved, check:ci and the editor E2E suite passed.
  • The facilitator dry run (Step 1) used a real mouse in a visible tab at 1440×900, in light and in dark theme. All ten tasks each reached the expected end state.
  • The seed pads and the script are ready, each seed call returned true, and the TOC header row shows "Project brief".
  • The maintainer ran Edward's session and at least two new-user sessions.
  • The hallway notes are posted on [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499 as ## Hallway test, <date>, with the pass table and quotes. No new user is named.
  • Each pass line is met, or each failed line has a recorded ruling and a filed or reopened child.
  • Each tunable change has a recorded ruling.
  • On a pass, docs/DEMO.md and d7-drag.png match the new move (release step 0).
  • On a pass, main is pushed and deployed with a (build): front tip commit, and the Context7 library is refreshed.
  • Each code child is closed only after the push.

Verification

This issue adds no test, because it changes no code (AGENTS.md §Test Policy, :102-110). The gate commands, in order:

# No dev server may run during this step.
bun run check:ci
rm -rf apps/webapp/.next           # safety check; check-ci.ts already deletes .next after build:ci
make dev-local                     # read the WEBAPP port
BASE_URL=http://localhost:<port> bash scripts/run-tests.sh --e2e --scope editor   # the editor E2E suite
  • Never run next build against a live dev server (AGENTS.md:110).
  • The sessions themselves are the check for hit zones, waits and motion. cy.dragTocItem skips dnd-kit, so a green E2E run proves nothing about them.
  • Check that the tab is visible before you trust a stuck animation. A hidden tab runs no requestAnimationFrame.

Docs to update

  • No repo file changes in this issue.
  • The ## Hallway test, <date> comment on [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499 is the record.
  • A tunable or re-open change updates the docs of the child that owns it, in that child's change.
  • docs/DEMO.md §Moving a section, line 100 and d7-drag.png change in the child that owns the docs. Release step 0 only checks them.
  • The R2, R4 and R5 peer exceptions are recorded on the tracker ruling comment. Link the hallway comment from it as the user evidence.

Read first

  • AGENTS.md §Workflow And Review Expectations: the peer rule (L151), read-only issue work (L158) and closing issues (L160).
  • AGENTS.md §Test Policy (L102-L110), and §Learned Workspace Facts for Context7 (L394) and the deploy tip rule (L415).
  • apps/webapp/CLAUDE.md §TOC And Heading Actions and §Motion System (motion v1).
  • .cursor/docs/design-system.md §Table of contents.
  • The tracker [Tracking] Move TOC sections like folders: cascade, drop inside, and a menu path #499: the rulings R1-R6, the Decisions, the Drag timeline and Release gate (Decision G1).
  • .cursor/skills/release-product/SKILL.md §1 Changelogs and §Ship.

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-16

    HT2. Tag Edward: yes. The maintainer named him and gave his GitHub handle: @edsaperia (confirmed, not a guess). He is tagged once on #499, with an invitation to the hallway test. Do not tag him again until the sessions are scheduled.

    HT1 is still open.

  3. added this to the v2.3.0 milestone on Oct 19, 2026
  4. HMarzban commented on Nov 3, 2026

    @HMarzban
    CollaboratorAuthor

    Status, 2026-11-03. The 2026-11-03 push (a9b0c69e8..8e25e83df) carries no code from this set. So the Step 0 entry gate is not met yet.

    Left:

  5. HMarzban commented on Nov 5, 2026

    @HMarzban
    CollaboratorAuthor

    Closed by maintainer ruling 2026-11-05: the current TOC drag is the version we keep. It shipped in dd287cb and f571c08..e9d01ff (see #499). Reopen this if the need comes back.

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

    TocUI

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions