Implement the 019-combatant-row-declutter feature that replaces always-visible HP controls and AC/MaxHP inputs with compact click-to-edit and click-to-adjust patterns in the encounter tracker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lukas
2026-03-06 15:07:04 +01:00
parent e59fd83292
commit 0c0da9b90e
11 changed files with 723 additions and 207 deletions

View File

@@ -0,0 +1,29 @@
# Data Model: Combatant Row Declutter
**Feature**: 019-combatant-row-declutter
**Date**: 2026-03-06
## No Data Model Changes
This feature is a purely visual/interaction refactor within the web adapter layer. No domain entities, application state, or persistence formats are affected.
### Existing entities (unchanged)
- **Combatant**: `id`, `name`, `initiative`, `maxHp`, `currentHp`, `ac`, `conditions`, `isConcentrating` — no fields added, removed, or modified.
### Existing callbacks (unchanged)
- `onAdjustHp(id: CombatantId, delta: number)` — same signature, now triggered from popover instead of inline QuickHpInput.
- `onSetAc(id: CombatantId, value: number | undefined)` — same signature, now triggered from click-to-edit instead of always-visible input.
### UI State (component-local only)
New component-local state introduced in the HP popover (not persisted):
- **popoverOpen**: boolean — whether the HP adjustment popover is visible.
- **inputValue**: string — the draft delta value in the popover input.
New component-local state in the AC click-to-edit (not persisted):
- **editing**: boolean — whether the inline AC edit input is visible.
- **draft**: string — the draft AC value being edited.
These follow the same patterns as existing component-local state (`EditableName.editing`, `ConditionPicker` open state).