Enable Return for onboarding proceed actions#10464
Conversation
Failure-Class: none
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e12aad356
ℹ️ 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 "@codex address that feedback".
| .cornerRadius(OmiChrome.smallControlRadius) | ||
| } | ||
| .buttonStyle(.plain) | ||
| .buttonStyle(.plain).keyboardShortcut(.defaultAction) |
There was a problem hiding this comment.
Route Return through the focused chat input
When chat-based onboarding reaches completion, the input TextField is still focused (startChat() sets isInputFocused = true and this state is not cleared), so pressing Return is handled by that field's .onSubmit { sendMessage() } before this default button can advance; with an empty draft, sendMessage() then no-ops. In the normal completed-chat state, the new shortcut still won't let Return continue unless the user first moves focus away, so the submit path should delegate to handleOnboardingComplete() or blur/hide the input when showing Continue.
Useful? React with 👍 / 👎.
What changed and why
Made Return the default action for visible onboarding setup and Continue controls, including the active Second Brain flow, legacy conversational onboarding, and file-index completion.
Product invariants affected
none
How it was verified
xcrun swift build -c debug --package-path Desktop --scratch-path /tmp/omi-onboarding-return-build.dFb1iG— passed../scripts/swiftlint-wrapper.sh lint— passed with 0 violations../scripts/swift-format-wrapper.sh linton the five changed Swift files — passed.python3 scripts/check_desktop_test_quality.py— passed./Applications/omi-onboarding-return.app; its automation bridge responded on port 47817. The copied profile was signed out, so onboarding could not be driven without interactive sign-in.xcrun swift test --package-path Desktop --scratch-path /tmp/omi-onboarding-return-build.dFb1iG --filter OnboardingFlowTestsis blocked before execution by unrelated existing test-target compilation errors inRealtimeHubSessionHandoffPolicyTestsandRealtimeVoiceContextSingleFlightTests.Tests
Added
OnboardingFlowTests.testOnboardingProceedActionsUseDefaultActionKeyboardShortcut, a static SwiftUI wiring tripwire for every onboarding proceed action.Failure class (fixes)
Failure-Class: none
New guards (only when adding a check or ratchet)
The regression tripwire is tied to this user-reported onboarding failure. It is not a shared primitive because it verifies a finite set of onboarding-specific controls, including dynamically shown Continue actions.