Skip to content

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

Merged
Git-on-my-level merged 2 commits into
mainfrom
lane/fix-conv-list-compile
Oct 1, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
lane/fix-conv-list-compile

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

main does not compile for mobile. Two merges left call sites behind for code that no longer exists:

Dart Analyze & Tests fails on every open mobile PR until this lands (UNDEFINED_METHOD / UNDEFINED_NAMED_PARAMETER, never baselined).

Verification

  • dart analyze lib test: no error-severity diagnostics left (other than the ungenerated env files local checkouts always have).
  • flutter test on conversation_locked_preview_test, conversation_swipe_delete_test, conversation_action_analytics_test, processing_conversation_placement_test: 21 passed. Before the change these failed to compile.
  • Not run on a device.

Failure class

Failure-Class: none

No existing class covers this: both breaks are merge resolutions that kept one side's call and the other side's deletion, and each PR's own checks were green before the merge commit. The closest class, FC-path-filter-masks-default-branch-health, is about skipped component jobs, which is not what happened here.

🤖 Generated with Claude Code

Review in cubic

Git-on-my-level and others added 2 commits October 2, 2026 00:44
…atPage 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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T17:50:30.538947Z 3867137 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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.

1 issue found across 3 files

Confidence score: 5/5

  • 20261002-locked-preview-single-overlay.json repeats the existing locked-conversation preview entry, so the same change may appear twice in the collected release notes. Remove or consolidate the duplicate.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="app/changelog/unreleased/20261002-locked-preview-single-overlay.json">

<violation number="1" location="app/changelog/unreleased/20261002-locked-preview-single-overlay.json:1">
P3: This fragment largely repeats the existing `20260930-locked-conversation-previews.json` entry ("Locked conversations now show a subtle frosted preview..."). Both sit in `unreleased/` and will be collected verbatim into the same release, so the release notes would state the locked-preview change twice within consecutive lines. Consolidate into that fragment or reword this one to focus only on the overlay removal.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

@@ -0,0 +1 @@
{"change":"Locked conversations in the list show the frosted preview only, without the old dark overlay on top."}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This fragment largely repeats the existing 20260930-locked-conversation-previews.json entry ("Locked conversations now show a subtle frosted preview..."). Both sit in unreleased/ and will be collected verbatim into the same release, so the release notes would state the locked-preview change twice within consecutive lines. Consolidate into that fragment or reword this one to focus only on the overlay removal.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At app/changelog/unreleased/20261002-locked-preview-single-overlay.json, line 1:

<comment>This fragment largely repeats the existing `20260930-locked-conversation-previews.json` entry ("Locked conversations now show a subtle frosted preview..."). Both sit in `unreleased/` and will be collected verbatim into the same release, so the release notes would state the locked-preview change twice within consecutive lines. Consolidate into that fragment or reword this one to focus only on the overlay removal.</comment>

<file context>
@@ -0,0 +1 @@
+{"change":"Locked conversations in the list show the frosted preview only, without the old dark overlay on top."}
</file context>

@Git-on-my-level
Git-on-my-level merged commit 88adb23 into main Oct 1, 2026
49 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/fix-conv-list-compile branch October 1, 2026 20:58
Git-on-my-level added a commit that referenced this pull request Oct 2, 2026
## Summary
- Restore mobile Export All Data with cancellable, honest byte progress,
a verified disk download, system sharing, and persistent Try Again
errors; add macOS Settings > Privacy > Data Controls export with
NSSavePanel and atomic saving.
- Preserve released-client default behavior; updated clients use the
additive authenticated `GET /v1/users/export?stream=true` completion
protocol. No timeout, auth policy, deployment control, or completeness
requirement is weakened.
- Round 2 fixes owner-decrypted export fields, auth-session fencing
(including A→B→A), ASGI disconnect cleanup, share-only retry, and
bounded stale mobile-file cleanup. Image-bearing sections follow text.
No durable-job design or new image-omission flag is included.

## Production evidence and request limits
User-supplied production evidence: a real `GET /v1/users/export` for an
approximately 4,300-conversation account returned HTTP 504 after **30.4
seconds with zero response bytes**. This is supplied evidence, not a
production request made or independently reproduced in this task. No
production account data or `api.omi.me` request was accessed.

The eager route constructs and validates the whole export before
committing headers. Streaming sends the opening JSON chunk before
user-data reads, avoiding that eager first-byte mechanism. This does not
establish which production layer generated the supplied 504, nor promise
that every large export finishes.

Repository timeout trace:
- `backend/main.py:309-332` wires `HTTP_GET_TIMEOUT` into
`TimeoutMiddleware`; `backend/utils/other/list_budget.py:3-6` documents
the production GET budget as **30 seconds**.
- `backend/utils/other/timeout.py:20,84-95` has an unset-variable
fallback of **120 seconds**, and its `wait_for(call_next(...))` bounds
response setup, not the entire streamed body.
- The current main-backend deploy uses
`.github/actions/deploy-backend-stack/action.yml:607-626`, with flags
rendered from `backend/deploy/runtime_env.yaml:2606-2615` and
`backend/scripts/render_backend_runtime_env.py:140-165`. Neither pins
`--timeout`/`timeoutSeconds` or `HTTP_GET_TIMEOUT`. The Cloud Run
request timeout is therefore inherited from the service, **not
ascertainable from the checked-in deploy configuration**. No live
infrastructure read was performed. Do not substitute Cloud Run's
creation default for a verified deployed value.

macOS uses the main Python data API (`APIClient.baseURL`), not the Rust
data plane. The separate `desktop-backend` service does not register
`routers.users`; backend deployment is required separately from client
releases.

## Review findings addressed
1. **Enhanced-protection exports:** the bulk photo reader now uses the
owner-scoped photo preparer. An export-scoped read context rejects
display decrypt fallbacks, corrupted ciphertext, or wrong-owner keys
instead of awarding completion. Normal display tolerance is unchanged
outside export. Real encrypted fixtures exercise both export variants
for photo bytes, compressed transcripts, manual speaker assignments,
historical memory content/evidence through MemoryService, and chat text.
`backend/database/conversations.py:131,467,493`;
`backend/database/chat.py:89`; `backend/database/memories.py:175`;
`backend/tests/services/users/test_data_export_strict_reads.py:234,331`.
2. **Request deadlines:** no durable-job lifecycle or deadline increase
is included. Image-bearing photo/frame sections now follow the text
sections. Actual truncated-200 downloads produce persistent Try Again
failures on mobile and macOS, never a successful partial file.
`backend/services/users/data_export.py:346-457`;
`app/test/widgets/data_export_test.dart:540`;
`desktop/macos/Desktop/Tests/AccountDataExportTests.swift:442`.
3. **Mobile session binding:** an immutable owner + session-generation
snapshot fences token acquisition, 401 refresh/replay, final file
publication, and native share/retry. A→B→A invalidates the original
snapshot; stale 401 work cannot sign out the new session.
`app/lib/services/auth_service.dart:185-201`;
`app/lib/backend/http/shared.dart:62,242,377`;
`app/lib/backend/http/user_data_export.dart:22`;
`app/test/unit/auth_session_snapshot_test.dart:35,66,124,190`.
4. **Share failures:** a completed download is retained and Retry shares
that exact file without another download. Even a captured old Retry
callback cannot substitute a newer export or a new owner's snapshot.
Share leases are awaited before handoff, with session revalidation
afterward. Android's native second copy remains a known limit.
`app/lib/pages/settings/data_export.dart:231-302,314-427`;
`app/test/widgets/data_export_test.dart:425,470,570,625,670`.
5. **Disconnect cleanup:** a dedicated response owns an ASGI disconnect
listener for specs 2.0 and 2.4, flags cooperative cancellation before
cancelling the response, waits for an in-flight bounded read to settle,
and deterministically closes the iterator/query streams. Header-send
errors, body-send errors, read failures, and normal completion also
close the source.
`backend/services/users/data_export_response.py:60-116`;
`backend/tests/routers/test_users_export_streaming.py:188-461`.
6. **Restart-safe cleanup:** export start sweeps exact app-owned UUID
directories after a 24-hour retention window; at most 200 owned
candidates are examined and 20 directories removed. Unrelated temp files
do not consume the candidate budget. Links, active sharing, and retained
retry paths are protected; cleanup no longer requires an in-memory
last-directory pointer. Tests use unique task-owned temporary
directories. `app/lib/pages/settings/data_export_files.dart:20-56`;
`app/test/unit/data_export_files_test.dart:29-159`;
`app/test/widgets/data_export_test.dart:697`.

The fix uses reusable read-context, response-lifecycle,
session-snapshot, and file-lifecycle primitives rather than adding
source-string guards.

## Test plan
All checks use local synthetic fixtures only; logs are retained under
`/tmp/omi-lane-data-export-logs/`.
- [x] Own worktree `backend/.venv` created from the pinned macOS lock,
Python 3.11.15. `PYTHON=.venv/bin/python bash test-preflight.sh`: 18
checks passed, no failures; optional integration-service warnings.
- [x] Canonical `BACKEND_UNIT_TEST_FILE_LIST=... bash test.sh`: **177
passed** across the four original export route/service suites, real
encrypted strict-read fixtures, cursor pagination, and memory
visibility. Log: `backend-test-sh-round2b.log`.
- [x] `flutter pub get`; focused `flutter test` export
widget/downloader, file cleanup, auth-session snapshot, and existing
auth-refresh suites: **68 passed**. Touched-source analyzer: no issues.
Log: `flutter-round2-rework.log` (final result; earlier full output in
`flutter-targeted.log`).
- [x] `xcrun swift build -c debug --build-tests --package-path Desktop`;
`xcrun swift test --skip-build --package-path Desktop --filter
'AccountDataExport|UserDataExport'`: **19 passed**. Includes real
APIClient truncated-200 → model error → successful Retry. Logs:
`swift-build.log`, `swift-test.log`.
- [x] Final mobile lifecycle regressions: export widget suite **22/22
passed**, including an unmounted Retry callback and a held native share
preventing cleanup/new downloads. Log: `final-flutter-widgets.log`.
- [x] Focused `make mobile-verify ARGS="fast --paths ..."`: **23/23
hermetic journeys passed**, loopback only. Log:
`final-mobile-verify.log`.
- [x] Enforced full `PYRIGHT_PYTHON=.venv/bin/python bash
scripts/typecheck.sh`: **0 errors**, 9,157 warnings (not a warning-free
claim). Log: `final-typecheck.log`.
- [x] All three canonical OpenAPI exporter `--check` surfaces are up to
date; Dart `--all --check`, TypeScript `--check`, Swift `--check`, and
released app-client compatibility passed. No API/schema change in round
2; checks found no regeneration necessary. Logs: `final-openapi-*.log`,
`final-gen-*.log`, `final-app-client-compat.log`.
- [x] Normal `OMI_PR_BODY_FILE=/tmp/omi-export-pr-body-round2.md git
push origin HEAD:refs/heads/lane/data-export-fix` passed the intact
bounded pre-push hook: **58 selected manifest check slots passed**,
generators and Swift compile passed, and the bounded backend test
selection passed. The history-dependent failure-class guard reported
**SKIP** on shallow history, not a verified history verdict. No skip
flag, force-push, or policy change was used. Hook evidence: worktree Git
metadata `omi-preflight/pre-push/preflight.log`.
- [x] Push verified with `git ls-remote`: remote
`refs/heads/lane/data-export-fix` and local HEAD both equal
**`f455f4dc4a857d299b4cccf5dcf3a9993a91e33e`**; GitHub PR head matches.
Working tree clean; PR remains OPEN and was not merged.
- [ ] **Current-main integration still blocked:**
`OMI_PR_BODY_FILE=/tmp/omi-export-pr-body-round2.md make preflight` ran
and failed at the line-count check's synthetic merge into current
`origin/main`: 99 localization conflicts (49 ARBs and 50 generated Dart
files). The successful normal push hook uses the merge-base and does
**not** establish current-main mergeability. Missing INV-MEM-1/INV-MEM-4
metadata citations were added and passed in the push hook. Logs:
`final-make-preflight-2.log`, `final-pr-preflight-metadata.log`. GitHub
currently reports the PR as DIRTY.
- [ ] Conditional upstream integration: #20216 is still OPEN at the
latest check; merge `origin/main` after it lands, resolve localization
conflicts preserving both sides, and reverify. Its fixes have not been
copied into this PR.

## Known limits
- **One foreground request is not a durable export.** Infrastructure
request deadlines, device foregrounding, connectivity, and free storage
still limit completion. An interrupted HTTP 200 stream is a failure, not
a successful partial archive; both clients require the terminal
completion suffix and expose Try Again. Moving images last gets text
onto the wire earlier but does not publish partial JSON or bypass
completeness. **Follow-up: generate an owner-authorized durable export
artifact asynchronously, then support resumable downloads with expiring
download authorization and a defined retention/deletion policy.** That
lifecycle is deliberately outside this PR.
- **Main-backend Cloud Run timeout is unverified.** The repo documents a
30-second production GET middleware budget but does not pin the deployed
Cloud Run request timeout. Verify that serving setting separately; this
PR does not change it.
- **Android sharing still makes a second full-file copy.** `share_plus`
11 stages the file in its FileProvider cache on the platform thread.
This PR retains a completed export after sharing fails so Try Again only
retries sharing; it does not add a custom FileProvider/native share
implementation. Very large shares can still block or require additional
disk space. A no-copy FileProvider path needs a separate native
implementation and device validation.
- **Cancellation is cooperative.** Disconnect prevents subsequent
bounded reads and deterministically closes the source after an
already-running blocking read settles; it cannot forcibly interrupt a
synchronous SDK RPC already in progress.
- **Temporary-file cleanup is bounded and conservative.** Cleanup runs
at export start rather than eagerly deleting a file while a receiver may
still be using it. It is limited to exact app-owned directory
identities, skips active/retained exports and links, and uses a
retention window; app/OS termination and delayed receivers remain
subject to that policy.

## Real-device verification limits
Physical iPhone/iPad/Android share/save sheets, large-file Android
platform-thread latency/copying, native macOS NSSavePanel,
foreground/background transitions, app restart with a real receiving
app, and production Cloud Run/load-balancer streaming are NOT VERIFIED.
Hermetic tests exercise production APIs with synthetic
transport/auth/filesystem fixtures; compilation is not a claim of device
behavior. No native install or production-account test is performed in
this task.

## Product invariants affected
- INV-MEM-3: retain MemoryService/privacy authority and owner-scoped
decrypted reads; failure never grants completion authority.
- INV-MEM-1: retain the three memory tiers and explicit
owner-portability Archive inclusion; no new memory store or
default-access policy.
- INV-MEM-4: retain canonical lineage, promotion, and suppression
authority; this read-only export does not perform capture, promotion, or
projection writes.
- INV-AUTH-1: macOS retains owner-generation authorization and existing
session ownership; mobile export captures owner plus auth-session
generation through token acquisition, 401 replay, publication, and share
retry.
- INV-UI-1, INV-UI-2, INV-UI-3: shared progress, feedback, controls, and
sheets.
- INV-MEM-5, INV-DATA-1: no alternate account authority, cohort, or
desktop data-plane routing.

Failure-Class: none

Line-Count-Exception: backend/database/chat.py | 1499 -> 1507 | Keep the
existing owner-scoped message reader and bulk export iterator as the
decryption/cancellation boundary; the reusable strict-read primitive
lives outside this file
Line-Count-Exception: backend/database/conversations.py | 3458 -> 3483 |
Wire export-only verified transcript/photo/manual-speaker reads and
cooperative bulk cancellation into the existing owner-scoped read
helpers without duplicating decryption logic
Line-Count-Exception: backend/database/memories.py | 1605 -> 1610 | Add
export-only fail-closed content/evidence verification to the existing
historical memory decryptor while preserving normal display tolerance
Line-Count-Exception: backend/routers/users.py | 2521 -> 2547 | Preserve
the established released-client export route and OpenAPI identity;
additive streaming/completion wiring stays here while disconnect
lifecycle and serialization live in feature modules
Line-Count-Exception: backend/utils/memory/memory_service.py | 4342 ->
4374 | Preserve canonical privacy and suppression authority while adding
cooperative export scan checks and deterministic closure of the owned
canonical/historical iterators

Generated with [Devin](https://devin.ai)
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.

1 participant