feat(state): persist assigned tile graphics - #210
Merged
Merged
Conversation
Add a validated application-owned graphic filename to per-sound metadata, migrate existing stores to the v2 envelope, and protect invalid or unsupported data from overwrite. Preserve default-entry pruning and existing graphic assignments when editing other metadata. Co-Authored-By: Codex <noreply@openai.com>
📝 WalkthroughWalkthroughAdds validated per-sound graphic references, store APIs, v1-to-v2 metadata migration, read-protected persistence behavior, application field preservation, and comprehensive tests for validation, pruning, round trips, and compatibility. ChangesAssigned graphic persistence
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SoundMetaStore
participant PersistenceDecoder
participant GraphicAssetRef
SoundMetaStore->>PersistenceDecoder: load versioned metadata
PersistenceDecoder->>GraphicAssetRef: validate persisted filename
GraphicAssetRef-->>PersistenceDecoder: validated reference or error
PersistenceDecoder-->>SoundMetaStore: migrated or current metadata
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
Collaborator
Author
|
@coderabbitai review |
✅ Action performedReview finished.
|
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.
Why
Per-sound tile graphics need a safe persistence boundary before file selection, copying, or rendering can be built. Existing sound metadata must migrate without losing customizations, and invalid paths must never cause HonkHonk to overwrite unreadable state.
What
Adds a validated application-owned graphic filename to per-sound metadata, advances the persisted envelope to v2 with explicit v1 and legacy migration, and preserves default-entry pruning. Invalid graphic references and unsupported versions load read-protected. This remains state-only: no chooser, copying, decoding, thumbnails, or rendering.
Testing
🤖 Co-authored by Codex. Closes #206.
Summary by CodeRabbit
New Features
Bug Fixes
Data & Reliability