Map: what the plan has that the build lacks (audit, 2026-10-28) #1263

Closed
opened 2026-10-28 15:13:51 +00:00 by claude-bot · 4 comments
Collaborator

The owner asked (2026-10-28), before cutting v4.6.2: "recheck the original plan for the markers and the map and make sure nothing else was forgotten or dropped."

This is a read-only audit of main at v4.6.1 (cd79fd1c) against the plan.

Plan sources: #593 (body and all comments), #734, CATALOGUE WIKI-11/WIKI-12 and the map D-rows, coverage/lane6d.py (which marks every WIKI-11 row except IS-489/490 as drawn, and #734 requires drawn rows to be built), the prototype lane6d.html and shared/wiki.js.

Code checked: routers/maps.py, map_service.py, map_audience.py, models/map.py, atlas_archive.py, the maps migration, Map.jsx, MapCanvas.jsx, OnTheMap.jsx, WhereParty.jsx, Party.jsx, WikiText.jsx.

The only written departures are a code comment at Map.jsx:21-26: no move or rename, travel links only through the API, and the filter not remembered. They were never recorded as a decision.

A. Breaks, or leaves bad data

  1. Removing a marker that is a trail stop fails with a 500. Stops saved from "Where the party ended…" carry only marker_id. trail_stops.marker_id is ON DELETE SET NULL, and ck_trail_stops_where needs marker_id or (map_id, x, y), so the DELETE violates the check. Verified: prod has 5 stops, all marker_id only. No test covers it.
  2. A failed "Add a map" leaves an orphan. createMap (and createAtlas) run before the upload. A refused picture leaves a map with no picture, and Retry or resubmitting makes another map (and atlas) each time. None of them can be deleted.

B. The UI offers something it can't do

  1. A marker can't be linked to its wiki page, or edited. This is #1260. Every "On the map" section, and quest "where" (IS-102), is empty for markers made in the UI.
  2. "A travel link" kind: offered to the GM, but no UI makes the link. The "Link the stair to another map" dialog was drawn but not built, and there is no delete. Links are table-only.
  3. "A holding" kind: offered, but names no group. org_entry_id has no UI, there is no "Held by", and there is no per-group filter (IS-087).
  4. Linking a marker to an existing map (child_map_id) has no UI. Only "Add a map → Inside" links a new map.
  5. There's no way to give a map its picture again, though the server's failure text tells the GM to "add its picture again". IS-489/490 lead there.
  6. Maps become unreachable: a second top-level map in an atlas, or a child map whose opening marker is removed. There's no map list, and no rename or delete of a map or atlas.
  7. Trail: waypoints don't link to their session (IS-077), and a wrong stop can't be removed (no route or UI).
  8. The GM's copy shows whose a player's marker is, and how private it is, only for notes (IS-076: "the GM always sees every marker, labelled as such").

C. Planned or drawn, not built

  1. A GM-only map or atlas from the UI: AddMapForm sends no audience (D193; the server supports it).
  2. The party's location carrying up to the region and world maps (#593).
  3. The trail drawn across portals and underground hops (IS-078); it's drawn only within one map.
  4. Label collision between always-on labels (IS-082), and the party marker's own popover.
  5. Scale labels ("Region", "Town") on the crumbs, a "+" on markers that open a map, and "No map of this place yet. Its marker opens the page".
  6. Second parties (D168): a player's "The party" always means the main party; only the main party's trail.
  7. The party page showing location and trail (IS-112); the front page shows a line, not a map (IS-124).
  8. The ![[Map: X]] embed (IS-043).
  9. Moving a marker, and changing a marker's audience after the reveal Undo is gone.
  10. A filter per group, and remembering the filter (IS-079).

Deferred in writing

  • The Surface/Underground switch (#593, IS-073).
  • Trail suggestions from the event log (#593 "Later").
  • Moving a marker, in #1260.

The full table, with file and line evidence per row, was produced in-session and is summarised above.

**The owner asked (2026-10-28), before cutting v4.6.2:** "recheck the original plan for the markers and the map and make sure nothing else was forgotten or dropped." This is a read-only audit of `main` at v4.6.1 (cd79fd1c) against the plan. **Plan sources:** #593 (body and all comments), #734, CATALOGUE WIKI-11/WIKI-12 and the map D-rows, `coverage/lane6d.py` (which marks every WIKI-11 row except IS-489/490 as **drawn**, and #734 requires drawn rows to be built), the prototype `lane6d.html` and `shared/wiki.js`. **Code checked:** `routers/maps.py`, `map_service.py`, `map_audience.py`, `models/map.py`, `atlas_archive.py`, the maps migration, `Map.jsx`, `MapCanvas.jsx`, `OnTheMap.jsx`, `WhereParty.jsx`, `Party.jsx`, `WikiText.jsx`. The only written departures are a code comment at `Map.jsx:21-26`: no move or rename, travel links only through the API, and the filter not remembered. They were never recorded as a decision. ## A. Breaks, or leaves bad data 1. **Removing a marker that is a trail stop fails with a 500.** Stops saved from "Where the party ended…" carry only `marker_id`. `trail_stops.marker_id` is `ON DELETE SET NULL`, and `ck_trail_stops_where` needs `marker_id` or `(map_id, x, y)`, so the DELETE violates the check. *Verified:* prod has 5 stops, all `marker_id` only. No test covers it. 2. **A failed "Add a map" leaves an orphan.** `createMap` (and `createAtlas`) run before the upload. A refused picture leaves a map with no picture, and Retry or resubmitting makes another map (and atlas) each time. None of them can be deleted. ## B. The UI offers something it can't do 3. **A marker can't be linked to its wiki page, or edited.** This is #1260. Every "On the map" section, and quest "where" (IS-102), is empty for markers made in the UI. 4. **"A travel link" kind:** offered to the GM, but no UI makes the link. The "Link the stair to another map" dialog was drawn but not built, and there is no delete. Links are table-only. 5. **"A holding" kind:** offered, but names no group. `org_entry_id` has no UI, there is no "Held by", and there is no per-group filter (IS-087). 6. **Linking a marker to an existing map** (`child_map_id`) has no UI. Only "Add a map → Inside" links a *new* map. 7. **There's no way to give a map its picture again,** though the server's failure text tells the GM to "add its picture again". IS-489/490 lead there. 8. **Maps become unreachable:** a second top-level map in an atlas, or a child map whose opening marker is removed. There's no map list, and no rename or delete of a map or atlas. 9. **Trail:** waypoints don't link to their session (IS-077), and a wrong stop can't be removed (no route or UI). 10. **The GM's copy** shows whose a player's marker is, and how private it is, only for notes (IS-076: "the GM always sees every marker, labelled as such"). ## C. Planned or drawn, not built 11. A GM-only map or atlas from the UI: `AddMapForm` sends no audience (D193; the server supports it). 12. The party's location carrying up to the region and world maps (#593). 13. The trail drawn across portals and underground hops (IS-078); it's drawn only within one map. 14. Label collision between always-on labels (IS-082), and the party marker's own popover. 15. Scale labels ("Region", "Town") on the crumbs, a "+" on markers that open a map, and "No map of this place yet. Its marker opens the page". 16. Second parties (D168): a player's "The party" always means the main party; only the main party's trail. 17. The party page showing location and trail (IS-112); the front page shows a line, not a map (IS-124). 18. The `![[Map: X]]` embed (IS-043). 19. Moving a marker, and changing a marker's audience after the reveal Undo is gone. 20. A filter per group, and remembering the filter (IS-079). ## Deferred in writing - The Surface/Underground switch (#593, IS-073). - Trail suggestions from the event log (#593 "Later"). - Moving a marker, in #1260. The full table, with file and line evidence per row, was produced in-session and is summarised above.
Author
Collaborator

Owner's decisions, 2026-10-28:

  • v4.6.2 covers all of A, B and C. It's a point release, because it fixes planned functionality that was dropped.
  • Deleting a map or atlas sends it to a bin with restore, like wiki pages (#408) and campaigns (#405), and it's purged after the grace period. No reason was ever recorded for leaving delete out: the FKs already cascade, and only the route and UI were missing.
  • Build first, review on dev. The new controls reuse existing patterns. The owner reviews them on the 4.6.2 rc.

Build plan. One integration branch integ/4.6.2, with #1260 and #1261 included.

  1. Server (qb-implementer, branch fix/1263-map-server):
    • PATCH marker (label, line, kind, page, opens-map, held-by, x/y, and audience for a GM).
    • A trail stop made from a marker also stores that marker's map/x/y, plus a migration that backfills existing stops (this fixes A1).
    • DELETE for a trail stop and for a travel link; an audience on links.
    • PATCH map and atlas (name, scale label, audience, parent/root).
    • Soft delete for maps and atlases (deleted_at/deleted_by_id): a bin listing, restore, and a purge task that also removes the picture and tiles.
    • Reads exclude binned rows. _check_marker_links refuses binned pages and maps.
  2. App, part 1 (qb-frontend, files outside Map.jsx):
    • ![[Map: X]] embed in WikiText.
    • Label collision and a "+" badge in MapCanvas.
    • The party page's location and trail.
    • "Holdings on the map" in OnTheMap.
  3. App, part 2 (qb-frontend, Map.jsx, after 1):
    • Marker edit/move, the page/holding/existing-map pickers, the travel-link dialog and removal, what the GM sees on player markers.
    • The map list with rename/delete, the bin view and restore.
    • Re-upload a picture; the Add-a-map retry fix (A2); GM-only map/atlas; scale label.
    • Trail stops linked to their sessions and removable.
    • Second parties (D168); the party location carried up; the trail across links; the party marker's popover; a remembered filter.
  4. Then: verification, wording rows on the owner's Wording Review page, CATALOGUE rows, rc on dev, owner review, final, and prod on the owner's say.
**Owner's decisions, 2026-10-28:** - **v4.6.2 covers all of A, B and C.** It's a point release, because it fixes planned functionality that was dropped. - **Deleting a map or atlas sends it to a bin** with restore, like wiki pages (#408) and campaigns (#405), and it's purged after the grace period. No reason was ever recorded for leaving delete out: the FKs already cascade, and only the route and UI were missing. - **Build first, review on dev.** The new controls reuse existing patterns. The owner reviews them on the 4.6.2 rc. **Build plan.** One integration branch `integ/4.6.2`, with #1260 and #1261 included. 1. **Server** (qb-implementer, branch `fix/1263-map-server`): - `PATCH` marker (label, line, kind, page, opens-map, held-by, x/y, and audience for a GM). - A trail stop made from a marker also stores that marker's map/x/y, plus a migration that backfills existing stops (this fixes A1). - `DELETE` for a trail stop and for a travel link; an audience on links. - `PATCH` map and atlas (name, scale label, audience, parent/root). - Soft delete for maps and atlases (`deleted_at`/`deleted_by_id`): a bin listing, restore, and a purge task that also removes the picture and tiles. - Reads exclude binned rows. `_check_marker_links` refuses binned pages and maps. 2. **App, part 1** (qb-frontend, files outside `Map.jsx`): - `![[Map: X]]` embed in `WikiText`. - Label collision and a "+" badge in `MapCanvas`. - The party page's location and trail. - "Holdings on the map" in `OnTheMap`. 3. **App, part 2** (qb-frontend, `Map.jsx`, after 1): - Marker edit/move, the page/holding/existing-map pickers, the travel-link dialog and removal, what the GM sees on player markers. - The map list with rename/delete, the bin view and restore. - Re-upload a picture; the Add-a-map retry fix (A2); GM-only map/atlas; scale label. - Trail stops linked to their sessions and removable. - Second parties (D168); the party location carried up; the trail across links; the party marker's popover; a remembered filter. 4. Then: verification, wording rows on the owner's Wording Review page, CATALOGUE rows, rc on dev, owner review, final, and prod on the owner's say.
Author
Collaborator

v4.6.2-rc1 is on dev (2026-10-28, 20:16 UTC).

  • Release: PR #1266 (integ/4.6.2) merged into main at e621bb93. The rc PR #1267 is merged, and v4.6.2-rc1 is tagged at 593e003b. Its release page has both starter packs, and the images are built for backend, frontend and bot.
  • Dev deploy: make migrate-safe ran the preflight, took backup questboard_manual_20261028T201316Z.dump, and migrated a125c0b1e5e1 → f1263a0b1c2d. Then up -d. All 7 services are healthy, /ready is ok, /api/meta reports 4.6.2-rc1, and there are no errors in the logs.
  • Backfills: all 63 trail stops on dev now carry their own map/x/y (none null). backfill_map_thumbs wrote 12 thumbnails with 0 failed (the other maps have no picture).
  • Verification before the rc: backend full 10,377 passed; frontend 5,523 passed; build OK; bot 1,226 passed; lint and checks clean. CI on #1267 was green, including all three journey runs. The render check took 66 shots, and its findings are fixed in da04596f.

Next: the owner reviews on dev. Then the final 4.6.2, and prod on the owner's say: backup, make migrate-safe, up -d, then the thumbnail backfill.

**v4.6.2-rc1 is on dev** (2026-10-28, 20:16 UTC). - **Release:** PR #1266 (integ/4.6.2) merged into main at e621bb93. The rc PR #1267 is merged, and `v4.6.2-rc1` is tagged at 593e003b. Its release page has both starter packs, and the images are built for backend, frontend and bot. - **Dev deploy:** `make migrate-safe` ran the preflight, took backup `questboard_manual_20261028T201316Z.dump`, and migrated `a125c0b1e5e1 → f1263a0b1c2d`. Then `up -d`. All 7 services are healthy, `/ready` is ok, `/api/meta` reports 4.6.2-rc1, and there are no errors in the logs. - **Backfills:** all 63 trail stops on dev now carry their own map/x/y (none null). `backfill_map_thumbs` wrote 12 thumbnails with 0 failed (the other maps have no picture). - **Verification before the rc:** backend full 10,377 passed; frontend 5,523 passed; build OK; bot 1,226 passed; lint and checks clean. CI on #1267 was green, including all three journey runs. The render check took 66 shots, and its findings are fixed in da04596f. **Next:** the owner reviews on dev. Then the final 4.6.2, and prod on the owner's say: backup, `make migrate-safe`, `up -d`, then the thumbnail backfill.
Author
Collaborator

Released in v4.6.2 — "The map, as planned" (tag at 881d0f58, release PR #1289, 2026-10-30).

Tried on dev as rc1 to rc4, with the owner's testing between candidates:

Dev is on 4.6.2 and healthy. Prod is still on 4.6.1. The deploy is approved by the owner, but this session can't reach the prod host, so the owner runs it (steps in the 4.6.2 changelog: backup, make migrate-safe, up -d, then backfill_map_thumbs).

**Released in v4.6.2 — "The map, as planned"** (tag at 881d0f58, release PR #1289, 2026-10-30). Tried on dev as rc1 to rc4, with the owner's testing between candidates: - rc1: this audit's work, with #1260 and #1261. - rc2: the fixes from the owner's testing: #1268 (#1270), #1269, #1271, #1273, #1275 and #1276 (#1272), the portal rename (#1274), and #1277 (#1278). - rc3: #1282 (a tile pyramid, so large maps load quickly) and #1283 (the rc2 review), both in #1284. - rc4: #1286 (the thumbnail had hidden the tiles; a taller map on a phone), in #1287. Dev is on 4.6.2 and healthy. Prod is still on 4.6.1. The deploy is approved by the owner, but this session can't reach the prod host, so the owner runs it (steps in the 4.6.2 changelog: backup, `make migrate-safe`, `up -d`, then `backfill_map_thumbs`).
Author
Collaborator

v4.6.2 is on prod (2026-10-30, 19:11 UTC), on the owner's say.

  • Backups: questboard_manual_20261030T190834Z.dump (make backup-now), and …190944Z.dump taken by migrate-safe.
  • Migrations: a125c0b1e5e1 → f1263a0b1c2d → a1269b0c1d2e.
  • All 7 services healthy, /ready ok, and /api/meta says 4.6.2 on questboard.rhoving.com. Bot: "Version handshake OK: backend 4.6.2, bot API contract v2", and it's logged in to Discord. No errors in the logs.
  • backfill_map_thumbs: {written: 2, levels: 2, failed: 0}. Weirholm and the Pool (2400 × 1600) and Exadia (4096 × 4096) both have levels down to z = -4, and thumbnails.
  • Counts unchanged: 7 users, 3 campaigns, 29 sessions, 134 wiki pages, 2 maps, 13 markers, 5 trail stops (all 5 placed by session).
**v4.6.2 is on prod** (2026-10-30, 19:11 UTC), on the owner's say. - Backups: `questboard_manual_20261030T190834Z.dump` (`make backup-now`), and `…190944Z.dump` taken by `migrate-safe`. - Migrations: `a125c0b1e5e1 → f1263a0b1c2d → a1269b0c1d2e`. - All 7 services healthy, `/ready` ok, and `/api/meta` says 4.6.2 on questboard.rhoving.com. Bot: "Version handshake OK: backend 4.6.2, bot API contract v2", and it's logged in to Discord. No errors in the logs. - `backfill_map_thumbs`: `{written: 2, levels: 2, failed: 0}`. Weirholm and the Pool (2400 × 1600) and Exadia (4096 × 4096) both have levels down to z = -4, and thumbnails. - Counts unchanged: 7 users, 3 campaigns, 29 sessions, 134 wiki pages, 2 maps, 13 markers, 5 trail stops (all 5 placed by session).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rbrooks/Quest-Board#1263
No description provided.