Skip to content

fix(app): the live row counts named people, not diarization ids - #23379

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/live-row-people
Oct 23, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/live-row-people

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

What

Home's live row said "Live · 10s · 343 people". It counted distinct raw speaker ids in the live transcript, and those ids are per-session diarization labels: a long session hands out hundreds. It now counts the people the transcript actually names (the owner plus speakers resolved to the user's people), the same list the live page header shows. The count appears only when at least two people are named.

Regression from #23366 (A4a live row), reported by David on TestFlight 1.0.573.

Tests

test/widgets/episodes_ui_test.dart: 40 unnamed voices never show a people count. 22 tests in the episode and Home suites pass.

Failure-Class: FC-generated-presentation-contract-bypass

UI-Evidence: none -- removes a wrong count from an existing row; no layout change

Risk

Client-only, a one-line count change. Rollback is a revert.

🤖 Generated with Claude Code

View guided diff Turn on auto-fix

Raw speaker ids are per-session diarization labels; a long live session hands out
hundreds, so Home read "343 people". Count the owner plus speakers resolved to the
user's people, the same participants the live page header names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T06:55:04.943894Z 3e986a2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e986a2174

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// the people list changes; the row itself rebuilds every second for its clock.
int _peopleCount(CaptureProvider capture) {
final people = context.read<PeopleProvider?>()?.people ?? SharedPreferencesUtil().cachedPeople;
final key = Object.hash(capture.segmentsPhotosVersion, identityHashCode(people));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Invalidate the count when the people list mutates

When a recognized person is deleted during a live session, PeopleProvider.deletePersonProvider and deletePeople mutate the existing people list in place. Its identity and the transcript version therefore remain unchanged, so this cache keeps returning the old count on every clock rebuild and the row can continue showing the deleted person until another transcript update occurs. Key the cache on a people-list revision/content change or make these mutations replace the list.

Useful? React with 👍 / 👎.

final key = Object.hash(capture.segmentsPhotosVersion, identityHashCode(people));
if (_peopleKey != key) {
_peopleKey = key;
_people = EpisodePresentation.participants(capture.segments, people, context.l10n).length;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Count recognized person IDs rather than display names

When two distinct recognized people share a display name—possible after renaming because the people rename endpoint does not enforce name uniqueness—EpisodePresentation.participants collapses them into its Set<String>. Taking that list's length therefore reports the owner plus one person instead of the owner plus both recognized people. Derive the numeric count from distinct personId values plus the owner rather than from the deduplicated header labels.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit e6b003d into main Oct 23, 2026
49 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/live-row-people branch October 23, 2026 07:20
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