Repository navigation
Keep a shared .ica's map colors when the profile isn't here - #248
Merged
Merged
Conversation
Export writes the strategy's profile id and its palette. Import kept the id whenever one was present and dropped the palette, so a strategy using someone else's custom profile drew in Default colors. When the id doesn't exist on this machine and the file has a palette, the strategy now keeps the palette as its own colors. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
When someone shares a .ica whose strategy uses one of their custom map themes, the receiver sees it in Default colors. The file carries the right colors; import just ignored them.
Reproduction
Export writes both
themeProfileIdandthemePalette. Import kept the id whenever one was present and threw away the palette. B has no profile with that id, so the strategy fell back to Default.The fix
_importStrategyFilenow checks whether the profile id exists on this machine. If it doesn't and the file has a palette, the strategy keeps that palette as its own colors (the "Custom, this strategy only" state,themeOverridePalette) and drops the dangling id. If the profile exists, nothing changes. Nothing changes either when the file has no palette, as with old exports: the id is kept, as before.No schema, Hive, or Convex change.
Not covered here
Cloud strategies sync only the profile id, not the profile's colors. A cloud strategy using a custom profile still shows Default colors on a device without that profile. Fixing that means syncing profiles or the palette, which is a separate change.
Verification
flutter analyzeon the touched files: no issues.flutter test: 1576 passed. Two heavy tests unrelated to import (the op-queue byte cap, loading geometry for every map) hit their 30-second timeouts on a busy machine; CI runs them.🤖 Generated with Claude Code
No blocking issue was found; this change is safe to merge based on the behavior checked.
What we checked:
Summary
The .ica import now preserves exported map colors when the referenced theme profile is unavailable locally. Available profiles retain their ID-based linkage. The missing-profile palette survived import, Hive reload, export, and reimport in the focused check.
Reviews (1) · Last reviewed commit: "Keep a shared .ica's map colors when the..."