Skip to content

Conversation

@ice-damocles
Copy link
Contributor

Description

  • Improves caching of useWatchWhenVisible to avoid flickering of the states

Task ID

ION-5434
ION-5419

Type of Change

  • Bug fix

@ice-damocles ice-damocles requested a review from a team as a code owner February 6, 2026 10:06
Copilot AI review requested due to automatic review settings February 6, 2026 10:06
@ice-damocles ice-damocles requested a review from a team as a code owner February 6, 2026 10:06
@ice-morpheus ice-morpheus enabled auto-merge (squash) February 6, 2026 10:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve caching in the useWatchWhenVisible hook to prevent UI flickering when providers reinitialize after being inactive. The changes add logic to retain cached AsyncValue data when the provider briefly returns loading or null states during reinitialization. Additionally, it includes UI improvements to the tokenized community page.

Changes:

  • Enhanced useWatchWhenVisible hook with smart caching logic to avoid showing degraded states (loading/null) when returning to a visible route
  • Excluded twitter tokens from showing duplicate titles in the header
  • Added text overflow handling and removed conditional padding for better UI consistency

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/app/hooks/use_watch_when_visible.dart Added AsyncValue-aware caching logic to preserve last good state during provider reinitialization, preventing flickering
lib/app/features/tokenized_communities/views/pages/tokenized_community_page.dart Excluded twitter token type from title display, added ellipsis for overflow protection, and removed conditional padding for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ice-endymion
ice-endymion previously approved these changes Feb 9, 2026
ice-evander
ice-evander previously approved these changes Feb 9, 2026
auto-merge was automatically disabled February 9, 2026 10:25

Pull Request is not mergeable

ice-kreios
ice-kreios previously approved these changes Feb 9, 2026
@ice-damocles ice-damocles force-pushed the bugfix/use-when-active-cache-fixes branch from c046f87 to 5bfccd5 Compare February 9, 2026 16:02
@ice-morpheus ice-morpheus force-pushed the bugfix/use-when-active-cache-fixes branch from 5bfccd5 to 152cec2 Compare February 9, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants