fix(ui): refresh event groups and contain failed avatars - #945
Merged
Merged
Conversation
Rebuild grouping once per notified list snapshot instead of caching mutable List identity and length. Reuse the bounded avatar component in user headers and retain image failure logs while displaying the existing local failure asset. Regression checks: old code fails equal-length refresh and avatar error cases; 15 related Flutter tests pass after the fix. Flutter debug build and Dart MCP personal-page smoke on Pixel_9a show real account data and no runtime errors. Analyze retains 17 pre-existing diagnostics. Independent review found no code blocker. Full authenticated Flow and fold posture coverage remain pending; this commit does not claim them.
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The avatar error test does not prove that the fallback path completed.
Review effort: Lite
Findings: None
What changed in this PR
Fixes stale event grouping on refreshed lists and contains avatar load failures with bounded fallbacks and logging.
Changes:
- Rebuild event-group indexes from current data snapshots.
- Reuse the shared avatar component with failure fallback.
- Add grouping and avatar regression tests.
| File | Description |
|---|---|
test/widget/gsy_avatar_error_test.dart |
Tests avatar failure behavior. |
test/widget/event_group_refresh_test.dart |
Tests refresh and pagination grouping. |
lib/widget/gsy_user_icon_widget.dart |
Adds bounded image failure fallback and logging. |
lib/widget/gsy_event_group_item.dart |
Removes mutable-list caching. |
lib/page/user/widget/user_header.dart |
Reuses the shared avatar component. |
lib/page/repos/repostory_detail_info_page.dart |
Uses snapshot-based grouping. |
lib/page/dynamic/dynamic_page.dart |
Rebuilds grouping on data notifications. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Rebuild grouping once per notified list snapshot instead of caching mutable List identity and length. Reuse the bounded avatar component in user headers and retain image failure logs while displaying the existing local failure asset.
Regression checks: old code fails equal-length refresh and avatar error cases; 15 related Flutter tests pass after the fix. Flutter debug build and Dart MCP personal-page smoke on Pixel_9a show real account data and no runtime errors. Analyze retains 17 pre-existing diagnostics. Independent review found no code blocker. Full authenticated Flow and fold posture coverage remain pending; this commit does not claim them.