forked from ente-io/ente
-
Notifications
You must be signed in to change notification settings - Fork 0
[mob][photos] Fix widget image quality and rotation issues #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
prateekmedia
wants to merge
9
commits into
main
Choose a base branch
from
widget-fixes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Co-Authored-By: Claude <[email protected]>
c50bf5b to
55ced18
Compare
- Implement isolate-based widget image processing pipeline with proper EXIF handling - Increase widget image resolution from 512px to 1024px for better quality - Add multi-level caching strategy to optimize performance - Use flutter_image_compress with auto-rotation for EXIF orientation fixes - Process all heavy image operations in isolate to avoid UI blocking Co-Authored-By: Claude <[email protected]> fix: enhance widget image processing with better error handling and visual feedback - Add comprehensive logging throughout widget image processing pipeline - Improve HEIC file handling with fallback decoding mechanism - Add visual quality indicator (512px/2048px) to widget subtitle for debugging - Better error reporting with stack traces for isolate failures - Enhanced cache file naming with size-specific identifiers 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> fix: restore TODO comments and add widget quality feature flag - Restored TODO prefixes that were inadvertently removed from comments - Added enhancedWidgetImage feature flag for internal users (1024px @ 85% quality vs 512px @ 70%) - Maintains backward compatibility with legacy widget image size for regular users Co-Authored-By: Claude <[email protected]> fix: optimize widget image quality and download logic - Set optimal widget image size to 1280px for mobile screens - Add retry logic for remote file downloads (2 attempts) - Skip cache for requests >512px to ensure high quality - Add network error detection to skip unnecessary retries - Show actual image resolution in debug mode with (i) suffix - Clean up redundant logging while keeping essential warnings Co-Authored-By: Claude <[email protected]>
- Cancel ongoing widget operations when starting new ones - Add CancelableCompleter support to all widget services - Check for cancellation at key points during rendering - Prevent waiting for outdated operations when selections change - Clean up resources when operations are cancelled This ensures immediate response to selection changes without waiting for previous widget computations to complete. Co-Authored-By: Claude <[email protected]> fix: only cancel widget operations when changes are detected - Move cancellation logic inside the update check - Only cancel ongoing operations if _shouldUpdateWidgetCache returns true - Prevents unnecessary cancellations when nothing has changed - Applies to all three widget services (album, memory, people) This ensures efficient resource usage by avoiding redundant cancellations and re-runs when the widget data hasn't actually changed. Co-Authored-By: Claude <[email protected]> feat: implement widget-type-specific cancellation tracking - Track separate operations for album, memory, and people widgets - Each widget type can only cancel its own operations - Prevents cross-widget cancellation (e.g., album changes won't cancel memory updates) - Uses Map to track operations by widget type identifier - Ensures operations using shared lock don't interfere with each other This isolation ensures that if Memory widget is processing and Album selection changes, only Album's queued operation (if any) is cancelled, not the running Memory operation. Co-Authored-By: Claude <[email protected]>
…ueue - Add request generation counter to each widget service - Skip outdated operations when they get the lock - Prevents redundant operations when multiple requests queue up - Ensures only the latest request for each widget type executes Example: If queue is [Memory (running), Album1, People, Album2], Album1 will be skipped when it gets the lock since Album2 is newer. This prevents wasting resources on outdated operations. Co-Authored-By: Claude <[email protected]>
- Use flutter_cache_manager instead of custom cache implementation - Remove unreliable quality checks based on file size - Simplify image fetching flow with clear priority hierarchy - Maintain retry logic for remote file downloads Co-Authored-By: Claude <[email protected]>
- Add WidgetCacheManager.emptyCache() call during logout - Ensures cached widget images are cleared when user signs out Co-Authored-By: Claude <[email protected]>
…fresh Co-authored-by: Claude <[email protected]>
38ad4da to
72b6137
Compare
Co-authored-by: Claude <[email protected]> Consolidate widget changes in internal changelog Co-authored-by: Claude <[email protected]> Update internal changes with enhanced widget feature Co-authored-by: Claude <[email protected]> Consolidate widget improvements in internal changelog Co-authored-by: Claude <[email protected]> Update flag notation in internal changelog Co-authored-by: Claude <[email protected]>
72b6137 to
b94df1a
Compare
Co-authored-by: Claude <[email protected]>
c2a43e9 to
0c2d477
Compare
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.
Description:
Tests: