Skip to content

fix(tasks): complete mobile delivery and safe summary recovery - #22841

Merged
aryanorastar merged 8 commits into
mainfrom
fix/20595-complete-task-delivery
Oct 21, 2026
Merged

aryanorastar merged 8 commits into
mainfrom
fix/20595-complete-task-delivery

Conversation

@aryanorastar

@aryanorastar aryanorastar commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Conversations can contain desktop-extracted action items while mobile Tasks has no way to review them. Task Integrations is also hidden behind an export glyph. Mobile now shows the existing server Suggested projection in Tasks, lets readers explicitly add or dismiss suggestions, recovers older desktop summary rows through the existing generation-fenced summary promoter, and exposes a named Task Integrations entry in Settings/search and the Tasks menu.

The backend now accepts historical text summary rows, converting only the selected row when acceptance saves its durable task link. Candidate preparation and acceptance use the existing bounded Firestore contention retry helper, including read-time aborts and exhausted SDK retries; unknown/ambiguous failures are not retried by that helper.

Acceptance reads and upserts the exact canonical task ID. A successful receipt survives a failed read without repeating acceptance; older Tasks, Home and pagination responses cannot erase the saved task or resurrect a resolved suggestion. New incomplete tasks exit an automatically selected Completed view while manual view choices remain respected. Overlapping reads are query/session-owned; point reads, Undo and optimistic creates cannot skip server pages. A save that invalidates initial loading schedules a replacement read, and summary retries renew keys only for confirmed terminal proposals while retaining ambiguous retries. Summary recovery preserves original storage coordinates through malformed-row filtering and conversation caching, so the selected row stays the selected row. Phone extraction retains its existing direct writer; this does not introduce a second manual-create path for phone summaries.

Refs #20595 and #12368. #12424 already restored the mobile-origin backend writer. #20725 remains separate and open; this PR completes the mobile access/recovery path through canonical acceptance rather than depending on that broader notes UI change.

Validation:

  • 195 focused schema, cache, task-provider, widget, Settings and production-wiring tests passed, including overlapping reads, first-load recovery, terminal suggestion retries, fresh/cached summaries with invalid leading rows and canonical approval. The latest backend run passed 386 Candidate lifecycle/router, summary promotion and capture/extraction/identity tests. Another 26 real Firestore emulator checks passed, covering concurrent preparation/acceptance, definite read/commit aborts, generation fences, expiry, text rows, canonical task reads/refresh/pagination and integration reads. The 23 selected hermetic mobile journey assertions also passed. The recovery/expiry suites are now registered in the existing backend emulator CI runner and its path triggers; the complete runner passed locally, including the 26 task checks.
  • Analyzer checks, all 51 local preflight checks, backend type checking (zero errors), API compatibility/code-generation checks and the normal pre-push gate passed. Native iPhone simulator build and agent-flutter checks passed; the cached-summary fixture rejects any prepare/accept request that does not use the original stored coordinate.
  • Mobile GitHub CI passed on 94798e1 (6,793 Dart tests); fresh CI for the final backend/CI head 7375693 is queued and is not yet confirmed green. Workflow-selected native platform/journey CI jobs were skipped; local iPhone simulator and selected hermetic journey evidence are recorded above. No store release or production account recovery is claimed.
  • Live read-only verification on 2026-10-20: production https://api.omi.me/openapi.json returned 200 and publishes all nine required route boundaries. Production Cloud Logging shows successful control and summary-preparation requests; this proves existing route availability, not deployment of this PR. A local curl → uvicorn → production FastAPI router → Firestore emulator smoke passed 10 requests with one-task receipt replay (synthetic identity/auth boundary, no customer records or external notifications).
  • Architecture and implementation checklist: app/docs/task-delivery.md.

Release and customer verification:

  • Needs merge, deployment of the backend serving the mobile task APIs, an authenticated synthetic production smoke, then an iOS/Android mobile release. Deploy backend first: legacy text-row support and contention retries are new server code. Existing universal APIs require no UID allowlist, bulk migration or new index. Relevant backend APIs: Candidate control/list/read/prepare/accept/reject, canonical task point/list reads and task-integration reads. Existing route/schema availability is verified; this PR’s new server behavior is not deployed.
  • Does not claim an account-specific historical backfill or recovery. Verify one affected phone/pendant conversation delivers tasks, and an older desktop summary can add a task that remains after refresh/reopen. Verify Task Integrations opens from Settings and the Tasks header/menu on a physical phone.
  • Keep iOS: extracted action items appear in a conversation but not in Tasks #20595 open until the affected customers' records and released app behavior are verified.

Product invariants affected

INV-TASK-2: desktop capture remains suggestion-only; only explicit approval invokes canonical acceptance. Phone capture policy is unchanged.
INV-UI-3: uses shared Omi controls/sheets, existing localized copy and localized Settings search.
INV-PERF-1: uses the bounded server Suggested projection and the existing shared task owner; no history polling or additional capture pipeline.

Failure-Class: new

UI evidence

Task suggestions

Named Task Integrations menu

Additional saved-task, integration destination and summary-recovery captures are recorded in the sibling evidence.json manifest.

Review canonical desktop suggestions, recover stored summary tasks, and fence stale task projections without adding a second capture writer. Keep receipt-only tasks from skipping server pagination.
Keep the shared Suggested projection's workstream context visible and verify its anchor-task approval with large translated text.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T17:02:37.470072Z 7375693 New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad91b01422

ℹ️ 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".

Keep original task row positions when decoding skips malformed entries and preserve their coordinates and completion state in the conversation cache. Prepare and accept the stored row rather than its compacted display index; cover fresh and cached recovery through the real API consumer and native fixture.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d70a1bb9ec

ℹ️ 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".

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

Legitimate, well-tested mobile work but mixes a bug fix with a new feature surface (exposing Task Integrations entry in Settings/search/Tasks menu, new provider/widgets) and is far outside the scoped-diff bar (1992 lines). Treated as feature per policy -> approve only, not merged.

@aryanorastar aryanorastar changed the title fix(mobile): deliver conversation tasks and expose Task Integrations fix(tasks): complete mobile delivery and safe summary recovery Oct 20, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

Verdict: no blocking issues found - this is a coherent, well-tested completion of the mobile task-delivery path; the one process note is that the earlier human approval (94798e1) predates the current head, so it should be refreshed before merge.

What I verified:

  • backend/database/summary_task_links.py - legacy plain-text summary rows are handled on both sides: read_summary_task_row coerces a string row to {'description': ...} before validation, and linked_patch upgrades only the selected row when acceptance commits its task link (siblings and transcript data untouched). test_legacy_string_summary_promotes_only_selected_row_and_replays_its_link covers exactly this.
  • backend/database/candidates.py - swapping raw db.transaction() for run_with_transaction_contention_retry is behavior-preserving plus bounded retry; I checked the helper on main and it only replays explicit Firestore Aborted errors in a fresh transaction, matching the PR's claim that ambiguous failures are not replayed.
  • app/lib/backend/schema/structured.dart - the new cache-only _cache_source_index coordinate survives malformed-row skipping (structured_decode_blast_radius_test.dart) and provably never leaks into task-write or generated wire payloads.
  • app/lib/backend/http/api/task_suggestions.dart - clean read-only candidates client (list/get/generation) plus generation-fenced accept/reject; candidate IDs are URL-encoded; no new permissions or secrets.
  • .github/workflows/backend-emulator-proofs.yml + ci-budget.yaml - purely additive path triggers for the two task test files, with an honest p50 budget bump (3 -> 4 min) and updated rationale.
  • The Tasks overflow entry and Settings/search wiring (settings_destinations.dart, settings_search_index.dart, integrations_page.dart) open the existing TaskIntegrationsPage - no new surface invented.

Notes (non-blocking):

  • Performance: Tasks now fires one candidates list GET on first open, and home/page.dart calls forceRefreshActionItems on every tasks-tab tap and on app resume while on Tasks - one extra list call per tap; fine for freshness, worth watching on slow networks with deep pagination.
  • UX nit: the Tasks overflow button's semanticLabel is now taskIntegrations but the icon is still the export up-arrow glyph; a checklist icon (as used in Settings) would read more consistently.

USER IMPACT: Phone users can now review desktop-suggested tasks in Tasks, add tasks from older desktop conversations via Add Task, and find Task Integrations by name in Settings search instead of an unlabeled export glyph.

Still wanted as a reviewer: nothing blocking; optionally a note on whether per-tap refresh is intended to bypass pagination caching. Maintainer: please refresh the approval on the current head.


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 flutter flutter work labels Oct 20, 2026
@aryanorastar
aryanorastar merged commit 1ceefd4 into main Oct 21, 2026
72 of 73 checks passed
@aryanorastar
aryanorastar deleted the fix/20595-complete-task-delivery branch October 21, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flutter flutter work positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants