Skip to content

perf(drawer): stop caption deltas rebuilding the voice board - #235

Merged
Tarquinen merged 2 commits into
devfrom
voice-board-input
Nov 21, 2026
Merged

Tarquinen merged 2 commits into
devfrom
voice-board-input

Conversation

@Tarquinen

@Tarquinen Tarquinen commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

During a voice call, every caption word made Home build the drawer status for the call twice, once before the action and once after, to see whether it changed. Now Home compares a small input (VoiceSessionBoardInput: status, sessions, active IDs, parents, pins, the open session and Developer Mode's home) and builds the board only when that input changes. Ports iOS #296 (8162a47d). The watcher also moved to run after Catch Up reconciles. Before, after the current card was deleted from another device, the board could be published without the next card's directory. That hole was on dev too.

Nothing visible changes, so no media. Verified on the Android VM: the full scripts/check.sh passes. The ported iOS test captionDeltasNeverRebuildTheBoard checks publish counts and that each tested input change also changes the input; it passes without the fix too, because dev publishes the same number of times. The extended Catch Up deletion test fails without the watcher move and passes with it.

During a call Home rebuilt the voice session board twice on every action,
including each caption delta (20-30 a second): it filtered unread sessions,
worked out busy and attention directories and built a new board, only to
find it equal to the last one.

Now Home compares a cheap VoiceSessionBoardInput (status without busy,
sessions, active IDs, parent sources, pinned keys, the open session and the
Developer Mode home state) and builds and publishes the board only when that
changes. Ports iOS #296 (8162a47d).

Verified: vm.sh check (full) passes. Ported captionDeltasNeverRebuildTheBoard:
200 deltas publish nothing, attention refreshes publish once each, and every
field the board reads changes the input too. On the VM JVM the per-action
cost dropped from about 11/33/170 us (50/200/1000 sessions) to about 0.4 us.
The voice board watcher sat on the detail reducer, which runs before Catch Up
reconciles. After the current card was deleted from another device, the board
was published before Catch Up opened the next card, so the next card's
directory could be missing. The watcher now sits in fullBody() beside the
streamFocusSessionIDs watcher. This hole was there on dev too.

The ported voice board test now also varies manually unread keys, the open
session, family sessions, connection state, the server and Developer Mode.
The drawer parity row names voiceSessionBoardInput.

Verified on the Android VM: full scripts/check.sh passes.
CatchUpTests.theCardCatchUpOpensAfterADeletionIsStreamFocused fails without
the move and passes with it.
@Tarquinen
Tarquinen merged commit 60bb91c into dev Nov 21, 2026
2 checks passed
@Tarquinen
Tarquinen deleted the voice-board-input branch November 21, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant