GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(web): adjacent lists of different types save an <!-- end list --> comment that reopens as a phantom code block · Issue #1397 · developing-today/code

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

New issue
Copy link
New issue
Copy link
Closed
Closed
id(web): adjacent lists of different types save an <!-- end list --> comment that reopens as a phantom code block#1397
Copy link
Assignees
dezren39
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)source/creatorFiled by the new-issue-creator jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this item

Description

@dezren39
dezren39
opened on Oct 27, 2026
Issue body actions

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:

  • Save: json_to_ast's child loop coalesces only consecutive bullet_list siblings (markdown.rs:1464-1487, the id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032 fix; its comment notes ordered/task lists are deliberately untouched). Any other adjacent list-type pair is emitted as sibling comrak List nodes, and comrak's CommonMark renderer separates sibling lists of different types with an <!-- end list --> comment.
  • Parse: the comment comes back as an HtmlBlock, and the NodeValue::HtmlBlock arm (markdown.rs:391-419, the id(web): HTML blocks (comments, <details>, <div>) are rewritten as ```html code blocks on save #982 fallback) converts it into a code_block with params:"html" / htmlBlock:true. At the pure codec level the markdown then happens to re-emit the comment (so the text is a fixpoint outside blockquotes), but the document model has gained a block the user never wrote — in the editor that block presents as a code block wedged between the two lists, and any consumer of the PM doc (collab, API writers, future schema tightening) sees content that was never in the source.

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

  • All five shapes above save with no <!-- end list --> comment (or any other renderer-internal separator) written into the user's markdown, and re-parse to a PM doc with exactly the two original lists and nothing between them.
  • The blockquote shape is a full markdown fixpoint across two saves.
  • The chosen separation strategy is coherent with the id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032 precedent and the id(web): HTML blocks (comments, <details>, <div>) are rewritten as ```html code blocks on save #982 HTML-block provenance design, with a note in the PR on what separates the lists in the saved text (e.g. a separator the parse direction provably drops, or a save-direction rewrite that avoids sibling different-type List nodes reaching the renderer).
  • id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032 behaviour is unchanged: adjacent bullet lists still coalesce, and its regression tests keep passing; existing web::markdown tests keep passing.
  • Regression tests in pkgs/id/src/web/markdown.rs cover bullet→ordered, ordered→bullet, task→bullet, and the blockquote case in both save and re-parse directions.

Activity

Next
  1. developing-today commented on Oct 27, 2026

    @developing-today
    developing-todayBot
    on Oct 27, 2026 – with developing.today
    Contributor
    More actions

    CODE-489

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 27, 2026
  3. github-actions
    assigned
    dezren39
    on Oct 27, 2026
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job, lane A (new-issue-creator-code-a)
    • Session / ID: cron new-issue-creator-code-a run 2026-10-27 05:55 CDT
    • Found via: filed this run
    • Task: Filed after verifying on main 452d69e with a standalone probe crate (verbatim pkgs/id/src/web/markdown.rs, comrak 0.56): adjacent different-type lists save an <!-- end list --> comment that re-parses as a phantom htmlBlock code_block; blockquote shape is not a markdown fixpoint. id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032 covered only coalescable bullet/bullet adjacency.
    • Expectation: triage (s) — pick a separation strategy coherent with id(web): adjacent bullet lists with different markers accumulate '<!-- end list -->' comments and html fences on every save — non-fixpoint, grows per save #1032/id(web): HTML blocks (comments, <details>, <div>) are rewritten as ```html code blocks on save #982, implement with regression tests per the acceptance criteria.
    • Links: probe log hidden_files/probe-2026-10-27-creator-a3/out4.log; queued as a repo-task/v1 triage packet on repo-health-code-pilot.
  5. dezren39 commented on Oct 27, 2026

    @dezren39
    dezren39
    on Oct 27, 2026
    MemberAuthor
    More actions

    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.

  6. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 27, 2026
  7. 185 remaining items

    Load more actions
  8. dezren39
    added 8 commits that reference this issue on Nov 8, 2026

    fix(id): keep end-list separator for ordered task/plain restarts (#1397)

    459b8c6

    fix(id): keep end-list separator on tight mismatch; ignore fence/cell…

    0efcfdf

    fix(id): keep a blank before ordered lists starting above 1 (#1397, C…

    cd4564a

    fix(id): judge list boundaries by effective tightness; bare-run fence…

    1d07af4

    fix(id): marker-prefixed fences + blank before empty-first-item lists (…

    90d8701

    test(id): empty-item boundary expectation — renderer spells empty ite…

    1ef5c75

    fix(id): raw-HTML fence tracking + empty-item guard family limit (#1397…

    3d419cd

    fix(id): stop writing renderer end-list separators between different-…

    ea302e0
  9. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    MemberAuthor
    More actions

    {"event":"done","worker":"repo-worker-code","queue":"repo-health-code-pilot","task_id":13352,"lane":"code-y","note":"Task 13352 COMPLETE (fixed_merged). PR #3258 squash-merged ea302e0; issue #1397 closed by the merge. Fresh by lane code-y: head 3d419cd merge-tree clean vs current main; Codex review on this head completed, has_unresolved_findings=false; targeted tests re-run fresh on laptop worktree 13352-3258: cargo test --manifest-path pkgs/id/Cargo.toml --features web --lib web::markdown — 261 passed, 0 failed. CI: basic checks QUEUED (systemic runner stall), native arm64 SUCCESS, 1 SKIPPED, CodeRabbit NEUTRAL, 0 failed; merged under standing criteria on local evidence."}

  10. dezren39
    closed this as completedon Nov 8, 2026
  11. developing-today
    added
    status:done
    on Nov 8, 2026
  12. dezren39
    removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    work/assignedQueue worker lifecycle state
    on Nov 8, 2026
  13. dezren39 commented on Nov 9, 2026

    @dezren39
    dezren39
    on Nov 9, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already_done)

    • Agent: repo queue worker, lane code-g (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-g run 2026-11-09; task 1465
    • Task: task 1465 for issue id(web): adjacent lists of different types save an <!-- end list --> comment that reopens as a phantom code block #1397 (small_fix). Fresh check: issue id(web): adjacent lists of different types save an <!-- end list --> comment that reopens as a phantom code block #1397 is CLOSED (2026-11-08T19:12:46Z, label status:done) and PR fix(id): stop writing renderer end-list separators between different-kind lists (#1397) #3258 is MERGED (2026-11-08T19:12:18Z, merge commit ea302e0) — the work was completed under task 13352 (fixed_merged). Completing task 1465 as already_done; no new work needed.
    • Links: task 1465 · issue id(web): adjacent lists of different types save an <!-- end list --> comment that reopens as a phantom code block #1397 · PR fix(id): stop writing renderer end-list separators between different-kind lists (#1397) #3258 fix(id): stop writing renderer end-list separators between different-kind lists (#1397) #3258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

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)source/creatorFiled by the new-issue-creator jobstatus:donetask/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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.