Skip to content

[#74] Warn on analysis tab when speakers are unnamed#75

Merged
julien731 merged 4 commits into
mainfrom
feature/74-warn-unnamed-speakers-on-analysis
May 29, 2026
Merged

[#74] Warn on analysis tab when speakers are unnamed#75
julien731 merged 4 commits into
mainfrom
feature/74-warn-unnamed-speakers-on-analysis

Conversation

@julien731

Copy link
Copy Markdown
Member

Closes #74

Summary

Adds a visible notice to the Analysis tab that surfaces when one or more speakers still carry raw diarization labels (e.g., SPEAKER_00, UNKNOWN). Without the notice it is easy to generate an LLM prompt that contains those raw IDs in place of meaningful names.

Approach

  • Reused the existing isUnidentifiedSpeaker() helper from frontend/js/utils.js and the .overview-notice banner pattern already used by the Overview tab, so visual styling stays consistent across tabs and benefits from dark/light theming for free.
  • Two small helpers were added to analysis-viewer.js:
    • getUnnamedSpeakersInfo() reads window._speakerEditorState (populated by transcript-viewer.renderSegments() when the meeting loads) and returns { unnamed, total }. An inline comment documents that cross-component dependency so a future refactor flags this read site.
    • renderUnnamedSpeakersWarning() returns the banner HTML if unnamed > 0, otherwise empty.
  • The banner is prepended in both renderAnalysisTab() (initial view) and renderPromptContent() (post-generate view). Keeping it visible after Generate Prompt was an intentional choice — it's most useful precisely when the user is about to copy the prompt with raw labels embedded.
  • A small .analysis-warning margin override and inline <code> styling were added to frontend/css/styles.css; the base banner appearance comes from .overview-notice.

Plan: docs/plans/74-warn-unnamed-speakers-on-analysis.md.

Verification

Manual browser smoke-test against the running dev server:

  • Meeting with 5/5 unnamed speakers → banner shows "5 of 5 speakers are still unnamed. Rename them on the Transcript tab — the generated prompt will use raw labels like SPEAKER_00 until you do." both before and after clicking Generate Prompt.
  • Meeting with all speakers named → no banner rendered.
  • Counter copy is singular/plural-correct (verb and noun).
  • ruff check . passes (no Python changes, but verified).

No frontend test framework exists in this repo, so no automated tests were added.

julien731 added 2 commits May 29, 2026 18:48
Plan for surfacing a warning on the Analysis tab when one or more speakers still carry raw diarization labels.
Surface a notice at the top of the Analysis tab listing how many speakers still carry raw diarization labels (SPEAKER_xx / UNKNOWN). The notice persists after Generate Prompt so users who copy the generated prompt are reminded that it contains raw labels until they rename speakers on the Transcript tab.
@julien731 julien731 added the feature New feature or enhancement label May 29, 2026
@julien731 julien731 self-assigned this May 29, 2026
julien731 added 2 commits May 29, 2026 19:03
Replace the subtle .overview-notice borrow with a dedicated, higher-contrast banner: warning-tinted background, full warning-colored border (1px + 4px left accent), full-strength text color (was muted), 14px body with a bold lead-in count, and a ⚠ icon. Role upgraded from status to alert. Works in both themes via existing CSS tokens.
Move getUnnamedSpeakersInfo/renderUnnamedSpeakersWarning into utils.js so both the Analysis and Plain Text tabs can render the same warning. Rename CSS classes from analysis-warning to unnamed-speakers-warning to match shared usage. Copy generalized from 'generated prompt' to 'copied text' so it reads correctly for plain text exports too.
@julien731 julien731 merged commit 12adf45 into main May 29, 2026
2 checks passed
@julien731 julien731 deleted the feature/74-warn-unnamed-speakers-on-analysis branch May 29, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show a warning on the meeting analysis screen if the speakers have not yet been labeled

1 participant