Redesign DM Dashboard (/dm/, /ru/dm/) with purple-gold theme (#534AB7 + #c8a84b): Design System: - Update dm-theme.css with 49 purple-gold tokens (transitions, shadows, hover states) - Create DmTabs.astro with ARIA, keyboard nav, URL hash sync, localStorage persistence - Create DmSidebar.astro for desktop navigation - Redesign DmHeader with gold accent - Update DmButton, DmCard, DmInput primitives - Expand i18n to 47 strings Layout: - Redesign DmLayout with 3-column dashboard grid (sidebar|main|context) - Update /dm/index.astro and /ru/dm/index.astro with named slots Feature Components: - DiceRoller: empty state, ARIA live, color-coded history, storage key fallback - InitiativeTracker: HP editing, active highlighting, storage key fallback - Open5eReference: skeletons, debounce, error retry, gold tabs - NotesPanel: cross-tab sync, copy-to-clipboard, auto-save - AuthPanel: VK/Yandex brand colors, pill buttons Tests: - Add 50 Playwright E2E tests (smoke, dice, initiative, reference, notes, data-migration) Fixes: - Document Open5e client.ts URL bugfix - Add backward-compatible storage key fallback for dice/initiative - Preserve legacy sessionStorage data on load
1.7 KiB
1.7 KiB
T18 — Data Migration Verification
Test Setup
- Pre-populated
sessionStoragewith old-format dice history and initiative data. - Pre-populated
localStoragewith old-format notes. - Ran Playwright tests against
/dm/#dice,/dm/#initiative,/dm/#noteson both desktop and mobile viewports.
Results
Dice History (dm-dice-history)
Status: INCOMPATIBLE
- Old format uses
resultinstead oftotaland omitsrolls. renderHistory()callsentry.rolls.includes(20), which throws whenrollsis undefined.- The uncaught exception aborts rendering, leaving the history list empty.
- Evidence: Playwright test confirms empty state is visible and 0 history items rendered.
Initiative Tracker (dm-initiative)
Status: PARTIALLY COMPATIBLE
- Old format stores
name,modifier,initiative,activebut lacksidandhp. - The list renders correctly (name and initiative score display).
- Broken: Delete button does nothing because
deleteCombatant()cannot match a missingid. - Evidence: Playwright test confirms the combatant renders and survives a delete click.
Notes (dm-notes)
Status: FULLY COMPATIBLE
- Old format stores a plain string; new
loadNotes()reads the same key unchanged. - Textarea populates correctly from
localStorage. - Evidence: Playwright test confirms textarea value matches old data.
Summary
| Feature | Compatibility |
|---|---|
| Dice history | Broken — missing total/rolls fields cause JS error |
| Initiative | Loads but delete is broken due to missing id |
| Notes | Fully compatible |
Commands Run
npx playwright test tests/dm/data-migration.spec.ts
All 6 tests passed (3 scenarios × 2 viewports).