Repository navigation
refactor: deepen the Task document - #44
Merged
Merged
Conversation
frantufro
force-pushed
the
refactor/deepen-task-document
branch
from
November 13, 2026 13:00
7b29216 to
038d1a7
Compare
TaskDoc parses and renders frontmatter, the H1 title and the body. core/frontmatter.rs moves into core/task_doc.rs, the H1 rule and read_body are shared by both new commands, and list reads metadata through TaskDoc. File output is unchanged.
frantufro
force-pushed
the
refactor/deepen-task-document
branch
from
November 13, 2026 13:18
038d1a7 to
1ef22bf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
core/task_doc.rs, a Task document module that parses and renders the whole Task file.TaskDoc::new(title, body, date),TaskDoc::parse(text),.title(),.meta(),.render(). Parse then render is lossless.core/frontmatter.rsis absorbed. Its parse and render functions are now private to the module;TaskMetastays public.first_h1,titled_body) lives only intask_doc.rs.parse_top_headingmoved out ofcore/roadmap.rs.read_bodywas duplicated incommands/new.rsandcommands/roadmap/new.rs; both now call the shared one. Roadmapnewusestitled_body(no frontmatter).commands/list.rsreads metadata throughTaskDoc::parse.read_task_titleincore/roadmap.rsis now a thin call toTaskDoc::title, so the Roadmap module work can drop it.title()searches the body after the frontmatter, so a#line inside frontmatter is no longer taken as the title.deepen-the-task-documentmoved to done.Pairing with the Roadmap module PR
The task depends on
deepen-the-roadmap-module, which is not merged. Likely conflicts with that PR:src/core/roadmap.rs(read_task_title,extract_first_h1,extract_roadmap_title, removedparse_top_headingand its tests, a newuse) andsrc/commands/roadmap/new.rs. The sibling table/JSON PR may touchsrc/commands/list.rs, and the Task store PR may touchsrc/commands/new.rsandsrc/core/slug.rsimports.Verification
cargo fmt --checkcargo clippy --all-targets -- -D warnings -W clippy::pedantic(local stable toolchain, not the pinned 1.98.0)cargo test --locked(unit tests plus tests/new.rs, tests/roadmap.rs and the rest all pass)