Repository navigation
Conversation
|
Thanks for the fix, @skdas20! The approach of keeping autocomplete on the original provider and using a separate one for the results page looks good. One concern: I ran Also, the CLA check is failing, so it will need to be signed before this can be merged. Thanks again! |
|
Thanks @ogres, good catch. The CLA is now signed. I'll tighten the test so it fails on the base version: assert the "no results" text is absent while |
There was a problem hiding this comment.
🟢 Approval recommended
The focused changes preserve autocomplete behavior and cover the loading-state regression, with no blocking issues identified.
No open issues 🎉
What changed in this PR
Fixes #2094 by keeping Debian search results in a loading state while AppStream initializes, so Ubuntu App Center shows progress instead of a premature empty state.
Changes:
- Adds a loading-aware search provider while preserving fast autocomplete behavior.
- Updates Debian results and retry handling to use the new provider.
- Adds a widget regression test for switching from Snap to Deb during initialization.
| File | Description |
|---|---|
packages/app_center/test/search_page_test.dart |
Tests progress during initialization and the empty state after completion. |
packages/app_center/lib/search/search_page.dart |
Uses the loading-aware provider for Debian results and retries. |
packages/app_center/lib/appstream/appstream_search.dart |
Shares search logic between autocomplete and loading-aware providers. |
Review effort: Balanced
| ( | ||
| ref, | ||
| query, | ||
| ) => _search(query, returnBeforeInitialization: true), |
There was a problem hiding this comment.
Do we actually need this? Where do we use it?
|
Yes. |
What
Why
When the package source changes to Deb before AppStream has initialized, the provider currently emits an empty result first. The results page therefore shows the empty state while the search is still running instead of displaying its progress indicator.
Fixes #2094.
Testing
flutter test --no-pub(233 tests passed)flutter analyze --no-pub --fatal-infosgit diff --check