feat(rust): the live map draws monuments by label, minor labels hidden (PLAN_REDESIGNS §4, D196, D213) #28

Merged
whitlocktech merged 3 commits from feat/map-marker-labels into edge 2026-09-30 00:17:26 +00:00
Member

What & why

This is PLAN_REDESIGNS §4 (D196). Each monument label gets its own switch, with a fleet default and a per-server override, on the live map card in Admin → Rust visibility. The label is what staff read, and it groups a monument's variants: 47 substations built from four prefabs are one "Substation".

  • Hidden by default (22 labels): Substation, Underground Cave, Train Tunnel, Water Well, Wild Swamp, Jungle Swamp, Ice Lake, Jungle Ruin, Fishing Village, Large Barn, Abandoned Supermarket, Oxum's Gas Station, Mining Outpost and Ranch. Under D213: Canyon B, Canyon C, Lake A, Oasis A, Oasis C, Mountain, Train Tunnel Link and Abandoned Cabins. Every other label is drawn, so a monument added by a game update appears.
  • GET /public/rust/servers/:id/map leaves hidden labels out of the answer entirely. The website and the Android app both read that answer, so neither needs a client change. world.monuments, which event steps use, is untouched.
  • Storage: one row per label, map.marker.<key> set to on or off, in rust_settings for the fleet and rust_map_overrides for a server. No schema change and no wire change. The key is the label in lower case, because the game spells "jungle swamp" and "Jungle ruin" in lower case on some maps.
  • Precedence: a server's switch wins over the fleet's, and the fleet's wins over the built-in list. Sending null clears a switch: a server then follows the fleet, and the fleet follows the built-in list.
  • Admin UI: a collapsible Monuments on the map checklist under the fleet layer switches, and a per-server Monuments list (Default / Drawn / Hidden). The form logic lives in client/src/lib/mapMarkers.js and is unit-tested.
  • The OpenAPI annotations and swagger-fragment.json are regenerated (61 paths).

Docs: RunicGateway/docs docs/rust-map-markers (PLAN_REDESIGNS §4.1 and D213).

How it was tested

  • npm test (server): 462 pass, including 7 new marker tests, one of which runs the filter over the rig map's 51 real labels. npm run check:swagger reports the fragment is current.
  • Client: npm test 66 pass (8 new), npm run build, npm run check:externals.
  • Rig: at the org lead's request, rust-carbon was regenerated at world 6000, seed 981448696. The Carbon rig now has a 12 GB memory limit; at 8 GB a 6000 world was killed during boot. The new map has 144 markers under 51 labels, and every built-in label is on it, so all 22 spellings were read from the rig.
  • Browser walk on a local core, signed in as a test admin:
    • The fleet list showed 51 labels with 22 hidden. The Carbon rig showed 51/22, and the Oxide rig's 3000 map showed 33/11.
    • I turned Substation on for the fleet and set Carbon to Hidden, then saved. The expected two rows were written, with one activity row. The public answer then drew Oxide's 31 substations and still hid Carbon's.
    • Undoing both through the page deleted both rows.
    • The public Map tab on Carbon draws 31 monuments (down from 144) with no console errors.
    • The walk found one cosmetic flaw, fixed in 4035c52: the fleet list printed the game's lower-case "jungle swamp".

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

## What & why This is PLAN_REDESIGNS §4 (D196). Each monument **label** gets its own switch, with a fleet default and a per-server override, on the live map card in Admin → Rust visibility. The label is what staff read, and it groups a monument's variants: 47 substations built from four prefabs are one "Substation". - **Hidden by default (22 labels):** Substation, Underground Cave, Train Tunnel, Water Well, Wild Swamp, Jungle Swamp, Ice Lake, Jungle Ruin, Fishing Village, Large Barn, Abandoned Supermarket, Oxum's Gas Station, Mining Outpost and Ranch. Under D213: Canyon B, Canyon C, Lake A, Oasis A, Oasis C, Mountain, Train Tunnel Link and Abandoned Cabins. **Every other label is drawn**, so a monument added by a game update appears. - `GET /public/rust/servers/:id/map` leaves hidden labels out of the answer entirely. The website and the Android app both read that answer, so neither needs a client change. `world.monuments`, which event steps use, is untouched. - **Storage:** one row per label, `map.marker.<key>` set to `on` or `off`, in `rust_settings` for the fleet and `rust_map_overrides` for a server. No schema change and no wire change. The key is the label in lower case, because the game spells "jungle swamp" and "Jungle ruin" in lower case on some maps. - **Precedence:** a server's switch wins over the fleet's, and the fleet's wins over the built-in list. Sending `null` clears a switch: a server then follows the fleet, and the fleet follows the built-in list. - **Admin UI:** a collapsible **Monuments on the map** checklist under the fleet layer switches, and a per-server **Monuments** list (Default / Drawn / Hidden). The form logic lives in `client/src/lib/mapMarkers.js` and is unit-tested. - The OpenAPI annotations and `swagger-fragment.json` are regenerated (61 paths). Docs: RunicGateway/docs `docs/rust-map-markers` (PLAN_REDESIGNS §4.1 and D213). ## How it was tested - `npm test` (server): 462 pass, including 7 new marker tests, one of which runs the filter over the rig map's 51 real labels. `npm run check:swagger` reports the fragment is current. - Client: `npm test` 66 pass (8 new), `npm run build`, `npm run check:externals`. - **Rig:** at the org lead's request, rust-carbon was regenerated at world 6000, seed 981448696. The Carbon rig now has a 12 GB memory limit; at 8 GB a 6000 world was killed during boot. The new map has 144 markers under 51 labels, and every built-in label is on it, so all 22 spellings were read from the rig. - **Browser walk** on a local core, signed in as a test admin: - The fleet list showed 51 labels with 22 hidden. The Carbon rig showed 51/22, and the Oxide rig's 3000 map showed 33/11. - I turned Substation on for the fleet and set Carbon to Hidden, then saved. The expected two rows were written, with one activity row. The public answer then drew Oxide's 31 substations and still hid Carbon's. - Undoing both through the page deleted both rows. - The public Map tab on Carbon draws 31 monuments (down from 144) with no console errors. - The walk found one cosmetic flaw, fixed in 4035c52: the fleet list printed the game's lower-case "jungle swamp". ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 3 commits 2026-09-29 23:20:16 +00:00
A switch per monument label, a fleet default and a per-server override, on
Admin -> Rust visibility's live map card. Substations, caves, train tunnels,
wells and the other minor labels start hidden; every other label is drawn,
so a monument a game update adds appears. GET /map leaves hidden labels out
of the answer, so the website and the app both lose them.

No schema change: rows are map.marker.<label key> in rust_settings and
rust_map_overrides. No wire change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
Read from the Carbon rig regenerated at world 6000, seed 981448696, whose map
carries every built-in label: the three that were unverified (Oxum's Gas
Station, Mining Outpost, Ranch) are spelled as written. Adds Canyon B/C,
Lake A, Oasis A/C, Mountain, Train Tunnel Link and Abandoned Cabins, and a
test over that map's 51 real labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
fix(rust): the fleet's label list prefers a capitalised spelling
All checks were successful
PR Checks / client-build (pull_request) Successful in 22s
PR Checks / frozen-manifest (pull_request) Successful in 41s
PR Checks / server-tests (pull_request) Successful in 7m45s
4035c523cb
Found on the walk: the game spells one label "jungle swamp" on both rigs'
maps, and the fleet list printed it that way beside the minor list's
"Jungle Swamp".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit b0143801a2 into edge 2026-09-30 00:17:26 +00:00
whitlocktech deleted branch feat/map-marker-labels 2026-09-30 00:17:27 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Module-Rust#28
No description provided.