Repository navigation
fix(task-list): keep descriptions with line breaks on one line - #799
Conversation
Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
|
Hi @rng1995 @chrisknvidia, small task-list fix for #798 when you get a chance. A description with a line break was saved across two lines and the task vanished on the next command. Happy to change anything. |
rng1995
left a comment
There was a problem hiding this comment.
Thank you for the contribution! Reviewed normalization before persistence in both add paths, blank-content rejection, and reload/status handling. All 22 reference-script tests passed, including multiline/CRLF descriptions and status-word persistence. No actionable issues found.
chrisknvidia
left a comment
There was a problem hiding this comment.
Thanks, this is a clean fix. I reproduced the problem on main (a description with a newline is written across two lines, list then shows No tasks, start --task_id task_1 fails and the next add reuses task_1; add_multiple loses the item with a bare carriage return the same way) and confirmed the branch fixes all three cases plus the whitespace-only add. The four new test cases fail against the unchanged tasks.py and pass with it, the status-word cases from #680 still round-trip unchanged, and nothing else in the repo depends on the old behaviour. No conflicts with main, sign-off on every commit, changelog entry in place. One non-blocking nit inline about the wording; otherwise good to go once CI runs.
|
@dhananjay6561 - Please address review comments, respond to it and resolve the merge conflicts for the PR to merge. Thanks! |
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com>
|
hi @rng1995 , Apologies, I missed this. Thanks for merging though |
Summary
The task-list reference helper stores one task per line in its Markdown state file, but
addwrote the description as given. A description with a line break was split across two lines that the loader can't parse, so the task was reported as added and then disappeared:listshowedNo tasks,start --task_id task_1failed, and the nextaddreusedtask_1.add_multiplelost items with a bare\rthe same way, because the file is read back with universal newlines.Descriptions now have their whitespace collapsed to single spaces before they are stored, in both
addandadd_multiple:add -c $'Write the report\nand send it'storesWrite the report and send it, andstart --task_id task_1works on itadd_multiple -c $'Draft\rreview; Ship'keeps both tasks (Draft review,Ship)addreturnsError: Content is requiredwith exit 1, matching howadd_multiplealready drops blank itemsFixes #798.
Verification
make lintmake testmake buildTested on macOS 26.6.2 arm64, Python 3.14.7, on top of upstream
620ac2d8.pytest -n 0 tests/test_reference_skill_scripts.py: 22 passed. Against the unchangedtasks.py, the 4 new cases fail.make testleft to CI here; a local full run on macOS stalled in an unrelated Docker transfer cancellation test.ruff check src tests: all checks passed;ruff format --checkclean on the changed files.python -m build: sdist and wheel built.Release Impact
CHANGELOG.md