* Improve premoves and fix random auctions and Ivits exploration
* Fix blocked legacy random-faction sealed auctions
* Allow premoves for initial building and booster choices
* Compact setup actions and show ship explorers
* Restore auto-charge controls in Gaia game UI
* Use published player-settings protocol 0.3.4
* Allow verified protocol 0.3.4 during release-age quarantine
* Keep planning and auto-charge in the action bar outside your turn
* Bump viewer to 5.20.6 for action bar release
* Use shared BGS viewer and chat protocol
* Use shared chat panel with faction portraits and mobile viewport
* Update shared chat visibility and show date separators
* Keep typing after completing a chat mention
Base (ScoringBoard) and Lost Fleet (ResearchBoard 7th column) both restyled the scoring column to
spread tiles evenly down the full board height (base) / pin finals to the action-row bottom (LF),
which read as 'spaced out'. Back to a tight top-aligned stack: base gap 4 units; Lost Fleet keeps
R6 anchored at the top, round tiles step a uniform tile+2, and the finals now sit directly below
R1's bottom edge (they previously overlapped R1 - positioned from its top, hiding it). Icons
unchanged. utils.ts researchBoardHeight/BOTTOM_SCORING_TILE_Y kept in sync (448 for LF).
viewer 5.16.2
The viewer bundle embeds its own copy of the engine, so the browser-side fromData also crashed on
the object-shaped federation hexes (blank board). Rebuild picks up the fixed engine.
Player.toJSON serializes federationCache.federations[].hexes as coordinate strings, but a state
can be persisted with the raw hex objects (the engine's Object.assign({}, this) serialization
copies the cache by reference, bypassing the player's own toJSON). fromData then called
map.getS(object) -> 'coords.includes is not a function' during load, the viewer swallowed it, and
the board rendered blank with no console error (game Electric-plaza-5793, a Nevlas player with 4
federations). Accept both forms: string parses via getS, object is looked up by {q, r}.
The game-server holds game state as plain JSON (Mongo + worker boundary both JSON-round-trip),
so currentPlayer() receives a plain object, not an Engine. sealedBidPendingSeats() is a METHOD -
it does not survive serialization - so calling it on the plain object threw
'engine.sealedBidPendingSeats is not a function' on every move in a sealed-bid game (incl. the
setup ban/pick moves, since currentPlayer runs after each). Restore via Engine.fromData like
move()/replay() already do. playerToMove survives as data (toJSON exports getters) but the method
does not, which is why this only broke once sealed bidding added a method call to currentPlayer.
- engine.sealedBidPendingSeats(): seats still owing a bid (undefined outside bid phases)
- move()/loadTurnMoves: accept silentBid/preferenceBid from ANY pending seat regardless of
playerToMove (was: strict turn-order assert -> 'not your turn to play' for off-turn bidders)
- bid phases resolve on the LAST pending bid, not on the sequential turn walk
- move() attributes the log line to the actual bidder, not playerToMove
- wrapper.currentPlayer() returns number[] of pending seats during bid phases (the platform's
/move route authorizes any seat in game.currentPlayers, which it fills from currentPlayer())
- deterministic auction tiebreaks (last faction-nominator wins) replace the seeded PRNG, so the
resolution no longer needs map.rng - which crashed hosted simultaneous bidding on a reloaded
engine ('map.rng is not a function'); bids + nominations alone now reproduce the result
- viewer: SealedBidPanel drops the waiting-for-turn gate (every pending seat bids at once) and
seat-prefixes the emitted move so the engine can parse the bidder
engine 4.12.0, viewer 5.16.0
The game-server now reads `engine.hashSeed ?? !!engine.stripSecret` to
decide whether the seed is sha256-hashed before init. Gaia's only hidden
information is the sealed-bid auction - player CHOICE, not seed-derived -
so the stripSecret-based default hashed our seeds pointlessly (sidebar log
showed base64 instead of the game name since the LF engine). Force the
raw seed.
FRONTIERS REMOVAL (engine + viewer). Old BGS games pin old engine
versions so replay compatibility is unaffected; no current-version
games used Frontiers.
Engine (745 tests passing, 0 lint errors):
- deleted available/ships.ts (+spec), move/ships.ts
- enums: Frontiers bitflag, ResearchField.Diplomacy, Resource Trade*/
ShipRange/UpgradeDiplomacy, Building ships/Colony/CustomsPost block
(+ships()/isShip()/isAvailableShip()/Ship), Command.MoveShip,
Phase.RoundShip, Condition.Trade, TechFrontiers1, Diplomacy tech pos
members; Expansion.All now = LostFleet
- research-tracks: Diplomacy track, frontiersEco, ship-range rewards
stripped from base Navigation track; all other Frontiers-only fields,
handlers, cases and AI dimensions removed
- wrapper.ts: frontiers expansion flag
Viewer (863 tests passing, lint clean):
- deleted logic/trade-rewards.ts, logic/buttons/ships.ts,
charts/testdata/frontiers/; zero 'frontiers' references remain
IMPORT-CYCLE + CJS FIXES surfaced by the Vite dev server (ESM strict
order), all pre-existing bugs webpack/CJS masked:
- engine/src/buildings.ts imported from ".." (package root -> compiled
dist) - now "./enums"
- engine/index.ts re-exported ~15 type-only names as values
(BrainstoneDest, MaxLeech, EventSource, EngineOptions, the
Available* block, ResourceConversion, FederationInfo, GaiaHexData,
AvailableSetupOption, PreferenceSplit*/SilentAuction* types) -
split into 'export type' (load-bearing for rolldown too)
- viewer: Rules.vue registers FactionInfoCard async, breaking the
Rules -> FactionInfoCard -> PlayerInfo -> Rules cycle
- viewer: buttonStringLabel moved from logic/buttons/utils.ts to
shortcuts.ts (re-exported), breaking utils <-> shortcuts
DEV APP ON VITE (npm run serve = vite --port 8080):
- vite.config.ts mode-aware: dev = SPA (index.html + public/ +
engine-source aliases + optimizeDeps exclusion), build = the
published IIFE lib (unchanged single-file contract, verified)
- package.json: pruned webpack-era files/unpkg entries (.map dropped
- no map uploads per owner decision); deleted
scripts/fix-package-imports.ts (referenced the vite build's
nonexistent dist/package/css)
- dev boot verified in Chromium: self-contained picker renders,
zero page errors
BASE-GAME SCORING CLIP (follow-up on 5.14.2, which shipped without
the intended fix due to a no-op string replace): ScoringBoard's
y=-25 offset removed for real; spec pins y===null; verified in the
built bundle (first final tile fully inside the canvas top).
AGENTS.md: no sourcemap upload to BGS (owner decision); bodyparser
exemption noted as deployed.
Two follow-up layout fixes from owner feedback:
1. The rounded card chrome is gone in BOTH base and Lost Fleet games:
the space map no longer paints a table-surface background, rounded
corners and inset border ring (theme.scss's .space-map rule), and
the research/actions canvas no longer draws its rounded
research-actions-panel rect behind the tracks (Game.vue). The boards
render on the page background like the pre-Lost-Fleet viewer; the
analysis-mode hazard overlay still paints on the map element. The
now-unused --ui-map-*/--ui-board-* theme vars are removed.
2. The base-game side ScoringBoard no longer clips at the top: the
pre-LF y=-25 offset pushed its first final-scoring tile 25 units
above the canvas viewBox top (the clip the owner saw); y=0 now
aligns the board with the canvas top.
Also verified programmatically in Chromium: map background
transparent/radius 0/shadow none, no .research-actions-panel node,
scoring board top not clipped. 873 tests pass; Game.spec.ts pins the
panel rect's absence for Lost Fleet now.
Three UI fixes from owner feedback on the Lost-Fleet-era layout:
1. Turn order: the Gaia-9/10 full-width rounded top banner is gone -
back to the pre-expansion compact indicator (h5 + player circles,
presence dots kept) sitting in the commands row (col-md-4, mobile
order-flip restored). The banner was designed to be replaced by a
platform-side HostedBar that never existed, so it rendered
everywhere including hosted BGS games.
2. Notes: LostFleetNotes.vue removed entirely (component, spec, and
the store's notesBackend/NotesBackend/setNotesBackend plumbing -
never called from viewer code; per-game notes are the hosting
platform's job now).
3. Base-game (non-Lost-Fleet) board layout: the LF merge had changed
shared values for all games. Restored the pre-expansion framing for
the base game, LF-conditional: viewBox min-x 0 (was -50), canvas
width tracks+120 (was +170), canvas height 505 (was 550 - the extra
45 was the empty strip at the bottom), ResearchBoard height 450,
ScoringBoard y=-25 restored, action row back to translate(45i+6,455),
and the 65/35 map/side-column split scoped to .lost-fleet only.
Verified in Chromium: base-game round-1 layout matches the old framing
(tracks left-anchored, scoring board right, no bottom gap, compact turn
order) and a Lost Fleet round-1 game keeps its ship/scoring/pool
layout. 873 viewer tests pass (LostFleetNotes.spec deleted, Game.spec
updated to pin the restored layout).
The vue-cli/webpack 4 toolchain was the root cause of three shipped
production crashes this week (iterator-spread __spreadArrays RangeError,
stale cache-loader emitting raw vue_1.default for the vue external, and
the TDZ circular-import). Replace it:
- vite.config.ts: lib build of src/wrapper.ts -> dist/package/
viewer.umd.js (IIFE, esnext, minified) + viewer.css + map. vue and
bootstrap-vue stay external (window.Vue / window.BootstrapVue) via
plain global reads - no .default interop possible. process.env is
baked to ({}) via define, matching vue-cli's old defaults.
- vitest.config.ts: jsdom env, single fork, chai-compatible specs run
unchanged. 879 tests pass (was 809 - the json-driven chart/resource
suites now register their dynamic tests properly under vitest).
- import type correctness across the codebase: rolldown rejects
value-imports of type-only exports, so type-only imports are now
written as import type (and mixed imports split). Also fixes
self-contained-state.ts's reassignment of a destructured const.
- Commands.spec.ts: split a two-render test into two its - two
@testing-library renders of Commands in one test interfere under
vitest.
- scripts: package/build -> vite build, test -> vitest run.
- devDeps: +vite +@vitejs/plugin-vue2 +vitest +jsdom +esbuild +events
(browser polyfill for the engine's node 'events' import).
Verified in Chromium against the built bundle: loads with CDN Vue 2 +
BootstrapVue, Rotate sectors completes with and without rotations, zero
pageerrors; the bundle contains no __spreadArrays helpers.
The admin endpoints take the file as the raw request body with query
parameters - not multipart. The map upload must use
application/octet-stream because koa-bodyparser's 1MB jsonLimit
intercepts application/json bodies before the route's raw reader and
413s anything larger. Also note the GET-before-PUT rule (the engine
upload mutates the doc; a PUT from a stale GET reverts it).
- Replace all iterator spreads ([...map.values()] etc) with Array.from() across
engine and viewer: under the TS->babel downlevel chain they compiled to
__spreadArrays, which reads .length on an iterator and produced
'RangeError: invalid array length' on 'Sector rotations finished' (the
reported boardgamers.space crash), plus several latent same-class sites.
- Break the research-tracks.ts -> ../index barrel import cycle (imports
Event/Expansion from leaf modules now): the cycle left Engine in TDZ and
the whole bundle failed with 'Cannot access engine_Engine before
initialization' at module eval under the rebuilt module order.
- Fix stale cache-loader output producing raw vue_1.default accesses for the
vue webpack external (window.Vue has no .default): 'Cannot read properties
of undefined (reading extend)' at load. Clean rebuild emits babel interop
wrappers correctly. vue-global-shim.js added as belt-and-braces doc for the
external's shape.
- Add autoprefixer as an explicit viewer devDependency (pnpm 11 no longer
hoists it; the lib build failed on postCSS plugin load).
- Update stale spec type signatures surfaced by the import change (tile
position as EventSource, loadFaction arity, ChargeRequest literal cast,
AvailableCommand data narrowing, FederationInfo new fields).
Verified: engine 750 passing / 4 pending; viewer 809 passing; lint + prettier
clean; rebuilt UMD has zero iterator-spread call sites and loads + completes
sector rotation (with and without rotations) in Chromium against the real
bundle with CDN-provided Vue 2.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Kim <kim.pham.nguyen2@gmail.com>
Co-authored-by: kimphamnguyen <82032729+kimphamnguyen@users.noreply.github.com>