Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
No blocking issues found. I couldn't run the app here (no browser in the sandbox), so I relied on your screenshots. In packages/app, tsc -b passes and the composer unit tests pass. A quick throwaway test of sessionTodos confirmed it handles the revert point, still-running calls, unknown statuses and empty items as described. The background activity alignment behaves the same for left, center and right in both LTR and RTL. With the setting "off" the lane now aligns to start rather than end, but only the todo pill shows in that case.
Public API is unchanged: these are app-internal components and new English i18n keys.
One small point: todos.ts re-implements sessionTodos and the todo parsing from packages/tui/src/util/todo.ts almost line for line (see inline).
Related: #42421
|
|
||
| // The experimental `todowrite` tool keeps no server state: the current list is the input of the latest completed call | ||
| // before the revert boundary. | ||
| export function sessionTodos(messages: readonly SessionMessageInfo[], boundary?: string): Todo[] { |
There was a problem hiding this comment.
This is a near copy of sessionTodos/parseTodos in packages/tui/src/util/todo.ts, and the description says the two should follow the same rule. Could both import it from one shared place, so the revert-point and status handling can't drift apart between the TUI and the app?
There was a problem hiding this comment.
The new commit looks sound: the pill now shows only when experimental.todo is on. todoEnabled() uses the same rule as the server (the highest-priority config document that sets experimental decides), so migrated V1 sessions won't bring back their old plan. In packages/app, tsc -b passes and the composer unit tests pass. I couldn't render the pill here because the sandbox has no browser.
Public API is unchanged; the app only reads the existing experimental.todo config key.
The duplicated sessionTodos logic shared with the TUI is still open in its thread.
The experimental
todowritetool (experimental.todo) is back, but the app had nowhere to show the plan. This adds a todo pill next to the background activity pill above the composer. It replaces the old full-width pull-out dock.Visual
How it works
flowchart LR M[session messages] -->|latest completed todowrite before the revert point| T[sessionTodos] T --> V{turn running and work left?} V -->|yes| P[SessionTodoPill] A[SessionActivityChips] --> L[SessionComposerLane] P --> LsessionTodosincomposer/todos.tsreads the input of the latest completedtodowritecall before the revert point. This is the same rule as the TUI'ssessionTodos.experimental.todois on, read from the location config the way the server reads it. The session must also be working with at least one todo not done or cancelled, like the old dock. Migrated V1 sessions keep their oldtodowritecalls, so without the flag check their last plan would come back.SessionComposerLanenow owns the out-of-flow row above the composer that the timeline reserves. It also owns the left/center/right alignment from the background activity setting. Both pills share one row, and the activity pill stays at the aligned edge.done/totalcount, and the current todo. Click it to open a popover with the full list. The popover keeps the todo in progress in view.session-composer-lane. Before, the activity container filled the full width.Stories:
session-todo-pill--collapsed,--open,--without-activity.Added by the opencode bot (AI-generated).
Related: #42421