Persistent thumbnail color cache with ListRow pattern#245
Merged
chrisballinger merged 1 commit intomasterfrom Apr 12, 2026
Merged
Persistent thumbnail color cache with ListRow pattern#245chrisballinger merged 1 commit intomasterfrom
chrisballinger merged 1 commit intomasterfrom
Conversation
Replaces the dual-observation list architecture (items + separate favorites) with a single GRDB read transaction that returns ListRow<T> containing the object, full ObjectMetadata, and cached ThumbnailColors. This eliminates redundant queries and provides instant color/metadata rendering. Key changes: - New thumbnail_colors GRDB table with Codable ThumbnailColors model - New ListRow<T> generic wrapper (object + metadata + colors) - Single annotated observation replaces dual items+favorites observations - DisplayableObject.supportsColorTheming gates list row colors (Art/MV only) - Detail views receive pre-loaded data via DetailPageItem pass-through - ColorPrefetcher background batch extraction at app launch - Thumbnail downloaders validate corrupt files and return awaitable Tasks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
ListRow<T>that bundles the object + fullObjectMetadata+ cachedThumbnailColorsthumbnail_colorsGRDB table stores extracted thumbnail colors across app restarts — no more re-extracting from images on every launchDetailPageItemthreads metadata + colors from list → detail, so detail views render instantly with no async flickerNew files
ThumbnailColors.swiftListRow.swiftListRow<T>— object + metadata + colorsColorPrefetcher.swiftThumbnailColors+UIKit.swiftDetailPageItemArchitecture changes
PlayaDBobservation methods return[ListRow<T>]instead of[T]ObjectListViewModelstores[ListRow<Object>], eliminates separate favorites observationObjectRowViewacceptsthumbnailColorsparam, gates onDisplayableObject.supportsColorThemingTask<Set<String>, Never>with corrupt file validationDependencyContainersequences: downloads →ColorPrefetcher.prefetchMissingColors()Test plan
🤖 Generated with Claude Code