결과는 움직임이 끝날 때까지(시간 상한 없음), 제한 시간은 각자 화면이 연출을 다 보여 준 뒤부터

- lib/motion: useMotionSettled에서 12초 상한을 없앰(명시한 maxMs만)
- 서버: 클라이언트 settled(seq)를 받으면 그 사람의 제한 시간을 연출에 걸린 만큼 늦춤(보고 전에는 최대 15초×속도,
  보고한 적 없는 화면·컴퓨터·실시간 게임은 예전 그대로), 마감이 바뀌면 deadline 메시지
- 바퀴벌레 포커: 게임을 끝낸 판정은 패배 배너까지 다 끝난 뒤에 끝 화면
- 증강 윷놀이: 선택 창 열림을 후보 묶음마다 따로, 이의있음! 재선택 창은 이의있음! 화면이 사라진 뒤에
- e2e/motion.e2e.ts: 30초 움직임·바퀴벌레 포커 마지막 판정·이의있음! 재선택·다빈치 ×1/8 회귀 확인, 방 타이머 단위 테스트

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-11-08 10:40:48 +09:00
parent 4e0eb4d52c
commit fa53175f51
18 changed files with 371 additions and 22 deletions

View File

@@ -529,8 +529,9 @@ function Who({ id, players, me }: { id: string; players: Record<string, PublicUs
/** The middle of the felt: the card being passed (with what was said), or the last verdict while the next card is chosen. */
function Table({ v, me, players, fresh, over }: { v: CockroachView; me: string | null; players: Record<string, PublicUser>; fresh: { slide: boolean; flip: boolean }; over: boolean }) {
const r = v.round;
// The call that ended the game is played out like any other (card turns, stamp, flight) before the end shows.
const lastCall = v.phase === 'finished' && fresh.flip && !over ? v.lastReveal : null;
// The call that ended the game is played out like any other (card turns, stamp, flight, the loss banner): the end
// shows only once all of it has finished (`over`), not when the card's own flip is done.
const lastCall = v.phase === 'finished' && !over ? v.lastReveal : null;
if (v.phase === 'finished' && !lastCall) {
const f = v.final!;
return (

View File

@@ -333,23 +333,26 @@ export function AugSelect({ v, act, pending, players, blocked = false }: { v: Yu
const sel = v.aug!.select!;
const [choice, setChoice] = useState<AugId | null>(null);
const [target, setTarget] = useState<AugId | ''>('');
const [open, setOpen] = useState(false);
const mine = sel.offers.length > 0 && sel.picksLeft > 0;
const key = sel.offers.join(',');
// New offers open the window by themselves, but only after the board has stopped moving (the last move's hop,
// the 이의있음! call, `blocked`) so nothing pops up over an animation.
const [autoOpen, setAutoOpen] = useState(mine);
const ready = useMotionSettled(autoOpen && mine && !blocked);
// The window belongs to one set of offers: new offers (혼돈 mode's second pick, the 이의있음! redo) start closed.
const [openKey, setOpenKey] = useState<string | null>(null);
const open = mine && openKey === key;
const setOpen = (on: boolean) => setOpenKey(on ? key : null);
// New offers open the window by themselves, but only after the board has stopped moving (the last move's hop)
// and the 이의있음! call is gone (`blocked`), so nothing pops up over an animation.
const [autoKey, setAutoKey] = useState<string | null>(mine ? key : null);
const ready = useMotionSettled(mine && autoKey === key && !blocked);
useEffect(() => {
setChoice(sel.forced);
setTarget('');
if (mine) setAutoOpen(true);
setAutoKey(mine ? key : null);
}, [key]); // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => {
if (!ready) return;
setOpen(true);
setAutoOpen(false);
}, [ready]);
setOpenKey(key);
setAutoKey(null);
}, [ready]); // eslint-disable-line react-hooks/exhaustive-deps
const tierText = { start: '범용 + 시작 전용', mid: '범용 + 중간 전용', final: '범용 + 마무리 전용' }[sel.tier];
const targets = choice === 'detective' ? sel.detectiveTargets : choice === 'delivery' ? sel.deliveryTargets : [];
const needTarget = choice === 'detective' || (choice === 'delivery' && targets.length > 0);