diff --git a/apps/web/src/components/__tests__/turn-navigation.test.tsx b/apps/web/src/components/__tests__/turn-navigation.test.tsx index 92871bf..f051f41 100644 --- a/apps/web/src/components/__tests__/turn-navigation.test.tsx +++ b/apps/web/src/components/__tests__/turn-navigation.test.tsx @@ -54,11 +54,11 @@ describe("TurnNavigation", () => { expect(container.textContent).not.toContain("—"); }); - it("round badge and combatant name are in separate DOM elements", () => { + it("round badge and combatant name are siblings in the center area", () => { renderNav(); const badge = screen.getByText("R1"); const name = screen.getByText("Goblin"); - expect(badge.parentElement).not.toBe(name.parentElement); + expect(badge.parentElement).toBe(name.parentElement); }); it("updates the round badge when round changes", () => { diff --git a/apps/web/src/components/action-bar.tsx b/apps/web/src/components/action-bar.tsx index 5fafa1f..1b2cdd8 100644 --- a/apps/web/src/components/action-bar.tsx +++ b/apps/web/src/components/action-bar.tsx @@ -437,83 +437,93 @@ export function ActionBar({ - {onManagePlayers && ( - - )} - {bestiaryLoaded && onViewStatBlock && ( -
+
+ {onManagePlayers && ( - {viewerOpen && ( -
-
- handleViewerQueryChange(e.target.value)} - onKeyDown={handleViewerKeyDown} - placeholder="Search stat blocks..." - className="w-full" - /> -
- {viewerResults.length > 0 && ( -
    - {viewerResults.map((result, i) => ( -
  • - -
  • - ))} -
- )} - {viewerQuery.length >= 2 && viewerResults.length === 0 && ( -
- No creatures found + )} + {bestiaryLoaded && onViewStatBlock && ( +
+ + {viewerOpen && ( +
+
+ handleViewerQueryChange(e.target.value)} + onKeyDown={handleViewerKeyDown} + placeholder="Search stat blocks..." + className="w-full" + />
- )} -
- )} -
- )} - {bestiaryLoaded && onBulkImport && ( - - )} + {viewerResults.length > 0 && ( +
    + {viewerResults.map((result, i) => ( +
  • + +
  • + ))} +
+ )} + {viewerQuery.length >= 2 && viewerResults.length === 0 && ( +
+ No creatures found +
+ )} +
+ )} +
+ )} + {bestiaryLoaded && onBulkImport && ( + + )} +
); diff --git a/apps/web/src/components/create-player-modal.tsx b/apps/web/src/components/create-player-modal.tsx index 349d442..77769d3 100644 --- a/apps/web/src/components/create-player-modal.tsx +++ b/apps/web/src/components/create-player-modal.tsx @@ -77,8 +77,16 @@ export function CreatePlayerModal({ }; return ( -
-
+ // biome-ignore lint/a11y/noStaticElementInteractions: backdrop click to close +
+ {/* biome-ignore lint/a11y/noStaticElementInteractions: prevent close when clicking modal content */} +
e.stopPropagation()} + >

{isEdit ? "Edit Player" : "Create Player"} diff --git a/apps/web/src/components/player-management.tsx b/apps/web/src/components/player-management.tsx index ee59471..3c72701 100644 --- a/apps/web/src/components/player-management.tsx +++ b/apps/web/src/components/player-management.tsx @@ -28,8 +28,16 @@ export function PlayerManagement({ if (!open) return null; return ( -
-
+ // biome-ignore lint/a11y/noStaticElementInteractions: backdrop click to close +
+ {/* biome-ignore lint/a11y/noStaticElementInteractions: prevent close when clicking modal content */} +
e.stopPropagation()} + >

Player Characters diff --git a/apps/web/src/components/turn-navigation.tsx b/apps/web/src/components/turn-navigation.tsx index 957b337..3c404ca 100644 --- a/apps/web/src/components/turn-navigation.tsx +++ b/apps/web/src/components/turn-navigation.tsx @@ -1,5 +1,5 @@ import type { Encounter } from "@initiative/domain"; -import { Settings, StepBack, StepForward, Trash2 } from "lucide-react"; +import { Library, StepBack, StepForward, Trash2 } from "lucide-react"; import { D20Icon } from "./d20-icon"; import { Button } from "./ui/button"; import { ConfirmButton } from "./ui/confirm-button"; @@ -27,28 +27,22 @@ export function TurnNavigation({ return (
-
- - + + +
+ R{encounter.roundNumber} -
- -
{activeCombatant ? ( - - {activeCombatant.name} - + {activeCombatant.name} ) : ( No combatants )} @@ -59,7 +53,7 @@ export function TurnNavigation({ } label="Clear encounter" onConfirm={onClearEncounter} disabled={!hasCombatants} - className="h-8 w-8 text-muted-foreground" + className="text-muted-foreground" />