Skip to content

id(web): adjacent lists of different types save an <!-- end list --> comment that reopens as a phantom code block #1397

Open

Description

@dezren39

Problem

In the id web markdown codec (pkgs/id/src/web/markdown.rs), a document where a list is immediately followed by a list of a different type — bullet → ordered, ordered → bullet, or task → bullet with no blank line between them — is corrupted on save: the save writes a literal <!-- end list --> HTML comment between the lists, and reopening the saved file turns that comment into a spurious code_block node sitting between the lists in the document model.

#1032 fixed this for adjacent bullet lists (different markers) by coalescing them on save. Different-type neighbours cannot be coalesced — a bullet list and an ordered list are genuinely different lists — so the boundary case #1032 excluded is still live.

Evidence (verified this run on main 452d69e6; markdown.rs identical at 95bfedb4 where the probe copy was taken)

Probe: verbatim copy of pkgs/id/src/web/markdown.rs in a standalone crate (comrak 0.56), markdown_to_prosemirror → prosemirror_to_markdown → re-parse. Log: fleet bookkeeping probe-2026-10-27-creator-a3/out4.log (cases also in out3.log).

Input Save output Re-parsed PM
- a\n1. b\n - a\n\n<!-- end list -->\n\n1. b\n bullet_list, code_block{params:"html", htmlBlock:true} containing <!-- end list -->, ordered_list
1. a\n- b\n 1. a\n\n<!-- end list -->\n\n- b\n ordered_list, same spurious code_block, bullet_list
- a\n- b\n1. c\n2. d\n comment inserted at the type boundary same spurious code_block between the lists
1. [ ] t\n- plain\n 1. [ ] t\n\n<!-- end list -->\n\n- plain\n task_list, same spurious code_block, bullet_list
> - a\n> 1. b\n (inside blockquote) > - a\n> \n> <!-- end list -->\n> \n> 1. b\n spurious code_block inside the quote — and the second save is not even a markdown fixpoint (the blank > line before > 1. b is dropped)

Root cause, both directions:

Controls from the same probe: same-type adjacent lists (post-#1032), blank-line-separated lists, nested lists, and task/plain nested sublists all round-trip cleanly; only same-level different-type adjacency breaks.

Why it matters

Switching from bullets to numbered steps mid-document without a blank line is a common note-taking shape (a shopping list followed by numbered prep steps; an agenda followed by action items). Today the first save pollutes the file with a renderer-internal comment, and reopening shows a phantom code block between the lists — the same user-visible failure family #1032 was filed to eliminate, surviving at exactly the boundaries its fix could not merge.

Acceptance criteria

Activity

  1. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  2. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    queue/queuedHas a queued task in the Supabase agent queue
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 27, 2026
  3. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  4. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Evidence from new-issue-creator-code-a (2026-10-27 run, verbatim-codec probe on main 37418e5): the same phantom-block symptom triggers with two adjacent ordered lists that differ only in delimiter — 1. a\n2) b\n saves as 1. a\n\n<!-- end list -->\n\n2. b\n and reopens with a code_block (htmlBlock) containing <!-- end list --> inserted between the two lists. The delimiter loss itself is #1380; noting here that the end-list-comment → phantom-code-block mechanism in this issue is not limited to lists of different types — a delimiter change within ordered lists produces it too.

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 27, 2026
  6. 154 remaining items

  7. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 4, 2026
  8. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  9. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. dezren39 commented on Nov 4, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  11. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 4, 2026
  12. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor
    • Session / ID: task 1465 (repo-fleet-monitor run 2026-11-05T15:32:18Z)
    • Found via: monitor reconciliation (Duty 1 claim/label divergence repair)
    • Task: Claim evaporated: task 1465 is queued and unclaimed in repo-health-code-pilot, but this issue still carried claimed labels. Labels reset to the truth (queue/queued + status/needs-triage). Checkpoint stage at evaporation: handed_off.
    • Expectation: The next lane claim picks task 1465 up from the queued state and posts a fresh pickup note.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)queue/parkedQueue task is parked (waiting on CI, time, or an event)queue/queuedHas a queued task in the Supabase agent queuesource/creatorFiled by the new-issue-creator jobstatus/needs-triageNot yet triaged; needs a first lookstatus/parkedDeliberately paused with a recorded resume conditiontask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions