Commit graph

135 commits

Author SHA1 Message Date
4a8dbc0feb fix: preserve mobile scrolling and cancel reversed loan moves 2026-09-27 09:20:39 +02:00
89009f7781 Add Persian viewer and tutorial translations 2026-09-27 00:53:48 +02:00
af8beebb2c fix(viewer): prevent translated button overlap and restore unread chat 2026-09-26 12:01:23 +02:00
762a9f71fe fix(viewer): review contextual translations and localize whole journal entries 2026-09-25 21:37:55 +02:00
f931ca59d6 fix(viewer): keep translated calculator controls within their keys 2026-09-25 18:28:54 +02:00
c197b42042 feat(viewer): support the shared color-blind preference 2026-09-25 17:38:35 +02:00
9436db2f7a feat(viewer): localize interface and tutorials in 15 languages 2026-09-25 16:29:21 +02:00
e57d24cdfe feat(viewer): add player hover cards and board thumbnails 2026-09-24 11:44:11 +02:00
f189ee4863 fix(viewer): show container action bar only on mobile 2026-09-22 08:45:53 +02:00
e562533c97 feat(viewer): support editing chat messages 2026-09-21 22:40:07 +02:00
3666bb0948 fix(viewer): make chat translation controls compact 2026-09-21 21:53:03 +02:00
8664228bc8 Support translated chat and platform analysis defaults 2026-09-21 20:32:09 +02:00
c88540c103 Keep the mobile board scrollable and let chat scroll into view 2026-09-21 16:40:06 +02:00
fed212b4a6
Merge pull request #11 from boardgamers/feat/game-analysis
Support saved analyses of finished Container games
2026-09-21 16:17:37 +02:00
347702289f Check mobile chat through its tab in browser smoke tests 2026-09-21 15:35:56 +02:00
30cdb46757 Support saved analyses of finished Container games 2026-09-21 15:30:16 +02:00
b8c88babf4 Square panel corners along the screen edges 2026-09-20 00:19:06 +02:00
25091017ec Tab between journal and chat on mobile 2026-09-20 00:14:47 +02:00
f801e92906 Preserve chat when mobile controls mount and remove redundant drag listeners 2026-09-20 00:10:16 +02:00
cae59283d7 Match mobile controls to Container board styling 2026-09-19 21:00:29 +02:00
4b6ac3c431 Make mobile container purchases possible without cross-board dragging 2026-09-19 20:41:39 +02:00
74d7bdabf7 Format native tutorial browser test 2026-09-17 16:17:47 +02:00
c226c43b76 Teach tutorial actions through the game board 2026-09-17 16:12:18 +02:00
ed21bfe073 Fix journal scrolling on refresh and match chat height 2026-09-17 14:22:08 +02:00
aaaaca312e Use shared tutorial feedback and next-chapter controls 2026-09-16 09:30:38 +02:00
9b206d180a Clarify tutorial scoring and acknowledge correct answers 2026-09-16 08:14:05 +02:00
4eb331d601 Add guided Container tutorials and clearer auction controls 2026-09-15 23:02:22 +02:00
9601fac15e Show floating chat shortcut only for unread messages 2026-09-15 11:50:39 +02:00
70e14de86c
Use shared BGS viewer and chat protocol (#10)
* Use shared BGS viewer and chat protocol

* Use shared chat panel with Container styling

* Update shared chat visibility and show date separators

* Keep typing after completing a chat mention
2026-09-13 22:54:10 +02:00
ff733404c2 Reset unread badges when chat history is replaced 2026-09-11 20:44:38 +02:00
668bf58909 Remove local review notes and metadata template 2026-09-10 23:04:55 +02:00
8f8cf6867f Send chat directly without sandbox-blocked form submissions 2026-09-10 22:43:31 +02:00
51f8041dda Move chat shortcut clear of BGS settings control 2026-09-10 22:23:52 +02:00
fd39276159 Place chat beside journal and add off-screen unread shortcut 2026-09-10 22:21:18 +02:00
09081dec4a Add click-to-move controls, readable journal and chat, and action sounds 2026-09-10 22:13:47 +02:00
93983c3fe3
Merge pull request #9 from boardgamers/moon/tentative-turns
Tentative-turn model: per-turn time increments, free undo, append-only log (engine+viewer 2.0.0)
2026-08-17 12:11:47 +02:00
87d81d14d0 build: pin @vue/compiler-sfc for the cli-plugin-typescript shim
The shim's bare require expects the vue-3 parse shape but declares no
dependency, so it resolved through pnpm's hidden hoist — which could pick
vue 2.7's legacy-shaped 2.7.16 (CI) or 3.5.41 (local) depending on layout.
packageExtensions makes it deterministic.
2026-08-17 10:04:13 +00:00
7484d8eef0 build: disable pnpm autoInstallPeers — vue3 compiler-sfc leak broke fresh builds 2026-08-17 10:00:14 +00:00
0566dcaab3 ci: modernize workflows (node 24, pnpm 11), single workspace lockfile
The per-directory v5.3 lockfiles were stale against the 2.0.0 package.jsons and
unreadable by the workflows' pnpm 5 anyway; the root v9 workspace lockfile is
authoritative. Reformat sources for prettier-plugin-organize-imports v3 and
ignore build artifacts.
2026-08-17 09:55:09 +00:00
1278df32e4 viewer: make the log modal readable in dark mode
The modal kept its own light backgrounds (#fefefe content, #ccc/#fff log
rows) but let the text color inherit from the page, so the platform's dark
mode rendered it white-on-gray. Pin an explicit dark text color on
.modal-content — the viewer styles everything else with fixed colors too —
so the log (and the other modals) are readable in both themes.
2026-08-17 09:50:30 +00:00
7a54e8e2dd viewer: don't re-apply matching tentative echoes
After a drag-drop the viewer paints a local preview of the move synchronously,
then the server's tentative echo of the same turn buffer arrived a few hundred
ms later and went through replaceState again. Rebuilding every piece while the
drop animation was still in flight made the piece show at its destination
instantly while also tweening there from the drop point. Matching echoes now
short-circuit like stale ones already did — they only trigger the move sound,
which used to be the echo replace's job (local previews are silent).

Also delay the self-contained harness's tentative echo by 300ms so it lands
mid-animation like on the real platform instead of masking such races.
2026-08-17 09:50:20 +00:00
1b6d749e31 viewer: apply preference toggles immediately
The preferences object handed to Game as a prop was a plain object owned by
launch(), and Vue 2 does not deep-observe prop values coming from a
non-reactive parent. Toggling sound or the drag/drop help indicators mutated
an unobserved object, so the UI only caught up on the next unrelated
re-render (in practice: after a refresh). Make the object a Vue.observable
and merge platform preference pushes into it instead of replacing it, so both
the in-game toggles and platform updates paint immediately.
2026-08-17 09:50:03 +00:00
fd23b5c996 viewer: inline icons and audio into the built bundles
Production deploys upload only dist/container-viewer.umd.min.js and
dist/container-viewer.css to S3; the lib build emitted the toolbar icons to
dist/img/*.svg and the sounds to dist/media/* and referenced them by relative
URL, so they all 404'd on the platform (v2 worked only because jsdelivr served
the whole npm package). Swap the svg rule's file-loader for url-loader and
raise the images/media inline limits so every asset becomes a data URI inside
the two uploaded files.
2026-08-17 09:49:53 +00:00
f0c6f0bba0 Add Playwright MCP to gitignore 2026-08-17 08:27:41 +00:00
3f9d7d51b8 viewer: ignore tentative-state echoes that don't match the turn buffer
A move response's tentative state replaced the local preview
unconditionally. If the user had undone down to an empty buffer (which
re-emits nothing) or already made another move, a late echo transiently
showed a phantom or regressed move (and a wrong sidebar log) until the
next response landed.

Only accept a tentative state whose visible log extends the committed log
by exactly the buffered moves, in order — validated against the engine:
every tentative echo satisfies this (all tentative moves are visible-log
moves; bids and bid-phase loans go to the hidden log but commit
immediately and never take this path). Stale echoes are dropped; the echo
for the current buffer, if one is in flight, follows anyway.
2026-08-16 21:32:04 +00:00
511ce1728a engine!: remove the dead reconstructState export
Its only consumer was the wrapper's Undo handling, deleted when the
tentative-turn model replaced destructive undo; nothing in the engine or
the viewer sources references it anymore (full replays go through
wrapper.replay). Removing a public API is fine for the 2.0.0 major.
2026-08-16 21:31:01 +00:00
c72ebf77bd engine: seed upkeep container seizures from the game seed
Upkeep seizures picked containers with a bare Math.random, breaking the
platform guarantee that the same seed yields the same game and making
wrapper.replay diverge from the original whenever a seizure occurred
(seizures are log *events*, not moves, so nothing recorded the choice).

Seed a per-upkeep seedrandom stream from the persisted game seed plus the
visible log length — which uniquely identifies the upkeep within the game,
since each upkeep immediately follows its own Pass/Accept/Decline log
entry — so both live play and full replays reproduce the same seizures.

Typing removeRandom along the way exposed that warehouse/factory-store
seizure messages read .color on a ContainerOnStore (always undefined);
they now correctly read .piece.color.
2026-08-16 21:30:32 +00:00
46534ebd30 engine: stop dropPlayer from clobbering simultaneous bidders
dropPlayer unconditionally called nextPlayer, which resets currentPlayers
to a single player. During an auction (currentPlayers = all pending
bidders) dropping one bidder handed the turn to the auctioneer — who has
no available moves yet — wedging the game and discarding the other
bidders' pending turns. It also advanced the turn even when the dropped
player was not up at all, and skipped the next player's upkeep
(actions/available moves) in the move phase.

Now the drop auto-plays only the dropped player's own pending decision
through the regular engine path — Bid bash in the bid phase (including the
additional-bid round), Accept the highest bid as auctioneer, Pass in the
move phase — and touches nothing if the player is not up. The engine's
existing isDropped filters take care of skipping them afterwards.

Also make the highest-bid computation ignore dropped players' bids: a
dropped bidder's stale high bid used to poison Math.max, leaving
highestBidders empty and crashing the accept/decline phase.
2026-08-16 21:29:01 +00:00
501a33103c engine: replay hidden-log moves in wrapper.replay
A state saved mid-bid-phase keeps its newest moves (bids, bid-phase loans)
in G.hiddenLog — they are only flushed to G.log when the accept/decline
phase starts. replay() only walked G.log, so an admin full-replay of such
a save silently lost the bids and diverged.

Whenever hiddenLog is non-empty it holds exactly the moves made after the
last visible log entry, in order (the visible log freezes during the bid
phase), so replaying [...log, ...hiddenLog] reconstructs the state
faithfully. logSlice's truncated-log replay now explicitly drops the
hidden log, since it reconstructs a historical state predating it.
2026-08-16 21:27:11 +00:00
7c94bc75b7 engine: cover a 3-player auction bid tie with an additional-bid round
Scripted 3-player game into a simultaneous-bidders auction; asserts every
bid is a single-move committed turn, the tie opens an additional-bid round
among the tied bidders, bids stay in the hidden log until the tie resolves,
and the accept settles the right amounts.
2026-08-16 21:26:39 +00:00