Skip to content

🎨 Palette: Add transcription status indicator#49

Open
Whamp wants to merge 1 commit intomainfrom
palette/transcription-status-indicator-16728899072193721130
Open

🎨 Palette: Add transcription status indicator#49
Whamp wants to merge 1 commit intomainfrom
palette/transcription-status-indicator-16728899072193721130

Conversation

@Whamp
Copy link
Owner

@Whamp Whamp commented Jan 31, 2026

User description

💡 What: Added a "Transcribing..." visual status indicator in the CLI.
🎯 Why: Users previously had no visual feedback during the transcription phase, leading to uncertainty about whether the app was working.
📸 Before/After: (CLI change) Before: Silent pause. After: Yellow "Transcribing..." spinner.
♿ Accessibility: Provides visual confirmation of background activity for sighted users relying on the terminal.


PR created automatically by Jules for task 16728899072193721130 started by @Whamp


PR Type

Enhancement


Description

  • Add visual "Transcribing..." status indicator during transcription

  • Expose self.console in ChirpApp for consistent UI updates

  • Add comprehensive UI tests for transcription status behavior

  • Document learning about CLI user feedback patterns


Diagram Walkthrough

flowchart LR
  A["ChirpApp initialization"] -- "expose console" --> B["self.console instance"]
  C["_transcribe_and_inject method"] -- "wrap with status" --> D["console.status context"]
  D -- "shows spinner" --> E["Yellow Transcribing indicator"]
  F["Test suite"] -- "verifies" --> E
Loading

File Walkthrough

Relevant files
Enhancement
main.py
Add transcription status indicator to ChirpApp                     

src/chirp/main.py

  • Refactored local console variable to instance variable self.console
    for reusability
  • Wrapped parakeet.transcribe() call with console.status() context
    manager showing "Transcribing..." spinner
  • Maintains existing console initialization logic from RichHandler or
    creates new Console instance
+7/-6     
Tests
test_chirp_ui.py
Add UI tests for transcription status indicator                   

tests/test_chirp_ui.py

  • Created new test file for UI behavior verification
  • Added TestChirpUI class with test_transcription_status_indicator test
    method
  • Mocks all ChirpApp dependencies (ParakeetManager, AudioCapture,
    AudioFeedback, etc.)
  • Verifies that console.status() is called with "Transcribing..." text
    and "dots" spinner during transcription
+91/-0   
Documentation
palette.md
Document CLI feedback pattern learning                                     

.jules/palette.md

  • Documents learning about CLI user experience with long-running
    operations
  • Establishes pattern to wrap blocking tasks (>1s) with console.status()
    for visual feedback
  • Provides actionable guidance for future CLI enhancements
+3/-0     

- Wraps the transcription process in a `rich.console.status` context manager.
- Refactors `ChirpApp` to expose `self.console` for consistent UI updates.
- Adds `tests/test_chirp_ui.py` to verify the UI status behavior.

Co-authored-by: Whamp <1115485+Whamp@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 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.

@qodo-code-review
Copy link

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Mock TextInjector to avoid side effects

Add @patch("chirp.main.TextInjector") to the test method's decorators to mock
the TextInjector and prevent side effects during testing.

tests/test_chirp_ui.py [20-24]

+@patch("chirp.main.TextInjector")
 @patch("chirp.main.ParakeetManager")
 @patch("chirp.main.AudioCapture")
 @patch("chirp.main.AudioFeedback")
 @patch("chirp.main.KeyboardShortcutManager")
 @patch("chirp.main.ConfigManager")
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out that TextInjector is not mocked, which could lead to unintended side effects like clipboard modification during the test run, and proposes patching it to ensure proper test isolation.

Medium
General
Use a more idiomatic mock assertion

Refactor the test assertion to use mock_console.status.assert_any_call() instead
of manually iterating through call_args_list for a more concise and idiomatic
check.

tests/test_chirp_ui.py [77-88]

 # Verify status was called with "Transcribing..."
 # Note: app._transcribe_and_inject calls app.parakeet.transcribe
 # We want to check that console.status("Transcribing...", spinner="dots") was entered.
 
-status_calls = mock_console.status.call_args_list
-transcribing_called = False
-for args, kwargs in status_calls:
-    if "Transcribing..." in args[0] and kwargs.get("spinner") == "dots":
-        transcribing_called = True
-        break
+mock_console.status.assert_any_call(
+    "[bold yellow]Transcribing...[/bold yellow]",
+    spinner="dots"
+)
 
-self.assertTrue(transcribing_called, "Console status 'Transcribing...' was not triggered.")
-
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies a verbose test assertion and replaces it with the more idiomatic and concise assert_any_call, improving test readability and precision.

Low
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant