reset the plan when a tail history response omits the todo projection
An omitted `todos` on a tail request was treated as "no projection carried" and preserved the prior value. Every installWindow caller is a tail request (doOpen, its gap re-pull, repairGap; loadOlder prepends without it), which the host answers with the full-log projection or omits only when the log holds no todo/write — so the field's absence is the authoritative empty list. A live write whose host crashed before persisting therefore left the rolled-back plan on screen indefinitely; the assignment now clears it on the next open or resync. Widened the parameter to an explicit `| undefined` so the two meanings cannot be conflated again, and updated the JSDoc at both declaring seams plus the bilingual README/note pair.
This commit is contained in:
@@ -244,6 +244,7 @@ export interface ConversationSnapshot {
|
||||
*/
|
||||
blank: boolean
|
||||
lastAgentError: string | null
|
||||
/** Latest `todo/write` whole-list snapshot in the window (last write wins); empty = no plan. */
|
||||
/** Current whole-list `todo/write` projection — the tail page's full-log value, then each live
|
||||
* write (last write wins); empty = the log holds no plan. */
|
||||
todos: readonly TodoItem[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user