From a9ca31e9bcb4a76433563de1388991ca2dd0eff1 Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 24 Mar 2026 23:22:54 +0100 Subject: [PATCH] Skip auto-opening stat block panel when adding creatures on mobile On desktop the panel has room alongside the combatant list, but on mobile it covers the screen and disrupts the add-combatant flow. Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/src/components/action-bar.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/action-bar.tsx b/apps/web/src/components/action-bar.tsx index fce41dd..7ea2beb 100644 --- a/apps/web/src/components/action-bar.tsx +++ b/apps/web/src/components/action-bar.tsx @@ -279,7 +279,8 @@ export function ActionBar({ const handleAddFromBestiary = useCallback( (result: SearchResult) => { const creatureId = addFromBestiary(result); - if (creatureId && panelView.mode === "closed") { + const isDesktop = globalThis.matchMedia("(min-width: 1024px)").matches; + if (creatureId && panelView.mode === "closed" && isDesktop) { showCreature(creatureId); } },