Repository navigation
feat: question_shown: read the question the terminal shows (#323) - #327
Merged
Merged
Conversation
Maxaubert
added a commit
that referenced
this pull request
Oct 16, 2026
…apped tokens match From the 2026-10-16 review of PR #327: - #23: a question shown on screen is not read while mute_level is 1 or more (the set still follows the screen); "Review your answers." goes through the normal speak/store path, so it is stored while muted. - #60: host_tab resolves to the newest session of the tab with a question set (stepping or read in order) and stops there, so an older session of the same tab is never acted on. - #61: matching folds the text to letters and digits with no separators, so a long token the terminal cut mid-word still matches (the 20-character prefix minimum stays). - A set read in order no longer restarts the question that is being read when the screen shows it. - In a host tab the hook sends channel_open (with host_tab) before an AskUserQuestion's questions, so a runtime started mid-turn still knows the session's tab (new golden case, a deliberate mapping change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
Owner
Author
|
Review fixes (2026-10-16 full code review), commit b4b82c0:
Tests: each new test failed first, then passed. cargo test -p sonara-agent / sonara-hook / sonarad all green, clippy clean, gate --quick all ok except the known local-only tests/embed curl example. No version bump. |
Maxaubert
added a commit
that referenced
this pull request
Oct 16, 2026
…apped tokens match From the 2026-10-16 review of PR #327: - #23: a question shown on screen is not read while mute_level is 1 or more (the set still follows the screen); "Review your answers." goes through the normal speak/store path, so it is stored while muted. - #60: host_tab resolves to the newest session of the tab with a question set (stepping or read in order) and stops there, so an older session of the same tab is never acted on. - #61: matching folds the text to letters and digits with no separators, so a long token the terminal cut mid-word still matches (the 20-character prefix minimum stays). - A set read in order no longer restarts the question that is being read when the screen shows it. - In a host tab the hook sends channel_open (with host_tab) before an AskUserQuestion's questions, so a runtime started mid-turn still knows the session's tab (new golden case, a deliberate mapping change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
Maxaubert
force-pushed
the
feat/question-follow
branch
from
October 16, 2026 08:12
b4b82c0 to
406b559
Compare
Maxaubert
added a commit
that referenced
this pull request
Oct 17, 2026
…apped tokens match From the 2026-10-16 review of PR #327: - #23: a question shown on screen is not read while mute_level is 1 or more (the set still follows the screen); "Review your answers." goes through the normal speak/store path, so it is stored while muted. - #60: host_tab resolves to the newest session of the tab with a question set (stepping or read in order) and stops there, so an older session of the same tab is never acted on. - #61: matching folds the text to letters and digits with no separators, so a long token the terminal cut mid-word still matches (the 20-character prefix minimum stays). - A set read in order no longer restarts the question that is being read when the screen shows it. - In a host tab the hook sends channel_open (with host_tab) before an AskUserQuestion's questions, so a runtime started mid-turn still knows the session's tab (new golden case, a deliberate mapping change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
Maxaubert
force-pushed
the
feat/question-follow
branch
from
October 17, 2026 01:10
3ea08f8 to
ee38d7e
Compare
…apped tokens match From the 2026-10-16 review of PR #327: - #23: a question shown on screen is not read while mute_level is 1 or more (the set still follows the screen); "Review your answers." goes through the normal speak/store path, so it is stored while muted. - #60: host_tab resolves to the newest session of the tab with a question set (stepping or read in order) and stops there, so an older session of the same tab is never acted on. - #61: matching folds the text to letters and digits with no separators, so a long token the terminal cut mid-word still matches (the 20-character prefix minimum stays). - A set read in order no longer restarts the question that is being read when the screen shows it. - In a host tab the hook sends channel_open (with host_tab) before an AskUserQuestion's questions, so a runtime started mid-turn still knows the session's tab (new golden case, a deliberate mapping change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
Owner decision (2026-10-16): once a host reports the screen for a set read in order (question_step off), only the question on screen is read. Sonara stops at its end, never reads on into a question the screen does not show, and a different question on screen stops the one being read at once. The same question again does nothing; the review line is read only on the review screen. A set no host reports is still read in order (#322); the mute rules stay. L2 gets entries set aside (Router::set_aside): kept in the batch, never fed (not by a replay either), not unread. L3 sets aside every question of a followed set but the one on screen (Rules::read_set_aside). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
…n being read Question-follow switched to the session whose question was shown, cut the message being read and read it again from the start once the question was answered. The set still follows the screen; the question is read when its session is. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
…saves what is sent to the device A key's sound (the flush sound) plays at once and was not in the earcon schedule, so the session_change chime and the announcement started under it. What follows a key's sound now waits for it and 0.3 s. SONARA_AUDIO_DUMP=<folder> writes every speech chunk and clip handed to the output as a WAV, with a timeline, to tell a clipped first word from one lost after the audio is sent. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
…t the default rate At Sonara's default rate (Kokoro speed 1.25) the model dropped an unstressed schwa that starts a sentence: "Agreed" was heard as "greed", "A real" as "real". The dumped audio showed the sound was missing before the output, not lost in it. That schwa now gets a primary stress. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59
…'s end The screen moving to another question (an answer, Tab, arrows) jumped straight to it and skipped the rest of the text before the questions. Now the message is read to its end and the question on screen follows, in both question_step modes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TJ8AkowszQHZvUwSrUS7wp
Maxaubert
force-pushed
the
feat/question-follow
branch
from
October 25, 2026 10:37
ee38d7e to
250fe18
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #323. Sonara side of the approved plan
docs/plans/2026-10-16-question-follow.md; the PrismTerminal side follows in its repo.Claude Code tells plugins nothing while the user moves between the questions of one AskUserQuestion. A terminal that draws the widget can: the new
agentmessagequestion_shown(protocol 1.12) carries the question on screen, and Sonara reads it.{channel | host_tab, text}or{..., review: true}.host_tabis the terminal tab the hook already reports (PRISM_TAB_ID), so PrismTerminal only needs its own tab id; the newest session of that tab with a match is used.question_stepon, the set lands on that question (asnext_question); off, the reading goes on from that question's entry. The current question, an unknown text and a set already reviewed do nothing. The review screen says "Review your answers." once per set.moved, pluschannel,question,of(orreview).questionShown(TSAgentApi) andquestion_shown(Python).Tests
test_question_shown_follows_the_question_on_screen,test_question_shown_finds_the_session_by_its_terminal_tab. SDK namespace tests (TS 39/39, Python).python packaging/gate.py --keep-going: all pass except thetests/embedcurl example (local only).Docs: protocol-v1 (message, 1.12), README (Prism follows the questions). Version 0.33.0. Releases are unsigned.
🤖 Generated with Claude Code
https://claude.ai/code/session_014cnwwWNiEmM5ghBD933h59