Skip to content

feat(inventory): show attached charm value separately from item price - #95

Merged
8liam merged 2 commits into
mainfrom
docs/project-next-steps
Nov 22, 2026
Merged

8liam merged 2 commits into
mainfrom
docs/project-next-steps

Conversation

@8liam

@8liam 8liam commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What and why

Weapons with priced charms attached now show that charm value next to the item price, without changing the item's price or the headline total.

  • Items table and grid cards: a muted + $X line appears under the price when at least one attached charm is priced. Unpriced charms are skipped.
  • Dashboard: a "Charms" stat sits beside Inventory, Storage units and Items, with the detail "not in total". It only renders when the charm value is above 0.
  • Server: buildDashboard returns totals.charmsValue. It is not added to totals.value, so the value history stays comparable with snapshots recorded before this change.
  • Loose charms: a charm listed as its own item is not counted again as an attachment. Its own price already covers it.

Charm value is kept out of the total on purpose. Counting it would shift the history line, and the total then wouldn't match what the weapons sell for on their own. Changing that is a separate decision.

How I verified it

Checks run on the working tree before this commit. They have not been re-run on the committed state.

  • vp check: 0 errors, 4 warnings (existing build-chunk warnings).
  • pnpm test: 302 of 302 pass. This includes new unit tests in src/lib/items/charm-value.test.ts and a dashboard test asserting charmsValue is summed, ignores unpriced charms and leaves totals.value unchanged.
  • pnpm build: succeeds.
  • Not run: pnpm exec tsc -b. Run it before merging.
  • Not checked: the UI has not been viewed in a browser. Layout of the table price cell, the grid card and the hero stat is unverified.

Review note: src/routeTree.gen.ts changed in this commit in formatting only (quote style and semicolons) because the generator output differs from the formatter config. The file is generated, so consider regenerating it with the repo's formatter or excluding it from the diff before merge.

  • pnpm exec tsc -b && vp check && pnpm test pass
  • Targets develop

- Sum priced charms attached to weapons into a charms value, shown as "+ X" on grid cards and table price cells
- Add a Charms stat to the portfolio hero; excluded from total value so loose charms are not double counted
- routeTree.gen.ts has formatter-only churn (quotes, semicolons) from regeneration
@8liam
8liam merged commit 87de676 into main Nov 22, 2026
4 checks passed
@8liam
8liam deleted the docs/project-next-steps branch November 22, 2026 11:15
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