Skip to content

fix(app): fetch Home today tasks by due window - #13570

Merged
kodjima33 merged 5 commits into
BasedHardware:mainfrom
Da7em-T:fix/home-today-due-window-12534
Sep 12, 2026
Merged

kodjima33 merged 5 commits into
BasedHardware:mainfrom
Da7em-T:fix/home-today-due-window-12534

Conversation

@Da7em-T

@Da7em-T Da7em-T commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #12534

What changed and why

The Home today preview filtered ActionItemsProvider.actionItems, which is only the first global page (limit 100). A due-today task past that page never appeared. Home now requests incomplete items in the same 7-day due window the widget already used (due_start_date / due_end_date) and keeps that list separate from the Tasks page.

Product invariants affected

none

How it was verified

flutter test test/unit/action_items_home_today_test.dart

Flutter 3.47.4 / Dart 3.13.3: 3 passed.

  • filterTodayTasks keeps due-today and recent overdue, drops completed / old / undated / tomorrow.
  • Home preview uses a due-window fetch, not the first global page of 100.
  • An empty due-window result does not hide a first-page today task.

Logic checked by reading backend/routers/action_items.py: start_date/end_date are creation filters; due-window query params are the ones Home needs.

No device, no signed-in account, and no Home screen screenshot.

Tests

  • app/test/unit/action_items_home_today_test.dart (executed locally, 3 passed)

Failure class (fixes)

Failure-Class: none

Home preview filtered ActionItemsProvider's first global page, so a
due-today task past offset 100 never appeared. Fetch incomplete items
in the same 7-day due window the widget already used, without replacing
the Tasks-page list.
Do not kick off the due-window request from build(). Load it once from
initState after the widget is mounted.
Union the due-window rows with the global first page so a successful
empty due query cannot hide a matching task already in memory.

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

All reported issues were addressed

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

Re-trigger cubic

…hanged

The Home preview can pass while still overwriting the global first page.
Guard that invariant so a regression cannot hide it.
@Da7em-T

Da7em-T commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the cubic P3 in 1688248: after ensureHomeTodayTasksLoaded, the test now asserts provider.actionItems is still the 100 filler IDs and does not contain hidden-due, so a regression that overwrote the Tasks-page list would fail.

The due-window empty-result path is covered in 2f828c7 (empty due-window result does not hide a first-page today task).

@Da7em-T

Da7em-T commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Local verification now executed (Flutter 3.47.4 / Dart 3.13.3):

flutter test test/unit/action_items_home_today_test.dart

3 passed. The PR body is updated; it no longer claims the suite was unrun.

A completed failed Future was sticky, so Home never asked the due window
again. Coalesce in-flight calls only; keep a successful load until
clearUserData.

Co-authored-by: Cursor <[email protected]>
@Da7em-T

Da7em-T commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up 48209d8: a failed due-window fetch no longer pins ensureHomeTodayTasksLoaded. In-flight calls still coalesce; a successful load stays sticky until clearUserData. flutter test test/unit/action_items_home_today_test.dart — 4 passed.

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

Bug-fix: fixes #12534, Home today preview only checked the first global page of action items, missing due-today tasks beyond it; scoped diff, dedicated dart tests added, bug confirmed still present on main.

@kodjima33
kodjima33 merged commit b94c8d2 into BasedHardware:main Sep 12, 2026
Git-on-my-level added a commit that referenced this pull request Sep 12, 2026
#13570 added dueStartDate/dueEndDate to ActionItemsFetcher on main.
GitHub analyzes the merge of this PR, so the existing test stubs must
accept those named args or Dart Analyze fails.
cursor Bot pushed a commit to apoorvdarshan/omi that referenced this pull request Sep 13, 2026
- dart format sync_provider.dart and offline_processing_display.dart
- import BleAudioCodec in offline_processing_display_test.dart
- align ActionItemsFetcher test stubs with dueStartDate/dueEndDate (BasedHardware#13570)
- drop dead filesUploaded counter after reportUploadProgress refactor

Verified: dart format --set-exit-if-changed on touched files; bash app/scripts/analyze_ratchet.sh; flutter test offline_processing_display_test.dart deletion_consistency_test.dart chat_content_blocks_test.dart

Co-authored-by: Apoorv Darshan <[email protected]>
Git-on-my-level added a commit that referenced this pull request Sep 13, 2026
…13564)

* ci(desktop): pin ship/CI Xcode to 26.6 (17F113) from one source of truth

PR #12867 looked right on a local Xcode 26 named bundle and shipped the
icon-less system Picker fallback: Liquid Glass sat behind
#if compiler(>=6.2) while desktop CI (GHA desktop-swift-ci.yml and Codemagic
omi-desktop-swift-release/-preview) compiled with Xcode 16.4, so the ship
toolchain never typechecked the glass APIs (#13548 reverted the tab bar).
Bump the desktop ship/CI toolchain off 16.4 and make drift impossible:

- desktop/macos/ci/xcode-pin.json is now the only place the version (26.6),
  build (17F113), and expected app path (/Applications/Xcode_26.6.app) live.
  26.6/17F113 exists on both vendors: GHA macos-26 image 20260907.0351.1
  (default Xcode, /Applications/Xcode_26.6.app) and Codemagic mac_mini_m4
  image 'Xcode 26.6.x (default)' (/Applications/Xcode-26.6.app).
- run-swift-ci.sh reads the pin file (fails closed when it is missing) and
  keeps asserting the exact version+build after selection.
- desktop-swift-ci.yml macOS jobs move macos-15 -> macos-26, cache key
  prefixes move xcode164 -> xcode266 so 16.4 caches cannot poison 26.x
  builds, and the select steps name the pinned version.
- codemagic.yaml omi-desktop-swift-release/-preview move xcode: 16.4 ->
  26.6 (Android 16.4 and iOS 26.0.1 untouched); the reviewed
  codemagic_workflow_contract digests are refreshed for that edit.
- test_desktop_swift_ci_contract.py loads the pin file instead of literals
  and adds codemagic pin-agreement + macos-26 runner assertions.

Verified locally: bash desktop/macos/tests/test-run-swift-ci.sh (pin
26.6/17F113 sandbox incl. wrong-version/wrong-build/missing-pin sabotage);
python3 .github/scripts/test_desktop_swift_ci_contract.py (38 tests OK);
python3 .github/scripts/check-release-process-guards.py (exit 0);
xcrun swift build -c debug --package-path Desktop on Xcode 26.6 (17F113)
completes (1855s).

* ci(desktop): fail closed on compiler-gated Apple SDK APIs

New desktop-compiler-gates manifest check: desktop/macos/scripts/
check-desktop-compiler-gates.py fails when Desktop/Sources or Desktop/Tests
contain #if compiler(...) / #elseif compiler(...) — the shape that let
#12867 compile Liquid Glass out of the Xcode 16.4 ship toolchain while CI
stayed green (#13548 reverted the tab bar). Runtime availability gating
(if #available(macOS 26, *) with a working fallback) is the sanctioned
pattern and passes. The allowlist ships empty and is asserted by exact
contents in test_check_desktop_compiler_gates.py, so it cannot silently
grow; entries require a documented reason and a matching path+line.

checks-manifest.yaml also extends desktop-swift-ci-contract triggers with
the pin file, runner script, launcher test, and codemagic.yaml so every
pin consumer re-runs the contract test on drift.

Verified locally: python3 .github/scripts/test_check_desktop_compiler_gates.py
(9 tests OK — planted #if compiler(>=6.2) glassEffect sabotage fails the
checker and removing it passes); python3 desktop/macos/scripts/
check-desktop-compiler-gates.py on the real tree reports none found;
make preflight manifest lane: all selected checks pass except the
pre-existing loaded-host flake in test_pr_preflight.py
SingleFlightTests.test_identical_processes_join_and_execute_once, which
fails 3/3 on pristine origin/main at the same host load (passes in
isolation) and is unrelated to this diff.

* changelog(desktop): mark ci xcode pin as internal-only (kind: none)

The desktop changelog check requires an in-repo fragment for production
desktop paths even with the no-changelog-needed label: the label is
invisible after merge and would redden main's Release Eligibility run.
This PR is CI/infra only (toolchain pin + fail-closed gate), so the
marker is kind: none.

* ci(desktop): raise verify ceiling to 90m for the first cold macos-26 full lane

Measured on run 34687313733 (PR #13564): with the pin moved to Xcode 26.6,
every cache cold under the new xcode266 keys, the full Swift suite ran
past 55 minutes and the 60-minute job ceiling cancelled the job mid
serial-cluster. Every completed suite was green (one wedged batch cost
1650s before its 1500s watchdog bisected it cleanly; zero test failures)
— purely a timing ceiling, so:

- desktop-swift-verify timeout-minutes 60 -> 90
- full-lane OMI_SWIFT_TEST_STEP_BUDGET_SECONDS 2700 -> 4200

Both changes cite the run; contract test constants updated to match.

* test(ci): close compiler-gate checker holes from review

Match compiler() anywhere in #if/#elseif, ignore block-commented
directives, and fail closed when the scan root has no Swift files.

* test(app): accept ActionItemsFetcher due-window params

#13570 added dueStartDate/dueEndDate to ActionItemsFetcher on main.
GitHub analyzes the merge of this PR, so the existing test stubs must
accept those named args or Dart Analyze fails.

* style(app): dart format test stubs at line-length 120

CI Check Dart formatting uses --line-length 120 after pub get.

* chore: restore dart test stubs from origin/main after merge format noise

* test(app): match ActionItemsFetcher due-window params
cursor Bot pushed a commit to apoorvdarshan/omi that referenced this pull request Sep 13, 2026
- dart format sync_provider.dart and offline_processing_display.dart
- import BleAudioCodec in offline_processing_display_test.dart
- align ActionItemsFetcher test stubs with dueStartDate/dueEndDate (BasedHardware#13570)
- drop dead filesUploaded counter after reportUploadProgress refactor

Verified: dart format --set-exit-if-changed on touched files; bash app/scripts/analyze_ratchet.sh; flutter test offline_processing_display_test.dart deletion_consistency_test.dart chat_content_blocks_test.dart

Co-authored-by: Apoorv Darshan <[email protected]>
kodjima33 pushed a commit that referenced this pull request Sep 14, 2026
…#13688)

* fix(app): correct offline sync processing counter and percent display

Fixes #4772.

Before: upload progress could show remaining-based percentages (100% at
start) and counters like -75/1 when multi-recording totals were clobbered
by per-chunk 1/1 device reports.

After: shared display helpers compute completed processed/total and 0–100%
completion; sync status cards show counter + percent during upload/download
and during post-upload server processing; upload progress reports after each
batch; ring download ticks no longer overwrite multi-file totals.

Verification: added app/test/unit/offline_processing_display_test.dart
(flutter test not run on this VM — no Flutter SDK installed).

Co-authored-by: Apoorv Darshan <[email protected]>

* fix(app): scope offline server-processing meter to upload batch

- Track WAL ids accepted (202) per sync pass; derive processed/total from
  that scope instead of _totalWalsToProcess vs global uploadedWals.
- Reinit single-WAL sync totals; preserve multi-file counts on 1/1 download ticks.
- Convert 1-based device download index to completed count in progress line.

Verification: Flutter unavailable on Cloud VM; run locally:
  cd app && flutter test test/unit/offline_processing_display_test.dart

Co-authored-by: Apoorv Darshan <[email protected]>

* fix(app): unbreak Formatting and analyzer CI for offline sync PR

- dart format sync_provider.dart and offline_processing_display.dart
- import BleAudioCodec in offline_processing_display_test.dart
- align ActionItemsFetcher test stubs with dueStartDate/dueEndDate (#13570)
- drop dead filesUploaded counter after reportUploadProgress refactor

Verified: dart format --set-exit-if-changed on touched files; bash app/scripts/analyze_ratchet.sh; flutter test offline_processing_display_test.dart deletion_consistency_test.dart chat_content_blocks_test.dart

Co-authored-by: Apoorv Darshan <[email protected]>

---------

Co-authored-by: Cursor Agent <[email protected]>
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.

Home day timeline omits tasks past the first 100 (ActionItemsProvider page 1 only)

2 participants