Skip to content

Intent: preserve nested lists inside list items - #133

Merged
noeltock merged 2 commits into
mainfrom
codex/126-preserve-nested-lists
Oct 4, 2026
Merged

noeltock merged 2 commits into
mainfrom
codex/126-preserve-nested-lists

Conversation

@noeltock

@noeltock noeltock commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Problem

Nested lists vanished inside intent list items while reporting success. Closes #126.

Solution

Pass assembled children into native list-item construction.

Behaviour Read first Proof
Preserve nested hierarchy, ordered attributes and siblings src/intent/index.ts Two-level parsed-tree regressions
Keep plain list shorthand dev/test/intent.test.ts Existing and added intent tests

Diff

+39 / −1 across two files.

 assembleNode
- paragraph and list-item -> createBlock(name, attrs, [])
+ paragraph -> createBlock(name, attrs, [])
+ list-item -> createBlock(name, attrs, children)

Testing & verification

Reviewed revision: 765e49f91b6f10e1f6d40d9d330a26ae0f6bcb3a · Environment: Node 24.18.0, macOS arm64.

  • npx vitest run dev/test/intent.test.ts: 14 passed. Both nested cases failed on the prior implementation (3 blocks instead of 8).
  • npm run typecheck: passed.
  • npm run verify: passed (727 tests, four existing skips; build, dependency support, authoring hashes, private-reference and package checks). Full PR CI passed: https://github.com/humanmade/block-runner/actions/runs/37173800280 (Node 20/22/24, packed consumers, WordPress proof and scope gate).
  • CLI issue reproduction: four valid blocks, zero warnings.

Not verified: target-site rendering and manual editor acceptance. The regression proves preservation through the pinned headless parse/serialize gate.

Risk / rollout

List items now retain their intended children; the shared finalization gate remains unchanged. No configuration or migration.

Detection: parsed-tree regression failures. Rollback: revert this PR.

@noeltock
noeltock merged commit 49e7d2f into main Oct 4, 2026
9 checks passed
@noeltock
noeltock deleted the codex/126-preserve-nested-lists branch October 4, 2026 03:36
@noeltock noeltock mentioned this pull request Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intent: preserve nested lists inside list items

1 participant