Skip to content

fix: speaker assignment not saving when selected from dropdown#4863

Open
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1775054053-fix-speaker-assignment
Open

fix: speaker assignment not saving when selected from dropdown#4863
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin/1775054053-fix-speaker-assignment

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Apr 1, 2026

Summary

Fixes #4860. Two bugs in the Rust transcript rendering pipeline prevented user-selected speaker assignments from taking effect:

  1. Assignment ordering: Auto-generated channel assignments (derived from the participant list) were appended after user assignments. Since HashMap::insert overwrites, the auto values silently replaced user choices. Fix: auto assignments are now inserted first so user assignments win.

  2. complete_channels gate: apply_identity_rules and assign_channel_human_id (formerly assign_complete_channel_human_id) both required the channel to be in complete_channels before applying a channel-wide assignment. RemoteParty is only marked complete for exactly-2-participant meetings, so any manual speaker assignment on RemoteParty in 3+ participant meetings was silently dropped. Fix: remove the complete_channels gate from both functions, and rename the function to reflect its new behavior.

Review & Testing Checklist for Human

  • Verify remember_identity asymmetry is safe: remember_identity (speakers.rs ~L155) still gates carry-forward propagation on complete_channels. This is intentionally left to prevent runtime words on non-complete channels from dynamically overwriting channel assignments — but confirm this doesn't cause assignments to "forget" on later segments that rely on carry-forward rather than direct lookup.
  • Regression-test the 2-participant case: The common case (self + 1 remote) should still auto-assign labels correctly without user interaction. The ordering change means auto assignments are now processed first instead of last — verify labels still appear correctly.
  • Manual end-to-end test: Open a transcript with multiple speakers, click a "Speaker N" label, select a person from the dropdown, and verify the label updates and persists across page navigation.
  • Test 3+ participant meetings: Since the complete_channels gate was the root cause for multi-participant meetings, specifically test a meeting with 3+ participants to confirm speaker assignment sticks.

Notes

  • All 62 Rust unit tests pass (60 existing + 2 new covering both bug scenarios).
  • assign_complete_channel_human_id was renamed to assign_channel_human_id to accurately reflect that it no longer checks channel completeness.

Link to Devin session: https://app.devin.ai/sessions/9d98abf7a843457cafc59d03a88e83e9
Requested by: @ComputelessComputer

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit 372245a
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69d459458be05c0009649fe0

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for char-cli-web canceled.

Name Link
🔨 Latest commit 372245a
🔍 Latest deploy log https://app.netlify.com/projects/char-cli-web/deploys/69d459459305a300084b8a32

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment on lines 91 to 96
}

let channel = segment.key.channel;
if !state.complete_channels.contains(&channel) {
return;
}

if let Some(human_id) = state.human_id_by_channel.get(&channel) {
segment.key = SegmentKey {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Intentional asymmetry: complete_channels guard kept in remember_identity but removed elsewhere

The complete_channels guard was removed from apply_identity_rules (line 119) and assign_complete_channel_human_id (line 93), but intentionally kept in remember_identity at line 155. This creates an asymmetry: reading channel identity (applying assignments to words/segments) no longer requires complete_channels, but writing channel identity at runtime (updating human_id_by_channel based on resolved word identities) still does. This prevents runtime words on non-complete channels from dynamically overwriting carefully set channel assignments. The asymmetry appears intentional but is worth documenting, as the function name assign_complete_channel_human_id no longer accurately describes its behavior — it now assigns channel human_id regardless of completeness.

(Refers to lines 88-101)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Two issues in the Rust transcript rendering pipeline:

1. Auto-generated channel assignments (from participant list) were appended
   AFTER user assignments, causing HashMap::insert to overwrite user choices
   with auto-generated ones. Fix: reverse ordering so user assignments are
   processed last and take priority.

2. Channel-scoped assignments were gated by complete_channels, which only
   includes RemoteParty for exactly 2-participant meetings. For 3+ participant
   meetings without speaker diarization, user assignments on RemoteParty were
   silently ignored. Fix: remove the complete_channels gate from
   apply_identity_rules and assign_complete_channel_human_id so channel-wide
   assignments are always applied.

Closes #4860

Co-Authored-By: John <john@hyprnote.com>
@devin-ai-integration devin-ai-integration bot force-pushed the devin/1775054053-fix-speaker-assignment branch from 6bb60a4 to b7441b6 Compare April 7, 2026 00:23
…uman_id

Co-Authored-By: John <john@hyprnote.com>
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.

Speaker assignment not saving when selected from dropdown

1 participant