Skip to content

Comments

fix: use composite key for CardInfo in HelpScreen grid#244

Merged
codebutler merged 1 commit intomasterfrom
fix/help-screen-duplicate-key
Feb 22, 2026
Merged

fix: use composite key for CardInfo in HelpScreen grid#244
codebutler merged 1 commit intomasterfrom
fix/help-screen-duplicate-key

Conversation

@codebutler
Copy link
Owner

Summary

  • Multiple CardInfo entries can share the same nameRes (e.g., Troika registers both MifareClassic and MifareUltralight variants with Res.string.card_name_troika)
  • The HelpScreen LazyVerticalGrid used nameRes.key alone as the item key, causing a duplicate key crash when scrolling
  • Added CardInfo.uniqueKey computed property ("${nameRes.key}:${cardType.name}") and use it for grid keys and card selection

Test plan

  • Open the Help/Explore screen on desktop and scroll through the card grid without crash
  • Tap a Troika card tile and verify the bottom sheet opens for the correct variant
  • Verify no other cards are affected by the key change

🤖 Generated with Claude Code

Multiple CardInfo entries can share the same nameRes (e.g., Troika has
both MifareClassic and MifareUltralight variants). Using nameRes.key
alone as the LazyVerticalGrid item key caused a duplicate key crash
when scrolling.

Add CardInfo.uniqueKey that combines nameRes.key with cardType.name,
and use it for grid keys and card selection in HelpScreen.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codebutler codebutler merged commit 887c958 into master Feb 22, 2026
7 checks passed
@codebutler codebutler deleted the fix/help-screen-duplicate-key branch February 22, 2026 20:34
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.

1 participant