Skip to content

Document importer: a block-id line and a line ending after a text-less block import an empty paragraph #616

Closed

Description

@SSFSKIM

What

The document importer reads a block-id line (^id) followed by a line ending, at the end of a block that holds no text (a chart fence, for one), as an empty paragraph after that block. So markdown an agent passes to artifact_create or an edit tool that ends "…:::, ^c1, newline" stores a chart and then an empty paragraph nobody wrote.

Seen with importMarkdown (invented text):

  • ':::chart\nsales\n:::\n^c1\n' imports as a chart and a paragraph;
  • the same text without the final newline imports as the chart alone;
  • a final newline after a paragraph, a table, a math block or a rule adds nothing.

UX wave U10a (#582) met it in its e2e scenes: the board opened with an extra empty paragraph under its last chart, which read like the write that landing removes (the editor's trailing paragraph) but was in the agent's own stored row. That landing changed its scenes' markdown and left the importer alone, because the importer is the agent's writer and outside its edge.

Change

A trailing line ending after a text-less block's ^id line creates no paragraph. Start from a failing unit case on importMarkdown with the first input above.

Acceptance

  • The first input above imports as the chart alone; a document that really ends with an empty paragraph the writer asked for (two line endings and more) keeps today's reading, pinned by a case.
  • The serialize and import round trip of a document ending in a chart, a table, a math block and a rule is unchanged for each (existing cases plus one for the chart).
  • agentBoard in e2e/dashboard.spec.ts no longer has to strip its content's final newlines: remove that strip and the three gap-caret scenes stay green.

Not in scope

Any change to what the editor writes (U10a owns that).

Source: the residue of UX wave U10a's fix round (2026-11-13 UTC). Buildable after #582 is on master.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 13, 2026
  2. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 20, 2026
  3. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: batch 7, group D

  4. added
    status:in-review
    and removed
    status:in-progress
    on Nov 20, 2026
  5. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: batch 7, PR #804

  6. removed
    status:in-review
    on Nov 20, 2026
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

    bugpriority:P3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions