diff --git a/src/app/routes/-GameRoutePendingShell.test.tsx b/src/app/routes/-GameRoutePendingShell.test.tsx new file mode 100644 index 00000000..651dc9f2 --- /dev/null +++ b/src/app/routes/-GameRoutePendingShell.test.tsx @@ -0,0 +1,18 @@ +// @vitest-environment happy-dom + +import { render, screen } from "@testing-library/react"; +import { describe, expect, it } from "vitest"; + +import { GameRoutePendingShell } from "./-GameRoutePendingShell"; + +describe("GameRoutePendingShell", () => { + it("announces loading while preserving the Observatory frame", () => { + render(); + + expect( + screen.getByRole("status", { name: "Loading Dungeon Observatory" }), + ).toBeTruthy(); + expect(screen.getByRole("main").getAttribute("aria-busy")).toBe("true"); + expect(screen.getByText("Dungeon Observatory")).toBeTruthy(); + }); +}); diff --git a/src/app/routes/-GameRoutePendingShell.tsx b/src/app/routes/-GameRoutePendingShell.tsx new file mode 100644 index 00000000..91bbba97 --- /dev/null +++ b/src/app/routes/-GameRoutePendingShell.tsx @@ -0,0 +1,48 @@ +export function GameRoutePendingShell() { + return ( +
+
+
+

Runestone

+

+ Dungeon Observatory +

+
+ + Preparing run + +
+ +
+ + +
+
+
+
+

+ Loading Dungeon Observatory +

+
+
+ + +
+
+ ); +} diff --git a/src/app/routes/game.tsx b/src/app/routes/game.tsx index 779f3f93..d191ca21 100644 --- a/src/app/routes/game.tsx +++ b/src/app/routes/game.tsx @@ -1,26 +1,16 @@ import { createFileRoute } from "@tanstack/react-router"; -import { lazy, Suspense } from "react"; import { APP_CONFIG } from "../../../app.config"; +import { GameRouteContent } from "./-GameRouteContent"; +import { GameRoutePendingShell } from "./-GameRoutePendingShell"; import { requirePersistedAuthSession } from "./-requirePersistedAuthSession"; -const GameRouteContent = lazy(() => - import("./-GameRouteContent").then((module) => ({ - default: module.GameRouteContent, - })), -); - export const Route = createFileRoute("/game")({ ssr: APP_CONFIG.SSR, beforeLoad: requirePersistedAuthSession, - component: LazyGamePage, + component: GameRouteContent, + pendingComponent: GameRoutePendingShell, + pendingMs: 0, + pendingMinMs: 0, }); - -function LazyGamePage() { - return ( - - - - ); -} diff --git a/src/entities/corridor/model/useCorridorMeshScenes.ts b/src/entities/corridor/model/useCorridorMeshScenes.ts index 23912cf4..2d368673 100644 --- a/src/entities/corridor/model/useCorridorMeshScenes.ts +++ b/src/entities/corridor/model/useCorridorMeshScenes.ts @@ -1,6 +1,5 @@ import { useGLTF } from "@react-three/drei"; import type * as THREE from "three"; -import { preloadGltfAssets } from "@/shared/lib"; import { CORRIDOR_GLTF_CONFIG } from "../config"; @@ -11,14 +10,6 @@ type CorridorMeshScenes = { wallVariationScene: THREE.Group; }; -preloadGltfAssets(useGLTF, [ - CORRIDOR_GLTF_CONFIG.WALL.PATH, - CORRIDOR_GLTF_CONFIG.WALL_CRACKED.PATH, - CORRIDOR_GLTF_CONFIG.WALL_SHELVES.PATH, - CORRIDOR_GLTF_CONFIG.FLOOR_TILE.PATH, - CORRIDOR_GLTF_CONFIG.TORCH.PATH, -]); - export const useCorridorMeshScenes = ( corridorId: string, ): CorridorMeshScenes => { diff --git a/src/entities/enemy/ui/EnemyMesh.tsx b/src/entities/enemy/ui/EnemyMesh.tsx index 458d1b36..2f0b710b 100644 --- a/src/entities/enemy/ui/EnemyMesh.tsx +++ b/src/entities/enemy/ui/EnemyMesh.tsx @@ -1,15 +1,10 @@ -import { useGLTF } from "@react-three/drei"; import type { RapierRigidBody } from "@react-three/rapier"; import { CapsuleCollider, RigidBody } from "@react-three/rapier"; import type { RefObject } from "react"; import { useRef } from "react"; -import { getPlayerPosition, preloadGltfAssets } from "@/shared/lib"; +import { getPlayerPosition } from "@/shared/lib"; -import { - ENEMY_ANIMATION_PATHS, - ENEMY_ENTITY_CONFIG, - ENEMY_GLTF_CONFIG, -} from "../config"; +import { ENEMY_ENTITY_CONFIG, ENEMY_GLTF_CONFIG } from "../config"; import type { EnemyMeshActions, EnemyMeshSettings } from "../model"; import { useEnemyGltfResources, @@ -18,13 +13,6 @@ import { useEnemyPhysicsLoop, } from "../model"; -preloadGltfAssets(useGLTF, [ - ENEMY_GLTF_CONFIG.CHARACTER.PATH, - ENEMY_ANIMATION_PATHS.MOVEMENT_BASIC, - ENEMY_ANIMATION_PATHS.GENERAL, - ENEMY_ANIMATION_PATHS.COMBAT_MELEE, -]); - type EnemyMeshProps = { settings: EnemyMeshSettings; actions: EnemyMeshActions; diff --git a/src/entities/room/ui/RoomMesh.tsx b/src/entities/room/ui/RoomMesh.tsx index 8d5b1b45..2ca19e97 100644 --- a/src/entities/room/ui/RoomMesh.tsx +++ b/src/entities/room/ui/RoomMesh.tsx @@ -3,7 +3,6 @@ import { useMemo } from "react"; import { ROOM_CONFIG } from "@/shared/config"; import type { Vector3Tuple } from "@/shared/lib"; -import { preloadGltfAssets } from "@/shared/lib"; import { ROOM_GLTF_CONFIG } from "../config"; import { @@ -31,15 +30,6 @@ type RoomMeshProps = { showGrid?: boolean; }; -preloadGltfAssets(useGLTF, [ - ROOM_GLTF_CONFIG.FLOOR_TILE.PATH, - ROOM_GLTF_CONFIG.WALL.PATH, - ROOM_GLTF_CONFIG.WALL_DOORWAY.PATH, - ROOM_GLTF_CONFIG.COLUMN.PATH, - ROOM_GLTF_CONFIG.TORCH.PATH, - ROOM_GLTF_CONFIG.CHEST.PATH, -]); - export function RoomMesh({ position, surface, diff --git a/src/features/auth/model/useAuthUsernameSubmission.test.ts b/src/features/auth/model/useAuthUsernameSubmission.test.ts index 067b89ce..5b04724d 100644 --- a/src/features/auth/model/useAuthUsernameSubmission.test.ts +++ b/src/features/auth/model/useAuthUsernameSubmission.test.ts @@ -72,6 +72,8 @@ describe("useAuthUsernameSubmission", () => { mockGetAuthClientStorage.mockReturnValue(memoryStorage); mockCreateUserMutation.mockResolvedValue(TEST_USER_PROFILE); mockSubmitAuthUsername.mockResolvedValue(TEST_USER_PROFILE); + mockPreloadRoute.mockResolvedValue(undefined); + mockNavigate.mockResolvedValue(undefined); }); it("submits usernames through the shared orchestration helper", async () => { @@ -120,4 +122,32 @@ describe("useAuthUsernameSubmission", () => { expect(mockPreloadRoute).not.toHaveBeenCalled(); expect(mockNavigate).not.toHaveBeenCalled(); }); + + it("does not wait for the game runtime preload before navigating", async () => { + let resolvePreload: (() => void) | undefined; + mockPreloadRoute.mockReturnValueOnce( + new Promise((resolve) => { + resolvePreload = resolve; + }), + ); + mockNavigate.mockResolvedValueOnce(undefined); + const { result } = renderHook(() => + useAuthUsernameSubmission({ + sendAuthEvent: vi.fn(), + sessionUuid: "existing-session-uuid", + }), + ); + + const submission = result.current.handleUsernameFormSubmit({ + username: "runestone_hero", + }); + await vi.waitFor(() => { + expect(mockNavigate).toHaveBeenCalledWith({ + to: AUTH_ROUTE_PATHS.GAME, + }); + }); + + resolvePreload?.(); + await submission; + }); }); diff --git a/src/features/auth/model/useAuthUsernameSubmission.ts b/src/features/auth/model/useAuthUsernameSubmission.ts index 09a63b1a..d56c5547 100644 --- a/src/features/auth/model/useAuthUsernameSubmission.ts +++ b/src/features/auth/model/useAuthUsernameSubmission.ts @@ -37,9 +37,11 @@ export const useAuthUsernameSubmission = ({ return; } - await router.preloadRoute({ - to: AUTH_ROUTE_PATHS.GAME, - }); + void router + .preloadRoute({ + to: AUTH_ROUTE_PATHS.GAME, + }) + .catch(() => undefined); await router.navigate({ to: AUTH_ROUTE_PATHS.GAME, }); diff --git a/src/features/input-orchestrator/config/mobileActionButtonLayoutConfig.ts b/src/features/input-orchestrator/config/mobileActionButtonLayoutConfig.ts index 29729fc6..c9666ec7 100644 --- a/src/features/input-orchestrator/config/mobileActionButtonLayoutConfig.ts +++ b/src/features/input-orchestrator/config/mobileActionButtonLayoutConfig.ts @@ -1,6 +1,6 @@ export const MOBILE_ACTION_BUTTON_LAYOUT_CLASS_NAMES = { ROOT: "pointer-events-auto flex flex-col gap-2 touch-none select-none", - BUTTON: "h-12 w-12 rounded-full p-0 shadow-lg backdrop-blur-md", + BUTTON: "size-11 rounded-full p-0 shadow-lg backdrop-blur-md", ICON: "h-5 w-5", } as const; diff --git a/src/features/input-orchestrator/ui/MobileActionButtonZone.test.tsx b/src/features/input-orchestrator/ui/MobileActionButtonZone.test.tsx index d3bb4801..d78ef157 100644 --- a/src/features/input-orchestrator/ui/MobileActionButtonZone.test.tsx +++ b/src/features/input-orchestrator/ui/MobileActionButtonZone.test.tsx @@ -59,6 +59,8 @@ describe("MobileActionButtonZone", () => { expect(runButton.className).toBe( MOBILE_ACTION_BUTTON_LAYOUT_CLASS_NAMES.BUTTON, ); + expect(runButton.className).toContain("size-11"); + expect(runButton.className).not.toMatch(/h-12|w-12/); expect(zoneRoot.className).toBe( MOBILE_ACTION_BUTTON_LAYOUT_CLASS_NAMES.ROOT, ); diff --git a/src/features/responsive-layout/lib/index.ts b/src/features/responsive-layout/lib/index.ts index 7507e3c1..d344dfaa 100644 --- a/src/features/responsive-layout/lib/index.ts +++ b/src/features/responsive-layout/lib/index.ts @@ -7,5 +7,6 @@ export { createResponsiveMediaQuerySubscriptions, type ResponsiveMediaQueryEntry, type ResponsiveMediaQuerySubscription, + readResponsiveMediaQueryMatch, removeResponsiveMediaQuerySubscriptions, } from "./responsiveMediaQuerySubscriptions"; diff --git a/src/features/responsive-layout/lib/responsiveMediaQuerySubscriptions.ts b/src/features/responsive-layout/lib/responsiveMediaQuerySubscriptions.ts index e884d2b4..8fd2e137 100644 --- a/src/features/responsive-layout/lib/responsiveMediaQuerySubscriptions.ts +++ b/src/features/responsive-layout/lib/responsiveMediaQuerySubscriptions.ts @@ -8,6 +8,17 @@ type ResponsiveMediaQuerySubscription = { listener: (event: MediaQueryListEvent) => void; }; +export const readResponsiveMediaQueryMatch = ( + query: string, + fallback: boolean, +): boolean => { + if (typeof window === "undefined") { + return fallback; + } + + return window.matchMedia(query).matches; +}; + export const createResponsiveMediaQuerySubscriptions = ( entries: readonly ResponsiveMediaQueryEntry[], ): ResponsiveMediaQuerySubscription[] => { diff --git a/src/features/responsive-layout/model/useResponsiveGameLayout.initial.test.ts b/src/features/responsive-layout/model/useResponsiveGameLayout.initial.test.ts new file mode 100644 index 00000000..46618b11 --- /dev/null +++ b/src/features/responsive-layout/model/useResponsiveGameLayout.initial.test.ts @@ -0,0 +1,47 @@ +// @vitest-environment happy-dom + +import { renderHook } from "@testing-library/react"; +import { describe, expect, it, vi } from "vitest"; + +import { RESPONSIVE_LAYOUT_MEDIA_QUERIES } from "../config"; + +vi.mock("../lib", async (importOriginal) => { + const original = await importOriginal(); + + return { + ...original, + createResponsiveMediaQuerySubscriptions: () => [], + }; +}); + +import { useResponsiveGameLayout } from "./useResponsiveGameLayout"; + +describe("useResponsiveGameLayout initial state", () => { + it("uses current desktop media queries before subscription effects run", () => { + const mediaQueries = { + [RESPONSIVE_LAYOUT_MEDIA_QUERIES.DESKTOP_MIN_WIDTH]: true, + [RESPONSIVE_LAYOUT_MEDIA_QUERIES.TABLET_STANDARD_WIDTH]: false, + [RESPONSIVE_LAYOUT_MEDIA_QUERIES.TABLET_COARSE_WIDTH]: false, + [RESPONSIVE_LAYOUT_MEDIA_QUERIES.MOBILE_MAX_WIDTH]: false, + [RESPONSIVE_LAYOUT_MEDIA_QUERIES.LANDSCAPE]: true, + [RESPONSIVE_LAYOUT_MEDIA_QUERIES.PORTRAIT]: false, + }; + + vi.spyOn(window, "matchMedia").mockImplementation( + (query) => + ({ + matches: Boolean(mediaQueries[query as keyof typeof mediaQueries]), + }) as MediaQueryList, + ); + + const { result } = renderHook(() => useResponsiveGameLayout()); + + expect(result.current).toEqual({ + isDesktopLayout: true, + isMobileLayout: false, + isTabletLayout: false, + isLandscape: true, + isPortrait: false, + }); + }); +}); diff --git a/src/features/responsive-layout/model/useResponsiveGameLayout.ts b/src/features/responsive-layout/model/useResponsiveGameLayout.ts index eb344577..0f5426eb 100644 --- a/src/features/responsive-layout/model/useResponsiveGameLayout.ts +++ b/src/features/responsive-layout/model/useResponsiveGameLayout.ts @@ -5,19 +5,50 @@ import { createResponsiveGameLayoutSnapshot, createResponsiveMediaQuerySubscriptions, type ResponsiveGameLayoutSnapshot, + readResponsiveMediaQueryMatch, removeResponsiveMediaQuerySubscriptions, } from "../lib"; export type ResponsiveGameLayout = ResponsiveGameLayoutSnapshot; export function useResponsiveGameLayout(): ResponsiveGameLayout { - const [isDesktopWidth, setIsDesktopWidth] = useState(false); - const [isTabletWidth, setIsTabletWidth] = useState(false); - const [isCoarsePointerTabletWidth, setIsCoarsePointerTabletWidth] = - useState(false); - const [isMobile, setIsMobile] = useState(false); - const [isLandscape, setIsLandscape] = useState(true); - const [isPortrait, setIsPortrait] = useState(false); + const [isDesktopWidth, setIsDesktopWidth] = useState(() => + readResponsiveMediaQueryMatch( + RESPONSIVE_LAYOUT_MEDIA_QUERIES.DESKTOP_MIN_WIDTH, + false, + ), + ); + const [isTabletWidth, setIsTabletWidth] = useState(() => + readResponsiveMediaQueryMatch( + RESPONSIVE_LAYOUT_MEDIA_QUERIES.TABLET_STANDARD_WIDTH, + false, + ), + ); + const [isCoarsePointerTabletWidth, setIsCoarsePointerTabletWidth] = useState( + () => + readResponsiveMediaQueryMatch( + RESPONSIVE_LAYOUT_MEDIA_QUERIES.TABLET_COARSE_WIDTH, + false, + ), + ); + const [isMobile, setIsMobile] = useState(() => + readResponsiveMediaQueryMatch( + RESPONSIVE_LAYOUT_MEDIA_QUERIES.MOBILE_MAX_WIDTH, + false, + ), + ); + const [isLandscape, setIsLandscape] = useState(() => + readResponsiveMediaQueryMatch( + RESPONSIVE_LAYOUT_MEDIA_QUERIES.LANDSCAPE, + true, + ), + ); + const [isPortrait, setIsPortrait] = useState(() => + readResponsiveMediaQueryMatch( + RESPONSIVE_LAYOUT_MEDIA_QUERIES.PORTRAIT, + false, + ), + ); useEffect(() => { const subscriptions = createResponsiveMediaQuerySubscriptions([ diff --git a/src/features/settings/config/settingsConfig.ts b/src/features/settings/config/settingsConfig.ts index 0794b359..96c03fba 100644 --- a/src/features/settings/config/settingsConfig.ts +++ b/src/features/settings/config/settingsConfig.ts @@ -19,7 +19,7 @@ export const SETTINGS_STORAGE_KEYS = { export const SETTINGS_COPY = { PAGE_TITLE: "Settings", - PAGE_DESCRIPTION: "Adjust audio levels and haptic feedback.", + PAGE_DESCRIPTION: "Tune audio, rendering, and haptic feedback for your run.", AUDIO_SECTION: "Audio", HAPTICS_SECTION: "Haptics", MASTER_VOLUME_LABEL: "Master Volume", diff --git a/src/pages/game/config/index.ts b/src/pages/game/config/index.ts index a45fe623..3c0b32a9 100644 --- a/src/pages/game/config/index.ts +++ b/src/pages/game/config/index.ts @@ -9,16 +9,17 @@ export { GAME_PAGE_CONTROLS } from "./gamePageControls"; export const GAME_PAGE_MOBILE_SHEET = { HEIGHT_DVH: 90, + STATECHART_MIN_ZOOM: 1, OPEN_BUTTON_LABEL: "Panels", - TITLE: "Game Surfaces", - DESCRIPTION: "Open the state visualizer and HUD panels.", + TITLE: "Dungeon Observatory", + DESCRIPTION: "Inspect the live machine and run telemetry.", TAB_IDS: { STATECHART: "statechart", HUD: "hud", }, TAB_LABELS: { - STATECHART: "Statechart", - HUD: "HUD", + STATECHART: "Runtime Map", + HUD: "Run Telemetry", }, } as const; @@ -26,6 +27,7 @@ export const GAME_PAGE_PORTRAIT_GATE = { TITLE: "Rotate Device", DESCRIPTION: "Landscape mode is required on mobile and tablet.", BODY: "Rotate your device to landscape to continue playing.", + HOME_ACTION_LABEL: "Return to landing page", } as const; export const GAME_PAGE_SCROLL_LOCK = { @@ -35,15 +37,17 @@ export const GAME_PAGE_SCROLL_LOCK = { export const GAME_PAGE_MOBILE_ACTION_PANEL_CLASS_NAMES = { ROOT: "pointer-events-auto relative flex shrink-0 flex-col items-end", - PROMPT_SLOT: "absolute bottom-full right-0 mb-4 flex w-40 flex-col gap-2", - COMPACT_WIDTH: "w-9", + PROMPT_SLOT: "absolute right-0 bottom-full mb-3 flex w-44 flex-col gap-2", + COMPACT_WIDTH: "w-24", TABLET_WIDTH: "w-40", - CONTROL_STACK: "flex w-full flex-col items-end gap-2", + CONTROL_STACK: "w-full items-end gap-2", + COMPACT_CONTROL_STACK: "grid grid-cols-2", + TABLET_CONTROL_STACK: "flex flex-col", } as const; export const GAME_PAGE_MOBILE_TOUCH_ACTION_PANEL_CLASS_NAMES = { ROOT: "flex w-full flex-col gap-2 empty:hidden", - BUTTON: "pointer-events-auto relative w-full font-bold", + BUTTON: "pointer-events-auto relative min-h-11 w-full font-bold", BUTTON_LABEL: "block w-full truncate text-center", INTERACT_BADGE: "absolute -top-2 -right-2 flex h-4 w-4 animate-pulse items-center justify-center rounded-full bg-dungeon-gold p-0 shadow-[0_0_8px_var(--dungeon-gold)]", @@ -78,8 +82,9 @@ export const GAME_PAGE_DESKTOP_HEADER_TEST_IDS = { } as const; export const GAME_PAGE_MOBILE_OVERLAY_CLASS_NAMES = { - ROOT: "pointer-events-none absolute right-4 bottom-4 z-30 flex items-end gap-2", - JOYSTICK_ANCHOR: "pointer-events-none absolute bottom-4 left-4 z-30", + ROOT: "pointer-events-none absolute right-[max(1rem,env(safe-area-inset-right))] bottom-[max(1rem,env(safe-area-inset-bottom))] z-30 flex items-end gap-2", + JOYSTICK_ANCHOR: + "pointer-events-none absolute bottom-[max(1rem,env(safe-area-inset-bottom))] left-[max(1rem,env(safe-area-inset-left))] z-30", JOYSTICK_INTERACTIVE_SURFACE: "pointer-events-auto", RUN_JUMP_ANCHOR: "flex items-end", RUN_JUMP_INTERACTIVE_SURFACE: "pointer-events-auto", diff --git a/src/pages/game/ui/GamePage.test.tsx b/src/pages/game/ui/GamePage.test.tsx index ae5d1cbe..8925bdd6 100644 --- a/src/pages/game/ui/GamePage.test.tsx +++ b/src/pages/game/ui/GamePage.test.tsx @@ -453,6 +453,20 @@ describe("GamePage", () => { expect( screen.getByTestId("xstate-inspector-details-widget"), ).not.toBeNull(); + expect( + screen.getByRole("complementary", { name: "Statechart graph" }), + ).not.toBeNull(); + expect( + screen.getByRole("region", { name: "Dungeon viewport" }), + ).not.toBeNull(); + expect( + screen.getByRole("region", { name: "Selected machine details" }), + ).not.toBeNull(); + expect( + screen.getByRole("complementary", { + name: "Game controls and state", + }), + ).not.toBeNull(); expect( within(screen.getByRole("banner")) @@ -536,7 +550,7 @@ describe("GamePage", () => { ).not.toBeNull(); }); - it("renders rotate-device banner in touch portrait mode", () => { + it("renders an accessible rotation dialog in touch portrait mode", () => { vi.mocked(useGamePage).mockReturnValue( createGamePageViewModel({ layout: { @@ -554,7 +568,21 @@ describe("GamePage", () => { , ); - expect(screen.getByText(GAME_PAGE_PORTRAIT_GATE.TITLE)).not.toBeNull(); + const rotationDialog = screen.getByRole("alertdialog", { + name: GAME_PAGE_PORTRAIT_GATE.TITLE, + }); + + expect(rotationDialog).not.toBeNull(); + expect( + within(rotationDialog).getByText(GAME_PAGE_PORTRAIT_GATE.DESCRIPTION), + ).not.toBeNull(); + expect( + within(rotationDialog) + .getByRole("link", { + name: GAME_PAGE_PORTRAIT_GATE.HOME_ACTION_LABEL, + }) + .getAttribute("href"), + ).toBe("/"); expect(screen.getByTestId("game-canvas-widget")).not.toBeNull(); expect(screen.queryByTestId("mobile-camera-switcher-widget")).toBeNull(); expect( diff --git a/src/pages/game/ui/GamePageDesktopHeader.test.tsx b/src/pages/game/ui/GamePageDesktopHeader.test.tsx index 64bf76b1..f7227386 100644 --- a/src/pages/game/ui/GamePageDesktopHeader.test.tsx +++ b/src/pages/game/ui/GamePageDesktopHeader.test.tsx @@ -63,14 +63,18 @@ describe("GamePageDesktopHeader", () => { expect(homeAction.parentElement).toBe(actions); expect(actions.lastElementChild).toBe(homeAction); expect(homeAction.getAttribute("href")).toBe("/"); - expect(homeAction.getAttribute("data-size")).toBe("icon-sm"); + expect(homeAction.getAttribute("data-size")).toBe("icon"); expect(homeAction.getAttribute("data-variant")).toBe("dungeon-outline"); + expect(homeAction.className).toContain("size-11"); expect(homeAction.className).not.toContain("w-fit"); expect( within(root).getByRole("link", { name: "RUNESTONE", }), ).toBeTruthy(); + expect(within(root).getByText("Floor I / Live Run")).toBeTruthy(); + expect(within(root).getByText("Dungeon Observatory")).toBeTruthy(); + expect(within(root).getByText("Active room")).toBeTruthy(); expect( within(actions).getByRole("button", { name: GAME_PAGE_CONTROLS.AUDIO.MUTE_ARIA_LABEL, diff --git a/src/pages/game/ui/GamePageDesktopHeader.tsx b/src/pages/game/ui/GamePageDesktopHeader.tsx index 3360f2b1..4c02712e 100644 --- a/src/pages/game/ui/GamePageDesktopHeader.tsx +++ b/src/pages/game/ui/GamePageDesktopHeader.tsx @@ -1,12 +1,18 @@ import { Link } from "@tanstack/react-router"; -import { Trophy, Volume2, VolumeX } from "lucide-react"; +import { Activity, Trophy, Volume2, VolumeX } from "lucide-react"; import { GAME_PAGE_CONTROLS, GAME_PAGE_DESKTOP_HEADER_TEST_IDS, } from "@/pages/game/config"; import { useGamePageDesktopHeaderModel } from "@/pages/game/model"; -import { Button, Tooltip, TooltipContent, TooltipTrigger } from "@/shared/ui"; +import { + Badge, + Button, + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/shared/ui"; import { LeaderboardSheet } from "@/widgets/leaderboard-panel"; import { MARKETING_ROUTES } from "@/widgets/marketing-shell"; import { GamePageDesktopSettingsAction } from "./GamePageDesktopSettingsAction"; @@ -19,29 +25,40 @@ export function GamePageDesktopHeader() { return (
-
+
RUNESTONE - ยท - Floor I +
- - Room: + + + @@ -59,7 +76,7 @@ export function GamePageDesktopHeader() { {isAudioMuted ? ( ) : ( - + )} @@ -79,7 +96,7 @@ export function GamePageDesktopHeader() { size="icon-sm" aria-label={GAME_PAGE_CONTROLS.LEADERBOARD.ARIA_LABEL} > - + diff --git a/src/pages/game/ui/GamePageDesktopLayout.tsx b/src/pages/game/ui/GamePageDesktopLayout.tsx index 12b3a832..639a3c42 100644 --- a/src/pages/game/ui/GamePageDesktopLayout.tsx +++ b/src/pages/game/ui/GamePageDesktopLayout.tsx @@ -7,7 +7,7 @@ export function GamePageDesktopLayout() { return (
diff --git a/src/pages/game/ui/GamePageDesktopSettingsAction.tsx b/src/pages/game/ui/GamePageDesktopSettingsAction.tsx index fde98e03..03c31fc3 100644 --- a/src/pages/game/ui/GamePageDesktopSettingsAction.tsx +++ b/src/pages/game/ui/GamePageDesktopSettingsAction.tsx @@ -15,7 +15,7 @@ export function GamePageDesktopSettingsAction() { size="icon-sm" aria-label={GAME_PAGE_CONTROLS.SETTINGS.ARIA_LABEL} > - + diff --git a/src/pages/game/ui/GamePageDesktopWorkspacePanels.tsx b/src/pages/game/ui/GamePageDesktopWorkspacePanels.tsx index 32b404b1..9b36ccdf 100644 --- a/src/pages/game/ui/GamePageDesktopWorkspacePanels.tsx +++ b/src/pages/game/ui/GamePageDesktopWorkspacePanels.tsx @@ -20,22 +20,30 @@ export function GamePageDesktopWorkspacePanels() { } = useGamePageDesktopLayoutModel(); return ( -
+
-
+
-

- Dungeon Canvas -

+
+

+ Dungeon viewport +

+ + Machine synchronized + +
-
+
@@ -63,7 +71,7 @@ export function GamePageDesktopWorkspacePanels() {