Skip to content

Show the previous-floor hover on the live map (#554)#557

Merged
ptrlrd merged 1 commit into
mainfrom
feat/live-floor-history
Jul 2, 2026
Merged

Show the previous-floor hover on the live map (#554)#557
ptrlrd merged 1 commit into
mainfrom
feat/live-floor-history

Conversation

@ptrlrd

@ptrlrd ptrlrd commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Closes #554.

When you hover a previous (visited) node on the live map, it now shows the same summary the game shows on a visited node: HP/gold, room or enemy, damage taken and turns for fights, and the rewards taken vs the cards/relics/potions skipped.

The mod half already shipped: it emits floor_history on the presence heartbeat (one entry per cleared floor, run-level, excludes the floor you are standing on). This wires up the website side.

Backend

  • Added _clean_floor_history to the presence ingest. The field was being dropped by the whitelist. Wired it after loot, and kept it out of the transient unset list since it is run-level, not combat-only.
  • Reused the existing path-safety id check so a bad reward id can't build a traversal URL.
  • Kept floor_history off the /active roster projection (it is detail-only, keeps the roster small).

Frontend

  • LiveMap shows a floating floor card on hover of a visited node. Entries are matched to nodes by visit order within the act (the player clears one node per depth), so the current node shows nothing, exactly like the game's "previous floor" hover.
  • Reward/skip items resolve to prettified names with a best-effort icon (hidden on a 404), gold shown as "N Gold".

Notes

  • Documented the field as v8 in markdown-docs/live-presence.md.
  • Backend cleaner is unit-verified (combat/shop/rest floors, unsafe ids dropped, junk coerced). The node-to-floor matching needs a live run to confirm the floor numbers and the rewards/skipped split line up, since I can't drive the game from here.

The mod now sends floor_history on the presence heartbeat: one entry per
cleared floor with the room/enemy, turns, damage, HP+gold snapshot, and the
rewards taken vs skipped. This is the live mirror of what the game shows when
you hover a visited node on the map.

Backend: added _clean_floor_history to the presence ingest (it was dropped by
the whitelist), wired after loot, and kept it out of the transient unset list
since it is run-level. Reused the path-safety id check so a bad reward id can't
build a traversal URL. Kept floor_history off the /active roster projection
(detail endpoint only).

Frontend: LiveMap now shows a floor summary card when you hover a visited node,
mirroring the game hover. Entries match nodes by visit order within the act
(one node cleared per depth), so the node you are standing on shows nothing.
Documented the field as v8 in the presence contract.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant