feat(chat): retry the last answer — redo-in-place Retry button on the latest brain bubble

This commit is contained in:
2026-08-29 18:32:15 -04:00
parent 1a60ecbd8b
commit 6832957ab0
7 changed files with 891 additions and 15 deletions
+10 -4
View File
@@ -108,11 +108,17 @@ def test_submit_reveals_user_message() -> None:
"""User intent kept by the owner: submitting scrolls the viewport down
so the user's own message is visible — the submit addMessage passes
the scroll intent; the streaming brain-bubble creations in the same
function never do."""
turn handler never do.
Phase 49: the turn handler is runTurn (extracted from handleSend) —
the user append + persistence save point 1 sit in its `!reask`
block (the redo-in-place retry path skips both: the question is
already in the DOM + conversation)."""
js = _js()
send = js.find("async function handleSend")
assert send != -1, "handleSend must exist"
body = js[send : js.find("\n}\n", send)]
turn = js.find("async function runTurn")
assert turn != -1, "runTurn must exist (phase 49 extraction)"
body = js[turn : js.find("\n}\n", turn)]
assert "if (!reask) {" in body, "the user append is gated on !reask"
assert 'addMessage("user", renderMarkdown(text), true)' in body, (
"the submit must reveal the user message (scroll intent true)"
)