Skip to content

Commit 8bdafc9

Browse files
Jasragsclaude
andauthored
feat(sheet): Add inventory management controls to WeaponsDisplay (#372) (#394)
Enhance WeaponsDisplay with interactive readiness, wireless, and ammo controls directly in the weapons view, matching InventoryPanel capabilities. - Add readiness badge (always visible) with color-coded pill - Add compact ammo indicator bar in collapsed row - Replace static wifi icon with state-aware Wifi/WifiOff - Add readiness button group in expanded view (editable only) - Add WirelessIndicator toggle in expanded view (editable only) - Add WeaponAmmoDisplay with reload/unload/swap in expanded view - Implement optimistic API updates with rollback on error - Pass onCharacterUpdate and editable props from character page - Add 22 new tests covering all interactive features (64 total) Co-authored-by: Claude Opus 4.6 <[email protected]>
1 parent ec0433b commit 8bdafc9

File tree

4 files changed

+650
-23
lines changed

4 files changed

+650
-23
lines changed

app/characters/[id]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,8 @@ function CharacterSheet({
392392
<WeaponsDisplay
393393
character={character}
394394
onSelect={(pool, label) => openDiceRoller(pool, label)}
395+
onCharacterUpdate={(updated) => setCharacter(updated)}
396+
editable={character.status === "active"}
395397
/>
396398

397399
{character.armor && character.armor.length > 0 && (

0 commit comments

Comments
 (0)