Restore speaker context and participant lookups broken by a SQL syntax error

GE
23d ago
+32-1

Summary

Intent: Since 1.4.30, SESSION_REMOTE_PARTICIPANT_IDS_SQL has one closing parenthesis too many (added with the additional-email match in #8044), so SQLite rejects it with near ")": syntax error. Remove it so speaker context capture and the remote participant lookups work again.

Found on desktop 1.4.34: every recording since 1.4.30 stored speaker_context as {"intervals":[]}, and the app logged a console error on each 5 s capture poll, so the owner's mic voices stay "Speaker N" even with a headset. useSessionParticipantHumanIds and getSessionTranscriptRenderRequest use the same query and get no participants or an error instead.

Demo

N/A — no UI of its own to show; the regression test reproduces the SQLite error, and a 1.4.34 test recording kept an empty speaker_context while the app logged an error every 5 s.

Verification

  • New regression test runs the query on in-memory SQLite (owner, a calendar copy, an additional-email copy, one remote person): fails with near ")": syntax error without the fix and returns only the remote person with it.
  • Ran the 1.4.29, 1.4.34 and fixed queries against a local 1.4.34 database: the fixed query returns the same participants as 1.4.29.
  • pnpm -F @anlg/desktop test: 4222 passed. pnpm -F @anlg/desktop typecheck: passed.
  • oxlint on the changed files: no errors (one existing warning in unchanged code). dprint check on the changed files: passed.
  • Not run: a desktop build with a live recording, i18n validation, the license-boundary checks.

Summary by cubic

Fixes a SQL syntax error in SESSION_REMOTE_PARTICIPANT_IDS_SQL that since 1.4.30 made SQLite reject the query, so speaker context capture always failed and remote participant lookups returned no participants.

  • Removes one extra closing parenthesis introduced with the additional-email match in #8044.
  • Adds a regression test that runs the query on in-memory SQLite.