Fixes + UX: combat HP, char delete, dice animation, compendium filters, import/export

- Combat: relabel HP controls Dmg/Heal, disabled at 0 (were silent no-ops)
- Characters: per-card Delete (confirm) + Export; header Import from JSON
- Dice: tumbling roll animation that settles on the result (a11y-safe)
- Compendium: per-category filters (monster type/CR, spell level/school, item rarity/type) + Clear
- Character import/export to portable JSON (reassigns id, validates on import)
- New: 4 io unit tests, e2e fixes spec (HP damage, delete, CR filter)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-08 00:40:43 +02:00
parent 9ecd817bc6
commit 866f1e1bf1
11 changed files with 554 additions and 41 deletions
+5
View File
@@ -102,6 +102,11 @@ export const charactersRepo = {
await db.characters.update(id, { ...patch, updatedAt: now() });
},
/** Insert a fully-formed character (e.g. from an import). Validates on write. */
async insert(character: Character): Promise<void> {
await db.characters.add(characterSchema.parse(character));
},
async remove(id: string): Promise<void> {
await db.characters.delete(id);
},