Skip to content

Conversation

@DopiGFX
Copy link
Contributor

@DopiGFX DopiGFX commented Jan 11, 2026

What did you fix?

closes #837


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] Refer to [Bug] Typo in item names #833
  • 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 proper name formatting and diacritics in item data (e.g., "Gaming B*tches Glyph", "La Cathédrale Scene").
    • Updated item count values for multiple items.
    • Adjusted status_chance statistic value.

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

@DopiGFX DopiGFX requested a review from a team as a code owner January 11, 2026 03:00
@DopiGFX DopiGFX requested a review from AyAyEm January 11, 2026 03:00
@coderabbitai
Copy link

coderabbitai bot commented Jan 11, 2026

📝 Walkthrough

Walkthrough

Title-casing regex logic updated to exclude capitalizing words after characters ö, é, ā, or *. Item data corrected for proper casing and diacritics. Item counts updated for several entries. Tests expanded to validate character handling.

Changes

Cohort / File(s) Summary
Title-Casing Logic
build/parser.mjs
Regex pattern adjusted to prevent capitalization following special characters (ö, é, ā, *) by incorporating negative lookbehind; single line change.
Item Data Corrections
data/json/All.json
Corrected item names with proper casing and diacritics (e.g., "B*Tches" → "B*tches", "CathéDrale" → "Cathédrale"); updated itemCount values for multiple items (Karkina Antenna, Lunar Pitcher, Moonlight Dragonlily, Sharrac Teeth, Sunlight Dragonlily); adjusted status_chance stat.
Test Coverage Expansion
test/utilities/title.spec.mjs
Added test cases for glyph and cathédrale scene lookups to validate special character handling in name replacements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • AyAyEm
  • TobiTenno

Poem

🐰 A typo hunt through data deep,
Where diacritics make characters leap,
The parser now knows: skip the *é's, *ö's, and *ā's,
"B*tches" and "Cathédrale" shine in their ways,
Item counts flourish, tests verified true—
The database dances, now fixed just for you! ✨

🚥 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 directly references issue #837 and accurately describes the main change: filtering umlaut-e, umlaut-a and asterisk characters in title-casing logic.
Linked Issues check ✅ Passed The PR implements the exact fix proposed in issue #837: tightening title-casing logic to suppress capitalization after ö, é, ā, and * characters, addressing all problematic names listed.
Out of Scope Changes check ✅ Passed All changes are in-scope: parser logic fixes (build/parser.mjs), test coverage additions (test/utilities/title.spec.mjs), and data file corrections (data/json/All.json) for the problematic items identified in issue #837.
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 (2)
build/parser.mjs (1)

27-32: Regex fix correctly prevents capitalization after special characters.

The updated pattern properly addresses issue #837 by excluding é, ā, and * from the negative lookbehind. This ensures proper title-casing for names like "La Cathédrale Scene" (not "La CathéDrale Scene") and "Gaming Btches Glyph" (not "Gaming BTches Glyph").

The character class syntax is correct—the asterisk is literal inside [öéā*] and doesn't require escaping.

📝 Optional: Add explanatory comment for maintainability

As the excluded character set grows (ö from #833, now é/ā/* from #837), a brief comment would help future maintainers understand why these specific characters prevent capitalization:

 const title = (str = '') =>
   str
     .toLowerCase()
+    // Exclude capitalizing after diacritics/special chars to preserve proper names
+    // e.g., "Cathédrale" not "CathéDrale", "B*tches" not "B*Tches"
     .replace(/(?<![öéā*])\b\w/g, (l) => l.toUpperCase())
     .replace(/'/gi, "'")
     .replace(/'S /gi, "'s ");
test/utilities/title.spec.mjs (1)

10-17: Test coverage looks good!

The new test cases correctly verify that letters following * and é are not capitalized, which aligns with the fix for issue #837.

However, the issue and regex pattern also mention the ā character (a with macron), but there's no test case covering it. Consider adding a test for this character to ensure complete coverage of all special characters in the negative lookbehind pattern.

Optional: Add test case for ā character

If an item name with ā exists in the data, consider adding a third test case:

    const cathedraleScene = find.findItem(cathedraleSceneUName);
    assert.equal(cathedraleScene.name, 'La Cathédrale Scene');
+
+    // Example - adjust uniqueName and expected name based on actual data
+    const itemWithMacronUName = '/Lotus/Types/Items/...'; // Replace with actual path
+    const itemWithMacron = find.findItem(itemWithMacronUName);
+    assert.equal(itemWithMacron.name, '...ā...'); // Expected name with ā followed by lowercase
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56c9eac and ac84d9b.

📒 Files selected for processing (8)
  • build/parser.mjs
  • data/json/All.json
  • data/json/Glyphs.json
  • data/json/Misc.json
  • data/json/Primary.json
  • data/json/Resources.json
  • data/json/i18n.json
  • test/utilities/title.spec.mjs
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
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.
🧬 Code graph analysis (1)
test/utilities/title.spec.mjs (1)
test/utilities/find.spec.mjs (1)
  • find (7-7)
🔇 Additional comments (3)
data/json/All.json (3)

322477-322477: Name corrections look good!

The capitalization fixes for "Gaming Btches Glyph" (lowercase 't' after asterisk) and "La Cathédrale Scene" (lowercase 'd' after 'é') correctly implement the regex fix from issue #837. The updated parser logic now properly avoids capitalizing words that follow special characters (, é, ö, ā).

Also applies to: 461728-461728


423593-423593: Verify itemCount changes are intentional.

Several itemCount values were updated during the data regeneration:

  • Karkina Antenna: 3 → 20
  • Lunar Pitcher: 6 → 50
  • Moonlight Dragonlily: 6 → 10
  • Sharrac Teeth: 5 → 20
  • Sunlight Dragonlily: 4 → 10

These changes appear unrelated to the regex fix for special characters. Please confirm these are legitimate game data updates and not accidental side effects of the regeneration process.

Also applies to: 530210-530210, 629147-629147, 895474-895474, 966923-966923


942173-942173: Verify status_chance change is intentional.

The status_chance value was updated from 32 to 50. This appears unrelated to the regex fix for special characters. Please confirm this is a legitimate game data update and not an accidental change during regeneration.

@TobiTenno
Copy link
Member

@coderabbitai you should consider using backticks instead of quotes for strings that might contain markdown-formatted text, as asterisks will make some of the text incorrectly italicized

@coderabbitai
Copy link

coderabbitai bot commented Jan 11, 2026

Tip

For best results, initiate chat on the files or code changes.

@TobiTenno: Thank you for the feedback! You're absolutely right. Using backticks for strings containing special markdown characters like asterisks prevents unintended formatting. For example, Gaming B*Tches Glyph renders correctly as a literal string, whereas "Gaming B*Tches Glyph" could cause the text between asterisks to be italicized.

I'll make sure to use backticks for code identifiers, file paths, and any strings that contain markdown special characters like *, _, ~, etc. in my future responses.


✏️ Learnings added
Learnt from: TobiTenno
URL: https://github.com/WFCD/warframe-items/pull/839

Timestamp: 2026-01-11T04:10:07.087Z
Learning: When displaying strings that contain markdown special characters (such as asterisks, underscores, tildes), use backticks instead of quotes to prevent unintended markdown formatting in responses.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
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.

@TobiTenno TobiTenno merged commit e6e8db8 into WFCD:master Jan 11, 2026
10 checks passed
@wfcd-bot-boi
Copy link
Collaborator

🎉 This PR is included in version 1.1272.99 🎉

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] More typo's found

3 participants