diff --git a/apps/web/src/components/GameGrid.tsx b/apps/web/src/components/GameGrid.tsx index c505b56..566a473 100644 --- a/apps/web/src/components/GameGrid.tsx +++ b/apps/web/src/components/GameGrid.tsx @@ -1,24 +1,43 @@ +import { useState } from 'react'; import { Link } from 'react-router'; import type { CatalogEntry } from '@bg/shared/lite'; -import { GAME_ICON } from '../lib/catalog-ui'; +import { GAME_GROUPS, GAME_ICON } from '../lib/catalog-ui'; -export function GameGrid({ games, columns = 'repeat(auto-fill, minmax(200px, 1fr))' }: { games: CatalogEntry[]; columns?: string }) { +/** + * Game picker (docs/07 Β§3.3): small tiles with icon, name and one meta line. The one-line blurb and + * difficulty live on the game page, so 26 games fit on a phone in a few screens. A tab row narrows the list. + */ +export function GameGrid({ games }: { games: CatalogEntry[] }) { + const [group, setGroup] = useState('all'); + const groups = GAME_GROUPS.filter((g) => games.some((x) => g.ids.includes(x.id))); + const shown = group === 'all' ? games : games.filter((g) => GAME_GROUPS.find((x) => x.key === group)?.ids.includes(g.id)); return ( -
- {games.map((g) => ( - - - {GAME_ICON[g.id] ?? '🎲'} - - {g.nameKo} - {g.blurb} - - {g.minPlayers === g.maxPlayers ? `${g.minPlayers}λͺ…` : `${g.minPlayers}~${g.maxPlayers}λͺ…`} - {g.minutes}λΆ„ - {g.level} - - - ))} +
+ {groups.length > 1 && ( +
+ + {groups.map((g) => ( + + ))} +
+ )} +
+ {shown.map((g) => ( + + + {GAME_ICON[g.id] ?? '🎲'} + + {g.nameKo} + + {g.minPlayers === g.maxPlayers ? `${g.minPlayers}λͺ…` : `${g.minPlayers}~${g.maxPlayers}λͺ…`} Β· {g.minutes}λΆ„ + + + ))} +
); } diff --git a/apps/web/src/components/NicknameForm.tsx b/apps/web/src/components/NicknameForm.tsx index 9410b3f..8a0ce20 100644 --- a/apps/web/src/components/NicknameForm.tsx +++ b/apps/web/src/components/NicknameForm.tsx @@ -72,8 +72,9 @@ export function NicknameForm({ } /** Guests are deleted with their records a day after they leave the site (docs/05 Β§4). */ -export function GuestWarning() { +export function GuestWarning({ short }: { short?: boolean }) { const discord = useSession((s) => s.discordEnabled); + if (short) return

⚠️ 게슀트 기둝은 ν•˜λ£¨ λ™μ•ˆ μ•ˆ λ“€μ–΄μ˜€λ©΄ μ§€μ›Œμ Έμš”.

; return (

⚠️ κ²ŒμŠ€νŠΈλŠ” 기둝이 였래 μ €μž₯λ˜μ§€ μ•Šμ•„μš”. μ‚¬μ΄νŠΈμ— λ“€μ–΄μ˜€μ§€ μ•Šμ€ 채 ν•˜λ£¨κ°€ μ§€λ‚˜λ©΄ 계정과 기둝이 λͺ¨λ‘ μ§€μ›Œμ Έμš”. diff --git a/apps/web/src/games/marble/index.tsx b/apps/web/src/games/marble/index.tsx index 58530c4..d01a825 100644 --- a/apps/web/src/games/marble/index.tsx +++ b/apps/web/src/games/marble/index.tsx @@ -81,7 +81,7 @@ function useCompact(): boolean { const CSS = ` .mb-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; } -.mb-box { position: relative; width: 100%; max-width: min(100%, calc(100vh - 64px - 52px - 36px)); aspect-ratio: 1 / 1; } +.mb-box { position: relative; width: 100%; max-width: min(100%, calc(100vh - var(--site-h) - 52px - 36px)); aspect-ratio: 1 / 1; } @media (max-width: 1099px) { .mb-box { max-width: min(100%, 760px); } } .mb-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 16px; box-shadow: var(--shadow); background: var(--surface-2); touch-action: manipulation; user-select: none; } .mb-cell { cursor: pointer; outline: none; } diff --git a/apps/web/src/games/yacht/index.tsx b/apps/web/src/games/yacht/index.tsx index e0d46ad..c45b6e0 100644 --- a/apps/web/src/games/yacht/index.tsx +++ b/apps/web/src/games/yacht/index.tsx @@ -83,7 +83,7 @@ const CSS = ` @media (min-width: 1100px) { .yt-wrap { display: grid; grid-template-columns: 380px minmax(0, 1fr); align-items: start; max-height: 100%; } .yt-die { --s: 64px; } - .yt-sheet { max-height: calc(100vh - 64px - 52px - 40px); } + .yt-sheet { max-height: calc(100vh - var(--site-h) - 52px - 40px); } .yt-table th, .yt-table td { height: 34px; } .yt-cell { height: 30px; } } diff --git a/apps/web/src/games/yut/index.tsx b/apps/web/src/games/yut/index.tsx index 7ad3b1d..634178b 100644 --- a/apps/web/src/games/yut/index.tsx +++ b/apps/web/src/games/yut/index.tsx @@ -75,7 +75,7 @@ const CSS = ` .yut-ctrl { display: flex; flex-direction: column; gap: 12px; min-width: 0; } @media (min-width: 1100px) { .yut-wrap { grid-template-columns: minmax(0, 1fr) 300px; align-items: center; } - .yut-board-box { max-width: min(100%, calc(100vh - 64px - 52px - 40px)); } + .yut-board-box { max-width: min(100%, calc(100vh - var(--site-h) - 52px - 40px)); } } .yut-chips { display: flex; flex-wrap: wrap; gap: 8px; } .yut-chip { min-width: 64px; min-height: 64px; border-radius: 14px; border: 3px solid var(--border); background: var(--surface); color: var(--text); diff --git a/apps/web/src/lib/catalog-ui.ts b/apps/web/src/lib/catalog-ui.ts index d79757d..14d47ea 100644 --- a/apps/web/src/lib/catalog-ui.ts +++ b/apps/web/src/lib/catalog-ui.ts @@ -29,3 +29,10 @@ export const GAME_ICON: Record = { /** Shown on the home screen so users know what's coming (docs/12-roadmap.md). */ export const UPCOMING: string[] = []; + +/** Tabs on the game picker (docs/07 Β§3.3). Games not listed here only show under 전체. */ +export const GAME_GROUPS: { key: string; label: string; ids: string[] }[] = [ + { key: 'board', label: 'νŒΒ·μ£Όμ‚¬μœ„', ids: ['omok', 'othello', 'chess', 'janggi', 'baduk', 'quoridor', 'yut', 'marble', 'yacht', 'las-vegas'] }, + { key: 'cards', label: 'μΉ΄λ“œΒ·νŒ¨', ids: ['seotda', 'poker', 'one-card', 'gostop', 'dalmuti', 'splendor', 'cockroach-poker', 'ninety-nine', 'mahjong', 'rummikub', 'davinci-code'] }, + { key: 'party', label: 'μ—¬λŸΏμ΄ νŒŒν‹°', ids: ['bang', 'halli-galli', 'dobble', 'catchmind', 'mafia'] }, +]; diff --git a/apps/web/src/pages/MePage.tsx b/apps/web/src/pages/MePage.tsx index 6322c1e..a02e89b 100644 --- a/apps/web/src/pages/MePage.tsx +++ b/apps/web/src/pages/MePage.tsx @@ -12,7 +12,7 @@ import { toast } from '../store/toast'; function Seg({ value, options, onChange, label }: { value: T; options: [T, string][]; onChange: (v: T) => void; label: string }) { return ( -

+
{label}
{options.map(([k, l]) => ( @@ -62,7 +62,7 @@ export default function MePage() { updateSettings({ tapConfirm: v === 'on' })} /> diff --git a/apps/web/src/pages/RoomPage.tsx b/apps/web/src/pages/RoomPage.tsx index c44e034..0e7b31b 100644 --- a/apps/web/src/pages/RoomPage.tsx +++ b/apps/web/src/pages/RoomPage.tsx @@ -105,6 +105,11 @@ function Room({ code, me }: { code: string; me: PublicUser }) { }, [room]); useTurnTitle(ui, game?.view, me.id); + // Inside a room the room bar replaces the site header, so the board gets that height back. + useEffect(() => { + document.documentElement.classList.add('in-room'); + return () => document.documentElement.classList.remove('in-room'); + }, []); if (status === 'replaced') { return ( @@ -291,19 +296,17 @@ function Lobby({ room, ui, me }: { room: RoomView; ui: GameUI; me: PublicUser }) const firstEmpty = room.seats.findIndex((s) => s === null); const wide = useWide(); - const invite = ( + // Only while a seat is empty: once everyone is in, the room bar's link button is enough. + const invite = firstEmpty >= 0 && (

μΉœκ΅¬μ—κ²Œ 이 μ½”λ“œλ₯Ό μ•Œλ € μ£Όμ„Έμš”

-
- + {/* QR lives on the empty seat button ("οΌ‹ 빈자리 Β· QR둜 μ΄ˆλŒ€"), so this row stays two buttons. */} +
-
); @@ -349,7 +352,7 @@ function Lobby({ room, ui, me }: { room: RoomView; ui: GameUI; me: PublicUser }) ) : (
{canAddBot && i === firstEmpty && (
{practice &&

πŸ€– μ—°μŠ΅ κ²Œμž„μ΄μ—μš”. κΈ°λ‘μ—λŠ” 남지 μ•Šμ•„μš”.

} - {me.kind === 'guest' && !practice && } {room.lockedOptions.length > 0 &&

πŸ”’ 일뢀 κ·œμΉ™μ€ κ΄€λ¦¬μžκ°€ μ •ν•΄ λ‘μ–΄μ„œ λ°”κΏ€ 수 μ—†μ–΄μš”.

} {isHost && wide && } @@ -430,17 +432,12 @@ function Lobby({ room, ui, me }: { room: RoomView; ui: GameUI; me: PublicUser })
{invite} {wide ? settingsCard : seats} - {wide && ( -
-

κ·œμΉ™ μš”μ•½

- -
- )} {!wide && settingsCard}
-
+
{wide && seats} {action} + {me.kind === 'guest' && !practice && } {wide && }
@@ -527,7 +524,6 @@ function SettingsForm({ room, ui, inline, onDone }: { room: RoomView; ui: GameUI return (
{room.lockedOptions.length > 0 &&

πŸ”’ κ΄€λ¦¬μžκ°€ κ³ μ •ν•œ κ·œμΉ™μ€ 바꿔도 μ €μž₯λ˜μ§€ μ•Šμ•„μš”.

} -

λ°”κΎΈλ©΄ λ°”λ‘œ μ μš©λΌμš”.


@@ -675,14 +671,17 @@ function ResultPanel({ room, me, players, onLeave }: { room: RoomView; me: Publi {voted ? `λ‹€λ₯Έ μ‚¬λžŒμ„ κΈ°λ‹€λ¦¬λŠ” 쀑… (${room.rematchVotes.length}/${seated.length})` : `πŸ” ν•œ 판 더 (${room.rematchVotes.length}/${seated.length})`} )} - - {room.lastGamePk && result.ranking.some((g) => g.includes(me.id)) && ( - - β–Ά μ²˜μŒλΆ€ν„° λ‹€μ‹œ 보기 - - )} + {/* One primary action (ν•œ 판 더); the rest share one quieter row. */} +
+ + {room.lastGamePk && result.ranking.some((g) => g.includes(me.id)) && ( + + β–Ά λ‹€μ‹œ 보기 + + )} +
diff --git a/apps/web/src/styles/global.css b/apps/web/src/styles/global.css index 5a577e1..969e1ad 100644 --- a/apps/web/src/styles/global.css +++ b/apps/web/src/styles/global.css @@ -370,7 +370,7 @@ label.field { .toasts { position: fixed; - top: calc(64px + env(safe-area-inset-top)); + top: calc(var(--site-h) + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 60; @@ -698,10 +698,27 @@ button.header-user { } } +/* Site header height, used by the sticky room bar and the viewport-fitting game layout. + Inside a room the room bar is the only top bar (docs/07 Β§3.4): one bar, not two. */ +:root { + --site-h: 64px; +} +@media (max-width: 719px) { + :root { + --site-h: 56px; + } +} +:root.in-room { + --site-h: 0px; +} +.in-room .site-header { + display: none; +} + /* Room bar under the site header */ .room-bar { position: sticky; - top: 64px; + top: var(--site-h); z-index: 25; height: 52px; background: var(--bg); @@ -717,9 +734,6 @@ button.header-user { gap: 12px; } @media (max-width: 719px) { - .room-bar { - top: 56px; - } .room-bar-inner { padding: 0 8px; } @@ -746,7 +760,7 @@ button.header-user { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; - height: calc(100vh - 64px - 52px); + height: calc(100vh - var(--site-h) - 52px); min-height: 560px; } .game-main { @@ -778,7 +792,7 @@ button.header-user { } .board-wrap { - max-width: min(100%, calc(100vh - 64px - 52px - 120px)); + max-width: min(100%, calc(100vh - var(--site-h) - 52px - 120px)); width: 100%; } @media (max-width: 1099px) { @@ -816,11 +830,18 @@ button.header-user { .chat-line strong { margin-right: 6px; } +/* One line of quick reactions; the rest scrolls sideways instead of stacking rows. */ .emote-row { display: flex; - flex-wrap: wrap; + flex-wrap: nowrap; + overflow-x: auto; + scrollbar-width: none; gap: 4px; } +.emote-row button { + flex: none; + white-space: nowrap; +} .emote-row button { border: 1px solid var(--border); background: var(--bg); @@ -859,6 +880,80 @@ button.header-user { } .game-card { transition: transform 0.12s ease, box-shadow 0.12s ease; + text-decoration: none; + color: inherit; + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: 6px; + padding: 18px 10px 16px; +} +/* Game picker tiles: icon, name, one meta line (docs/07 Β§3.3). */ +.game-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); + gap: 12px; +} +.game-card-icon { + font-size: 2.4rem; + line-height: 1.1; +} +.game-card-name { + font-size: 1.05rem; + word-break: keep-all; +} +.game-card-meta { + font-size: 0.85rem; + color: var(--text-sub); +} +.game-tabs { + flex-wrap: nowrap; + overflow-x: auto; + scrollbar-width: none; +} +.game-tabs button { + flex: none; +} +@media (max-width: 719px) { + .game-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 8px; + } + .game-card { + padding: 14px 4px 12px; + } + .game-card-icon { + font-size: 2rem; + } + .game-card-name { + font-size: 0.95rem; + } + .game-card-meta { + font-size: 0.75rem; + } + /* λ°© λ§Œλ“€κΈ° full width, the two smaller actions side by side. */ + .home-actions { + grid-template-columns: 1fr 1fr; + gap: 10px; + } + .home-action { + min-height: 0; + padding: 14px 16px; + } + .home-action.primary { + grid-column: 1 / -1; + } + .home-action-icon { + font-size: 1.6rem; + margin-bottom: 4px; + } + .home-action-title { + font-size: 1.1rem; + } + .home-action-sub { + font-size: 0.85rem; + } } .phone-only { display: none; @@ -1257,3 +1352,20 @@ button.header-user { .data-table.compact td { padding: 8px 8px; } + +/* Settings: label and choices on one line (wraps under on narrow screens). */ +.setting-row { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; + gap: 6px 12px; + padding: 6px 0; + border-top: 1px solid var(--border); +} +.setting-row:first-of-type { + border-top: 0; +} +.setting-row .segmented { + gap: 6px; +} diff --git a/docs/05-accounts-auth.md b/docs/05-accounts-auth.md index f268c0b..84c44ec 100644 --- a/docs/05-accounts-auth.md +++ b/docs/05-accounts-auth.md @@ -42,7 +42,7 @@ - λ‘œκ·Έμ•„μ›ƒ: μ„Έμ…˜ μ‚­μ œ + μΏ ν‚€ μ‚­μ œ. κ²ŒμŠ€νŠΈκ°€ λ‘œκ·Έμ•„μ›ƒν•˜λ©΄ 게슀트 계정을 μ§€μš΄λ‹€(λ°© 자리, 전적, μ„Έμ…˜ 포함, μ§€λ‚œ λŒ€κ΅­ κΈ°λ‘μ—λŠ” 'μ•Œ 수 μ—†μŒ'으둜 λ‚¨μŒ). 확인 μ°½μ—μ„œ μ§€μ›Œμ§„λ‹€κ³  μ•Œλ¦°λ‹€. - κ²ŒμŠ€νŠΈκ°€ μ‚¬μ΄νŠΈλ₯Ό λ‹«κ³  ν•˜λ£¨(24μ‹œκ°„) λ™μ•ˆ μ˜€μ§€ μ•ŠμœΌλ©΄ 같은 λ°©μ‹μœΌλ‘œ μ§€μš΄λ‹€. μ„œλ²„κ°€ 1λΆ„λ§ˆλ‹€ `users.last_seen_at`(μš”μ²­Β·μ†ŒμΌ“ μ’…λ£Œ λ•Œ κ°±μ‹ )을 보고 μ •λ¦¬ν•˜λ©°, μ†ŒμΌ“μ΄ μ—΄λ € μžˆκ±°λ‚˜ λ°© 자리λ₯Ό κ°–κ³  있으면 κ±΄λ„ˆλ›΄λ‹€. - 계정 νŽ˜μ΄μ§€μ˜ "λͺ¨λ“  κΈ°κΈ°μ—μ„œ λ‘œκ·Έμ•„μ›ƒ"은 κ·Έ μ‚¬μš©μžμ˜ λͺ¨λ“  μ„Έμ…˜ μ‚­μ œ. -- 게슀트둜 μ‹œμž‘ν•˜λŠ” κ³³(둜그인 νŽ˜μ΄μ§€, 이름 μ •ν•˜κΈ° μΉΈ), 게슀트의 /me, κ²ŒμŠ€νŠΈκ°€ μžˆλŠ” λŒ€κΈ°μ‹€μ— "⚠️ κ²ŒμŠ€νŠΈλŠ” 기둝이 였래 μ €μž₯λ˜μ§€ μ•Šμ•„μš”. μ‚¬μ΄νŠΈμ— λ“€μ–΄μ˜€μ§€ μ•Šμ€ 채 ν•˜λ£¨κ°€ μ§€λ‚˜λ©΄ 계정과 기둝이 λͺ¨λ‘ μ§€μ›Œμ Έμš”." κ²½κ³ λ₯Ό 보인닀. +- 게슀트둜 μ‹œμž‘ν•˜λŠ” κ³³(둜그인 νŽ˜μ΄μ§€, 이름 μ •ν•˜κΈ° μΉΈ), 게슀트의 /me, κ²ŒμŠ€νŠΈκ°€ μžˆλŠ” λŒ€κΈ°μ‹€(ν•œ μ€„λ‘œ 쀄인 "⚠️ 게슀트 기둝은 ν•˜λ£¨ λ™μ•ˆ μ•ˆ λ“€μ–΄μ˜€λ©΄ μ§€μ›Œμ Έμš”.")에 "⚠️ κ²ŒμŠ€νŠΈλŠ” 기둝이 였래 μ €μž₯λ˜μ§€ μ•Šμ•„μš”. μ‚¬μ΄νŠΈμ— λ“€μ–΄μ˜€μ§€ μ•Šμ€ 채 ν•˜λ£¨κ°€ μ§€λ‚˜λ©΄ 계정과 기둝이 λͺ¨λ‘ μ§€μ›Œμ Έμš”." κ²½κ³ λ₯Ό 보인닀. ## 6. HTTP API | λ©”μ„œλ“œ | 경둜 | μ„€λͺ… | diff --git a/docs/06-lobby-rooms.md b/docs/06-lobby-rooms.md index 2504c6c..29f096e 100644 --- a/docs/06-lobby-rooms.md +++ b/docs/06-lobby-rooms.md @@ -31,13 +31,14 @@ 4. μ˜΅μ…˜μ€ "κΈ°λ³Έ μ„€μ •" λͺ‡ 개만 보이고 λ‚˜λ¨Έμ§€λŠ” "μžμ„Έν•œ μ„€μ •" μ ‘κΈ° μ•ˆμ— λ‘”λ‹€. ## 5. λŒ€κΈ°μ‹€ ν™”λ©΄ (PCλŠ” 두 μΉΈ 배치 β€” `07-ui-ux.md` 3.4. μ•„λž˜λŠ” λ‚΄μš© μˆœμ„œμ΄λ©° 쒁은 ν™”λ©΄μ—μ„œλŠ” 이 μˆœμ„œλ‘œ ν•œ 칸에 μŒ“μΈλ‹€) -1. **μ΄ˆλŒ€ μΉ΄λ“œ**(κ°€μž₯ λˆˆμ— λ„κ²Œ): 큰 글씨 μ½”λ“œ `123 456` - - [μ½”λ“œ 볡사] [링크 볡사] [κ³΅μœ ν•˜κΈ°](λͺ¨λ°”일: 곡유 μ‹œνŠΈ β†’ μΉ΄μΉ΄μ˜€ν†‘ λ“±) [QR 보기](같은 κ³΅κ°„μ˜ 가쑱이 폰으둜 μ°μ–΄μ„œ μž…μž₯) +1. **μ΄ˆλŒ€ μΉ΄λ“œ**(κ°€μž₯ λˆˆμ— λ„κ²Œ, λΉˆμžλ¦¬κ°€ μžˆμ„ λ•Œλ§Œ β€” λ‹€ μ°¨λ©΄ 숨기고 λ°© λ§‰λŒ€μ˜ πŸ”— 링크 λ³΅μ‚¬λ§Œ 남긴닀): 큰 글씨 μ½”λ“œ `123 456` + - [링크 볡사] [κ³΅μœ ν•˜κΈ°](λͺ¨λ°”일: 곡유 μ‹œνŠΈ β†’ μΉ΄μΉ΄μ˜€ν†‘ λ“±. κ³΅μœ κ°€ μ•ˆ λ˜λŠ” PCλŠ” [μ΄ˆλŒ€κΈ€ 볡사]) 두 개만. μ½”λ“œλŠ” 크게 λ³΄μ΄λ―€λ‘œ λ”°λ‘œ 볡사 λ²„νŠΌμ„ 두지 μ•ŠλŠ”λ‹€. QR(같은 κ³΅κ°„μ˜ 가쑱이 폰으둜 μ°μ–΄μ„œ μž…μž₯)은 빈자리 μΉΈ "οΌ‹ 빈자리 Β· πŸ“· QR둜 μ΄ˆλŒ€"λ₯Ό λˆ„λ₯΄λ©΄ λœ¬λ‹€. - λ³΅μ‚¬ν•˜λ©΄ λ²„νŠΌμ΄ 1.5μ΄ˆκ°„ "λ³΅μ‚¬ν–ˆμ–΄μš” βœ“"둜 λ°”λ€œ + 진동(지원 κΈ°κΈ°). - 곡유 문ꡬ: "OOλ‹˜μ΄ 였λͺ© 방에 μ΄ˆλŒ€ν–ˆμ–΄μš”! μ½”λ“œ 123 456 Β· https://<도메인>/r/123456" -2. **자리 λͺ©λ‘**: κ²Œμž„ μΈμ›λ§ŒνΌ 자리 μΉΈ. 각 μΉΈ: ν”„λ‘œν•„, λ‹‰λ„€μž„, λ°©μž₯ μ™•κ΄€, μ€€λΉ„ 체크, μ—°κ²° μƒνƒœ 점(초둝/λ…Έλž‘/νšŒμƒ‰). λΉˆμžλ¦¬λŠ” 점선 "+ μ΄ˆλŒ€ν•˜κΈ°"(λˆ„λ₯΄λ©΄ μ΄ˆλŒ€ μΉ΄λ“œλ‘œ 슀크둀). +2. **자리 λͺ©λ‘**: κ²Œμž„ μΈμ›λ§ŒνΌ 자리 μΉΈ. 각 μΉΈ: ν”„λ‘œν•„, λ‹‰λ„€μž„, λ°©μž₯ μ™•κ΄€, μ€€λΉ„ 체크, μ—°κ²° μƒνƒœ 점(초둝/λ…Έλž‘/νšŒμƒ‰). λΉˆμžλ¦¬λŠ” 점선 "οΌ‹ 빈자리 Β· πŸ“· QR둜 μ΄ˆλŒ€"(λˆ„λ₯΄λ©΄ QR. 아직 μžλ¦¬κ°€ μ—†λŠ” μ‚¬λžŒμ—κ²ŒλŠ” "οΌ‹ μ—¬κΈ° 앉기"). - λ‹‰λ„€μž„(자리, κ΄€μ „μž λͺ©λ‘, κ²°κ³Ό ν™”λ©΄)을 λˆ„λ₯΄λ©΄ 기둝 μΉ΄λ“œκ°€ λœ¬λ‹€: 이 κ²Œμž„μ˜ 판·승·패·무·승λ₯ , 이 λ°© 전적, 전체 κ²Œμž„ 합계. 패 = 판 - 승 - 무(1등이 μ•„λ‹ˆλ©΄ 패). μ»΄ν“¨ν„°λŠ” λˆ„λ₯Ό 수 μ—†λ‹€. `GET /api/users/:id/stats`(둜그인 ν•„μš”). - - κ²ŒμŠ€νŠΈμ—κ²ŒλŠ” μ„€μ • μΉ΄λ“œμ— "기둝이 였래 μ €μž₯λ˜μ§€ μ•Šκ³ , ν•˜λ£¨ λ™μ•ˆ μ•ˆ λ“€μ–΄μ˜€λ©΄ 계정과 기둝이 μ§€μ›Œμ§„λ‹€"λŠ” κ²½κ³ λ₯Ό 보인닀(μ—°μŠ΅ λ°© μ œμ™Έ). + - κ²ŒμŠ€νŠΈμ—κ²ŒλŠ” [κ²Œμž„ μ‹œμž‘]/[μ€€λΉ„ν•˜κΈ°] μ•„λž˜μ— ν•œ μ€„λ‘œ "⚠️ 게슀트 기둝은 ν•˜λ£¨ λ™μ•ˆ μ•ˆ λ“€μ–΄μ˜€λ©΄ μ§€μ›Œμ Έμš”."λ₯Ό 보인닀(μ—°μŠ΅ λ°© μ œμ™Έ). + - κ·œμΉ™ μ„€λͺ…은 λŒ€κΈ°μ‹€μ— 펼쳐 두지 μ•ŠλŠ”λ‹€. λ°© λ§‰λŒ€μ˜ [πŸ“– κ·œμΉ™]으둜 λ³Έλ‹€. 3. **κ²Œμž„ μ„€μ • μš”μ•½**: "였λͺ© Β· 렌주룰 Β· ν•œ 수 30초" + λ°©μž₯μ—κ²Œλ§Œ [μ„€μ • λ°”κΎΈκΈ°]. 4. **μ•„λž˜ κ³ μ • λ²„νŠΌ**(μ—„μ§€ λ‹ΏλŠ” κ³³): - λ°©μž₯: [κ²Œμž„ μ‹œμž‘] β€” μ΅œμ†Œ 인원이 μ•ˆ 되면 λΉ„ν™œμ„± + "1λͺ… 더 ν•„μš”ν•΄μš”" μ•ˆλ‚΄. λͺ¨λ‘ μ€€λΉ„κ°€ μ•„λ‹ˆμ–΄λ„ μ‹œμž‘ κ°€λŠ₯ν•˜λ˜ "μ€€λΉ„ μ•ˆ 된 μ‚¬λžŒμ΄ μžˆμ–΄μš”. μ‹œμž‘ν• κΉŒμš”?" 확인. diff --git a/docs/07-ui-ux.md b/docs/07-ui-ux.md index e04891b..dc43671 100644 --- a/docs/07-ui-ux.md +++ b/docs/07-ui-ux.md @@ -8,6 +8,12 @@ 5. **μ‹€μˆ˜ λ°©μ§€.** 큰 κ²°μ •(기ꢌ, λ‚˜κ°€κΈ°, 올인, 닀이)은 확인. 단, λ§€ ν„΄ 확인창은 κΈˆμ§€(느렀짐) β€” λŒ€μ‹  "두 번 눌러 ν™•μ •" μ˜΅μ…˜(λ°”λ‘‘Β·μ˜€λͺ© 였착 λ°©μ§€, κΈ°λ³Έ 켜짐: 첫 탭은 미리보기 돌, 같은 곳을 λ‹€μ‹œ νƒ­ν•˜λ©΄ 착수). 6. **기닀림을 보여 μ€€λ‹€.** 남은 μ‹œκ°„ 링, "OOλ‹˜μ΄ 생각 쀑…", μ—°κ²° μƒνƒœ. 7. **κ°€λ³κ²Œ.** μž₯식 이미지 μ΅œμ†Œ, μ• λ‹ˆλ©”μ΄μ…˜μ€ 짧게(150~250ms), `prefers-reduced-motion` 쑴쀑. +8. **ν•œλˆˆμ— λ“€μ–΄μ˜€κ²Œ (2026-10-09, "ν•œ 화면에 정보가 λ„ˆλ¬΄ λ§Žλ‹€" ν”Όλ“œλ°±).** μ°Έκ³ : NN/g 점진적 곡개(자주 μ“°λŠ” κ²ƒλ§Œ 첫 단계, λ‚˜λ¨Έμ§€λŠ” 이름이 λΆ„λͺ…ν•œ 두 번째 단계, μ΅œλŒ€ 2단계), ν† μŠ€ "ν•œ ν™”λ©΄ ν•œ κ°€μ§€", Board Game Arena ν™”λ©΄ μ§€μΉ¨(판이 κ°€μš΄λ°, μ •λ³΄λŠ” λ¬Άμ–΄μ„œ, λ“œλ¬Έ μ •λ³΄λŠ” λ²„νŠΌΒ·μ ‘κΈ° λ’€λ‘œ), Hick의 법칙(κ³ λ₯Ό 것이 많으면 묢음 νƒ­μœΌλ‘œ λ‚˜λˆˆλ‹€). + - 같은 정보λ₯Ό 두 곳에 두지 μ•ŠλŠ”λ‹€(λ°© μ•ˆμ—μ„œλŠ” μ‚¬μ΄νŠΈ 메뉴λ₯Ό 숨기고 λ°© λ§‰λŒ€ ν•œ μ€„λ§Œ, λŒ€κΈ°μ‹€μ˜ κ·œμΉ™ 전문은 [πŸ“– κ·œμΉ™]으둜). + - λͺ©λ‘ μΉ΄λ“œλŠ” 이름 + ν•œ 쀄 μ •λ³΄λ§Œ. μ„€λͺ…Β·λ‚œμ΄λ„λŠ” λ“€μ–΄κ°„ λ‹€μŒ ν™”λ©΄μ—μ„œ. + - μ§€κΈˆ ν•„μš” μ—†λŠ” 것은 μˆ¨κΈ΄λ‹€(μžλ¦¬κ°€ λ‹€ μ°¨λ©΄ μ΄ˆλŒ€ μΉ΄λ“œ, μ²˜μŒλΆ€ν„° 펼친 ν•΄μ‹œκ°’ 같은 μ„ΈλΆ€ 정보). + - λ²„νŠΌμ€ ν™”λ©΄λ§ˆλ‹€ μ§„ν•œ 것 ν•˜λ‚˜. λ‚˜λ¨Έμ§€λŠ” ν•œ 쀄에 λ¬Άμ–΄ 덜 μ§„ν•˜κ²Œ. + - κ²½κ³ Β·μ•ˆλ‚΄ λ¬Έκ΅¬λŠ” ν•œ μ€„λ‘œ 쀄인닀(전문은 처음 ν•œ 번, λ‘œκ·ΈμΈΒ·μ΄λ¦„ μ •ν•˜κΈ°Β·/meμ—μ„œ). ## 2. λ””μžμΈ 토큰 ### 2.1 색 (밝은 ν…Œλ§ˆ / μ–΄λ‘μš΄ ν…Œλ§ˆ) @@ -66,17 +72,20 @@ β”‚ [β–Ά ν•˜λ˜ κ²Œμž„μœΌλ‘œ λŒμ•„κ°€κΈ°] (μžˆμ„ λ•Œλ§Œ) β”‚ β”‚ [οΌ‹ λ°© λ§Œλ“€κΈ° (νŒŒλž€ 큰 λ²„νŠΌ)] [πŸ”’ μ½”λ“œλ‘œ μ°Έμ—¬ β†’ /j] [πŸ€– 컴퓨터와 μ—°μŠ΅] β”‚ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ -β”‚ κ²Œμž„ μΉ΄λ“œ 격자 (4~5μ—΄, μΉ΄λ“œμ— μΈμ›Β·μ‹œκ°„Β·λ‚œμ΄λ„) β”‚ +β”‚ [전체] [νŒΒ·μ£Όμ‚¬μœ„] [μΉ΄λ“œΒ·νŒ¨] [μ—¬λŸΏμ΄ νŒŒν‹°] ← μ’…λ₯˜ νƒ­ β”‚ +β”‚ κ²Œμž„ 타일 격자 (PC μžλ™ μ—΄, νœ΄λŒ€ν° 3μ—΄. 타일 = μ•„μ΄μ½˜Β·μ΄λ¦„Β·"2λͺ… Β· 5~15λΆ„") β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` - 첫 화면에 λ‹€ λ„£μ§€ μ•ŠλŠ”λ‹€. μ„€λͺ… 글은 λ²„νŠΌ μ•„λž˜ ν•œ μ€„λ§Œ, λ‚˜λ¨Έμ§€λŠ” νƒ­μ΄λ‚˜ λ²„νŠΌμ„ 눌러 λ“€μ–΄κ°„λ‹€. +- κ²Œμž„ ν•œ 쀄 μ†Œκ°œμ™€ λ‚œμ΄λ„λŠ” κ²Œμž„ μ†Œκ°œ(`/g/:id`)μ—λ§Œ λ‘”λ‹€. νœ΄λŒ€ν°μ—μ„œ 26κ°œκ°€ μ„Έ ν™”λ©΄ 남짓에 λ“€μ–΄μ˜¨λ‹€. +- νœ΄λŒ€ν°: [οΌ‹ λ°© λ§Œλ“€κΈ°]λŠ” ν•œ 쀄 전체, [μ½”λ“œλ‘œ μ°Έμ—¬]Β·[컴퓨터와 μ—°μŠ΅]은 κ·Έ μ•„λž˜ λ‚˜λž€νžˆ. ### 3.4 λŒ€κΈ°μ‹€ (PC) ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” -β”‚ μ΄ˆλŒ€ μΉ΄λ“œ(μ½”λ“œ 크게, 볡사·QR) β”‚ 자리 λͺ©λ‘(2~10μΉΈ 격자) β”‚ -β”‚ κ²Œμž„ μ„€μ •(νŽΌμ³μ„œ λ°”λ‘œ μˆ˜μ • β€” λ°©μž₯) β”‚ μ±„νŒ…(항상 λ³΄μž„) β”‚ -β”‚ κ·œμΉ™ μš”μ•½ β”‚ [κ²Œμž„ μ‹œμž‘] / [μ€€λΉ„ν•˜κΈ°] β”‚ +β”‚ μ΄ˆλŒ€ μΉ΄λ“œ(빈자리 μžˆμ„ λ•Œλ§Œ) β”‚ 자리 λͺ©λ‘(2~10μΉΈ 격자) β”‚ +β”‚ κ²Œμž„ μ„€μ •(νŽΌμ³μ„œ λ°”λ‘œ μˆ˜μ • β€” λ°©μž₯) β”‚ [κ²Œμž„ μ‹œμž‘] / [μ€€λΉ„ν•˜κΈ°] β”‚ +β”‚ β”‚ μ±„νŒ…(항상 λ³΄μž„) β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` @@ -95,6 +104,9 @@ - μΉ΄λ“œ κ²Œμž„: 판 μžλ¦¬μ— μ›ν˜• ν…Œμ΄λΈ”, λ‚˜λŠ” 항상 μ•„λž˜, λ‚΄ νŒ¨λŠ” 판 μ•„λž˜μͺ½ λ„“κ²Œ. - PC μ‘°μž‘: 마우슀λ₯Ό 올리면 미리 보기 돌(반투λͺ…), 클릭 ν•œ λ²ˆμ— 착수(κΈ°λ³Έκ°’). "두 번 눌러 ν™•μ •"은 ν„°μΉ˜ 기기의 기본값이고 μ„€μ •μ—μ„œ λ°”κΏ€ 수 μžˆλ‹€. - 단좕킀: `Enter` μ±„νŒ… μž…λ ₯, `Esc` μ°½ λ‹«κΈ°, λ°©ν–₯ν‚€+`Enter` 판 μ‘°μž‘. +- λ°© μ•ˆ(λŒ€κΈ°μ‹€Β·κ²Œμž„Β·κ²°κ³Ό)μ—μ„œλŠ” μ‚¬μ΄νŠΈ 상단 메뉴λ₯Ό 숨기고 λ°© λ§‰λŒ€(← ν™ˆ Β· κ²Œμž„ 이름 Β· πŸ”— λ°© μ½”λ“œ Β· πŸ“– κ·œμΉ™ Β· βš™οΈ μ„€μ • Β· πŸšͺ λ‚˜κ°€κΈ°) ν•œ μ€„λ§Œ λ‘”λ‹€. 판이 그만큼 컀진닀. 높이 계산은 CSS λ³€μˆ˜ `--site-h`(λ°© μ•ˆμ—μ„œλŠ” 0)λ₯Ό μ“΄λ‹€. +- μ±„νŒ…μ˜ λΉ λ₯Έ λ°˜μ‘(이λͺ¨μ§€Β·μ§§μ€ 말)은 ν•œ 쀄. λ„˜μΉ˜λ©΄ μ˜†μœΌλ‘œ λ°€μ–΄ λ³Έλ‹€. +- κ²°κ³Ό μ°½: μ§„ν•œ λ²„νŠΌμ€ [πŸ” ν•œ 판 더] ν•˜λ‚˜. [판 보기]Β·[β–Ά λ‹€μ‹œ 보기]λŠ” ν•œ 쀄에 λ‚˜λž€νžˆ, [λ°© λ‚˜κ°€κΈ°]λŠ” κΈ€μž λ²„νŠΌ, 곡정성 확인은 μ ‘μ–΄ λ‘”λ‹€. ### 3.6 κ΄€λ¦¬μž (PC) μ™Όμͺ½ μ‚¬μ΄λ“œλ°”(220px)에 메뉴, 였λ₯Έμͺ½μ— λ‚΄μš©. ν‘œλŠ” PCμ—μ„œ ν‘œ ν˜•νƒœ, 쒁은 ν™”λ©΄μ—μ„œλŠ” μΉ΄λ“œ λͺ©λ‘. @@ -159,7 +171,7 @@ - κ²Œμž„ 상세 - λŒ€κΈ°μ‹€(λ°©μž₯/μ°Έκ°€μž/κ΄€μ „μž, 인원 λΆ€μ‘±/가득 μ°Έ) - κ²Œμž„ ν™”λ©΄(λ‚΄ μ°¨λ‘€/λ‚¨μ˜ μ°¨λ‘€/μ—°κ²° λŠκΉ€/자리 비움/μΌμ‹œ μ •μ§€) -- κ²°κ³Ό ν™”λ©΄(승/패/λ¬΄μŠΉλΆ€, ν•œ 판 더 νˆ¬ν‘œ 쀑, μ²˜μŒλΆ€ν„° λ‹€μ‹œ 보기) +- κ²°κ³Ό ν™”λ©΄(승/패/λ¬΄μŠΉλΆ€, ν•œ 판 더 νˆ¬ν‘œ 쀑, β–Ά λ‹€μ‹œ 보기) - 계정(게슀트/λ””μŠ€μ½”λ“œ, λ‚΄ κ²Œμž„ 기둝 λͺ©λ‘ + [λ‹€μ‹œ 보기]) - λ‹€μ‹œ 보기(`/replay/:gamePk`: νŒμ€ 읽기 μ „μš©, 처음/이전/μž¬μƒΒ·λ©ˆμΆ€/λ‹€μŒ/끝 + μŠ¬λΌμ΄λ”. PCλŠ” 였λ₯Έμͺ½ μΉΈ, 폰은 μ•„λž˜ κ³ μ • λ§‰λŒ€. λͺ» λ³΄λŠ” κ²Œμž„μ€ μ•ˆλ‚΄ 문ꡬ, docs/09 Β§8) - 였λ₯˜(λ°© μ—†μŒ, λ°© 가득 μ°Έ, μ„œλ²„ μ—…λ°μ΄νŠΈ, μ˜€ν”„λΌμΈ) diff --git a/docs/09-game-engine.md b/docs/09-game-engine.md index 3dc51bb..056ecdc 100644 --- a/docs/09-game-engine.md +++ b/docs/09-game-engine.md @@ -127,7 +127,7 @@ export interface GameUI { - **μž₯λ©΄**: 슀트리밍 행동(κ·Έλ¦Ό 맞히기 μ„ )이 μ•„λ‹Œ 행동 ν•˜λ‚˜κ°€ ν•œ μž₯λ©΄. 첫 μž₯면만 view 전체, λ‚˜λ¨Έμ§€λŠ” μ•ž μž₯면과의 차이(`packages/shared/src/view-patch.ts`)만 보낸닀. λ‹€μ‹œ λ§Œλ“  κ²°κ³Όκ°€ μ €μž₯된 결과와 λ‹€λ₯΄λ©΄ 보여 μ£Όμ§€ μ•ŠλŠ”λ‹€. - **λͺ» λ³΄λŠ” 경우**(410, ν•œκ΅­μ–΄ μ•ˆλ‚΄): 90일이 μ§€λ‚˜ λ‘œκ·Έκ°€ μ§€μ›Œμ§, κ·Έ λ’€λ‘œ κ²Œμž„ κ·œμΉ™ 버전(`stateVersion`)이 λ°”λ€œ, λ‹€μ‹œ λ§Œλ“  κ²°κ³Όκ°€ 닀름. - **API**: `GET /api/me/games?before=&limit=`(λ‚΄κ°€ λκΉŒμ§€ ν•œ κ²Œμž„, μ΅œμ‹ μˆœ), `GET /api/replays/:gamePk`. λ‹€μ‹œ λ§Œλ“  κ²°κ³ΌλŠ” 잠깐(10λΆ„, 32개) μΊμ‹œν•˜κ³ , ν•œ λ²ˆμ— ν•˜λ‚˜μ”© μ‘°κΈˆμ”© λŠμ–΄ λ§Œλ“€μ–΄ λ°© 처리λ₯Ό 막지 μ•ŠλŠ”λ‹€. -- **ν™”λ©΄**: κ²Œμž„μ˜ `Board`/`Side`λ₯Ό κ·ΈλŒ€λ‘œ μ“°λ˜ 읽기 μ „μš©(`act`λŠ” 아무것도 μ•ˆ 함, 판 μ•ˆμ˜ λˆ„λ₯΄κΈ°Β·ν‚€ μž…λ ₯은 λ§‰μŒ). 처음 / 이전 / μž¬μƒΒ·λ©ˆμΆ€ / λ‹€μŒ / 끝 λ²„νŠΌ, μŠ¬λΌμ΄λ”, "n번째 / 전체 n번", μž₯λ©΄ μ„€λͺ…(λˆ„κ°€ μ›€μ§μ˜€λŠ”μ§€, μžλ™ μ§„ν–‰). ν‚€λ³΄λ“œ ←/β†’/Home/End. λ“€μ–΄κ°€λŠ” κ³³: κ²°κ³Ό ν™”λ©΄ [μ²˜μŒλΆ€ν„° λ‹€μ‹œ 보기](`RoomView.lastGamePk`), λ‚΄ 정보 β€Ί λ‚΄ κ²Œμž„ 기둝 [λ‹€μ‹œ 보기]. +- **ν™”λ©΄**: κ²Œμž„μ˜ `Board`/`Side`λ₯Ό κ·ΈλŒ€λ‘œ μ“°λ˜ 읽기 μ „μš©(`act`λŠ” 아무것도 μ•ˆ 함, 판 μ•ˆμ˜ λˆ„λ₯΄κΈ°Β·ν‚€ μž…λ ₯은 λ§‰μŒ). 처음 / 이전 / μž¬μƒΒ·λ©ˆμΆ€ / λ‹€μŒ / 끝 λ²„νŠΌ, μŠ¬λΌμ΄λ”, "n번째 / 전체 n번", μž₯λ©΄ μ„€λͺ…(λˆ„κ°€ μ›€μ§μ˜€λŠ”μ§€, μžλ™ μ§„ν–‰). ν‚€λ³΄λ“œ ←/β†’/Home/End. λ“€μ–΄κ°€λŠ” κ³³: κ²°κ³Ό ν™”λ©΄ [β–Ά λ‹€μ‹œ 보기](`RoomView.lastGamePk`), λ‚΄ 정보 β€Ί λ‚΄ κ²Œμž„ 기둝 [λ‹€μ‹œ 보기]. - **ν…ŒμŠ€νŠΈ**: λͺ¨λ“  κ²Œμž„μ„ μ‹€μ œ `Room`으둜 λκΉŒμ§€(λ¬΄μž‘μœ„ 행동, μ‹œκ°„ 초과, λ‚˜κ°€κΈ°) λ‘” λ’€ λ‹€μ‹œ λ§Œλ“  μƒνƒœΒ·κ²°κ³Όκ°€ 같은지, λͺ¨λ“  μž₯면이 κ·Έ ν”Œλ ˆμ΄μ–΄κ°€ 받은 view와 같은지(`replay.test.ts`), κΆŒν•œ(`replay-api.test.ts`), λΈŒλΌμš°μ €(`e2e/replay.e2e.ts`). ## 9. 컴퓨터 μƒλŒ€ (`packages/games/src/bots/`, 06 Β§12) diff --git a/e2e/bots.e2e.ts b/e2e/bots.e2e.ts index da92714..8a259ea 100644 --- a/e2e/bots.e2e.ts +++ b/e2e/bots.e2e.ts @@ -111,9 +111,13 @@ try { const codeOf = (p: Page) => new URL(p.url()).pathname.split('/').pop()!; const userId = (nick: string) => app.db.query<{ id: string }, [string]>('SELECT id FROM users WHERE nickname = ?').get(nick)?.id; - await step('였λͺ©(κ²Œμž„ 쀑): μ‚¬μ΄νŠΈ 둜고둜 ν™ˆΒ·μƒˆλ‘œκ³ μΉ¨ β†’ μžλ¦¬λŠ” 남고 접속은 λŠκΉ€, μ‚¬μ΄νŠΈκ°€ μ—΄λ € 있으면 30λΆ„ λ’€ 정리', async () => { + await step('였λͺ©(κ²Œμž„ 쀑): μ‚¬μ΄νŠΈ μ•ˆμ—μ„œ ν™ˆμœΌλ‘œΒ·μƒˆλ‘œκ³ μΉ¨ β†’ μžλ¦¬λŠ” 남고 접속은 λŠκΉ€, μ‚¬μ΄νŠΈκ°€ μ—΄λ € 있으면 30λΆ„ λ’€ 정리', async () => { const code = codeOf(a); - await a.locator('.site-logo').click(); + // The room hides the site header (one top bar), so move within the app the way a back gesture would. + await a.evaluate(() => { + history.pushState({}, '', '/'); + dispatchEvent(new PopStateEvent('popstate')); + }); await a.waitForURL(`${ORIGIN}/`); const room = app.rooms.get(code)!; for (let i = 0; i < 50 && room.conns.size; i++) await Bun.sleep(20); diff --git a/e2e/replay.e2e.ts b/e2e/replay.e2e.ts index 01837bd..d061da0 100644 --- a/e2e/replay.e2e.ts +++ b/e2e/replay.e2e.ts @@ -121,7 +121,7 @@ try { await step('A(PC): κ²°κ³Ό ν™”λ©΄ β†’ μ²˜μŒλΆ€ν„° λ‹€μ‹œ 보기 β†’ ν•œ μˆ˜μ”© λ„˜κΈ°κΈ°', async () => { await a.waitForTimeout(400); // sheet animation - await a.getByRole('link', { name: /μ²˜μŒλΆ€ν„° λ‹€μ‹œ 보기/ }).click(); + await a.getByRole('link', { name: 'β–Ά λ‹€μ‹œ 보기' }).click(); await a.waitForURL(/\/replay\/[0-9A-Z]{26}$/); replayUrl = a.url(); await a.getByText('κ²Œμž„μ„ μ‹œμž‘ν–ˆμ–΄μš”.').waitFor(); @@ -236,7 +236,7 @@ try { await step('μ›μΉ΄λ“œ λ‹€μ‹œ 보기: 각자 자기 μΉ΄λ“œλ§Œ λ³΄μž„', async () => { await a.waitForTimeout(400); - await a.getByRole('link', { name: /μ²˜μŒλΆ€ν„° λ‹€μ‹œ 보기/ }).click(); + await a.getByRole('link', { name: 'β–Ά λ‹€μ‹œ 보기' }).click(); await a.waitForURL(/\/replay\//); await a.getByText('κ²Œμž„μ„ μ‹œμž‘ν–ˆμ–΄μš”.').waitFor(); expectEq(await hand(a), liveA, "A's replay hand at the start");