UI: fix last-move highlight, localize move history, clamp zoom overscroll #42
Reference in New Issue
Block a user
Delete Branch "feature/ui-recent-highlight-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Four independent fixes in the game screen (
ui/), reported by the owner.1 & 3 — Recent-move highlight (event-driven)
The highlight used the last play (skipping passes) and was a
$derivedtied toplacement.pending, so it lit the opponent's old word after our own pass and re-fired when a just-placed tile was recalled.refreshRecent) — refreshed only on a real game event (open/refresh, opponent move, our own committed move) and dismissed the moment composing starts, so recalling a draft never re-lights it.2 — Localized move-history labels
Non-play history rows printed the raw English action (
exchange,pass). Addedmove.{pass,exchange,resign,timeout}to both catalogs and routed the label throught(); under a Russian UI the history now reads «Обмен» / «Пас».4 — Zoomed-board overscroll
The zoomed board is a native
overflow:autoscroller; addedoverscroll-behavior: noneso it clamps at the edge instead of rubber-banding into empty space.Tests
lastMoveCellsunit coverage (trailing pass/exchange → empty).Verified locally:
pnpm check(0/0),test:unit(148),build,test:e2e(86, both engines), plus a manual mock-mode pass via Playwright MCP covering all six scenarios (highlight on open, place→recall no re-fire, exchange→no stale highlight + live opponent re-flash, RU «Обмен» in history).