Skip to content

🎨 Palette: Add critical red warning to speaker delete action#459

Draft
EffortlessSteven wants to merge 1 commit intomainfrom
palette-red-delete-speaker-prompt-12737496808467700653
Draft

🎨 Palette: Add critical red warning to speaker delete action#459
EffortlessSteven wants to merge 1 commit intomainfrom
palette-red-delete-speaker-prompt-12737496808467700653

Conversation

@EffortlessSteven
Copy link
Copy Markdown
Member

πŸ’‘ What: Made the delete action warning red in the prompt.
🎯 Why: Brings consistency to destructive action warnings to make sure they are clearly seen by users.
πŸ“Έ Before/After: Not visual in browser, visual in terminal prompt.
β™Ώ Accessibility: Improves visual salience of non-recoverable actions.


PR created automatically by Jules for task 12737496808467700653 started by @EffortlessSteven

πŸ’‘ What: Made the delete action warning red in the prompt.
🎯 Why: Brings consistency to destructive action warnings to make sure they are clearly seen by users.
πŸ“Έ Before/After: Not visual in browser, visual in terminal prompt.
β™Ώ Accessibility: Improves visual salience of non-recoverable actions.
@google-labs-jules
Copy link
Copy Markdown

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 10, 2026

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 10 minutes and 13 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 10 minutes and 13 seconds.

βŒ› How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fd8e4a2f-30cc-40eb-951c-a09afd62c6d2

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 23d833f and 02ed94e.

πŸ“’ Files selected for processing (2)
  • tests/test_speaker_identity.py
  • transcription/speaker_identity.py
✨ Finishing Touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-red-delete-speaker-prompt-12737496808467700653

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds unit tests for the interactive speaker deletion command and introduces a colorized warning message to the deletion prompt to alert users that the action is irreversible. A review comment suggests refactoring the new tests into a class to maintain consistency with the existing test organization in the file and consolidating imports for better maintainability.

Comment on lines +680 to +723
def test_handle_delete_command_interactive(
registry: SpeakerRegistry, sample_embedding: np.ndarray, monkeypatch
):
"""Should delete speaker interactively when user inputs 'y'."""
import argparse

from transcription.speaker_identity import _handle_delete

speaker_id = registry.register_speaker("Test Speaker", sample_embedding)
args = argparse.Namespace(speaker_id=speaker_id, force=False)

# Mock sys.stdin.isatty to simulate interactive terminal
monkeypatch.setattr("sys.stdin.isatty", lambda: True)

# Mock input to return 'y'
monkeypatch.setattr("builtins.input", lambda prompt: "y")

result = _handle_delete(registry, args)

assert result == 0
assert registry.get_speaker(speaker_id) is None


def test_handle_delete_command_interactive_abort(
registry: SpeakerRegistry, sample_embedding: np.ndarray, monkeypatch
):
"""Should not delete speaker interactively when user inputs 'n'."""
import argparse

from transcription.speaker_identity import _handle_delete

speaker_id = registry.register_speaker("Test Speaker", sample_embedding)
args = argparse.Namespace(speaker_id=speaker_id, force=False)

# Mock sys.stdin.isatty to simulate interactive terminal
monkeypatch.setattr("sys.stdin.isatty", lambda: True)

# Mock input to return 'n'
monkeypatch.setattr("builtins.input", lambda prompt: "n")

result = _handle_delete(registry, args)

assert result == 0
assert registry.get_speaker(speaker_id) is not None
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The new tests for the delete command are added as module-level functions, which deviates from the organizational pattern established in the rest of the file where tests are grouped into classes (e.g., TestSpeakerRegistry, TestIdentityMapping). For better maintainability and consistency, these tests should be encapsulated within a class, such as TestSpeakerCLI. Additionally, common imports like argparse and _handle_delete can be consolidated at the top of the class or module.

References
  1. Maintain consistency with existing code structure and organizational patterns within the file. (link)

@github-actions
Copy link
Copy Markdown

Benchmark Results

Commit: 29f7d8790b3fab1482a9643bf05df5cc5f50569e
Sample Limit: 5

Baseline Comparison

Track Metric Current Baseline Regression Threshold Status
ASR wer 0.0000% 5.0000% -100.0% 50% βœ…
cer 0.0000% 2.0000% -100.0% 50% βœ…

Overall: βœ… All metrics within thresholds


Details
  • Workflow run: #437
  • Artifacts: benchmark-results-24221656738
  • Mode: Report-only (regressions do not block merge)

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

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