1 Commits
0.9.12 ... main

Author SHA1 Message Date
Lukas
f10c67a5ba Dismiss side panel when encounter becomes empty
All checks were successful
CI / check (push) Successful in 1m7s
CI / build-image (push) Successful in 15s
Closes the stat block / source manager panel when the last combatant
is removed or the encounter is cleared, giving a fully clean state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 00:16:32 +01:00

View File

@@ -30,6 +30,13 @@ export function App() {
const activeRowRef = useRef<HTMLDivElement>(null);
const actionBarAnim = useActionBarAnimation(encounter.combatants.length);
// Close the side panel when the encounter becomes empty
useEffect(() => {
if (isEmpty) {
sidePanel.dismissPanel();
}
}, [isEmpty, sidePanel.dismissPanel]);
// Auto-scroll to active combatant when turn changes
const activeIndex = encounter.activeIndex;
useEffect(() => {