-
-
Notifications
You must be signed in to change notification settings - Fork 167
feat(speakers): let one person own several clusters, correctly #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Optic00
merged 6 commits into
stenolabs:feat/speaker-diarization
from
Optic00:feat/speaker-many-to-one
Aug 5, 2026
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
467281f
feat(speakers): make one person owning several clusters the easy, cor…
Optic00 97e778f
fix(speakers): rebuild a cluster's evidence instead of stacking it
Optic00 da98bd3
fix(speakers): offer the excerpts whose quote and clip cover the same…
Optic00 bf93380
docs(speakers): spec the run-provenance and review-state slice
Optic00 1158873
fix(speakers): a clip too short to place a voice earns no preference
Optic00 9f197d3
fix(e2e): give the sample clip a duration, so "toggling to stop" has …
Optic00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { describe, expect, it } from 'vitest'; | ||
|
|
||
| import { orderProfilesForRow } from './SpeakerReviewPanel'; | ||
|
|
||
| const p = (display_name: string) => ({ display_name, person_id: `id-${display_name.toLowerCase()}` }); | ||
|
|
||
| describe('orderProfilesForRow', () => { | ||
| it('puts people already assigned in this meeting first', () => { | ||
| const ordered = orderProfilesForRow( | ||
| [p('Zoe'), p('Alice'), p('Max')], | ||
| new Set(['id-max']), | ||
| ); | ||
| expect(ordered.map((x) => x.display_name)).toEqual(['Max', 'Alice', 'Zoe']); | ||
| }); | ||
|
|
||
| it('keeps each group alphabetical', () => { | ||
| const ordered = orderProfilesForRow( | ||
| [p('Zoe'), p('Alice'), p('Max'), p('Bea')], | ||
| new Set(['id-max', 'id-zoe']), | ||
| ); | ||
| expect(ordered.map((x) => x.display_name)).toEqual(['Max', 'Zoe', 'Alice', 'Bea']); | ||
| }); | ||
|
|
||
| it('leaves the order alone when nobody is assigned yet', () => { | ||
| const ordered = orderProfilesForRow([p('Zoe'), p('Alice')], new Set()); | ||
| expect(ordered.map((x) => x.display_name)).toEqual(['Alice', 'Zoe']); | ||
| }); | ||
|
|
||
| it('does not mutate the list it was given', () => { | ||
| const input = [p('Zoe'), p('Alice')]; | ||
| orderProfilesForRow(input, new Set(['id-alice'])); | ||
| expect(input.map((x) => x.display_name)).toEqual(['Zoe', 'Alice']); | ||
| }); | ||
| }); | ||
|
|
||
| describe('orderProfilesForRow identity', () => { | ||
| it('matches on person_id, not on the display name', () => { | ||
| // Two profiles can read alike after a rename. Marking the never-assigned | ||
| // one as present in this meeting would invite the exact misassignment | ||
| // the "here" hint exists to prevent. | ||
| const assigned = { display_name: 'Alex', person_id: 'id-a' }; | ||
| const other = { display_name: 'Alex', person_id: 'id-b' }; | ||
| const ordered = orderProfilesForRow([other, assigned], new Set(['id-a'])); | ||
| expect(ordered.map((x) => x.person_id)).toEqual(['id-a', 'id-b']); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: The Change picker ordering is recomputed per row render, so larger meetings repeatedly sort the same profiles list and can make the panel feel slower. Reusing one precomputed/memoized ordered profile list for all rows would keep behavior the same with less render work.
Prompt for AI agents