Files
DeepTutor/web/components/space
Bingxi Zhao (Frank) 771174f494 fix(web): re-send a refused answer instead of discarding it (#1273)
When a question's turn is gone, `submit_user_reply` is refused — correctly;
the backend has no waiter left. What the three composers did with that
refusal is the bug: they raised "This question is no longer active, so your
answer could not be sent. Send a new message to continue." and returned.

The composer had already cleared the box, so the return discarded what the
user had typed. And the advice was impossible to follow: every subsequent
message hit the same branch, because the predicate that routes into it reads
only the persisted card, which nothing ever retires. The one instruction the
error gave was the one thing it was preventing.

So a refused reply now falls through to `sendMessage` with the same content.
The card is one way to answer, never the only one, and the conversation
cannot trap the user — whichever of the several ways in to a dead turn they
came by (a backend restart, a Stop, a replay race).

The message says what actually happened rather than reporting a failure:
the text was delivered, just not to the question. `REPLY_NOT_DELIVERED`
stays for the card banners, where it remains true — a card's own Submit has
no composer to fall through to.

The regression test pins the refusal path specifically: it fails against the
previous `return`, which is the shape that stranded the reporter.

This does not remove the need to retire a dead card server-side (no
`ask_user_resolved` counterpart is ever emitted when a turn dies) — that is
the deeper half and is left as follow-up.
2026-09-08 00:26:00 +08:00
..
2026-09-02 04:09:11 +08:00
2026-09-03 01:38:54 +08:00
2026-09-03 01:38:54 +08:00
2026-06-18 00:22:48 +08:00
2026-06-17 10:50:44 +08:00
2026-07-31 00:25:48 +08:00
2026-06-17 10:50:44 +08:00
2026-06-17 10:50:44 +08:00
2026-06-18 00:22:48 +08:00
2026-06-11 20:03:34 +08:00