Skip to content

fix(onboarding): route pendant tutorial question outcomes and failures directly (#23385) - #23387

Closed
ocakciomursel-pixel wants to merge 1 commit into
BasedHardware:mainfrom
ocakciomursel-pixel:fix/pendant-tutorial-question-pipeline-23385
Closed

ocakciomursel-pixel wants to merge 1 commit into
BasedHardware:mainfrom
ocakciomursel-pixel:fix/pendant-tutorial-question-pipeline-23385

Conversation

@ocakciomursel-pixel

@ocakciomursel-pixel ocakciomursel-pixel commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #23385

UI-Evidence: none -- routes onboarding voice question outcomes and existing localized retry/limit strings directly from DeviceOnboardingProvider without visual layout changes
Failure-Class: none
Line-Count-Exception: app/lib/services/capture/capture_controller.dart | 4507 -> 4604 | routes tutorial voice-question outcomes, transcriptions, and terminal drop/failure signals directly to DeviceOnboardingProvider (#23385)

Product invariants affected

  • INV-CAP-1

Summary

Routes pendant tutorial question outcomes, transcriptions, and failures directly to DeviceOnboardingProvider instead of relying on global MessageProvider.messages heuristics in SinglePressStep.

Root Cause

  1. MessageProvider.sendVoiceMessageStreamToServer intentionally routes voice turns to a detached voiceMessages list whenever shouldDisplayInCurrentChat('omi', '') is false (e.g., when a past chat session, persona/app chat, or fresh chat session is active in the background). SinglePressStep previously listened only to MessageProvider.messages, leaving the tutorial stuck on Processing your question… even when the voice turn succeeded.
  2. Terminal voice drops and stream/transport/quota/audio-save failures outside emptyFrames and no_speech left DeviceOnboardingProvider.questionSent = true with no failure signal.
  3. Calling deviceOnboardingProvider.onButtonEvent(buttonState) before CaptureController admitted the session start caused an ignored press during the 2-second autoEndGrace window (or an overlapping press while questionSent was pending) to desynchronize tutorial UI state from actual capture session state.

Changes

  • Typed Voice Question Outcome (capture_external_actions.dart, provider_capture_external_actions.dart, message_provider.dart):
    • Added VoiceQuestionFailure (noSpeech, offline, server, timeout, quota, notSignedIn, failed) and VoiceQuestionOutcome (answered / failed), returned by sendVoiceMessageStreamToServer across all paths while keeping background chat history isolated.
    • Added onQuestionTranscribed callback when the human question chunk arrives so the tutorial displays the transcribed question regardless of active chat context.
  • Attempt-Scoped Tutorial Question State (device_onboarding_provider.dart, capture_controller.dart, single_press_step.dart):
    • Scoped tutorial question attempts by activeQuestionAttemptId with a bounded pending-request timeout (questionPendingTimeout) and automatic retirement when navigating away or disposing.
    • Only transition the tutorial into Listening after CaptureController admits the session start (preventing autoEndGrace or overlapping presses while questionSent is pending from desynchronizing UI/session state).
    • Routed every terminal drop (actionsDisabled, emptyFrames, noDevice, codecLookupFailed, cancelled) and stream/transport failure back to DeviceOnboardingProvider.onVoiceQuestionFailed.
    • Removed the global MessageProvider listener from SinglePressStep and rendered localized failure/limit explanations from provider.questionFailure.
  • Tests:
    • Added unit and widget regression tests across device_onboarding_provider_test.dart, omi_button_actions_controller_test.dart, message_provider_voice_test.dart, and device_onboarding_question_revisit_test.dart.

@ocakciomursel-pixel
ocakciomursel-pixel force-pushed the fix/pendant-tutorial-question-pipeline-23385 branch from e6082b1 to 4d037eb Compare October 23, 2026 12:54
@github-actions

Copy link
Copy Markdown
Contributor

Hey @ocakciomursel-pixel 👋

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:

  • Project standards — Ensuring consistency across the codebase
  • User needs — Making sure changes align with what our users need
  • Code best practices — Maintaining code quality and maintainability
  • Project direction — Keeping aligned with our product principles and locked invariants

Before your next PR, please skim:

  • PRODUCT.md — product north star
  • Product invariants — locked rules (shared chat, memory tiers, agent control plane, integrations, brand)

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!

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.

bug: pendant tutorial question can stall outside the main chat or after voice failures

1 participant