fix(panel): remove stale HP rendering per ADR-014#171
Merged
Conversation
…anel reads "Edge"
S2-BUG (playtest 2026-04-26): the character panel header and the inline
party rows rendered an "HP N/M" badge that pulled from EdgePool under
a misleading label. ADR-014 ("Diamonds and Coal") and ADR-078 ("Edge
/ Composure") removed HP from CreatureCore in favor of the EdgePool
composure currency — Sebastien-axis (mechanics-first) players in the
playgroup notice this immediately and ask why HP is showing.
This patch:
- src/components/CharacterPanel.tsx
- Renames the header badge: HpBadge → EdgeBadge, "HP N/M" → "Edge N/M",
testid character-hp-badge → character-edge-badge, aria-label "Hit
points N of M" → "Edge N of M".
- Renames the inline party row: testid party-member-hp-{id} →
party-member-edge-{id}, "HP N/M" → "Edge N/M".
- Comments now reference ADR-014 / ADR-078 with a note that the
legacy wire field names (hp/hp_max on CharacterSummary,
current_hp/max_hp on PartyMember) are kept until a protocol-level
rename (out of scope — would require save migration).
- src/components/CharacterSheet.tsx
- hp / hp_max field doc-comments updated to call out the schema
rename and the legacy wire-name caveat.
- src/components/__tests__/CharacterPanel.test.tsx
- Updated existing assertions to look for "Edge N/M" + the new
testids; added rename-completeness lock tests that assert the
legacy testids and "HP N/M" text never appear in the panel header
OR the party section.
- src/__tests__/edge-badge-party-status-wiring.test.tsx (new)
- Wiring test that drives a synthetic PARTY_STATUS payload through
the App.tsx fan-out shape (hp/hp_max derived from current_hp/max_hp)
into a real CharacterPanel render, asserting Edge labels end-to-end
and no legacy HP testids/text anywhere. Required by CLAUDE.md
"Every test suite needs a wiring test".
Coordinates with the server PR (slabgorb/sidequest-server#63, commit
e303d57df95c5a03ede12e3e0f4abc7f207e9f72) which removed the matching
HP emission from the chargen.complete log line and the
character_creation.character_built OTEL event.
e1b9f39 to
54c2049
Compare
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.
Summary
Playtest 2026-04-26 (S2-BUG): the character panel header and the inline party rows rendered an "HP N/M" badge that pulled from EdgePool under a misleading label. ADR-014 ("Diamonds and Coal") and ADR-078 ("Edge / Composure") removed HP from
CreatureCorein favor of the EdgePool composure currency — Sebastien-axis (mechanics-first) players in the playgroup notice this immediately and ask why HP is showing when the schema says it shouldn't.Changes
src/components/CharacterPanel.tsxHpBadge→EdgeBadge,"HP N/M"→"Edge N/M", testidcharacter-hp-badge→character-edge-badge, aria-label"Hit points N of M"→"Edge N of M".party-member-hp-{id}→party-member-edge-{id},"HP N/M"→"Edge N/M".hp/hp_maxonCharacterSummary,current_hp/max_hponPartyMember) are kept until a protocol-level rename.src/components/CharacterSheet.tsxhp/hp_maxfield doc-comments updated.src/components/__tests__/CharacterPanel.test.tsx"HP N/M"text never appear in the panel header OR the party section.src/__tests__/edge-badge-party-status-wiring.test.tsx(new)hp/hp_maxderived fromcurrent_hp/max_hp) into a realCharacterPanelrender, asserting Edge labels end-to-end and no legacy HP testids/text anywhere. Required by CLAUDE.md "Every test suite needs a wiring test".Scope deliberately not included
The wire protocol field names on
PartyMember(current_hp/max_hp) andCharacterState(hp/max_hp) and the App.tsx mapping (CharacterSummary.hp/hp_max) are unchanged — those are a coordinated server-side rename plus save migration and are out of scope for the playtest fix. UI labels and testids are flipped here so Sebastien doesn't see "HP" in the panel during today's session.Coordinates with
slabgorb/sidequest-server#63(fix/s2-hp-schema-leak-server) — server commite303d57df95c5a03ede12e3e0f4abc7f207e9f72removes the matching HP emission from thechargen.completelog line and thecharacter_creation.character_builtOTEL event.Test plan
npx vitest run src/components/__tests__/CharacterPanel.test.tsx— all CharacterPanel tests pass with the new Edge labels (210 across all worktrees, including the new schema-lock tests).npx vitest run src/__tests__/edge-badge-party-status-wiring.test.tsx— new wiring test passes.npx vitest run src/components/__tests__/ src/__tests__/edge-badge-party-status-wiring.test.tsx— 125 files / 2359 tests pass; no regressions.npx eslintclean for touched files.Restart
Needs UI rebuild: yes (component rename — testids/labels changed). Browser hard refresh after
npm run buildor in dev hot-reload.🤖 Generated with Claude Code