Skip to content

fix: prefetch images for connection error - handle retry#504

Merged
bluestreak01 merged 4 commits intomainfrom
fix/handle-images-in-connection-error
Nov 29, 2025
Merged

fix: prefetch images for connection error - handle retry#504
bluestreak01 merged 4 commits intomainfrom
fix/handle-images-in-connection-error

Conversation

@emrberk
Copy link
Copy Markdown
Collaborator

@emrberk emrberk commented Nov 28, 2025

No description provided.

@emrberk emrberk requested a review from Copilot November 28, 2025 20:47
Copy link
Copy Markdown
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 fixes image loading issues during connection errors by implementing image prefetching with base64 data URLs. When a connection error occurs, preloaded images can be displayed without requiring network access, and the retry button now attempts to reconnect instead of forcing a full page reload.

Key Changes:

  • Implemented image prefetching mechanism that converts images to base64 data URLs
  • Modified the retry button to call fetchAll instead of reloading the page
  • Updated fetchAll to support conditional error message display via a switchView parameter

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/providers/SettingsProvider/index.tsx Added image prefetching logic, modified retry button behavior to use fetchAll instead of page reload, and converted fetchAll to a memoized callback with conditional error messaging
src/components/CenteredLayout/index.tsx Added support for preloaded images prop to display cached image data
e2e/questdb Updated subproject commit reference

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

@bluestreak01 bluestreak01 merged commit 51d452a into main Nov 29, 2025
3 checks passed
@bluestreak01 bluestreak01 deleted the fix/handle-images-in-connection-error branch November 29, 2025 18:21
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.

3 participants