From 15aef06e32b1efcaf75b070e0ab6cdc158cceec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Tue, 8 Sep 2026 14:56:47 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20Require=20@done=20on=20every=20?= =?UTF-8?q?=E2=9C=94=20backlog=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sandy081.todotasks extension marks a line done from the ✔ glyph alone, then unconditionally decorates its @done tag via lineText.indexOf("@done"). On a bare ✔ that returns -1, so the decorator builds a Range with a negative character offset, VS Code throws, and all decoration/highlighting for the document dies. The committed backlog.tasks contained two such lines (the branching- model subtasks), so re-opening the file reproducibly broke highlighting. Add @done to them and document the required ✔/@done (and ✘/@cancelled) coupling in AGENTS.md. --- AGENTS.md | 2 ++ backlog.tasks | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 3057b43..e74557b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -36,6 +36,8 @@ Never start a long-lived / blocking process such as `npm run watch`. It runs unt `backlog.tasks` uses the vscode-todotasks format (not Markdown). A line ending in `:` is a project; every other line is a task. Status glyphs: `☐` open, `✔` done, `✘` cancelled; subtasks nest by indentation. Inline `@tags` carry metadata — `@done` / `@cancelled` mark completion, `@critical` / `@high` / `@low` / `@today` set priority. The `(…)` timestamp after `@done` is editor-generated: omit it when checking off by hand. +**Required coupling:** a `✔` line _must_ also carry `@done`, and a `✘` line _must_ carry `@cancelled`. The `sandy081.todotasks` extension treats the glyph as the completion signal, then unconditionally searches for the matching tag to decorate; a bare `✔`/`✘` with no tag makes it compute an illegal `Range` (negative character offset) that throws and kills all highlighting/decoration for the document. A `☐` may stand alone. So check off by hand as `✔ … @done` (optionally `@done (timestamp)`), never a lone `✔`. + ### Working on tasks - **Task with subtasks** (a task that has indented children): create a branch off `main` using the prefix inferred from the task content (`feature/…` / `fix/…` / `chore/…`), check it out, work on each subtask with commits, then present a concise handover for the user to review. Use this fixed shape: diff --git a/backlog.tasks b/backlog.tasks index 7a13c2b..108d5a7 100644 --- a/backlog.tasks +++ b/backlog.tasks @@ -9,8 +9,8 @@ Setup: ☐ Add gitea release page in CI @high ☐ Split off template into separate package => pi --session 01a07dde-7050-7054-bb36-1606d7eb2bc3 @high ✔ Document branching model @done - ✔ Describe branching model: when to branch, base branch, naming - ✔ Clarify release workflow: who pushes `main`, CI as post-merge gate, drop PR usage + ✔ Describe branching model: when to branch, base branch, naming @done + ✔ Clarify release workflow: who pushes `main`, CI as post-merge gate, drop PR usage @done (9/8/2026, 2:54:32 PM) v1.0: ☐ API surface is stable and fully typed