Repository navigation
refactor(roadmap): deepen the Roadmap module - #46
Merged
Merged
Conversation
Roadmap::parse classifies lines once and offers render_resolved, add_task, next_not_done and an atomic save. The line grammar helpers become private, write_atomic exists once, and the unused root_for_roadmap is removed. Unit tests move to the Roadmap interface.
frantufro
force-pushed
the
refactor/deepen-roadmap-module
branch
from
November 13, 2026 13:00
c691f15 to
bbcf412
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
Roadmapmodule insrc/core/roadmap.rs:Roadmap::parse(slug, src)(orload) classifies lines once (task, Milestone, other##heading, other). It offersrender_resolved(tasks),add_task(slug, milestone),next_not_done(tasks),contains_task,titleand one atomicsave.TaskInfo { status, title }, or slug toTaskStatusfornext). The commands keep building the lookup fromscan_alltoday, so the Task store can supply it later without changingRoadmap.roadmap show,addandnextparse, call one method and print.write_atomicexists once (Roadmap::save);root_for_roadmap(unused) is removed; the grammar helpers (parse_task_line,parse_milestone_heading, ...) are private.tests/roadmap.rsis unchanged and passes. CLI output is byte-identical.deepen-the-roadmap-module.roadmap addnow takes the roadmap slug as&str, which touches one line insrc/main.rs.Pairs with the Task store PR
The task asks to move
TaskStatusnext to the Task store. It stays incore/roadmap.rshere because that code is not merged; moving it is a small follow-up once the Task store lands.Likely conflicts with the Task store PR:
src/commands/roadmap/show.rs,add.rsandnext.rs(thescan_allslug lookups),src/core/roadmap.rs(TaskStatus), and the oneroadmap addline insrc/main.rs. Resolution: keep the closure-based calls and replace the lookup construction with the Task store's.Verification
cargo fmtcargo clippy --all-targets -- -D warnings -W clippy::pedanticcargo test