fix(app): the dashboard keeps each run's events, each answer's own times, and only its session's captions

- Each start gets a new dashboard; stop ends the event feeding and waits for
  it before forgetting, so queued or earlier-run events never reach the
  screen.
- AnswerAsked carries the request's speech end and final times, so a second
  waiting question does not change the first answer's timing.
- Captions are shown only while Jarvis is in a voice channel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-12 13:55:44 +09:00
parent 0973ad9815
commit 371e87f553
6 changed files with 132 additions and 58 deletions

View File

@@ -145,8 +145,9 @@ and the late "left" update cancelled the new join (seen on real Discord).
`SpeakStart` and `SpeakEnd`; `Stopped` when all speech is stopped (`stop()`, the slash command or the
session ending), sent before the `SpeakEnd`s it causes; `Joined` and `Left` (with a reason: `command`,
`moved`, `disconnected`, `shutdown`); `Addressed` and `Ranked` with the brain's answers to `ask_addressed` and `ask_rank`. `WorkerLost` when the voice worker connection ends: the finals of utterances in progress will not
come, and the restarted worker numbers utterances afresh. `AnswerAsked { id, user }` when
`answer(user, ..)` queued speech `id` (the dashboard times answers by it, `admin.spec.md`).
come, and the restarted worker numbers utterances afresh. `AnswerAsked { id, user, ended_at,
final_at }` when `answer(user, text, heard)` queued speech `id` for a request whose speech ended
and whose final arrived at those times (the dashboard times answers by it, `admin.spec.md`).
`voice_members()` lists the people in Jarvis's voice channel that it hears (ID and display name),
the same set reported to the worker.
- **Speaking**: `say(text, more)` queues a TTS request and returns its id (`None` when not in a voice