Track the damage Panache deals #329
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!329
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/panache-power-tracking"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Panache wasn't in
MetaPowerRegistry, so it had no pooled aggregate, no meta-power card, no badge, no shared summary. Worse, its damage was invisible: it strikes fromAfterCardPlayedthrough the creature overload ofCreatureCmd.Damage, which forwardscardSource: null, so every hit arrived anonymous and the tracker's null-source branch dropped it.That understatement became load-bearing when the deck view gained damage sorting (#325): a Panache reported Total damage 0, sorted to the bottom, and under the attacks-only filter disappeared from the view entirely — the sort actively misreporting a card that deals real damage.
The damage had nowhere to go
Registering it is the easy half. No registered power had ever dealt damage, so
PowerAggregatecarried no damage fields at all. It now has the same five asCardAggregate—TotalIntended,TotalBlocked,TotalOverkill,TotalEffective,Kills— named to match so the tooltip vocabulary lines up, and merged throughMergePowerAggregatesIntowith everything else.Attribution
Follows the primer's rule for downstream damage: arm a narrow window at a reliable event, consume only what plainly belongs to it.
A prefix on
PanachePower.AfterCardPlayedopens the window. The damage observer claims an entry only when it:A prefix rather than a postfix on purpose: the method is
async, so a postfix runs when the Task is returned, not when the damage resolves — it would close the window before the entries arrive.Schema
New persisted fields come with
Fixtures/RunSchema/panache-power-damage-run.json, a README entry, and threeSchemaLoadingTestscases: historical load, resumable load, and a missing-field default asserted against the olderaggression-power-run.json.NotInDeckViewTestspins the registry order and caught the new entry, exactly as its comment says it should.Verification
2137 passed, 0 failed. Built, deployed, hot-reloaded: patch install went433 → 434and the diag dump listsPanachePower.AfterCardPlayed.Restart required before behavioural testing. This adds a Harmony target that was unpatched in the running process, so per the primer existing compiled callers may bypass the detour until a restart. Live verification not run.
🤖 Generated with Claude Code