Skip to content

feat(encounter): one combat widget, two mounts — combat merge (consolidation epic 2/7) - #334

Open
deepiq2022 wants to merge 7 commits into
mainfrom
feat/combat-merge
Open

deepiq2022 wants to merge 7 commits into
mainfrom
feat/combat-merge

Conversation

@deepiq2022

Copy link
Copy Markdown
Contributor

Summary

Second sub-project of the tool-consolidation epic: the Run dashboard's duplicate _InitiativePanel is replaced by ONE shared combat widget.

  • EncounterPane({compact}) in lib/features/encounter_screen.dart now renders combat everywhere. Full mode is a pure extraction of the old EncounterScreen body — every key, dialog, and behavior unchanged, proven by the existing encounter tests passing unedited. EncounterScreen is a thin Track mount.
  • Compact mode is the Run dashboard glance: initiative rows (current-turn highlight, defeated strike-through, HP readout), tap-row stat-block dialog, Next turn / Roll all init, and a new "Open encounter" jump to Track → Encounter. It keeps the historical run-init-* keys and shows no manager affordances.
  • _InitiativePanel is deleted; _InitiativeSlot supplies the Run panel chrome ("Initiative · Round N") around EncounterPane(compact: true).
  • Pure widget merge — no model or persistence change. Design ratchet net-negative (131 ≤ 132).

Spec: docs/superpowers/specs/2026-08-22-combat-merge-design.md. Plan: docs/superpowers/plans/2026-08-22-combat-merge.md.

Accepted deviations (noted by the final review)

  • The Run slot can show a transient loading frame on first build (the shared pane's async.when); the old panel defaulted to an empty state.
  • The compact empty-state text styling drifted slightly (plan-prescribed); flagged as a token-migration candidate.

Testing

  • Full suite on the rebased tree: 2414 tests pass; flutter analyze clean.
  • New coverage: compact renders rows/actions and hides all manager UI; empty state; run-init-open-full navigation asserted against shellRouteProvider (verified non-vacuous by inverting the expectation).
  • macOS device smoke run still pending (Run glance → stat-block tap → Open encounter → full manager).

🤖 Generated with Claude Code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants