Skip to content

Suggesting mode: a new block nested under an existing one loses its nesting #185

Open

Description

@maxsam4

In suggesting mode (#184), a draft compares blocks by id when it is turned into ops. A block that is new in the draft gets added after the block before it in reading order, so a new block nested under an existing parent (say, a sub-item under a list item) comes back as a sibling when the suggestion is accepted.

Repro: turn on Suggesting, add a nested list item under an existing item, send, then accept. The item arrives unnested.

Expected: the suggestion keeps the draft's structure. Each new block's op should name its parent (parentId/depth from the draft) rather than only the block before it, and moving a block in the draft should become a move op.

Related: in a draft, choice and task blocks still call their services when clicked. A draft should be inert until it's sent.

🤖 Generated with Claude Code

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions