Skip to content

Toggle todo - #920

Merged
will-lamerton merged 1 commit into
Nano-Collective:mainfrom
bigattichouse:toggle-todo
Aug 30, 2026
Merged

will-lamerton merged 1 commit into
Nano-Collective:mainfrom
bigattichouse:toggle-todo

Conversation

@bigattichouse

@bigattichouse bigattichouse commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Closes #918.

The todo list eats a lot of vertical space in the transcript, which is wasteful once you already know what the agent is working on. Ctrl-T collapses it into a single segment on the status bar and brings it back on demand.

While collapsed the segment keeps the progress that was on screen, so hiding the list doesn't mean losing track of it:

Segment Meaning
Todo (2/5 Ctrl-t) two of five done
Todo (~2/5 Ctrl-t) ...and one currently in progress
Todo (~2/5* Ctrl-t) ...and the list changed since you hid it

The unread marker renders in the warning colour, so a change while the list is collapsed is visible without expanding it. On narrow terminals the key hint is dropped, and the segment is measured into the existing width budget alongside the tune and context segments so it collapses under pressure like everything else on that bar.

Visibility lives in useAppState next to the other session-scoped UI state; the key is handled in user-input alongside the existing control shortcuts.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Changeset

  • Added a changeset (minor)

Testing

Automated Tests

  • New features include passing tests in .spec.ts/tsx files — 134 tests across chat-input, development-mode-indicator, user-input, useAppState and interactive-app
  • All existing tests pass
  • Tests cover both success and error scenarios

Note

Rebased onto main now that #923 has landed. One remaining check depends on #925, which fixes a FORCE_COLOR sensitive assertion in location-step.spec.tsx that is unrelated to this branch. Everything else passes: format, lint, types, types:vscode, knip, audit and build.

Manual Testing

  • Tested with Ollama

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • No breaking changes

🤖 Generated with Claude Code

https://claude.ai/code/session_01J7jWv6TLZ5UCr5BVfE2FP7

@bigattichouse

Copy link
Copy Markdown
Contributor Author

sigh.. working on it. not used to the new tools yet

@bigattichouse

Copy link
Copy Markdown
Contributor Author

Reworked and rebased onto current main. The branch is now a single feature-only commit (12 files, no config changes).

For anyone picking this up: the mess in the earlier revisions wasn't the feature. main had gone red from two dependency bumps — TypeScript 7 removing baseUrl and rejecting non-relative paths, and the AVA 7→8 bump (#912) requiring an array-form extensions. My attempts to work around those locally included setting rootDir to "../", which relocated the build output to dist/<repo>/source/** and broke both pnpm build and knip's entry resolution. That's all reverted.

The toolchain repairs are split out into #923 so they can land on their own and unblock every other open PR. This one stays red until that merges.

Closes Nano-Collective#918.

The todo list occupies a lot of vertical space in the transcript, which
is wasteful once you already know what the agent is working on. Ctrl-T
now collapses it into a single segment on the status bar and brings it
back on demand.

While collapsed the segment carries the progress that was on screen
before, so hiding the list does not mean losing track of it:

  Todo (2/5 Ctrl-t)     two of five done
  Todo (~2/5 Ctrl-t)    ... and one currently in progress
  Todo (~2/5* Ctrl-t)   ... and the list changed since you hid it

The unread marker renders in the warning colour so a change while the
list is collapsed is visible without expanding it. On narrow terminals
the key hint is dropped and the segment is measured into the existing
width budget alongside the tune and context segments, so it collapses
under pressure like everything else on that bar.

Visibility lives in useAppState next to the other session-scoped UI
state, and the key is handled in user-input alongside the existing
control shortcuts.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01J7jWv6TLZ5UCr5BVfE2FP7
@will-lamerton
will-lamerton merged commit b6615b1 into Nano-Collective:main Aug 30, 2026
10 of 11 checks passed
@will-lamerton

Copy link
Copy Markdown
Member

Great work @bigattichouse :)

will-lamerton added a commit that referenced this pull request Aug 30, 2026
Review follow-ups on #920:

- Status bar: the badge no longer takes width unconditionally. The
  Ctrl-t key hint is now an optional segment, dropped first under width
  pressure (before the editor line-range suffix and the Shift+Tab hint),
  so it stops squeezing the session name and editor pill toward their
  6-char floor at 80 columns. The collapsed badge keeps its progress
  readout, which is the only trace of the list while it is hidden. The
  hint is also no longer hard-gated on isNarrow, so narrow terminals
  keep it whenever there is room for it.

- useAppState: setLiveTaskList no longer runs side effects inside a
  state updater. Updaters must be pure - React re-invokes them under
  StrictMode and when a concurrent render is replayed. The unread flag
  is now computed before the state write, and the setter is narrowed to
  Task[] | null, which is what every caller already passed and what
  useAppHandlers already declared.

- The unread marker now fires on real id/status churn rather than on any
  call, so re-setting an unchanged list cannot light it up.

- chat-input: memoised the badge payload; it was rebuilt on every render
  and defeated the memo() on DevelopmentModeIndicator whenever a task
  list existed. Folded the two filter passes into one.

- Renamed the todo* surface to task*, matching liveTaskList and the
  "Tasks" header the badge summarises. Made hasUnread required, and
  dropped setShowTodoList / setTodoHasUnread from useAppState, which
  nothing consumed.

- Tests: added the missing keypress coverage (ctrl+t fires the toggle,
  still fires while the input is disabled, and inserts no literal
  character), plus width-budget tests for the new drop order.
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.

[Feature] Toggle Todo list visibility

2 participants