Skip to content

Comments

feat:Implemented the new control layout with animated mic ripple and …#15

Merged
fbraza merged 1 commit intomainfrom
feature/controls-issue-4
Sep 30, 2025
Merged

feat:Implemented the new control layout with animated mic ripple and …#15
fbraza merged 1 commit intomainfrom
feature/controls-issue-4

Conversation

@fbraza
Copy link
Contributor

@fbraza fbraza commented Sep 30, 2025

Description

Mic Button & Animation

  • Rebuilt the control row to center a gradient Icons.mic button that launches/stops recording.
  • When RecordingState.recording, a 3-layer pulse animation loops via AnimationController to mimic the reference ripple; paused/stopped states halt the animation so the mic stays calm.

Contextual Actions

  • Added side buttons that fade in only while a session is active (recording or paused): left toggles pause/ resume, right discards via a trash icon. Idle/stopped states hide both, keeping the mic centered.
  • Updated the screen wiring to provide explicit callbacks (_handleMicTap, pause/resume/discard) and revised the ViewModel to manage a RecordingState enum plus discardRecording().

State Logic Enhancements

  • ViewModel now tracks recordingState, resets timers on stop/discard, and clears waveform data when discarding
    for a clean restart.

Tests & Dependencies

  • Expanded unit tests to cover the new state transitions and discard behavior; added widget tests verifying button visibility/toggling with localization support.
  • Added flutter_localizations for tooltip/localization needs referenced by the controls
  • flutter test passes.

@fbraza fbraza merged commit 553348a into main Sep 30, 2025
2 checks passed
@fbraza fbraza mentioned this pull request Sep 30, 2025
4 tasks
Copy link

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

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.

ℹ️ 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

Comment on lines 65 to 67
_waveformTick,
(_) => _pushWaveformSample(model),
);

Choose a reason for hiding this comment

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

[P1] Waveform continues updating while recording is paused or discarded

The new recording state logic clears waveformData and resets the timer when a session is paused, stopped, or discarded, but _VoiceToTextViewState still schedules _waveformTimer in initState and never cancels or gates it based on recordingState. As a result, _pushWaveformSample keeps publishing random samples even after discardRecording() has emptied the waveform or when the state is paused/stopped, so the UI immediately repopulates with a live waveform and the “clear” action has no visible effect. Consider starting the periodic sampler only while RecordingState.recording or checking the state before pushing samples so the waveform can actually freeze or clear when recording is inactive.

Useful? React with 👍 / 👎.

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