git/dew/main
issues/0009-history-view-strips-completion-metadata-with-strin.md
15 lines691 B last change raw · source · history

title: history view strips completion metadata with string replacement status: open labels: [bug] created: 2026-09-18 closed:


Rendering done.txt strips the x <date> prefix from the parsed description with:

strings.Replace(desc, "x "+parts[1], "", 1)

It assumes parts[1] is a 10-character date. That happens to work for lines dew writes itself, but any task whose description contains the literal x <date> gets silently mangled, and the completed date is re-derived from raw fields on every frame (once in the measuring loop and again in the render loop).

Fix: parse the x <date> prefix once in ParseTask (e.g. an IsDone + DoneDate field) and render from that.