Skip to content

revert(app): remove mobile chat history and new chats - #20015

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Itaxh1:fix/mobile-single-chat
Oct 1, 2026
Merged

Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Itaxh1:fix/mobile-single-chat

Conversation

@Itaxh1

@Itaxh1 Itaxh1 commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR

Revert the unwanted Past chats / New Chat feature. Ask Omi keeps one continuous chat when
reopened
, with a cleaner header. The current chat UI and saved messages stay intact.

Screenshots

Continuous chat Home (context)
iPhone chat with the current conversation and no history control iPhone Home; existing layout unchanged by this PR

User-supplied screenshots from the production preview build. Home is included as context;
its layout and Ask Omi bar are unchanged by this PR. Screenshot assets are hosted in the
contributor's fork, outside this code diff.

What changed and why

This partially reverts the mobile chat-history and fresh-session behavior introduced in #19838.
Opening Ask Omi should continue one ongoing conversation. Previously, reopening it from Home
started a fresh session and the history control exposed Past chats and New Chat. After this
change, reopening keeps the current messages and any active reply.

This is a targeted revert of that feature. The chat presentation and other changes from #19838
remain in place.

  • Remove the mobile history control and its Past chats / New Chat page; keep the top handle centered.
  • Remove ChatPage.startFresh and update Home, typed/voice quick actions, deep links,
    conversation detail and app detail to resume the current conversation.
  • Retain the current composer, microphone, greeting, suggestions and dismissal behavior.

Existing server sessions and messages remain stored. This does not delete, merge or migrate
previous threads. Enabled chat apps retain their scoped behavior, and Clear Chat still confirms.

How it was verified

Local checks passed against upstream main 8bd26833ef3b (still current when fetched before publication):

Check Result
Full Flutter unit/widget suite 3,721 passed; no skips
Protected spine contract run 138 passed
Full hermetic mobile journeys 23 passed; no failures or skips
Analyzer ratchet Passed; baseline unchanged
Localization freshness Passed: 49 locales, 3,599 keys
Local repository preflight All 22 selected checks passed
Focused visual audit Seven scenarios passed; five recaptured in both Light and Dark
Production startup configuration tests Two passed

The production Profile-prod preview build was installed on an iPhone 15 Pro Max. Signature,
compiled checkout identity, production API/Firebase and sign-in callback were verified. The user supplied the iPhone screenshots below showing the active chat and Home. A final
automated cold-restart/reopen check remains pending because device services are unavailable;
physical microphone/Bluetooth behavior was not exercised in this follow-up.

Hosted CI passed on commit 7921b25b212e, with the maintainer-granted ci:full label:
Mobile App Checks passed Dart
Analyze & Tests, Generated Files and Mobile Release Eligibility. Repository hygiene, formatting,
metadata and applicable contract checks also passed. Native compile and hosted journey lanes
were not selected by this PR's changed paths; the full 23-check journey suite passed locally.

Commands run: TZ=UTC bash app/test.sh, bash app/scripts/analyze_ratchet.sh,
python3 app/scripts/l10n.py check, make mobile-verify ARGS="fast --all",
bash scripts/pr-preflight --lane local --base upstream/main --pr-body-file <body>, and
app/scripts/visual_audit.sh in Light and Dark.

Regression coverage

app/test/widgets/chat_continuity_navigation_test.dart covers repeated close/reopen, loading an
empty provider through the current-chat path, preserving an active reply, absent history controls,
centered handle, drafts, latest-only suggestions, constrained layouts and header-only dismissal.

The chat-current-thread visual scenario uses the real HTTP client/provider with a synthetic
backend. It disposes and recreates the page/provider, reloads the existing transcript, continues
it, and asserts zero chat-session list/create requests. Existing voice, failed-reply, response
actions and Clear Chat tests remain in the suite.

Product invariants affected

none — no locked invariant requiring a citation matches this mobile-only change. Shared mobile
UX and brand checks passed.

Failure class (fixes)

Failure-Class: none

This removes an unwanted product behavior; backend session resolution and storage are unchanged.
No failure-class registry definition is added or changed.

Scoped cleanups

Remove the retired page and its dedicated tests, update chat ownership documentation and add a
mobile changelog fragment. Remove one pre-existing unused test-helper import so the analyzer
ratchet passes without changing its baseline.

Review in cubic

Resume the current conversation from every mobile entry point and remove the separate history/new-chat controls. Preserve backend sessions, stored messages, the composer and active sends.
@Itaxh1 Itaxh1 added the ci:full Maintainer-granted: run full CI on this fork PR label Sep 30, 2026
@Itaxh1 Itaxh1 self-assigned this Sep 30, 2026
@Itaxh1
Itaxh1 marked this pull request as ready for review September 30, 2026 19:52
@Git-on-my-level

Copy link
Copy Markdown
Member

Reviewed this revert of the mobile chat-history surface from #19838. The removal is clean and coherent — thanks for keeping it tightly scoped and for the honest changelog entry.

File-by-file notes:

  • app/lib/pages/chat/page.dart — startFresh param, _introRevision, and the PastChatsPage import removed; init now unconditionally resumes the current conversation (refreshMessages() when empty). No dangling references repo-wide to PastChatsPage, ChatHistoryChoice, or ChatPage.startFresh.
  • app/lib/pages/chat/past_chats_page.dart — deleted together with its test (past_chats_page_test.dart); correct pairing.
  • app/lib/pages/chat/widgets/chat_chrome.dart — history button removed; the SizedBox(width: kToolbarHeight) spacer keeps the dismissal handle centered. Reasonable.
  • app/lib/pages/apps/app_detail/app_detail.dart, home/page.dart, home_deep_links.dart, quick_actions_service.dart — mechanical startFresh removals; voice autostart and deep-link drafts preserved.
  • app/lib/pages/conversation_detail/page.dart — this entry now continues the current thread with a conversation-scoped context instead of starting a fresh session. Matches the stated intent, just flagging it as a user-visible behavior change on that surface too.
  • app/lib/pages/chat/README.md — rewritten table matches the code; no stale references found.
  • app/test/widgets/chat_continuity_navigation_test.dart (renamed) — good continuity assertions: no chat_history key, no chat-session POST/GET on reopen. The new visual-audit chat-current-thread scenario covering reload after provider disposal is a nice addition.
  • app/changelog/unreleased/20260930-mobile-single-chat.json — accurate user-facing description.
  • app/test/support/recording_analytics.dart — small unused-import cleanup; harmless.

The retained ChatHistoryState provider (openChatSession/deleteChatSession/loadOlderMessages) is still exercised via Clear Chat and older-messages loading, so it isn't orphaned by this diff.

Two minor nits, non-blocking:

  1. The pastChats and startFresh localization keys are now unused by production code but remain across the .arb files — fine to drop in a later l10n cleanup if the removal sticks.
  2. The README verification section still cites "popup/history return navigation" for chat_presentation_test.dart; that test now pushes a test-local History button rather than the removed page, so the wording could be tightened.

One caveat on verification: most CI lanes were skipped on this run, and the test evidence is PR-body-reported. If you can attach the app/test.sh output (or get a full CI pass), that would firm it up.

Leaving the ship/no-ship call to a human maintainer: fully removing a feature that landed a day earlier (rather than fixing it) is a product-direction decision, and mobile loses any access to saved past sessions while desktop/backend session storage remains — a parity gap worth an explicit sign-off.


AI-generated maintainer feedback 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 flutter flutter work needs-maintainer-review Needs a human maintainer to sign off before merge labels Sep 30, 2026
@Itaxh1
Itaxh1 requested a review from Git-on-my-level October 1, 2026 04:57
@Git-on-my-level
Git-on-my-level merged commit 3d4e600 into BasedHardware:main Oct 1, 2026
57 of 59 checks passed
Git-on-my-level added a commit that referenced this pull request Oct 1, 2026
origin/main (298baab) does not compile: the detail-v3 merge reintroduced
`ChatPage(startFresh: ...)` after #20015's revert removed the parameter, and
the frost-previews merge dropped `_buildCardContent` while keeping its call
site. Both breaks are on main with no lane changes applied; this restores
compilation so the mobile lanes (including this PR's) can run.

- conversation_list_item.dart: restore `_buildCardContent` from 3f1ab32
  (locked-preview frost wrapper around the mobile card content).
- conversation_detail/page.dart: drop the `startFresh` argument — the revert's
  contract is that every entry point resumes the current conversation, and
  `initialChatContext` already scopes the chat to this conversation.
Git-on-my-level added a commit that referenced this pull request Oct 1, 2026
origin/main (298baab) does not compile: the detail-v3 merge reintroduced
`ChatPage(startFresh: ...)` after #20015's revert removed the parameter, and
the frost-previews merge dropped `_buildCardContent` while keeping its call
site. Both breaks are on main with no lane changes applied; this restores
compilation so the mobile lanes (including this PR's) can run.

- conversation_list_item.dart: restore `_buildCardContent` from 3f1ab32
  (locked-preview frost wrapper around the mobile card content).
- conversation_detail/page.dart: drop the `startFresh` argument — the revert's
  contract is that every entry point resumes the current conversation, and
  `initialChatContext` already scopes the chat to this conversation.
Git-on-my-level added a commit that referenced this pull request Oct 1, 2026
origin/main (298baab) does not compile: the detail-v3 merge reintroduced
`ChatPage(startFresh: ...)` after #20015's revert removed the parameter, and
the frost-previews merge dropped `_buildCardContent` while keeping its call
site. Both breaks are on main with no lane changes applied; this restores
compilation so the mobile lanes (including this PR's) can run.

- conversation_list_item.dart: restore `_buildCardContent` from 3f1ab32
  (locked-preview frost wrapper around the mobile card content).
- conversation_detail/page.dart: drop the `startFresh` argument — the revert's
  contract is that every entry point resumes the current conversation, and
  `initialChatContext` already scopes the chat to this conversation.
Git-on-my-level added a commit that referenced this pull request Oct 1, 2026
…tention window (#20172)

* feat(app): auto-remove synced local recording copies with a 30-day retention window

- Wal.syncedAt stamped at every synced transition; 0 = unknown age, never
  removed. Serialized as synced_at in the WAL index.
- LocalWalSyncImpl._removeExpiredSyncedCopies deletes phone-disk synced
  copies older than the window; hooked at WAL init and after a full upload
  pass, logged as wal_synced_copy_autoremove.
- Preference exposed in the Manage Storage sheet and on the Offline Sync
  page (one shared Icons.auto_delete row treatment). Existing onboarded
  installs are pinned OFF once at startup; fresh installs default ON at
  30 days.
- Manage Storage rows moved onto OmiColors/OmiType/OmiRadius tokens so the
  sheet renders correctly in light and dark mode.

* fix(app): close review findings in synced-copy auto-remove

Review findings (Devin swe-2-high), each verified at file:line before fixing:

- Streamed WALs that land already-synced (_chunk new/updated WAL, finalize
  tail buffer) now stamp syncedAt, so live-streamed recordings are eligible
  for auto-remove instead of silently never aging out.
- Startup default migration writes the preference key BEFORE the marker, so
  a crash mid-migration retries on the next launch instead of leaving an
  existing install pinned to the ON default without consent.
- The Manage Storage auto-remove row holds its tapped value locally: the
  sheet is stateless and would otherwise visually snap the switch back
  while the stored preference had already changed.

* fix(app): decide the auto-remove default on first launch, not per-onboarding-state

Round-2 review finding: onboardingCompleted is set during launch 1 for new
users, so a launch-2 migration keyed on it pinned fresh installs to OFF,
defeating the default-ON requirement.

The split is now decided on the first launch that runs this build:
- already onboarded = an upgrading install: pin OFF once (key before marker,
  so a crash mid-migration retries);
- not yet onboarded = a fresh install: mark it immediately so no later
  launch mistakes it for an upgrade; the ON default governs until the user
  toggles.

Adds a launch-1/launch-2 regression test for the onboard-after-install path.

* chore(app): add FC-launch-later-cohort-misclassification definition

* fix(app): close PR-review findings in synced-copy auto-remove

PR #20172 review (codex + cubic):

- Streamed WALs marked synced by socket-send bookkeeping are transport-only,
  not server-confirmed: they no longer start the retention clock (syncedAt
  stays 0 until a server-confirmed transition stamps it), so the sweep can
  never delete the only copy of an unacknowledged recording. A WAL that
  receives new unacked frames also resets its clock.
- The migration commits its marker only after the upgrade-pin write succeeds,
  so a failed write retries on the next launch.
- The sweep runs on the no-pending-work early-return path and when the toggle
  is enabled, so expired copies age out without waiting for a restart.
- Sweep covers all three durable buckets (active, retired, foreign), matching
  the device-wide scope of the existing retention cap.
- Local Copies settings section uses OmiSettingsGroup/OmiSettingsRow instead
  of hand-rolled header/radius (UX contract).
- Tests: streamed-syncedAt==0 contract, sdcard/flashPage exclusion, non-default
  retention window; test names updated to match asserted behavior.

* fix(app): restore compile after the conversation-detail-v3 merge on main

origin/main (298baab) does not compile: the detail-v3 merge reintroduced
`ChatPage(startFresh: ...)` after #20015's revert removed the parameter, and
the frost-previews merge dropped `_buildCardContent` while keeping its call
site. Both breaks are on main with no lane changes applied; this restores
compilation so the mobile lanes (including this PR's) can run.

- conversation_list_item.dart: restore `_buildCardContent` from 3f1ab32
  (locked-preview frost wrapper around the mobile card content).
- conversation_detail/page.dart: drop the `startFresh` argument — the revert's
  contract is that every entry point resumes the current conversation, and
  `initialChatContext` already scopes the chat to this conversation.
Git-on-my-level added a commit that referenced this pull request Oct 1, 2026
…ge argument so main compiles (#20216)

* fix(app): restore the locked-preview card content and drop a stale ChatPage argument so main compiles

The merge of #20044 kept the call to _buildCardContent but dropped the method,
the isLocked row signature and the removal of the old locked overlay. The
conversation-detail merge re-added startFresh: true, which #20015 removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* chore(app): changelog for the locked preview overlay

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Maintainer-granted: run full CI on this fork PR flutter flutter work needs-maintainer-review Needs a human maintainer to sign off before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants