Repository navigation
Conversation
…tems around it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Nesting or lifting numbered composer items now updates surrounding list numbers consistently. The change is limited to draft editing, with no changes to submission, product defaults, or external systems. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
In a numbered list in the composer, Tab on item 2 nests it under item 1 but leaves the items after it numbered
3.and4.. Enter and Shift+Tab already renumber in the same situation, so only Tab leaves the gap.Shift+Tab has the reverse problem. Lifting the first nested item out of
1. b / 2. cleaves the remaining child numbered2. c, so the sent Markdown starts that nested list at 2. Shift+Enter on an empty nested item in the plain-text composer lifts it the same way and has the same gap.Change
renumberFollowingItemsincomposer-list-continuation.tsnow renumbers a run of lists in one pass, each list from its own starting number, and folds the result into the edit. Every key goes through it:.or).Web and desktop share this composer. Mobile has no Tab list nesting.
Scope and approval
A small fix for an obvious bug. It extends the renumbering #14332 added for Enter to the nesting and lifting paths from #17138 and #27016, in the same file and test table. No new setting.
Verification
vp test run src/composer-list-continuation.test.ts(fromapps/web) onmain(d1909d6) with the new rows: 3 failed, 32 passed (Tab, Shift+Tab, and Shift+Enter on an empty nested item). With the fix: 35 passed, including a row that keeps siblings under a bullet numbered (- a / 1. b / 2. c).vp run check:changedpasses.vp run dev:desktop) on macOS, Apple silicon, default rich-text composer, no provider set up. Driven with key and mouse events sent through its remote debugging port; lists were typed with Shift+Enter for new items.main(d1909d6) first, then this branch. The web client matched.Tab on "Add the new shortcuts". On
main, the items after it stay3.and4.:On this branch they read
2.and3.:Shift+Tab on "Add the new shortcuts", nested under item 1 with "Fix the dark theme" after it. On
main, its new child still reads2.:On this branch the child restarts at
1.and the parent list counts on to3.:Not checked: Shift+Enter in the plain-text composer is covered by the test only. With rich text on, Enter in a list item goes through the editor's own list commands, which this PR does not touch.
Generated with Claude Opus 5.5 in T3 Code Nightly