Repository navigation
fix(app): load the app catalog on Integrations when apps came from the cache - #20497
Merged
Merged
Conversation
…e cache #19730 moved the Apps tab catalog onto Settings > Integrations and gated its load on `appProvider.apps.isEmpty`. Start-up fills `apps` from the local cache (app_shell setAppsFromCache), so for anyone who had used apps before, getApps() never ran, `groupedApps` stayed empty, and the catalog under the search bar was blank. The old Apps tab called getApps() on every open. AppProvider.ensureCatalogLoaded() now owns that decision and keys it on `groupedApps`, the data the catalog draws; Integrations calls it. Duplicate loads are already coalesced by getApps(). Verification: - flutter test test/providers/app_provider_load_test.dart test/providers/app_provider_enabled_fetch_failure_test.dart: 6 pass, including the new cached-apps case. - flutter analyze on the changed files: only the two existing avoid_print infos already on main. Failure-Class: none
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
This was referenced Oct 4, 2026
sanjayJ369
added a commit
to sanjayJ369/omi
that referenced
this pull request
Oct 6, 2026
…asedHardware#20500) The CAP_APP_ACK_RECLAIM download test sampled the card's advances after a fixed 300 ms sleep. Under CI load the first chunk's checkpoint persist and proof validation had not finished by then, so the incremental advance landed after the snapshot and the test failed with 0 advances (PR BasedHardware#20497 run 37150132070, attempt 1). This was a timing flake, not a custody write outliving teardown. The fake card now completes a future on its first advance, and the test waits for it, bounded at 10 s, before sending the last records and DONE. A missing incremental advance still fails the existing expectation.
kodjima33
pushed a commit
that referenced
this pull request
Oct 7, 2026
…20500) (#20638) * fix(app): flush pendant custody writes before tests delete storage (#20500) Ring-custody checkpoint writes are serialized on a save/IO queue, and mismatch invalidation and ring reincarnation persist them fire-and-forget. Nothing let a caller wait for queued writes, so tests that delete their custody directory after a fixed 50ms settle raced them: the queued `.json.tmp` -> rename ran after teardown and failed the suite with PathNotFoundException "after it has completed" (main and unrelated PRs). - PendantRingCustody.flush() / PendantCustodyStore.flush(): complete once every write queued so far has landed, re-checking for writes queued while waiting. - The three flaky suites end the custody session (disconnect) and flush before deleting storage; ring_custody_download_test flushes every custody it creates before removing the path_provider mock, and pendant_custody_main_red_test flushes the shared custody. - pendant_ring_custody_flush_test.dart gates the store's directory so a fire-and-forget write is provably pending and pins flush() semantics. * fix(app): re-check queued custody checkpoints after each store flush A checkpoint queued while flush() waited on the store reached the I/O queue only after its predecessor's save, so flush() could return with it still pending. flush() now waits on the store inside the checkpoint-queue loop. The teardown regression test asserted on uncaught errors, but noteInfo already logs and swallows a failed write, so it passed without flush(). It now checks what reached disk before the directory is deleted, and a new test pins the store-wait race. * fix(app): drain open sessions' live-mark writes in custody flush flush() only waited on the checkpoint queue, but an open session's live marks enqueue their persists lazily on its mark chain, so a test could flush, delete storage, and have a later mark write recreate it. flush() now also waits on every open session's mark chain until both are stable. Every custody test that deletes storage now flushes each custody it built first: pendant_ring_custody_test and local_wal_live_custody_test leaked recreated temp dirs on every run. The two wrap tests that queue thousands of marks end their session so the queued persists are dropped, and the disconnect test flushes in finally. The flush tests read the checkpoint from disk synchronously so an early return cannot hide behind the store queue, and a new test pins the store-level loop. * test(app): end the wrap test's custody session even when it fails The u16 wrap test queues about 3300 mark persists; it now ends its session through addTearDown right after beginConnection, so a failing expectation does not leave teardown's flush writing them one by one past the timeout. The two-mark wrap test no longer needs that. A comment now says why flush() re-checks the mark chains as well as the save queue. * test(app): wait for the incremental advance instead of a fixed sleep (#20500) The CAP_APP_ACK_RECLAIM download test sampled the card's advances after a fixed 300 ms sleep. Under CI load the first chunk's checkpoint persist and proof validation had not finished by then, so the incremental advance landed after the snapshot and the test failed with 0 advances (PR #20497 run 37150132070, attempt 1). This was a timing flake, not a custody write outliving teardown. The fake card now completes a future on its first advance, and the test waits for it, bounded at 10 s, before sending the last records and DONE. A missing incremental advance still fails the existing expectation. * test(app): await the pendant drain instead of sleeping on it (#20500) The 10s custody-window test fired the drain timer's callback by hand, dropped the Future it returned, and read the WAL index after a fixed 300 ms sleep. Under CI load the index save had not landed by then, so the test failed with no disk WAL (main at 4e93805). Because that skipped sync.stop(), teardown then deleted tempDir under the still running save, which failed again "after test completion" renaming wals.json.tmp. That is a WAL index write, so the custody flush in tearDown could not cover it. The test now drives the timers with the existing ManualScheduler: it elapses the 10s window and awaits waitForCallbackIo(), which completes once the drain, its audio write and the index save have finished. The body runs in try/finally with sync.stop(), which queues behind any drain still running, so no index write outlives tempDir even when an expectation fails. The changelog exemption reason now covers both timing fixes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The app catalog under Settings → Integrations shows nothing below the search bar for anyone who has used apps before.
appProvider.apps.isEmpty. The old Apps tab calledgetApps()on every open.appsfrom the local cache (app_shell.dart,setAppsFromCache()), sogetApps()never runs.groupedApps, the only thing the catalog draws, stays empty and the page is blank.Change
AppProvider.ensureCatalogLoaded()owns the decision now. It fetches the catalog whengroupedAppsis empty, keyed on the data the catalog actually draws rather thanapps. It also loads popular apps when that list is empty, as before.IntegrationsPagecalls it instead of theapps.isEmptycheck.getApps()already coalesces concurrent loads.Product invariants affected
none
Failure class
Failure-Class: none
Verification
test/providers/app_provider_load_test.dartsets up the failing state:appsfilled from the cache,groupedAppsempty. It asserts thatensureCatalogLoaded()fetches the catalog once and fills the groups.flutter test test/providers/app_provider_load_test.dart test/providers/app_provider_enabled_fetch_failure_test.dart: 6 tests pass.flutter analyzeon the changed files: only the twoavoid_printinfos already onmain.scripts/pr-preflight --pr-body-file <this body>: passes.🤖 Generated with Claude Code