Skip to content

feat(issues): back write_todo_list with the issue board - #539

Merged
yogthos merged 2 commits into
mainfrom
consolidate-tasks-issues
Jun 29, 2026
Merged

feat(issues): back write_todo_list with the issue board#539
yogthos merged 2 commits into
mainfrom
consolidate-tasks-issues

Conversation

@yogthos

@yogthos yogthos commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Consolidate the two work-tracking surfaces that did the same thing. The right-pane TODOS panel and the end-of-turn nudge were driven by an in-memory write_todo_list checklist that was entirely separate from the durable issue tracker. They are now one thing: a todo is an issue.

write_todo_list upserts its plan into the issues table scoped to the current session, so bulk planning gains the full issue lifecycle (open / in_progress / blocked / done / cancelled) and the model can rely on which items are still open. Items are matched by title across calls, and omitted items are no longer silently dropped, the model closes one by restating it completed or cancelled.

The in-memory TODO_LIST is kept as a fast render mirror of this session's live board so the panel does not hit SQLite on every frame. Both write_todo_list and the issue tool refresh it after a write, and resume and /clear repopulate it from the DB. The panel and the nudge are session-scoped; the project-wide turn-start board reminder is unchanged.

Adds a cancelled terminal status, session-scoped board_for_session, and a transactional sync_todos to IssueStore, with tests covering upsert by title, no-auto-close of omitted items, reopen clearing closed_at, and the tool writing through to the board.

Yogthos added 2 commits June 29, 2026 09:14
Consolidate the two work-tracking surfaces that did the same thing. The
right-pane TODOS panel and the end-of-turn nudge were driven by an
in-memory write_todo_list checklist that was entirely separate from the
durable issue tracker. They are now one thing: a todo is an issue.

write_todo_list upserts its plan into the issues table scoped to the
current session, so bulk planning gains the full issue lifecycle
(open / in_progress / blocked / done / cancelled) and the model can rely
on which items are still open. Items are matched by title across calls,
and omitted items are no longer silently dropped, the model closes one
by restating it completed or cancelled.

The in-memory TODO_LIST is kept as a fast render mirror of this
session's live board so the panel does not hit SQLite on every frame.
Both write_todo_list and the issue tool refresh it after a write, and
resume and /clear repopulate it from the DB. The panel and the nudge are
session-scoped; the project-wide turn-start board reminder is unchanged.

Adds a cancelled terminal status, session-scoped board_for_session, and
a transactional sync_todos to IssueStore, with tests covering upsert by
title, no-auto-close of omitted items, reopen clearing closed_at, and
the tool writing through to the board.
- open_count now excludes cancelled as well as done, so it matches
  board() membership; the turn-start "and N more" overflow hint no
  longer counts terminal issues the model can't list.
- write_todo_list no longer persists durable rows when there is no
  active session (--no-session). It keeps the plan ephemeral in the
  panel mirror, so a one-shot run can't leak NULL-session issues into
  every future session's project-wide board reminder.
- Extract a shared board_query helper behind board() and
  board_for_session() so their column list and ordering can't drift,
  and add a stable `id DESC` tiebreak (a sync_todos batch stamps one
  updated_at across rows, so ordering was otherwise nondeterministic).
- Both tools refresh the panel mirror from the store they already hold
  open instead of reopening the DB a second time per write.
- Drop the dead `pending` arm in unfinished_count (the mirror only ever
  holds normalized statuses) and simplify the write_todo_list summary.
- cargo fmt (the CI rustfmt failure).

Tests: open_count_excludes_both_terminal_states plus the existing
store/tool suites.
@yogthos
yogthos merged commit e0dfc0b into main Jun 29, 2026
12 checks passed
yogthos pushed a commit that referenced this pull request Jun 30, 2026
PTY-backed !/!! bang commands (interactive gh/editors, vt100 in-place
render), /prompt <name> <text> runs the text, write_todo_list backed by
the issue board, clipboard copied tooltip, CI clippy gate, visible failed
MCP servers, stream retry on mid-tool-call chunk timeouts, and bounded DB
loads in agent construction. (#538, #539, #540, #541, #542, #544, #546, #547)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant