Skip to content

ECHO-930 feat(participant): prevent double start recording and track actual recording start time - #990

Merged
ussaama merged 1 commit into
mainfrom
feat/recording-started-at-and-double-start-guards
Aug 11, 2026
Merged

ECHO-930 feat(participant): prevent double start recording and track actual recording start time#990
ussaama merged 1 commit into
mainfrom
feat/recording-started-at-and-double-start-guards

Conversation

@ussaama

@ussaama ussaama commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Double-start guards in the portal:

  • ref latch on the initiate form (submit + skipOnboarding auto-submit) so a fast double click creates one conversation, not two; the auto-submit path now reuses startConversation and gains the missing conversation_started event
  • re-entrancy latch and cancellation token in useChunkedAudioRecorder: a second tap during the mic prompt is a no-op, stopping during the prompt releases the acquired stream, and a failed start rolls back recorder, stream, and meter state so retries keep working
  • recording_started analytics and the wake lock only fire when recording actually starts

recording_started_at:

  • new nullable conversation.recording_started_at column (Directus snapshot)
  • primary source: the first liveness ping with state "recording" persists the server-clocked start (same signal the live monitor already uses); the first audio chunk is the fallback, clamped to [created_at, now + 5m] and stored UTC
  • one conditional PATCH enforces the rules in the filter itself: uploads are never stamped, the server-clocked liveness value may move the stamp earlier, and the client-clocked chunk value only fills an empty one
  • text chunks and dashboard uploads never stamp; the conversations BFF retries without the field if the column is not deployed yet
  • dashboard lists and the detail panel display recording_started_at with a created_at fallback; sorting stays on created_at (accepted trade-off)
  • translations added for nl, de, fr, es; cs, it, uk fall back to English

…cording start time

Double-start guards in the portal:
- ref latch on the initiate form (submit + skipOnboarding auto-submit) so a
  fast double click creates one conversation, not two; the auto-submit path
  now reuses startConversation and gains the missing conversation_started event
- re-entrancy latch and cancellation token in useChunkedAudioRecorder: a second
  tap during the mic prompt is a no-op, stopping during the prompt releases the
  acquired stream, and a failed start rolls back recorder, stream, and meter
  state so retries keep working
- recording_started analytics and the wake lock only fire when recording
  actually starts

recording_started_at:
- new nullable conversation.recording_started_at column (Directus snapshot)
- primary source: the first liveness ping with state "recording" persists the
  server-clocked start (same signal the live monitor already uses); the first
  audio chunk is the fallback, clamped to [created_at, now + 5m] and stored UTC
- one conditional PATCH enforces the rules in the filter itself: uploads are
  never stamped, the server-clocked liveness value may move the stamp earlier,
  and the client-clocked chunk value only fills an empty one
- text chunks and dashboard uploads never stamp; the conversations BFF retries
  without the field if the column is not deployed yet
- dashboard lists and the detail panel display recording_started_at with a
  created_at fallback; sorting stays on created_at (accepted trade-off)
- translations added for nl, de, fr, es; cs, it, uk fall back to English
@linear

linear Bot commented Aug 11, 2026

Copy link
Copy Markdown

ECHO-930

@github-actions

Copy link
Copy Markdown
Contributor

Hi !

Thank you for contributing to Dembrane ECHO! Before we consider your Pull Request, we ask that you sign our Contributor License Agreement (CLA). This is only required for your first Pull Request.

Please review the CLA, and sign it by adding your GitHub username to the contributors.yml file. Thanks!

@ussaama
ussaama merged commit e51326d into main Aug 11, 2026
11 checks passed
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