Skip to content

Conversation

@wjdunlop
Copy link
Contributor

@wjdunlop wjdunlop commented Nov 22, 2025

If this PR fixes an issue, link it below. If not, delete these two lines.
Resolves #(issue number)

Description:

Found again another bit of a river that wasn't connected. It's the River Teme, for those curious.

Please complete the following:

  • I have added screenshots for all UI updates
  • I process any text displayed to the user through translateText() and I've added it to the en.json file
  • I have added relevant tests to the test directory
  • I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
image image

Please put your Discord username so you can be contacted if a bug or regression is found:

dxtron_25592

@wjdunlop wjdunlop requested a review from a team as a code owner November 22, 2025 13:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 22, 2025

Walkthrough

The PR updates the Britannia map manifest with adjusted land tile counts across three map variants and reformats nation coordinate arrays to a multi-line layout for improved readability. No structural map changes are made.

Changes

Cohort / File(s) Summary
Britannia Map Configuration
resources/maps/britannia/manifest.json
Reduced num_land_tiles counts (map: 933706→933664, map16x: 55009→54999, map4x: 228914→228894); reformatted nation coordinate arrays from single-line to multi-line format; added trailing newline

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that tile count reductions are intentional and correctly calculated across all three map variants
  • Confirm coordinate reformatting is applied consistently to all nations
  • Check that no coordinate values were accidentally modified during reformatting

Possibly related PRs

Suggested labels

Bug Fix, Feature - Map

Suggested reviewers

  • evanpelle
  • Duwibi

Poem

🗺️ Tiles counted, coordinates spread,
From crowded lines to formatted bed,
Britannia's map now clean and right,
With numbers trimmed and arrays bright! ✨

Pre-merge checks

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'fix literally 2 pixels in the river' matches the changeset well - it describes fixing a river rendering issue. However, the actual changes show numeric tile count updates and formatting refactoring, not just a 2-pixel fix. Clarify whether the title refers to the visual 2-pixel river fix or the underlying coordinate/tile data changes. Consider if the title should mention both the river pixels and the manifest formatting updates.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description mentions fixing a disconnected river (River Teme) and includes screenshots showing the visual fix. This aligns with the file changes to the manifest affecting map tiles and coordinates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 930a79e and 33a68c2.

⛔ Files ignored due to path filters (4)
  • map-generator/assets/maps/britannia/image.png is excluded by !**/*.png
  • resources/maps/britannia/map.bin is excluded by !**/*.bin
  • resources/maps/britannia/map16x.bin is excluded by !**/*.bin
  • resources/maps/britannia/map4x.bin is excluded by !**/*.bin
📒 Files selected for processing (1)
  • resources/maps/britannia/manifest.json (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: VariableVince
Repo: openfrontio/OpenFrontIO PR: 1655
File: resources/maps/giantworldmap/manifest.json:165-174
Timestamp: 2025-07-31T12:03:08.052Z
Learning: In OpenFrontIO draft PRs, flag names in map manifest files may be placeholders that will be updated to match the actual SVG flag file names when the assets are received. The final naming depends on the actual flag SVG files provided, not code naming conventions.
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 1864
File: resources/maps/arabianpeninsula/manifest.json:13-170
Timestamp: 2025-08-19T11:00:55.422Z
Learning: In OpenFrontIO, nation names in map manifests are displayed directly in the UI without translation. They do not need to be added to resources/lang/en.json or processed through translateText(). This is the established pattern across all existing maps including Europe, World, Asia, Africa, and others.
📚 Learning: 2025-08-19T11:00:55.422Z
Learnt from: TheGiraffe3
Repo: openfrontio/OpenFrontIO PR: 1864
File: resources/maps/arabianpeninsula/manifest.json:13-170
Timestamp: 2025-08-19T11:00:55.422Z
Learning: In OpenFrontIO, nation names in map manifests are displayed directly in the UI without translation. They do not need to be added to resources/lang/en.json or processed through translateText(). This is the established pattern across all existing maps including Europe, World, Asia, Africa, and others.

Applied to files:

  • resources/maps/britannia/manifest.json
🪛 GitHub Actions: 🧪 CI
resources/maps/britannia/manifest.json

[warning] 1-1: Prettier formatting issues found in resources/maps/britannia/manifest.json. Run 'npx prettier --write' to fix.

🔇 Additional comments (2)
resources/maps/britannia/manifest.json (2)

4-4: Tile count reductions align with river fix.

The land tile count decreases across all map variants are proportional and logically consistent with removing a disconnected river section.

Also applies to: 9-9, 14-14


1-227: Clarify test additions claim; manifest and map name translation are correct.

Good news: the manifest structure is correct. The britannia nation names are correctly NOT added to en.json—this matches the established OpenFrontIO pattern where only map names are translated, never the nation names displayed on maps.

The en.json modification is valid: "britannia": "Britannia" (the map name translation) was added on line 190. This is appropriate.

However, your second checklist claim needs clarification:

  • Tests claim unverified: No britannia-specific test files were found in the codebase. Please confirm whether you added tests for this map, and if so, which files contain them. If no tests were added, uncheck that item in your PR description.

The code itself is sound—nation names correctly remain untranslated as per the pattern.

Comment on lines +20 to +23
"coordinates": [
960,
1258
],
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Fix Prettier formatting error before merge.

The CI pipeline reports Prettier formatting issues. Although the multi-line coordinate format improves readability, it does not match your project's Prettier configuration. Run npx prettier --write resources/maps/britannia/manifest.json locally and commit the corrected formatting.

Also applies to: 29-32, 38-41, 47-50, 56-59, 65-68, 74-77, 83-86, 92-95, 101-104, 110-113, 119-122, 128-131, 137-140, 146-149, 155-158, 164-167, 173-176, 182-185, 191-194, 200-203, 209-212, 218-221


I need to verify the claims in the review comment by inspecting the actual file and Prettier configuration.


🏁 Script executed:

#!/bin/bash
# Check if manifest.json exists and inspect the coordinates section
fd "manifest.json" --type f | head -5

Length of output: 169


🏁 Script executed:

#!/bin/bash
# Look for Prettier configuration files
fd -e prettierrc -e "prettier.config.*" | head -10

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Check package.json for Prettier config and check first 50 lines of manifest
cat package.json | grep -A 20 "prettier" || echo "No prettier config in package.json"

Length of output: 2195


🏁 Script executed:

#!/bin/bash
# Get full content of the manifest.json to verify actual formatting
cat resources/maps/britannia/manifest.json 2>/dev/null || echo "File not found at expected path"

Length of output: 3623


I found the file and can see it uses multi-line coordinate formatting. Let me verify Prettier's default behavior for JSON arrays.


---

🌐 Web query:

```web
Prettier default JSON array formatting behavior short arrays

💡 Result:

Short answer: Prettier prints JSON arrays on a single line when the entire array (including brackets, items, commas and surrounding context) fits within its printWidth and the array is simple; otherwise it breaks the array across lines. Single-line arrays never get trailing commas. See Prettier’s options/behavior (printWidth + trailingComma). [1][2]

Sources:

  • Prettier options (printWidth behavior). [1]
  • Prettier options (single-line arrays do not get trailing commas / trailingComma option). [2]

Format coordinates to match Prettier defaults.

The multi-line coordinate arrays do not match Prettier's default formatting. Prettier prints JSON arrays on a single line when the entire array fits within its printWidth. The short arrays like [960, 1258] should be formatted on one line. Run npx prettier --write resources/maps/britannia/manifest.json to apply the correct formatting.

Also applies to: lines 29–32, 38–41, 47–50, 56–59, 65–68, 74–77, 83–86, 92–95, 101–104, 110–113, 119–122, 128–131, 137–140, 146–149, 155–158, 164–167, 173–176, 182–185, 191–194, 200–203, 209–212, 218–221

🤖 Prompt for AI Agents
In resources/maps/britannia/manifest.json around lines 20 to 23, the short
numeric coordinate arrays are split across multiple lines instead of using
Prettier's single-line formatting (e.g. [960, 1258]); update those arrays (and
the other listed occurrences) to single-line arrays or run the formatter to fix
them automatically. Run npx prettier --write
resources/maps/britannia/manifest.json (or manually collapse each short
coordinate array to one line) so all coordinate arrays that fit within
printWidth are formatted as single-line arrays.

Copy link
Contributor

@Duwibi Duwibi left a comment

Choose a reason for hiding this comment

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

It looks good! If you've tested it and it works without problem, it should be ready :)

@evanpelle
Copy link
Collaborator

can you run npm run format please

Copy link
Contributor

@LoackyBit LoackyBit left a comment

Choose a reason for hiding this comment

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

To pass prettier check, replace this formatting:

    {
      "coordinates": [
        918,
        1088
      ],

with the original one:

{
      "coordinates": [1114, 1108],

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.

4 participants