Skip to content

Chat composer always says "Ask Omi" instead of "Ask a follow-up…" - #12910

Merged
kodjima33 merged 1 commit into
BasedHardware:mainfrom
nathanchengx:fix/follow-up-text-incorrect
Sep 8, 2026
Merged

kodjima33 merged 1 commit into
BasedHardware:mainfrom
nathanchengx:fix/follow-up-text-incorrect

Conversation

@nathanchengx

@nathanchengx nathanchengx commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

The chat composer read "Ask a follow-up…" whenever it sat under the conversation, including right after clearing the chat, where there was nothing to follow up on. The composer now always says "Ask Omi". There is no follow-up variant and no dependence on what the transcript holds, so there is no state for the copy to get wrong. The search placement keeps its own prompt. The rule is one pure function (QueryComposerPlaceholder.text(mode:)) so the bar and the tests cannot disagree. The home e2e flow doc describes the new copy.

Carried fix (temporary)

Rebased onto current main and carrying the one-commit fix from #12932 (Vision OCR language query via the request instance) so the Desktop Swift checks can run past the deprecation error that has broken main since #12888 (#12931). It is byte-identical to #12932; once that merges, a rebase drops it from this PR automatically. This PR does not otherwise touch Rewind.

Product invariants affected

none

How it was verified

  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test --filter 'QueryShellTests|QueryComposerTests' in desktop/macos/Desktop → 57 tests, 0 failures.
  • Exercised in the running app (named bundle omi-follow-up-text-incorrect, signed in against the dev backend): the composer reads "Ask Omi" with an empty transcript and still reads "Ask Omi" after a message is sent and answered. Window screenshots taken for both states.
  • Pinned swift-format lint clean; bounded pre-push gate passed.

Tests

  • QueryShellTests.testTheChatComposerAlwaysSaysAskOmi is the regression test: the .answer placement yields "Ask Omi".
  • testSearchingKeepsTheSearchPlaceholder pins the search placement.

Failure class (fixes)

Failure-Class: none

🤖 Generated with Claude Code

https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB

@Git-on-my-level

Copy link
Copy Markdown
Member

Nice catch and a clean fix — I verified the premise and the wiring before commenting.

What I checked, per file:

  • QueryShellModel.swift — the new QueryComposerPlaceholder.text(mode:hasConversation:) is a pure function, and all three branches are pinned by tests; .results correctly keeps RewindSearchMetrics.placeholder, so the search placement is untouched.
  • QueryHeroBar.swift — hasConversation is an explicit, documented input rather than guessed state, and the derived placeholder feeds both the visible overlay text and the accessibility label (lines 382/392), so VoiceOver reads the same first-question prompt the eye sees.
  • QueryShellHome.swift — the single composerBar() construction passes !chatProvider.messages.isEmpty. I confirmed in ChatProvider.clearChat() that clearing really empties messages (session branch sets messages = []; the default branch clears via the kernel turn projection), so the placeholder flips back to "Ask Omi" immediately after a clear — exactly the scenario in the title.
  • QueryShellTests.swift — the three new tests cover empty transcript, non-empty transcript, and search mode; the regression test also pins the literal "Ask Omi" string.
  • QueryComposerTests.swift — the harness host mirrors production wiring (!provider.messages.isEmpty), so the bar and the tests cannot drift apart.
  • changelog/unreleased/20260907-empty-chat-placeholder.json — matches the format documented in desktop/macos/changelog/README.md.

One consistency gap worth fixing here: desktop/macos/e2e/flows/home.yaml (step at ~line 35) still tells the verifier that on a fresh open the chat composer shows 'Ask a follow-up…'. After this change a fresh open has an empty transcript, so it would read "Ask Omi" — the flow doc would contradict the app.

Minor, non-blocking: the empty-state wording ("Ask Omi") is user-facing copy; it's a single constant, so trivially adjustable if maintainers prefer different phrasing.

Checks are green on this head (Desktop Swift Build & Tests, Release Compile, Static & Test Contracts, Hygiene). Since the PR is still a draft I'm leaving a signal rather than a formal review — once it's marked ready it should be a quick human sign-off.

AI-generated maintainer feedback posted on behalf of the Omi maintainers.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@Git-on-my-level Git-on-my-level added positive-signal Automation verified a genuine fix/quality contribution macOS labels Sep 7, 2026

@undivisible undivisible left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Light CR: QueryComposerPlaceholder correctly asks "Ask Omi" when empty and follow-up only with messages; tests cover modes. Still DRAFT — mark ready when you want soft-path; not merging drafts.

@nathanchengx nathanchengx changed the title fix(desktop): ask a first question, not a follow-up, over an empty chat If empty chat just say "Ask Omi" not "Ask follow up" Sep 7, 2026

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Clean, well-tested desktop fix (empty-chat placeholder derived from conversation state, 3 new regression tests, CI green). Holding at approve-only since the PR is still a draft — please mark ready when you want it merged.

@nathanchengx
nathanchengx force-pushed the fix/follow-up-text-incorrect branch from c33e521 to be57f95 Compare September 7, 2026 15:04
@nathanchengx nathanchengx changed the title If empty chat just say "Ask Omi" not "Ask follow up" Chat composer always says "Ask Omi" instead of "Ask a follow-up…" Sep 7, 2026
@nathanchengx
nathanchengx marked this pull request as ready for review September 7, 2026 15:35
@nathanchengx

Copy link
Copy Markdown
Contributor Author

Marked ready for review. The red Desktop Swift checks on this PR come from main, not this diff: the merge ref fails the release compile on RewindOCRService.swift:134 (deprecated VNRecognizeTextRequest.supportedRecognitionLanguages(for:revision:), introduced in #12888; -warnings-as-errors under release). Tracked in #12931. This branch does not touch Rewind; the bounded pre-push gate (debug compile + targeted tests) passed locally and the change was exercised in a running named bundle.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@nathanchengx
nathanchengx force-pushed the fix/follow-up-text-incorrect branch from be57f95 to a78c6fe Compare September 7, 2026 16:08
@nathanchengx

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and carrying the one-commit fix from #12932 so Desktop Swift Build/Static can go green here; it is byte-identical to that PR and a rebase drops it once #12932 merges. Already out of draft.

The composer under the conversation read "Ask a follow-up…", including
right after the reader cleared the chat — an invitation to follow up on
nothing. It now says the one thing it always means, "Ask Omi", whatever
the transcript holds; only the search placement keeps its own prompt.
The rule is one pure function so the bar and the tests cannot disagree,
and the home e2e flow describes the new copy.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB
@nathanchengx
nathanchengx force-pushed the fix/follow-up-text-incorrect branch from a78c6fe to e0b34cd Compare September 7, 2026 20:36
@nathanchengx

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (which carries the Vision OCR fix), dropping the copied #12932 commit; the diff is otherwise unchanged and the PR is out of draft.

@Git-on-my-level

Copy link
Copy Markdown
Member

Verified on the current head (e0b34cd), which sits after the rebase that dropped the carried fix from #12932 — the branch is back to the single composer commit, and the Desktop Swift checks are green on it without touching Rewind.

Per file:

  • QueryShellModel.swift — QueryComposerPlaceholder is a pure, exhaustive switch over QueryShellMode: .answer returns the new constant, .results returns RewindSearchMetrics.placeholder, so the search placement keeps its own prompt by construction. Notably, this head simplifies the rule relative to the version the approvals were left on: the hasConversation: input is gone and the chat placement is now constant, removing exactly the state the copy could previously get wrong. The QueryShellSubmit doc paragraph was updated to match.
  • QueryHeroBar.swift — the placeholder computed property now just delegates to QueryComposerPlaceholder.text(mode:). At head it feeds both the visible overlay (Text(placeholder)) and the accessibility label (.accessibilityLabel(Text(placeholder))), so VoiceOver reads the new copy as well.
  • QueryShellTests.swift — testTheChatComposerAlwaysSaysAskOmi and testSearchingKeepsTheSearchPlaceholder pin both branches of the new function, and no test still asserts the old string.
  • QueryComposerTests.swift — comment-only rewording that stops coupling the harness notes to one specific placeholder string, which is why this copy change doesn't invalidate those tests' meaning.
  • changelog/unreleased/20260907-empty-chat-placeholder.json — matches the unreleased-changelog convention the desktop docs point to; a single accurate change entry.
  • e2e/flows/home.yaml — step S1's instruction now reads ('Ask Omi'), and I checked the step's expect block (interactive_count, text_visible: Chat) — nothing there pins the old copy, so the flow and the diff agree.

Also checked repo-wide: the only files on main still containing "Ask a follow-up" are the ones this PR edits, so there is no orphaned copy elsewhere; the remaining mentions at head are historical references in doc comments, which is correct. The desktop strings here are inline rather than localized catalogs, so there are no locale files to update.

One note for the maintainers: both approvals were left on 46da1a9 and describe the earlier state-dependent placeholder ("follow-up only with messages"); this head is the simplified constant-copy version, so a quick re-sign-off on the final wording is the one remaining step before merge.

AI-generated maintainer feedback posted on behalf of the Omi maintainers.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@kodjima33 kodjima33 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Desktop bug fix: composer wrongly said 'Ask a follow-up...' with nothing to follow up on; now always 'Ask Omi'. Bug-fix fast lane (~3/5), owner-override, CI green.

@kodjima33
kodjima33 merged commit 32c3a13 into BasedHardware:main Sep 8, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants