[#74] Warn on analysis tab when speakers are unnamed#75
Merged
Conversation
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.
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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
isUnidentifiedSpeaker()helper fromfrontend/js/utils.jsand the.overview-noticebanner pattern already used by the Overview tab, so visual styling stays consistent across tabs and benefits from dark/light theming for free.analysis-viewer.js:getUnnamedSpeakersInfo()readswindow._speakerEditorState(populated bytranscript-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 ifunnamed > 0, otherwise empty.renderAnalysisTab()(initial view) andrenderPromptContent()(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..analysis-warningmargin override and inline<code>styling were added tofrontend/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:
SPEAKER_00until you do." both before and after clicking Generate Prompt.ruff check .passes (no Python changes, but verified).No frontend test framework exists in this repo, so no automated tests were added.