Files
buzz/mobile/lib/shared
Diem Nguyen 133c883b8c fix(mobile): confirm before starting a Huddle from the header (#9155)
Tapping the headphones button in a channel header used to start a Huddle
straight away, which turned on the microphone and posted "Huddle
started" to the channel. The button is easy to hit by accident. Now,
when no Huddle is running there, the button asks "Start a Huddle?"
first, with Cancel and Start Huddle.

- `showConfirmation` in `shared/widgets/confirmation_dialog.dart` adds a
non-destructive mode to the shared confirm helper.
`showDestructiveConfirmation` now calls it with `destructive: true`, so
existing callers behave the same. On iOS the native UIKit alert reads a
new `destructive` argument and uses `.default` style instead of
`.destructive` when it's false. On other platforms the confirm button
keeps the default `FilledButton` style instead of the error color.
- `_huddleNavigationAction` asks before calling `start`. That covers
both the Material header button and the iOS native navigation action.
Opening or joining a Huddle that's already running stays one tap, and so
do the explicit "Start new" buttons inside the Huddle sheets.

Companion to block/buzz-app#2687, which adds the same confirmation on
desktop. buzz-app#2660 also moves the desktop button away from the
members button, but there's no equivalent move on mobile: the headphones
is the only action in the header.

### Screenshots

Rendered by a scratch widget test from the real `ChannelDetailPage`
(Android/Material path, Inter loaded) at 390×844. The scratch test has
been removed. On iOS, the same confirmation shows as a native UIKit
alert, which isn't captured here because this machine has no iOS
Simulator.

Before: tapping the headphones goes straight into a call.

<img
src="https://github.com/user-attachments/assets/adced280-2abd-44ad-a079-1c83749892a0"
width="300" alt="Before">

After, light and dark, cropped to the new dialog:

| Light | Dark |
| --- | --- |
| ![After,
light](https://github.com/user-attachments/assets/2e7c5bc3-ebd9-451b-9b20-5d916947722c)
| ![After,
dark](https://github.com/user-attachments/assets/999c1798-9d91-4b83-b8c2-eb8490da6bf0)
|

### Validation

- The existing journey "community transition cancels and awaits an
in-flight Huddle start" now taps the button and checks that the dialog
appears, that Cancel closes it without publishing anything, and that
tapping again and choosing Start Huddle starts the call. With the
confirm removed, this test fails.
- `channel_member_profile_actions_test` checks that destructive
confirmations still send `destructive: true` to the iOS bridge.
- Full `flutter test`: 4,508 passed. `flutter analyze` and `dart format`
are clean.
- Not yet checked: the iOS native alert on a device or simulator, and a
human trying it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Diem Nguyen <diem@squareup.com>
Co-authored-by: Fizz <6be7be23ec5bba868f3e1db5ec86013d76bd1a293dce5b435a192158fec13641@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:33:07 -08:00
..