[PR #457] [MERGED] fix(game-map): show Set destination button for unknown locations on mobile #4626

Closed
opened 2026-10-22 04:09:17 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/457
Author: @Romuromylus
Created: 5/6/2026
Status: ✅ Merged
Merged: 5/6/2026
Merged by: @SpicyMarinara

Base: main ← Head: fix/mobile-map-unknown-location-set-destination


📝 Commits (1)

  • bd063ce fix(game-map): show Set destination button for unknown locations on mobile

📊 Changes

1 file changed (+3 additions, -3 deletions)

View changed files

📝 packages/client/src/components/game/GameMap.tsx (+3 -3)

📄 Description

Linked issue

Closes #456

Why this change

  • On mobile, tapping an unknown ("?") location on a node-graph map selects the node (blue ring appears) but the bottom footer — including the Set destination button — never renders. Mobile players have no way to travel to undiscovered adjacent nodes through the map UI.
  • Desktop is unaffected because GameMapPanel calls onMove immediately on click rather than using the mobile select-then-confirm flow.

What changed

  • packages/client/src/components/game/GameMap.tsx (MobileMapButton): the selected-node footer was wrapped in {selectedNodeData && selectedNodeData.discovered && (...)}, hiding it entirely for undiscovered nodes even when canTravel would have allowed travel. Removed the outer discovered gate so the footer renders for any selected node, and masked the unknown node's emoji/label with ❓ / Unknown location to match the on-map ❓ treatment.
  • Travel-button visibility still defers to canTravel, which already permits travel to undiscovered adjacent nodes (and to the current node), so the eligibility logic is unchanged.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

What was personally verified before opening this PR:

  • Ran pnpm check locally on the fix branch (TypeScript + ESLint + production build, all clean).
  • Built and deployed the patched build to a real EasyPanel container fronted by basicAuth.
  • Manually tested on Android Chrome at the actual mobile viewport in the screenshots:
    • Tapping a discovered adjacent location → footer shows emoji + label + Set destination button. ✅
    • Tapping an undiscovered ("?") adjacent location → footer now shows ❓ Unknown location + Set destination button. ✅
    • Pressing the button travels the party to that node and closes the modal. ✅
    • Tapping the current location → footer shows "You are here" instead of the destination button (unchanged). ✅

The "Checked edge cases" box is intentionally left unchecked: only the mobile flow above was exercised. Light/dark mode parity, non-Chromium mobile browsers (Safari iOS), and the no-Set-destination-for-non-adjacent-unknowns case were not personally re-verified and would benefit from a reviewer eyeball.

Docs and release impact

  • No docs changes needed

UI evidence (if applicable)

Before / after captured at the same Android viewport:

Before — unknown ("?") location selected, no footer rendered:

Same screenshot as in #456 — blue selection ring around the unknown node, no footer or button at the bottom of the modal.

After — unknown location selected, footer + button now rendered:

❓ Unknown location on the left, Set destination button on the right; tapping it routes through the same onMove handler and closes the modal.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/457 **Author:** [@Romuromylus](https://github.com/Romuromylus) **Created:** 5/6/2026 **Status:** ✅ Merged **Merged:** 5/6/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `fix/mobile-map-unknown-location-set-destination` --- ### 📝 Commits (1) - [`bd063ce`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bd063cef5846aaf4d9b7db55b9438b93e61fd8df) fix(game-map): show Set destination button for unknown locations on mobile ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/GameMap.tsx` (+3 -3) </details> ### 📄 Description ## Linked issue Closes #456 ## Why this change - On mobile, tapping an unknown ("?") location on a node-graph map selects the node (blue ring appears) but the bottom footer — including the **Set destination** button — never renders. Mobile players have no way to travel to undiscovered adjacent nodes through the map UI. - Desktop is unaffected because `GameMapPanel` calls `onMove` immediately on click rather than using the mobile select-then-confirm flow. ## What changed - `packages/client/src/components/game/GameMap.tsx` (`MobileMapButton`): the selected-node footer was wrapped in `{selectedNodeData && selectedNodeData.discovered && (...)}`, hiding it entirely for undiscovered nodes even when `canTravel` would have allowed travel. Removed the outer `discovered` gate so the footer renders for any selected node, and masked the unknown node's emoji/label with `❓` / `Unknown location` to match the on-map ❓ treatment. - Travel-button visibility still defers to `canTravel`, which already permits travel to undiscovered adjacent nodes (and to the current node), so the eligibility logic is unchanged. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes What was personally verified before opening this PR: - Ran `pnpm check` locally on the fix branch (TypeScript + ESLint + production build, all clean). - Built and deployed the patched build to a real EasyPanel container fronted by basicAuth. - Manually tested on Android Chrome at the actual mobile viewport in the screenshots: - Tapping a discovered adjacent location → footer shows emoji + label + **Set destination** button. ✅ - Tapping an undiscovered ("?") adjacent location → footer now shows `❓ Unknown location` + **Set destination** button. ✅ - Pressing the button travels the party to that node and closes the modal. ✅ - Tapping the current location → footer shows "You are here" instead of the destination button (unchanged). ✅ The "Checked edge cases" box is intentionally left unchecked: only the mobile flow above was exercised. Light/dark mode parity, non-Chromium mobile browsers (Safari iOS), and the no-Set-destination-for-non-adjacent-unknowns case were not personally re-verified and would benefit from a reviewer eyeball. ## Docs and release impact - [x] No docs changes needed ## UI evidence (if applicable) Before / after captured at the same Android viewport: **Before** — unknown ("?") location selected, no footer rendered: > Same screenshot as in #456 — blue selection ring around the unknown node, no footer or button at the bottom of the modal. **After** — unknown location selected, footer + button now rendered: > `❓ Unknown location` on the left, **Set destination** button on the right; tapping it routes through the same `onMove` handler and closes the modal. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:09:17 +07:00
Sign in to join this conversation.
No milestone
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
Pasta-Devs/Marinara-Engine#4626
No description provided.