Repository navigation
fix(capture): handle async capture failures in quick actions mute/unmute and home record button (#19245) - #21303
Dragonire9 wants to merge 6 commits into
Conversation
|
Thanks for this — the direction is right and the tests are a welcome addition. I reviewed all four changed files; notes below. app/lib/services/quick_actions_service.dart
app/lib/pages/home/widgets/battery_info_widget.dart
app/test/services/quick_actions_service_test.dart
app/test/widgets/capture_home_ui_test.dart
One caveat for the maintainer merging this: the checks on this PR haven't run a test suite (only the AI reviewer, status neutral), so these new tests haven't been executed by CI yet — worth a local No security, privacy, workflow, or dependency surfaces touched. Leaving for human maintainer review before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
@Git-on-my-level Thank you for the thorough review and helpful design notes! Addressed both items up to commit
Ready for merge whenever convenient! |
|
Follow-up review on
The widget tests in One caveat unchanged from my earlier review: no CI test suite has run on this head, so please run the app tests ( Thanks for the quick turnaround — this looks good from my side pending CI and maintainer merge. by AI on behalf of David — if a human maintainer response is needed, please @Git-on-my-level. |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile bug fix for #19245 (unhandled async capture failures in quick actions / home record button); good scoped diff with tests, but the required 'PR Metadata Preflight' check is currently failing, so holding at approve-only per the hard floor until it's green.
|
Thanks @Dragonire9 — the code change itself looks good, and the regression tests are a nice touch. Notes per file:
One thing blocking the PR Metadata Preflight check — the PR body needs two small additions (the diff itself is fine):
Minor description nit: the summary says This head already has maintainer approval; adding the two body lines should turn the preflight green and clear the path to merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
@kodjima33 @Git-on-my-level Updated the PR metadata trailers and |
|
Confirmed — the PR body now carries Everything flagged across the four changed files has been addressed: the One caveat, unchanged from my earlier reviews: CI on this PR doesn't run the app test suite, so a local With maintainer approval already on this head and metadata now green, this is ready for merge from my side. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Withdrawing this pull request and closing it. For the record: I committed and engineered these fixes under the expectation of the repository's paid bug bounty program, not as unpaid open-source charity. All unmerged contributions are permanently withdrawn. |
|
Hey @Dragonire9 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Summary
Resolves #19245
Addresses unhandled async capture command errors when pausing/resuming capture via Quick Actions or stopping recording via the Home record button. Previously, failures in coordinator dispatches (
outcome.throwIfFailed()) caused unhandled async exceptions in the zone error handler with no visual feedback.Key Changes
Quick Actions Service (
app/lib/services/quick_actions_service.dart):_toggleMutetoasyncand awaitedcaptureProvider.pauseCapture()/resumeCapture()insidetry/catch.OmiFeedback.error(context, context.l10n.somethingWentWrong)whencontext.mounted._handleShortcutand_toggleMutedispatches withunawaited.handleShortcutForTestingandtoggleMuteForTesting.Home Record Button (
app/lib/pages/home/widgets/battery_info_widget.dart):await captureProvider.finishCapture()intry/catchwithin_startPhoneRecording, ensuring that stop errors displayOmiFeedback.error(context, context.l10n.somethingWentWrong)and return gracefully.await _startPhoneRecording(context)in_startRecordingwithtry/catchandOmiFeedback.errorfallback.unawaited.Automated Regression Tests:
app/test/widgets/capture_home_ui_test.dart: Added test assertions verifying that tapping the button while recording invokesfinishCapture(), and that an error fromfinishCapture()displaysen.somethingWentWrongwithout unhandled errors.app/test/services/quick_actions_service_test.dart: Added hermetic unit/widget tests verifying thatQuickActionsServicemute/unmute commands callpauseCaptureandresumeCapture, and catch failures to showen.somethingWentWrong.Failure-Class: none
UI-Evidence: none