Commit graph

650 commits

Author SHA1 Message Date
2e778ca976 Show platform Supporter badges and preferred player colours 2026-10-01 23:56:32 +02:00
f2c1c6887b fix: don't count Australia's uranium mines in the resources pass warning
canPowerAllPlants() summed the fuel cost of every plant in hand, including
Australia's uranium plants (11/23/28/34/39), which are mines that never
power cities — and uranium cannot even be bought in the main market there.
That made the 'skip buying resources without enough to power all your
plants?' confirmation fire every Resources phase, no matter what.

Skip mines via the engine's isUraniumMine() helper, mirroring how the
bureaucracy move list and the hand-limit count already treat them.
2026-10-01 20:20:03 +02:00
4e49df1e89 Merge commit '76988deb8a' into feat/ongoing-analysis-scenarios 2026-09-30 14:26:32 +02:00
365fc51990 fix: hand floating chat reminders over to the BGS rail 2026-09-30 14:25:52 +02:00
ddd4d06848 Document complete viewer uploads 2026-09-30 00:27:36 +02:00
31fafa1aea Load selected language separately and reduce viewer bundle size 2026-09-29 23:56:42 +02:00
76988deb8a docs: add Boardgamers play link 2026-09-28 22:47:29 +02:00
d441d1f83f fix: use protocol 0.6.2 and remove chat scroll backports 2026-09-28 19:51:14 +02:00
14de23dd28 Release engine 2.0.10 with safe analysis scenarios 2026-09-27 19:32:03 +02:00
657e5ece7b Defer regional plant substitutions until the region draft completes 2026-09-27 19:22:49 +02:00
247dee9a67 Add ongoing analysis with independently reconstructed hidden futures 2026-09-27 19:22:01 +02:00
ba031305f8 Fix slow scrolling in chat and journal, including active legacy games 2026-09-27 10:05:43 +02:00
b6d2823130 Improve board controls and resource resupply indicators 2026-09-27 09:20:42 +02:00
bc66da8ab1 Add Persian viewer and tutorial translations 2026-09-27 00:52:39 +02:00
8d582bddfe Keep color-blind region borders behind board pieces and connections 2026-09-26 16:03:53 +02:00
bde47fa076 Distinguish color-blind regions with patterned city borders 2026-09-26 15:48:04 +02:00
9c3d99b680 Add shared color-blind mode with player and region markers 2026-09-26 15:16:35 +02:00
421546a136 fix(viewer): prevent translated button overlap and restore unread chat 2026-09-26 12:00:53 +02:00
5d1ca5878d Review viewer translations and translate complete game messages 2026-09-25 22:07:20 +02:00
25834723ee feat(viewer): localize interface and tutorials in 15 languages 2026-09-25 16:30:05 +02:00
09de708a47 feat(viewer): add player hover cards and board thumbnails 2026-09-24 11:44:12 +02:00
da6ce4cd6d feat(viewer): support editing chat messages 2026-09-21 22:40:10 +02:00
5921c3c1d0 fix(viewer): make chat translation controls compact 2026-09-21 21:53:12 +02:00
4bf7a2aa90 Support manual analyses and translated chat 2026-09-21 20:32:10 +02:00
github-actions
7fd6a0911c 🔖 powergrid-viewer 2.1.8 2026-09-20 13:43:27 +00:00
d24263501d Remove queued move notices from the viewer 2026-09-20 15:40:16 +02:00
990580a820 Hide successful premove notices in the viewer 2026-09-20 15:37:58 +02:00
github-actions
b114df84a9 🔖 powergrid-viewer 2.1.7 2026-09-18 17:45:55 +00:00
github-actions
9bbbb6bcfb 🔖 powergrid-engine 2.0.8 2026-09-18 17:43:46 +00:00
Eliott C.
f9c4d7dc05
Add current-round planning and city/powering premoves (#156)
* Add current-round planning and city/powering premoves

* Hide empty premove containers after cancellation

* Simplify premove review and cancellation and fix clean-checkout checks

* Run premove browser checks in CI and serve the preview favicon

* Validate premoves directly and reopen them through Plan

* Show saved premoves in Plan button and use board Undo

* Remove redundant preview label from planning controls

* Rename queue cancellation to Cancel premoves

* Use board Done control to skip simulated plant purchases

* Remove root docs and repository screenshots
2026-09-18 10:35:54 -07:00
github-actions
2c7ae95085 🔖 powergrid-engine 2.0.7 2026-09-16 17:19:00 +00:00
github-actions
9fc81fd0bf 🔖 powergrid-viewer 2.1.6 2026-09-16 17:14:57 +00:00
Eliott C.
5f2406ebb9
Add playable Powergrid tutorials and city income reference (#155)
* Add playable Powergrid tutorials and city income reference

* Space houses that share a city count so each one stays readable

The income row shortened the city-count cells, and the house markers were
packed to fit: 6px between columns against a 12px-wide house, and 3px
between rows. Two players on the same number — the ordinary case for most
of a game — overlapped by half and read as a single smudge; five or six at
the start of a game read as one blob.

Lay them out bottom-aligned in the cell instead, growing upward from the
income strip so the number above stays legible, a house-width between
columns and a house-height between rows. Five or six sharing go three wide
rather than three tall: a third row starts at the top of the cell and hides
the number completely, which is every game's opening position.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Lift dialogs above the status bar and complete the payment table

The status bar is sticky at z-index 10 and every modal sat at z-index 1, so
the bar painted over the top of any open dialog. Modals open 10vh down and
the bar is a fixed 40px, so on a short viewport — a phone held sideways —
the bar landed across the dialog's own header and covered the close button,
leaving no way out of the dialog at all. Put the modal above it; the bar is
then dimmed behind the overlay like the rest of the page.

The payment table counted to citiesToEndGame, which stopped one column short
of the number that ends the game, and a player can finish holding more cities
than that by building in the same phase as whoever triggered the end. Render
the whole table instead, so it agrees with the city track on the board.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: John Gold <goldjohn6@gmail.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 10:10:47 -07:00
mmunson99
93d1490a4f
Fix per-player timer inflating from client clock skew (#154)
The per-player game clock could show one player using nearly the whole
game's elapsed time. Root cause: `move.time` was the acting client's
Date.now(), and `updateClocks` banks a stretch by subtracting one
player's stamp from another's (`ts - clockStartedAt`, where the two come
from different players' moves). Browsers disagree on the wall clock, so a
player whose clock ran fast charged that skew to themselves on every
turn; over a game's many turns it accumulated toward the total elapsed
time (observed in a real game: one player at ~46s of skew reached ~86%
of the game's wall-clock duration, while the player who followed them was
under-charged, clamped to 0 by the existing Math.max guard).

Drive the clocks from a single clock instead. `wrapper.move` — the
authoritative move processor, never reached during a deterministic
replay — now stamps each turn with the server clock as `serverTime`, and
`updateClocks` prefers it over the client `time`. AI turns are already
server-stamped, so human turns now match. The client `time` is kept
untouched: it is the move's identity for reconciling the turn buffer
against the server's echo (viewer turn-buffer helpers), and it still
drives the local preview clock on the acting player's own board.

Determinism is preserved: the server stamp is written into the log and
reused on replay. Added a wrapper test that plays with absurd client
stamps and asserts the timers track the server clock, plus a replay
check; pinned Date.now across the wrapper suite so buffers replay to
byte-identical states.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-16 09:55:08 -07:00
github-actions
1dcbcfb99c 🔖 powergrid-viewer 2.1.5 2026-09-14 20:45:41 +00:00
Eliott C.
3e8f55c0ad
Fix China Done freezing on a hidden deck (#153) 2026-09-14 22:45:08 +02:00
github-actions
e84d00d2a7 🔖 powergrid-viewer 2.1.4 2026-09-14 00:48:43 +00:00
goldjohn6
e20f0b2215
Show the chat shortcut only for unread messages, beside the settings gear (#152)
A player reported that the floating "Chat" tag hovers in the lower left and
blocks things (on a phone it covered the journal and the uranium market),
while the chat itself is always reachable below the board.

- Only show the shortcut when there is an unread message and the chat feed
  is not already on screen.
- Move it bottom-right, 89px from the edge: just left of the platform's
  settings gear (fixed at right:25px, 45px wide), the slot the platform's own
  chat button used. Restyled as a pill with the unread count.
- protocol-smoke: the Journal-tab check now expects no shortcut without
  unread chat; added checks for the count, the anchor, not covering the
  game buttons, and that clicking it brings the chat into view and it hides
  once read.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 17:44:11 -07:00
github-actions
b0442bf9ce 🔖 powergrid-viewer 2.1.3 2026-09-13 21:00:35 +00:00
Eliott C.
41829b9c5a
Use shared BGS viewer and chat protocol (#151)
* Use shared BGS viewer and chat protocol

* Use the viewer TypeScript config in every build worker

* Use shared chat panel and preserve mobile journal shortcut

* Update shared chat visibility and show date separators

* Keep typing after completing a chat mention
2026-09-13 22:54:10 +02:00
github-actions
d85e117dff 🔖 powergrid-viewer 2.1.2 2026-09-12 18:46:56 +00:00
44a7c49eb8 Scroll restored feeds to latest when they become visible 2026-09-12 20:40:40 +02:00
github-actions
8b7a27c914 🔖 powergrid-viewer 2.1.1 2026-09-12 18:39:29 +00:00
bb39505b28 Add mobile chat and journal tabs with unread count 2026-09-12 20:37:48 +02:00
github-actions
a48e69ab0d 🔖 powergrid-viewer 2.1.0 2026-09-12 17:11:01 +00:00
Eliott C.
f51db1d657
Add inline journal cards, embedded chat and action sounds (#149) 2026-09-12 19:10:23 +02:00
github-actions
ac62adf13b 🔖 powergrid-viewer 2.0.14 2026-09-11 18:49:00 +00:00
goldjohn6
8c4eee03bb
Show what a city would cost to build, in its tooltip (#148) (#150)
In Step 3 the cost of a city depends on how many players are already
there, so two cities a player can reach can differ by 10 Elektro with
nothing on the board to say so. #148 asked for that number.

It did not need computing. `available-moves` already totals the
shortest-path connection cost and the slot cost for the current
occupancy (10/15/20 in the standard build, per-map `slotCosts`
otherwise) and drops every city the player cannot afford — the viewer
was throwing that total away and keeping only the names.

So the change is to stop discarding it: `getBuildableCityPrices()`
passes the per-city totals to the map, and a buildable city's tooltip
reads "Suwon — build for 17" instead of "Suwon".

A tooltip rather than a printed label, deliberately. Measured across
every recharged map at 2-6 players, a Step-3 build turn offers a median
26-52% of the cities in play and sometimes all of them, so a label on
each would bury the board it is meant to explain — and there is nowhere
to put one in portrait. Only three tooltips needed changing: the map
already draws tap-target overlays on actionable cities, and SVG
hit-testing gives the tooltip to the topmost element.

Japan's free jump quotes the same city at two prices, so both are shown.

Verified by executing 11,533 offered build moves across every recharged
map at 2-6 players and asserting the quoted price equals the money
actually deducted: zero mismatches. Free-jump quotes were only 16 of
those — correct in all 16, but thin. Live-checked in the browser on
Korea in portrait.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 11:45:56 -07:00
github-actions
ff063e6f5e 🔖 powergrid-engine 2.0.6 2026-09-03 17:25:41 +00:00
goldjohn6
b7a6c5a8ef
Spell out the UK & Ireland first-house cost in the map rules (#146)
* docs(engine): spell out the UK & Ireland first-house cost in the map rules

The cross-island rule said "an extra 20 Elektro on top of the normal
first-house cost" without naming that cost, so the total for starting a
second network was not obvious at the table. Name it ($10) and set FIRST
apart, per Mike's read of the dialog.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Update engine/src/maps/ukireland.ts

Co-authored-by: Eliott C. <coyotte508@gmail.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Eliott C. <coyotte508@gmail.com>
2026-09-03 10:23:40 -07:00