diff --git a/apps/web/src/arcade-games/matching/index.ts b/apps/web/src/arcade-games/matching/index.ts index d0bfe13f..1d82b44e 100644 --- a/apps/web/src/arcade-games/matching/index.ts +++ b/apps/web/src/arcade-games/matching/index.ts @@ -15,6 +15,7 @@ import { matchingGameValidator } from './Validator' const manifest: GameManifest = { name: 'matching', displayName: 'Matching Pairs Battle', + shortName: 'Matching Pairs', icon: '⚔️', description: 'Multiplayer memory battle with friends', longDescription: diff --git a/apps/web/src/components/practice/start-practice-modal/GameBreakSettings.tsx b/apps/web/src/components/practice/start-practice-modal/GameBreakSettings.tsx index 59741e57..67e3a89b 100644 --- a/apps/web/src/components/practice/start-practice-modal/GameBreakSettings.tsx +++ b/apps/web/src/components/practice/start-practice-modal/GameBreakSettings.tsx @@ -147,7 +147,7 @@ export function GameBreakSettings() { }, })} > - {singleGame.manifest.displayName.replace(' Battle', '').replace(' Lightning', '')} + {singleGame.manifest.shortName || singleGame.manifest.displayName} @@ -510,7 +510,7 @@ export function GameBreakSettings() { (g) => g.manifest.name === gameBreakSelectedGame ) return game - ? `${game.manifest.icon} ${game.manifest.displayName.replace(' Battle', '').replace(' Lightning', '')}` + ? `${game.manifest.icon} ${game.manifest.shortName || game.manifest.displayName}` : 'Select game' })()} @@ -591,8 +591,7 @@ export function GameBreakSettings() { })} > - {game.manifest.icon}{' '} - {game.manifest.displayName.replace(' Battle', '').replace(' Lightning', '')} + {game.manifest.icon} {game.manifest.shortName || game.manifest.displayName} ))} diff --git a/apps/web/src/lib/arcade/manifest-schema.ts b/apps/web/src/lib/arcade/manifest-schema.ts index ebf5b2e1..458894e6 100644 --- a/apps/web/src/lib/arcade/manifest-schema.ts +++ b/apps/web/src/lib/arcade/manifest-schema.ts @@ -11,6 +11,10 @@ import { z } from 'zod' export const GameManifestSchema = z.object({ name: z.string().min(1).describe('Internal game identifier (e.g., "matching")'), displayName: z.string().min(1).describe('Display name shown to users'), + shortName: z + .string() + .optional() + .describe('Short name for compact UI spaces (defaults to displayName)'), icon: z.string().min(1).describe('Emoji icon for the game'), description: z.string().min(1).describe('Short description'), longDescription: z.string().min(1).describe('Detailed description'),