Skip to content

more forgiving movement/bloackers#123

Merged
skuhlmann merged 1 commit into
stagingfrom
feat/adventurer-map
Jun 22, 2026
Merged

more forgiving movement/bloackers#123
skuhlmann merged 1 commit into
stagingfrom
feat/adventurer-map

Conversation

@skuhlmann

@skuhlmann skuhlmann commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Enables a more playable free-walk map experience and tightens point-of-interest interactions.

  • Makes character movement more forgiving with a smaller collision radius, smaller rendered sprite, walkable polygon padding, and a new village entrance connector region.
  • Removes visible POI labels from the map and restyles POI markers as borderless pulsing yellow icons.
  • Requires the character to be within a POI trigger area before opening its dialog.
  • Adds the Mine as an enabled POI with a cave-in/access-blocked dialog.
  • Fixes character selector card wrapping/overflow for longer role descriptions.
  • Updates map docs, generated manifest data, and e2e coverage for proximity-based POI activation.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "The Mine" location to the adventure map with cave-in inspection dialog
    • Implemented proximity-based travel: locations are now only accessible when nearby
    • Added pulsing animation to map location markers
  • Updates

    • Adjusted character collision detection parameters
    • Refined map navigation mesh and location boundaries
    • Updated map location UI styling and interactions
  • Documentation

    • Updated map dashboard feature specification

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a mine POI (replacing member-gate) with a cave-in dialog, proximity-gates map location travel to POIs whose trigger region contains the player's position, expands walkable polygons outward in the converter script, reduces characterFootRadius from 14 to 10, replaces map location pin styling with a pulse animation, and updates map data, config, validation, and E2E tests.

Changes

Mine POI, proximity gating, and collision geometry

Layer / File(s) Summary
Converter polygon expansion and characterFootRadius reduction
scripts/convert-tiled-map.mjs, scripts/validate-map-manifest.mjs, docs/map-dashboard-feature-spec.md
Introduces walkableExpansionPixels, an expandPolygon helper, and an optional expansion parameter in absolutePolygon; passes expansion into the walkable layer conversion. Reduces default characterFootRadius to 10. Adds "mine" to the manifest validator allowlist. Spec docs gain converter padding rules and narrow-transition connector polygon guidance.
Map data: villageEntry polygon and mine POI
public/assets/map/maps/adventure/adventure.tiled.json, public/assets/map/maps/adventure/map.json
Adds a new villageEntry walkable polygon (id 21) to the Tiled source. Replaces the disabled member-gate POI with the enabled mine POI (triggerRadius: 78, actionLabel: "Inspect cave-in"). Regenerates map.json with updated walkable point sets for core, town, lavaRoad, and villageEntry, plus the new mine POI entry and updated characterFootRadius.
Mine location type, config, and dialog
src/app/(frontend)/dashboard/map/mapConfig.ts, src/app/(frontend)/dashboard/map/MapLocationDialog.tsx
Adds 'mine' to MapLocationID and the mapLocationIDs whitelist. Adds a case 'mine' branch in LocationContent and a Mine component rendering the cave-in blocked-access message.
Proximity-gated POI travel
src/app/(frontend)/dashboard/map/MapDashboardClient.tsx
Imports isPointInPOITrigger, computes a memoized nearbyPOIIDs set from enabled open-dialog POIs whose trigger region contains movement.sourcePosition, gates travelToLocation to require the location ID in nearbyPOIIDs, and disables markers when no role is selected or the location is not nearby. Removes visible label span from markers.
Map UI: pin pulse, label removal, character selector tweaks
src/app/(frontend)/globals.css, src/app/(frontend)/dashboard/map/MapSprite.tsx, src/app/(frontend)/dashboard/map/MapCharacterSelector.tsx
Removes .map-location-label from the shared background selector and all mobile overrides. Replaces .map-location-pin rules with a map-poi-pulse keyframe animation and drop-shadow disabled state. Adds scale-90 to MapSprite's button. Adjusts MapCharacterSelector grid breakpoint, button height, and role title typography.
E2E test: mine POI flow
tests/e2e/app.spec.ts
Replaces the prior slop-swamp/guild-castle travel assertions with: confirm slop swamp button is disabled, press ArrowRight/ArrowUp to move, assert nearby mine region, click "inspect cave-in", and verify the Mine dialog with cave-in text.

Sequence Diagram(s)

sequenceDiagram
    actor Player
    participant MapDashboardClient
    participant isPointInPOITrigger
    participant MapLocationDialog

    Player->>MapDashboardClient: move character (keyboard/dpad)
    MapDashboardClient->>isPointInPOITrigger: check each enabled open-dialog POI vs sourcePosition
    isPointInPOITrigger-->>MapDashboardClient: nearbyPOIIDs set
    MapDashboardClient-->>Player: render nearby POI markers as active (pulse animation)
    Player->>MapDashboardClient: click "Inspect cave-in" marker
    MapDashboardClient->>MapDashboardClient: travelToLocation — guard: id in nearbyPOIIDs
    MapDashboardClient->>MapLocationDialog: open mine dialog
    MapLocationDialog-->>Player: display Mine / cave-in blocked message
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • raid-guild/portal#117: Implements the original map dashboard feature whose components (MapDashboardClient, MapLocationDialog, MapCharacterSelector, map config) are directly extended by this PR.
  • raid-guild/portal#121: Directly precedes this PR on the same free-walk collision pipeline, updating convert-tiled-map.mjs, validate-map-manifest.mjs, and the nearby-location gating logic that this PR further modifies.

Poem

🐇 A mine has appeared with a cave-in in place,
The walker must wander to reach the right space.
Polygons expand with a nudge and a pad,
The radius shrank — not too big, not too sad.
Hop close to the pin and the pulse starts to glow,
Only the nearby shall travel below! 🪨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title 'more forgiving movement/bloackers' appears to contain a typo ('bloackers' likely meant 'blockers') and is overly vague, failing to clearly describe the main changes in the changeset. Revise the title to be more specific and clear, such as 'Improve character movement with reduced collision radius and walkable polygon padding' or 'Enhance movement forgiveness and enforce proximity-based POI interactions'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/adventurer-map

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

scripts/convert-tiled-map.mjs

Oops! Something went wrong! :(

ESLint: 9.39.3

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from: /.eslintrc.cjs
at JSON.stringify ()
at /node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2255:45
at Array.map ()
at ConfigValidator.formatErrors (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2246:23)
at ConfigValidator.validateConfigSchema (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2277:84)
at ConfigArrayFactory._normalizeConfigData (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/e

... [truncated 445 characters] ...

c/dist/eslintrc.cjs:3261:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3199:25)
(node:2) ESLintRCWarning: You are using an eslintrc configuration file, which is deprecated and support will be removed in v10.0.0. Please migrate to an eslint.config.js file. See https://eslint.org/docs/latest/use/configure/migration-guide for details. An eslintrc configuration file is used because you have the ESLINT_USE_FLAT_CONFIG environment variable set to false. If you want to use an eslint.config.js file, remove the environment variable. If you want to find the location of the eslintrc configuration file, use the --debug flag.
(Use node --trace-warnings ... to show where the warning was created)

scripts/validate-map-manifest.mjs

Oops! Something went wrong! :(

ESLint: 9.39.3

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from: /.eslintrc.cjs
at JSON.stringify ()
at /node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2255:45
at Array.map ()
at ConfigValidator.formatErrors (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2246:23)
at ConfigValidator.validateConfigSchema (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2277:84)
at ConfigArrayFactory._normalizeConfigData (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/e

... [truncated 445 characters] ...

c/dist/eslintrc.cjs:3261:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3199:25)
(node:2) ESLintRCWarning: You are using an eslintrc configuration file, which is deprecated and support will be removed in v10.0.0. Please migrate to an eslint.config.js file. See https://eslint.org/docs/latest/use/configure/migration-guide for details. An eslintrc configuration file is used because you have the ESLINT_USE_FLAT_CONFIG environment variable set to false. If you want to use an eslint.config.js file, remove the environment variable. If you want to find the location of the eslintrc configuration file, use the --debug flag.
(Use node --trace-warnings ... to show where the warning was created)

src/app/(frontend)/dashboard/map/MapCharacterSelector.tsx

Oops! Something went wrong! :(

ESLint: 9.39.3

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from: /.eslintrc.cjs
at JSON.stringify ()
at /node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2255:45
at Array.map ()
at ConfigValidator.formatErrors (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2246:23)
at ConfigValidator.validateConfigSchema (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2277:84)
at ConfigArrayFactory._normalizeConfigData (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/e

... [truncated 445 characters] ...

c/dist/eslintrc.cjs:3261:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/.pnpm/@eslint+eslintrc@3.3.3/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3199:25)
(node:2) ESLintRCWarning: You are using an eslintrc configuration file, which is deprecated and support will be removed in v10.0.0. Please migrate to an eslint.config.js file. See https://eslint.org/docs/latest/use/configure/migration-guide for details. An eslintrc configuration file is used because you have the ESLINT_USE_FLAT_CONFIG environment variable set to false. If you want to use an eslint.config.js file, remove the environment variable. If you want to find the location of the eslintrc configuration file, use the --debug flag.
(Use node --trace-warnings ... to show where the warning was created)

  • 6 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/app/(frontend)/globals.css (1)

359-387: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Respect reduced-motion preferences for the POI pulse animation.

The new infinite pulse runs for all users. Add a prefers-reduced-motion: reduce override to disable or tone down this animation.

Suggested patch
 .map-location-pin {
   align-items: center;
   animation: map-poi-pulse 2.8s ease-in-out infinite;
@@
 }
 
+@media (prefers-reduced-motion: reduce) {
+  .map-location-pin {
+    animation: none;
+    transform: none;
+  }
+}
+
 `@keyframes` map-poi-pulse {
   0%,
   100% {
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/app/`(frontend)/globals.css around lines 359 - 387, The
`.map-location-pin` class applies an infinite pulse animation that runs
continuously for all users without respecting accessibility preferences. Add a
`@media (prefers-reduced-motion: reduce)` media query that overrides the
animation property on the `.map-location-pin` selector to disable the animation
by setting it to none, ensuring users who prefer reduced motion will not see the
map-poi-pulse animation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/app/`(frontend)/globals.css:
- Around line 359-387: The `.map-location-pin` class applies an infinite pulse
animation that runs continuously for all users without respecting accessibility
preferences. Add a `@media (prefers-reduced-motion: reduce)` media query that
overrides the animation property on the `.map-location-pin` selector to disable
the animation by setting it to none, ensuring users who prefer reduced motion
will not see the map-poi-pulse animation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 42b16f99-449d-4931-93ee-37555d466b9b

📥 Commits

Reviewing files that changed from the base of the PR and between c60fdf1 and 53fbec3.

📒 Files selected for processing (12)
  • docs/map-dashboard-feature-spec.md
  • public/assets/map/maps/adventure/adventure.tiled.json
  • public/assets/map/maps/adventure/map.json
  • scripts/convert-tiled-map.mjs
  • scripts/validate-map-manifest.mjs
  • src/app/(frontend)/dashboard/map/MapCharacterSelector.tsx
  • src/app/(frontend)/dashboard/map/MapDashboardClient.tsx
  • src/app/(frontend)/dashboard/map/MapLocationDialog.tsx
  • src/app/(frontend)/dashboard/map/MapSprite.tsx
  • src/app/(frontend)/dashboard/map/mapConfig.ts
  • src/app/(frontend)/globals.css
  • tests/e2e/app.spec.ts

@skuhlmann
skuhlmann merged commit c10a820 into staging Jun 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant