Skip to content

fix: show shop description for Warm Beanie, move description logic to logic layer - #265

Open
eseidel wants to merge 1 commit into
mainfrom
fix/shop-description-logic
Open

eseidel wants to merge 1 commit into
mainfrom
fix/shop-description-logic

Conversation

@eseidel

@eseidel eseidel commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Shop purchases containing equipment items with modifiers (e.g., Warm Beanie) were showing no description text
  • Moved all shop description generation from UI into ShopPurchase.shopDescription() in the logic layer, resolving descriptions via a priority chain: custom description → item charges → purchase modifiers → item description → item modifier descriptions
  • Consolidated the duplicated _formatModifiers(Item, Registry) pattern (copy-pasted in bank.dart, equipment_stats_dialog.dart) into ModifierMetadataRegistry.formatModifierDescriptions()

Test plan

  • Added 8 tests for ShopPurchase.shopDescription covering all priority levels and edge cases
  • Added 3 tests for ModifierMetadataRegistry.formatModifierDescriptions
  • All logic tests pass (2390)
  • All UI tests pass (175)
  • dart analyze --fatal-infos clean on all changed files

@eseidel
eseidel force-pushed the fix/shop-description-logic branch from e9aa917 to c77bdff Compare April 1, 2026 05:00
…tion logic to logic layer

Shop purchases containing equipment items with modifiers (e.g., Warm Beanie)
were showing no description. Moved all shop description generation from UI into
ShopPurchase.shopDescription() in the logic layer, with a priority chain:
custom description > item charges > purchase modifiers > item description >
item modifier descriptions. Also consolidated the duplicated _formatModifiers
pattern from bank/equipment/shop into ModifierMetadataRegistry.formatModifierDescriptions().
@eseidel
eseidel force-pushed the fix/shop-description-logic branch from c77bdff to d19acd4 Compare April 1, 2026 05:02
@eseidel
eseidel enabled auto-merge (squash) April 1, 2026 05:03
@codecov

codecov Bot commented Apr 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.67442% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.13%. Comparing base (abccd9c) to head (d19acd4).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
logic/lib/src/types/modifier_metadata.dart 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
+ Coverage   90.11%   90.13%   +0.02%     
==========================================
  Files         108      108              
  Lines       14673    14716      +43     
==========================================
+ Hits        13222    13265      +43     
  Misses       1451     1451              
Flag Coverage Δ
logic 90.19% <97.67%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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