Skip to content

id(web): ordered task lists lose their ordering on save — rewritten as bullet task lists #997

Closed

Description

@dezren39

Bug

In the id web markdown codec (pkgs/id/src/web/markdown.rs), an ordered task list loses its ordering on save: it comes back as a bullet task list, and a non-1 start number is lost with it.

Evidence (verified this run, main 14dd66b6)

Standalone probe crate compiling the verbatim codec from current main (logs: goal hidden_files/probe-2026-10-26-1215/out2.log + out3.log):

  • Input:
    1. [ ] todo
    2. [x] done
    
    Parsed PM: a single task_list node (no order attr anywhere). Saved output:
    - [ ] todo
    - [x] done
    
  • Input:
    5. [ ] five
    6. [x] six
    
    Saved output: - [ ] five / - [x] six — both the numbering and the start value 5 are gone.

Root cause, both directions:

  • Parse: the NodeValue::List arm (markdown.rs:~205-220) checks only whether the first child is a TaskItem; when it is, it emits {"type":"task_list"} and discards list.list_type (Ordered vs Bullet) and list.start. The non-task branch right below does preserve both (ordered_list with attrs.order).
  • Save: the task_list arm of json_to_ast (markdown.rs:~946) hardcodes list_type: ListType::Bullet, bullet_char: b'-' — there is no PM shape that could carry the ordering even if parse kept it.

For comparison, a plain ordered list round-trips correctly (3. three / 4. four keep order: 3 — same probe), and a plain bullet task list round-trips correctly. Only the ordered+task combination loses data.

Why it matters

Ordered checklists are a natural way to write sequenced steps ("step 1… step 2…") with completion state. Opening such a file in id and saving any edit silently renumbers it into an unordered checklist — the sequence information the author encoded is destroyed without any visible warning in the editor.

Acceptance criteria

  • 1. [ ] todo\n2. [x] done round-trips as an ordered task list; 5. [ ] five\n6. [x] six additionally preserves the start number 5 (same order convention as ordered_list).
  • The PM representation chosen (e.g. an order attr on task_list, or ordered list semantics for task items) must be one the web editor schema can actually render/edit — check pkgs/id/web before settling; if the editor cannot represent it today, the issue's fix note must say what was chosen and why.
  • Mixed content keeps working: - [ ] todo\n- plain (task + plain items in one list, existing test test_task_list_mixed_content) does not regress.
  • New unit tests in pkgs/id/src/web/markdown.rs cover ordered task lists with start 1 and start >1, both directions.
  • Existing codec tests pass.

Related

  • Plain task lists and plain ordered lists are both fine (probe-verified this run) — this is only the intersection.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Oct 26, 2026
  2. developing-today commented on Oct 26, 2026

    @developing-today
    Contributor
  3. added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 26, 2026
  4. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · state: filed

    • Agent: new-issue-creator job
    • Session / ID: new-issue-creator run 2026-10-26T17:10Z (12:10 CDT)
    • Found via: filed this run
    • Task: Ordered task lists lose ordering/start in the markdown codec (parse discards list_type/start for task lists at markdown.rs:~208; save hardcodes Bullet at ~:946); verified with a standalone verbatim-codec probe on main 14dd66b, queued for triage (PM/editor representation choice needed).
    • Expectation: effort/m — done when ordered task lists round-trip with start preserved and unit tests cover start 1 and >1.
    • Links: probe logs in goal hidden_files/probe-2026-10-26-1215/ (out2.log, out3.log)
  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 26, 2026
  6. 14 remaining items

  7. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Oct 27, 2026
  8. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Parked — PR #1042 opened, CI still running (15 SUCCESS incl. cargo-fmt-check, 12 pending, 0 failed). Local verification: verbatim-codec probe suite 70/70.

    {"v":1,"kind":"note","state":"parked","task_id":1195,"summary":"PR 1042 opened @ fd23051c: ordered task lists carry attrs.order through codec + editor schema. Probe suite 70 passed / 0 failed incl. new test_ordered_task_list_roundtrips. Parked 20m on CI per 5-minute rule.","artifacts":["https://github.com/developing-today/code/pull/1042"],"next":"merge PR 1042 when CI green (esp. test-web-unit, test-web-typecheck), then complete task 1195"}
    
  9. 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 Oct 27, 2026
  10. added a commit that references this issue on Oct 27, 2026
  11. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    Done — PR #1042 merged (merge commit 1fdc882); issue auto-closed. Full CI green on the PR (test-web-unit, test-web-typecheck, cargo-check, clippy, fmt all SUCCESS).

    {"v":1,"kind":"note","state":"done","task_id":1195,"summary":"PR 1042 merged: ordered task lists preserve order/start through the markdown codec (attrs.order both directions) and the editor schema renders/parses <ol class=contains-task-list>. Probe suite was 70/70 incl. test_ordered_task_list_roundtrips; CI fully green.","artifacts":["https://github.com/developing-today/code/pull/1042"],"next":"none — task 1195 complete (fixed_merged)"}
    
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)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