Skip to content

Conversation

@TobiTenno
Copy link
Member

@TobiTenno TobiTenno commented Jan 10, 2026

What did you fix?

closes #833


Reproduction steps

See tests


Evidence/screenshot/link to line

Considerations

  • Does this contain a new dependency? [No]
  • Does this introduce opinionated data formatting or manual data entry? [No]
  • Does this pr include updated data files in a separate commit that can be reverted for a clean code-only pr? [Yes]
  • Have I run the linter? [Yes]
  • Is is a bug fix, feature request, or enhancement? [Bug Fix]

Summary by CodeRabbit

  • Bug Fixes

    • Corrected apostrophe formatting in item titles and names across the system
    • Fixed title casing for specific character sequences
  • New Features

    • Added new warning category for missing wiki thumbnails
    • Enhanced title transformation with improved character handling

✏️ Tip: You can customize this high-level summary in your review settings.

@TobiTenno TobiTenno requested a review from a team as a code owner January 10, 2026 00:41
@TobiTenno TobiTenno requested a review from AyAyEm January 10, 2026 00:41
@coderabbitai
Copy link

coderabbitai bot commented Jan 10, 2026

📝 Walkthrough

Walkthrough

This PR fixes item name formatting issues by correcting title casing logic to preserve lowercase after special characters (ö, apostrophes), updating data entries with proper punctuation, enhancing item lookup with fallback mechanisms, and adding test coverage for the title transformation functionality.

Changes

Cohort / File(s) Summary
Parser & Title Logic
build/parser.mjs, test/utilities/title.spec.mjs
Modified title casing regex with negative lookbehind to preserve lowercase after ö; normalized typographic apostrophes to ASCII. Added comprehensive test cases validating umlaut and possessive apostrophe handling.
Data Corrections
data/warnings.json
Added "missingWikiThumb" field; corrected "Devil'S Cap" to "Devil's Cap" with proper straight apostrophe.
Test Utilities
test/lookup.mjs
Enhanced item lookup with fallback resolution: exact name match → uniqueName search → case-insensitive substring search. Changed API endpoint from warframes to items.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

Type: Bug, Scope: Data, Severity3: Minor

Suggested reviewers

  • Soundofdarkness

Poem

🐰 ✨
Apostrophes now stand up straight,
Umlauts keep their case just right,
Typos fixed, oh what delight!
Item names shine crystal bright,
With tests to guard them through the night.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references issue #833 and specifically mentions 'filter graves, umlaut-o', which directly aligns with the main fixes for incorrect apostrophe capitalization and umlaut-o letter casing issues described in the PR objectives.
Linked Issues check ✅ Passed The PR addresses all coding requirements from issue #833: fixing incorrect capitalization after apostrophes via grave accent replacement, correcting umlaut-o letter casing via negative lookbehind regex, and handling trailing newlines through data updates.
Out of Scope Changes check ✅ Passed All changes align with issue #833 objectives: parser regex fix for apostrophes and umlaut-o, test addition for validation, data corrections, and lookup enhancement to support resolution fallbacks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings

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

@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: 0

🧹 Nitpick comments (1)
build/parser.mjs (1)

30-32: LGTM: Title casing fixes address the reported issues.

The negative lookbehind (?<!ö) prevents capitalizing letters immediately following ö, fixing "HöLlvanian" → "Höllvanian". The apostrophe normalization replaces typographic apostrophes (') with ASCII apostrophes ('), fixing "Albrecht'S" → "Albrecht's".

💡 Optional: Consider handling other umlauts

While the PR scope only mentions ö, you might want to consider whether other umlauts (ä, ü, ë, ï) could appear in the dataset and need similar treatment:

-.replace(/(?<!ö)\b\w/g, (l) => l.toUpperCase())
+.replace(/(?<!ö|ä|ü|ë|ï)\b\w/g, (l) => l.toUpperCase())

This is purely optional since no issues with other umlauts are reported.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3e8543 and 7ed76d6.

📒 Files selected for processing (17)
  • build/parser.mjs
  • data/json/All.json
  • data/json/Fish.json
  • data/json/Gear.json
  • data/json/Melee.json
  • data/json/Misc.json
  • data/json/Mods.json
  • data/json/Node.json
  • data/json/Primary.json
  • data/json/Resources.json
  • data/json/Secondary.json
  • data/json/Skins.json
  • data/json/Warframes.json
  • data/json/i18n.json
  • data/warnings.json
  • test/lookup.mjs
  • test/utilities/title.spec.mjs
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-12-03T23:47:24.677Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 663
File: config/masterableCategories.json:1-2
Timestamp: 2024-12-03T23:47:24.677Z
Learning: In the 'warframe-items' repository, when suggesting changes to regex patterns in 'config/masterableCategories.json', ensure that added patterns only include items relevant to the current PR context, and avoid adding items not present in the context.

Applied to files:

  • test/lookup.mjs
📚 Learning: 2025-11-28T01:41:19.914Z
Learnt from: SlayerOrnstein
Repo: WFCD/warframe-items PR: 778
File: build/parser.mjs:568-574
Timestamp: 2025-11-28T01:41:19.914Z
Learning: In the WFCD/warframe-items repository, for Nightwave Act processing, the regex difference between `build/parser.mjs` (using `/[0-9]{1,3}$/` with anchor) and `build/build.mjs` (using `/[0-9]{1,3}/` without anchor) is intentional and serves different purposes in each file.

Applied to files:

  • test/lookup.mjs
📚 Learning: 2025-03-29T18:52:41.800Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 714
File: build/parser.mjs:451-469
Timestamp: 2025-03-29T18:52:41.800Z
Learning: Wiki data in the warframe-items builder should not have null checks as it's critical for the build process - if wiki fetch fails, the build should fail to prevent propagating incorrect data downstream.

Applied to files:

  • data/warnings.json
📚 Learning: 2025-12-22T12:16:24.709Z
Learnt from: TobiTenno
Repo: WFCD/warframe-items PR: 805
File: build/tradable.mjs:1-1
Timestamp: 2025-12-22T12:16:24.709Z
Learning: In Warframe, Prime variants of Bow, Launcher, and Sniper weapon types are not tradable, just like Prime variants of Rifle, Shotgun, Pistol, and other built weapon types. These types should be included in the builtUntradable array in build/tradable.mjs.

Applied to files:

  • data/warnings.json
🧬 Code graph analysis (2)
test/utilities/title.spec.mjs (1)
test/utilities/find.spec.mjs (1)
  • find (7-7)
test/lookup.mjs (4)
index.mjs (2)
  • res (136-136)
  • items (103-103)
index.js (1)
  • items (104-104)
test/utilities/find.spec.mjs (1)
  • items (10-10)
test/index.spec.mjs (13)
  • items (29-29)
  • items (68-68)
  • items (72-72)
  • items (81-81)
  • items (100-100)
  • items (108-108)
  • items (113-113)
  • items (117-117)
  • items (122-122)
  • items (131-131)
  • items (138-138)
  • items (152-152)
  • items (166-166)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (4)
data/warnings.json (2)

7-7: LGTM: Apostrophe normalization applied correctly.

The correction from "Devil'S Cap" to "Devil's Cap" aligns with the PR objectives to fix incorrect capitalization after apostrophes.


9-9: LGTM: Missing wiki thumbnail tracking added.

The new missingWikiThumb field tracks items without wiki thumbnails, which is consistent with the data regeneration mentioned in the PR description.

test/lookup.mjs (1)

10-17: LGTM: Improved lookup flexibility with cascading fallbacks.

The changes enhance the lookup utility by:

  1. Switching to the more general /items/ endpoint (instead of /warframes/)
  2. Adding fallback strategies: exact name match → uniqueName match → case-insensitive substring match

This makes the test utility more robust and flexible for various item types.

test/utilities/title.spec.mjs (1)

1-14: LGTM: Excellent test coverage for title transformations.

The new tests validate both fixes from the PR:

  1. Umlaut handling: Verifies "Höllvanian" maintains lowercase after ö
  2. Apostrophe handling: Verifies typographic apostrophes are normalized to ASCII

The tests use real item data via uniqueNames, ensuring the transformations work correctly in production scenarios.

@TobiTenno TobiTenno enabled auto-merge (squash) January 10, 2026 00:49
@TobiTenno TobiTenno merged commit bdc8440 into master Jan 10, 2026
10 checks passed
@TobiTenno TobiTenno deleted the fix-833 branch January 10, 2026 01:03
@wfcd-bot-boi
Copy link
Collaborator

🎉 This PR is included in version 1.1272.97 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Typo in item names

3 participants