GeezerVison is showing github.com — id(web): ordered task lists lose their ordering on save — rewritten as bullet task lists · Issue #997 · developing-today/code
id(web): ordered task lists lose their ordering on save — rewritten as bullet task lists #997DescriptionBug
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:
Parsed PM: a single
task_list node (no order attr anywhere). Saved output:
- Input:
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.
Activitydeveloping-today commented on Oct 26, 2026 dezren39 commented on Oct 26, 2026 🤖 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)
dezren39 commented on Oct 27, 2026 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"}
dezren39 commented on Oct 27, 2026 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)"}
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|