docs(site): publish game rules (RU) and migrate off game/rules.txt #85

Merged
developer merged 7 commits from feature/site-rules-ru into development 2026-05-31 15:45:06 +00:00
Owner

What

Stage 1 of publishing the game rules to the site: the Russian rules page
(authoritative) plus migration off game/rules.txt. The English mirror is a
separate stage.

Two commits by design, so the editorial changes can be reviewed against a
verbatim baseline:

  1. d3770e7 — verbatim Markdown port of game/rules.txtsite/ru/rules.md
    (headings with stable anchors, GFM tables, LaTeX formulas; text
    unchanged
    ).
  2. 140ee8e — editorial pass + migration.

Review the editorial diff cleanly with:
git diff --word-diff d3770e7 140ee8e -- site/ru/rules.md

Editorial (commit 2)

  • Lore intro moved to the RU home page, rewritten in a modern, less pompous
    voice.
  • Fixed typos; replaced the TODO/WTF cargo-tech note and the abandoned
    (---ссылка---) marker with the verified mechanic and a real cross-link;
    dropped the report TODO row.
  • Wove organic intra-page cross-links (#combat, #movement, #victory, …).
  • Documented engine nuances verified against the code:
    • ore auto-farming and the capital / «запасы промышленности» store
      (industry capped at population);
    • cargo is lost with ships destroyed in battle (battle.go
      ship_group.go);
    • a losing race's colonists at a neutral planet are not lost — they stay
      aboard (route.go; this corrects the audit note that claimed otherwise).

Migration

  • Deleted game/rules.txt; its content now lives, authoritative, in
    site/ru/rules.md. Russian is the source of truth for the rules (recorded
    in site/README.md and CLAUDE.md).
  • Repointed every reference (ui/frontend code comments + tests, ui/docs,
    tools, ui/PLAN.md links). Four historical prose mentions remain in
    ui/PLAN.md, left intact per "don't rewrite the plan's history".

Verification

  • pnpm -C site build clean; LaTeX formulas + GFM tables render; all 11
    intra-page anchor links resolve.
  • pnpm -C ui/frontend check — 0 errors.
  • Site has no dedicated build CI; the local pnpm build is the gate. This PR
    also touches game/, ui/** and tools/, so go-unit, integration and
    ui-test fire as well.
## What Stage 1 of publishing the game rules to the site: the **Russian rules page** (authoritative) plus migration off `game/rules.txt`. The English mirror is a separate stage. Two commits by design, so the editorial changes can be reviewed against a verbatim baseline: 1. `d3770e7` — verbatim Markdown port of `game/rules.txt` → `site/ru/rules.md` (headings with stable anchors, GFM tables, LaTeX formulas; **text unchanged**). 2. `140ee8e` — editorial pass + migration. Review the editorial diff cleanly with: `git diff --word-diff d3770e7 140ee8e -- site/ru/rules.md` ## Editorial (commit 2) - Lore intro moved to the RU home page, rewritten in a modern, less pompous voice. - Fixed typos; replaced the TODO/WTF cargo-tech note and the abandoned `(---ссылка---)` marker with the verified mechanic and a real cross-link; dropped the report TODO row. - Wove organic intra-page cross-links (`#combat`, `#movement`, `#victory`, …). - Documented engine nuances verified against the code: - ore auto-farming and the capital / «запасы промышленности» store (industry capped at population); - cargo is lost with ships destroyed in battle (`battle.go` → `ship_group.go`); - a losing race's colonists at a neutral planet are **not** lost — they stay aboard (`route.go`; this corrects the audit note that claimed otherwise). ## Migration - Deleted `game/rules.txt`; its content now lives, authoritative, in `site/ru/rules.md`. Russian is the source of truth for the rules (recorded in `site/README.md` and `CLAUDE.md`). - Repointed every reference (ui/frontend code comments + tests, ui/docs, tools, ui/PLAN.md links). Four historical prose mentions remain in `ui/PLAN.md`, left intact per "don't rewrite the plan's history". ## Verification - `pnpm -C site build` clean; LaTeX formulas + GFM tables render; all 11 intra-page anchor links resolve. - `pnpm -C ui/frontend check` — 0 errors. - Site has no dedicated build CI; the local `pnpm build` is the gate. This PR also touches `game/`, `ui/**` and `tools/`, so `go-unit`, `integration` and `ui-test` fire as well.
developer added 2 commits 2026-05-31 13:56:49 +00:00
Faithful Markdown rendering of game/rules.txt for the site: headings with
stable anchors, GFM tables and LaTeX formulas — the text itself is
unchanged (typos, the TODO/WTF notes, the broken (---ссылка---) marker and
the lore intro are all preserved as-is). The editorial pass (clarity,
nuances, organic cross-links, intro moved to the home page) follows in a
separate commit so its diff isolates exactly what changed relative to the
original. Registers the page in the RU sidebar.
docs(site): edit rules for clarity + cross-links; migrate off rules.txt
Build · Site / build (push) Successful in 8s
Tests · Go / test (push) Successful in 2m27s
Tests · UI / test (push) Waiting to run
Tests · Integration / integration (pull_request) Successful in 1m45s
Build · Site / build (pull_request) Successful in 9s
Tests · Go / test (pull_request) Successful in 3m14s
Tests · UI / test (pull_request) Successful in 3m14s
140ee8e0ee
Editorial pass over site/ru/rules.md (on top of the verbatim port):
- moved the lore intro to the RU home page, rewritten in a modern voice;
- fixed typos, replaced the TODO/WTF cargo-tech note and the abandoned
  (---ссылка---) marker with the verified mechanic and a real cross-link,
  dropped the report TODO row;
- wove organic intra-page cross-links (#combat, #movement, #victory, ...);
- documented engine nuances verified against the code: ore auto-farming
  and the capital / "запасы промышленности" store (industry capped at
  population); cargo lost with ships destroyed in battle; and that a
  losing race's colonists at a neutral planet are NOT lost — they stay
  aboard (this corrects the audit note, verified in route.go).

Migration: delete game/rules.txt (its content now lives, authoritative,
in site/ru/rules.md) and repoint every reference to it (ui/frontend code
comments + tests, ui/docs, tools, ui/PLAN.md links). Record the
RU-authoritative rule in site/README.md and CLAUDE.md. The English
site/rules.md mirror follows in a separate stage.
developer added 1 commit 2026-05-31 14:23:05 +00:00
chore: bug screenshot
Tests · Integration / integration (pull_request) Successful in 1m48s
Build · Site / build (pull_request) Successful in 9s
Tests · Go / test (pull_request) Successful in 2m0s
Tests · UI / test (pull_request) Successful in 3m14s
2a3f31a32b
developer added 1 commit 2026-05-31 14:32:44 +00:00
fix(site): hide the MathJax assistive-MathML twin (no duplicate formulas)
Build · Site / build (push) Successful in 8s
Tests · Integration / integration (pull_request) Successful in 1m48s
Build · Site / build (pull_request) Successful in 7s
Tests · UI / test (pull_request) Successful in 3m20s
Tests · Go / test (pull_request) Successful in 2m11s
9b689b2885
markdown-it-mathjax3 renders each formula as a visible SVG plus a MathML
twin (<mjx-assistive-mml>) for screen readers, hidden via CSS scoped to a
per-container #mjx-<id> selector. In the static build the containers carry
no id, so that scoped rule matches nothing and the twin renders as a
second, oversized (theme-monospaced) copy of every formula, in every
browser. Add a global visually-hidden rule for mjx-assistive-mml in the
theme CSS: the twin stays in the DOM for assistive tech but is removed
from view and from layout.
developer added 1 commit 2026-05-31 15:03:18 +00:00
fix(site): formulas — downgrade markdown-it-mathjax3 to v4 (fix hydration)
Build · Site / build (push) Successful in 8s
Tests · Integration / integration (pull_request) Successful in 1m42s
Build · Site / build (pull_request) Successful in 8s
Tests · Go / test (pull_request) Successful in 3m18s
Tests · UI / test (pull_request) Successful in 3m24s
f9f725f657
The duplicate-then-disappearing formulas were a Vue hydration mismatch,
not a CSS problem. markdown-it-mathjax3 v5 pulls the `mathxyjax3` fork,
which emits each formula's CSS as an in-content `<style>` block scoped to
a per-container `#mjx-<id>` that the static build never sets. The orphaned
scoped CSS left the screen-reader MathML twin visible (the duplicate), and
the in-`<main>` `<style>` elements break VitePress/Vue hydration
("Hydration completed but contains mismatches"), which strips the SVG
glyph `<path>`s and blanks every formula after the page finishes loading.

Downgrade to markdown-it-mathjax3 ^4.3.2 — the mathjax-full-based version
VitePress officially supports. It uses `juice` to inline all CSS into the
element `style` attributes (no in-content `<style>`), so hydration is
clean (glyphs survive) and the MathML twin is hidden by its own inlined
style (no duplicate). This also drops the earlier custom.css workaround,
which only treated the symptom and itself blanked the formulas.

Verified with a headless Chromium render of the built /ru/rules: all 10
formulas keep their glyph paths after hydration, no console mismatch, no
duplicate copies.
developer added 2 commits 2026-05-31 15:19:51 +00:00
docs(site): add English rules page + home intro (Stage 2 of the rules)
Build · Site / build (push) Successful in 8s
Tests · Integration / integration (pull_request) Successful in 1m42s
Build · Site / build (pull_request) Successful in 8s
Tests · UI / test (pull_request) Successful in 3m20s
Tests · Go / test (pull_request) Successful in 1m59s
e998c8a03a
site/rules.md is a faithful English mirror of the authoritative Russian
site/ru/rules.md — the same section anchors (so the in-page cross-links
and the RU/EN structure line up), the same LaTeX formulas with English
labels, and the same tables and engine nuances. Rewrite the English home
intro to match the Russian one and link to the rules, and register Rules
in the English sidebar. Completes the bilingual rules.
owner approved these changes 2026-05-31 15:27:15 +00:00
developer merged commit 5d2f2bfc26 into development 2026-05-31 15:45:06 +00:00
developer deleted branch feature/site-rules-ru 2026-05-31 15:45:06 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: developer/galaxy-game#85