SIGN IN SIGN UP

fix(chat): call a note expired only on a live, idle session

`!isPrompting` is not proof the turn ended. A mid-turn attach hydrates while
the entry is still `connecting` (`CONNECTION_CREATED` seeds it), and
`markConnectionGone` flips to `disconnected` exactly when the terminal event
never arrived — both read "not prompting" with the agent still running and the
note still consumable. Offering the recovery there costs a duplicate: the user
queues a copy, the agent then reads the original, and the instruction lands
twice. The ambiguous states keep the historical hide.

`resendNote` also tombstones before reading the note, so two clicks in one tick
queue one message rather than two.
X
xintaofei committed
95dfb748dbe670a57ab19a0c41863f3a502b73c1
Parent: 21be221