Skip to content

Fix main-panel icons, idle bones, language, and weapon skills - #18

Open
MolochDaGod wants to merge 7 commits into
mainfrom
fix/main-panel-icons-bones-i18n
Open

Fix main-panel icons, idle bones, language, and weapon skills#18
MolochDaGod wants to merge 7 commits into
mainfrom
fix/main-panel-icons-bones-i18n

Conversation

@MolochDaGod

@MolochDaGod MolochDaGod commented Aug 24, 2026

Copy link
Copy Markdown
Owner

User description

Fixes live info.grudge-studio.com/main-panel.html: bone rematch TDZ (idle/bind pose), icon URLs off info HTML-on-miss onto assets CDN, i18n for Stats/Bag/slots, weapon hotbar iconUrl, Toon RTS kit link, tierLabel SSOT.

Summary by Sourcery

Fix main-panel asset loading and character previews while expanding localization and equipment metadata consistency.

New Features:

  • Add multilingual labels for main-panel stats, inventory sections, equipment slots, and tier names across six supported languages.
  • Add grounded character presentation with idle animation playback, foot planting, and cursor-driven head tracking.
  • Link the hero preview to the Toon RTS race kits and expose a bones/sockets reference.

Bug Fixes:

  • Fix main-panel, hotbar, and equipment icons that resolved to HTML error pages instead of CDN assets.
  • Prevent incompatible idle animation or bone mappings from hiding or folding the character preview.
  • Ensure locale changes refresh translated equipment and inventory content.

Enhancements:

  • Centralize asset URL normalization and use the item tier labels as the source of truth.

CodeAnt-AI Description

Fix main panel assets and hero animation while expanding localization

What Changed

  • Main panel and weapon skill icons now load from the assets CDN instead of broken HTML-returning URLs
  • Hero idle animation failures no longer prevent the character preview from appearing, and bone matching handles renamed nodes safely
  • Language changes now refresh stats, bag labels, equipment slots, and the displayed equipment panel
  • Added translated labels for stats, bag sections, and equipment slots in English, Spanish, French, German, Portuguese, and Japanese
  • Equipment preview links now use the Toon RTS race kit, and tier names include Starter through Legendary

Impact

✅ Fewer broken equipment and skill icons
✅ Character previews remain visible when idle animation data is incompatible
✅ Consistent multilingual equipment labels

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Bone rematch used the track node name before it was declared, so idle never bound and the paperdoll stayed in bind pose. Icon URLs that pointed at info.grudge-studio.com returned HTML instead of PNGs; they now resolve on the assets CDN. Locale packs cover Stats, Bag, and equipment slots, and the Toon RTS race GLB is the play kit link instead of the old Unity WK pack.
Copilot AI lite review requested due to automatic review settings August 24, 2026 22:03
@codeant-ai

codeant-ai Bot commented Aug 24, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 752b693 Aug 24, 2026 · 22:03 22:11

@codeant-ai

codeant-ai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectstore-grudge Ready Ready Preview Aug 25, 2026 3:32am

@sourcery-ai

sourcery-ai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Reviewer's Guide

Fixes main-panel runtime issues by making icon paths CDN-safe, preventing idle bone-remap failures and weapon-mesh animation conflicts, switching model references to the Toon RTS kit, adding reactive localization for panel and equipment labels, and aligning tier labels with the master item definitions.

Sequence diagram for localized main-panel refresh

sequenceDiagram
    participant User
    participant MainPanel2D
    participant MainPanelI18n
    participant MainPanel

    User->>MainPanel2D: change locale
    MainPanel2D->>MainPanelI18n: setLocale(locale)
    MainPanel2D->>MainPanelI18n: applyDom()
    MainPanel2D->>MainPanel: rebuildTabStrip()
    MainPanel2D->>MainPanel: refreshAll()
    MainPanel->>MainPanelI18n: t(slots.slot)
    MainPanel-->>User: localized tabs and equipment slots
Loading

Sequence diagram for CDN-safe item and skill icons

sequenceDiagram
    participant MainPanel
    participant API
    participant CDN
    participant Browser

    MainPanel->>API: load item and skill data
    API-->>MainPanel: iconUrl or skill.iconUrl
    MainPanel->>MainPanel: fixIconUrl(iconUrl)
    MainPanel->>CDN: request normalized icon URL
    CDN-->>Browser: icon image
    MainPanel-->>Browser: render equipment and hotbar icons
Loading

Flow diagram for safe idle animation and model rendering

flowchart LR
    A[Mount hero viewport] --> B[Select idle clip]
    B --> C[rematchClipBones]
    C --> D{Bone remap succeeds?}
    D -->|Yes| E[Play idle clip]
    D -->|No| F[Log bone remap warning]
    F --> E
    E --> G[Use Toon RTS kit model]
    G --> H[Skip weapon and shield mesh tracks]
Loading

File-Level Changes

Change Details Files
Hardened asset URL resolution so icons are served from the assets CDN instead of HTML-returning info/objectstore paths.
  • Normalize absolute legacy host URLs and relative icon paths to the CDN.
  • Update food and potion fallback mappings to CDN game-asset locations.
  • Apply normalized URLs to equipment, inventory, and hotbar skill icons.
js/weapon-skill-tree.js
main-panel.html
Fixed hero idle animation bone rematching and switched the displayed model reference to the Toon RTS kit.
  • Resolve track node names before filtering weapon and shield mesh tracks.
  • Catch remapping failures so idle playback can continue without breaking viewport mounting.
  • Update the model link labeling and replace the old grudge6 character-kit link with the bones/sockets page.
js/main-panel-hero-viewport.js
main-panel.html
Added localized UI labels and refreshed rendered panels after locale changes.
  • Add locale data for the main panel.
  • Mark guest, stats, unit, clear-self, bag, and bag-scope labels for translation.
  • Translate equipment slot placeholders and labels through the i18n API.
  • Expose refreshAll and invoke it when the language selector changes.
api/v1/main-panel-locales.json
js/main-panel-2d.js
main-panel.html
Aligned displayed item tiers with the master-items tierLabel mapping.
  • Add Starter as tier zero and use the corrected Common-through-Legendary sequence.
main-panel.html

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Aug 24, 2026

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="js/main-panel-2d.js" line_range="87" />
<code_context>
       try {
         if (typeof global.rebuildTabStrip === "function") global.rebuildTabStrip();
         else global.MainPanelI18n.applyDom();
+        if (typeof global.refreshAll === "function") global.refreshAll();
       } catch (_) {}
     });
</code_context>
<issue_to_address>
**issue (bug_risk):** Changing the locale refreshes the panels, but `renderLeftCol()` rebuilds the stats and profession markup with hard-coded English strings such as Combat Stats, Health, Mana, Damage, and Professions; those generated labels have no `data-i18n` keys, so the advertised language refresh leaves the main stats panel in English.

**Triggers:** When the user changes the language while the main panel is open.

**Suggested fix:** Translate the generated labels with `MainPanelI18n.t(...)` or add stable `data-i18n` attributes after rendering and reapply the locale.
</issue_to_address>

Sourcery assessment

Approval pending. 1 finding to address first.

Blocking findings: js/main-panel-2d.js:87


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread js/main-panel-2d.js
try {
if (typeof global.rebuildTabStrip === "function") global.rebuildTabStrip();
else global.MainPanelI18n.applyDom();
if (typeof global.refreshAll === "function") global.refreshAll();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (bug_risk): Changing the locale refreshes the panels, but renderLeftCol() rebuilds the stats and profession markup with hard-coded English strings such as Combat Stats, Health, Mana, Damage, and Professions; those generated labels have no data-i18n keys, so the advertised language refresh leaves the main stats panel in English.

Triggers: When the user changes the language while the main panel is open.

Suggested fix: Translate the generated labels with MainPanelI18n.t(...) or add stable data-i18n attributes after rendering and reapply the locale.

Copilot AI 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.

🟡 Changes recommended

The new bagScope localization hook is currently overridden by a hard-coded runtime assignment, so the label won’t remain localized (especially after locale-triggered refreshes).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the main panel UI to reliably load icon assets from the assets CDN (avoiding HTML-on-miss responses), improve hero viewport resilience when idle clip bone remapping fails, and expand localization coverage for key labels (stats/bag/slots) while aligning tier labels with master item data.

Changes:

  • Route icon URL resolution through CDN-aware helpers (including weapon skill hotbar icons) and normalize legacy icon paths.
  • Make hero viewport mounting tolerant of bone-remap failures and fix a TDZ in clip track processing.
  • Add/extend i18n keys for main panel labels and equipment slot names; refresh UI on locale changes.
File summaries
File Description
main-panel.html Adds i18n hooks for labels, rewrites icon URL handling to CDN, updates tier labels, hotbar icon fallback, and kit links.
js/weapon-skill-tree.js Aligns icon URL normalization with CDN rules to avoid loading missing /icons from info/objectstore.
js/main-panel-hero-viewport.js Fixes TDZ in bone rematch and prevents remap failures from breaking viewport mounting.
js/main-panel-2d.js Refreshes tabs/slots rendering after locale changes via refreshAll().
api/v1/main-panel-locales.json Adds translations for new labels and equipment slot names across supported locales.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread main-panel.html
<div>
<h3 data-i18n="app.inventory">Inventory</h3>
<div class="bag-scope" id="bagScope">Account bag · UUID stacks</div>
<div class="bag-scope" id="bagScope" data-i18n="app.bagScope">Account bag · UUID stacks</div>
@augmentcode

augmentcode Bot commented Aug 24, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR improves the main-panel's visual asset resolution, localization, and hero preview behavior.

Changes:

  • Adds translated Stats, Bag, bag-scope, and equipment-slot labels for all supported locales.
  • Repaints main-panel content after a locale change so dynamically rendered slot labels update.
  • Marks additional static panel strings with i18n keys.
  • Normalizes legacy info/objectstore icon hosts to the assets CDN and updates consumable icon paths.
  • Uses skill-level icon fields when rendering the weapon hotbar.
  • Updates the hero animation remapper to resolve track node names before filtering weapon tracks.
  • Guards hero idle-clip remapping so a remap failure does not prevent animation playback.
  • Links the equipment panel to the Toon RTS race kit and the bones/sockets reference page.
  • Adds a Starter tier fallback label alongside existing tier labels.

Technical Notes:

  • The panel continues to load catalog data from the ObjectStore API while binary icons and character models use the CDN.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode 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.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread js/main-panel-2d.js
try {
if (typeof global.rebuildTabStrip === "function") global.rebuildTabStrip();
else global.MainPanelI18n.applyDom();
if (typeof global.refreshAll === "function") global.refreshAll();

@augmentcode augmentcode Bot Aug 24, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In js/main-panel-2d.js:87, this new refreshAll() call invokes renderInventory(), which immediately overwrites #bagScope with the English Account bag · UUID stacks · max ... string at main-panel.html:1831 after setLocale() has translated it. Consequently, changing to any non-English locale leaves the new bag-scope copy untranslated.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread js/main-panel-2d.js
try {
if (typeof global.rebuildTabStrip === "function") global.rebuildTabStrip();
else global.MainPanelI18n.applyDom();
if (typeof global.refreshAll === "function") global.refreshAll();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: Calling refreshAll() on every locale change can start a second asynchronous Equipment viewport mount while the previous mountHeroViewport() is still awaiting kit or idle-clip loading. The older mount can resume after the newer mount has disposed its renderer, then write its root/equipment into the shared viewport state and continue its animation loop, leaving a stale preview and leaked WebGL resources. Coordinate mounts with a generation token or abort/cancel the previous mount before refreshing. [race condition]

Severity Level: Major ⚠️
- ⚠️ Equipment locale changes start overlapping hero viewport loads.
- ⚠️ Repeated language changes can grow discarded WebGL resources.
- ✅ Existing disposed guard prevents stale preview restoration.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** js/main-panel-2d.js
**Line:** 87:87
**Comment:**
	*Race Condition: Calling `refreshAll()` on every locale change can start a second asynchronous Equipment viewport mount while the previous `mountHeroViewport()` is still awaiting kit or idle-clip loading. The older mount can resume after the newer mount has disposed its renderer, then write its root/equipment into the shared viewport state and continue its animation loop, leaving a stale preview and leaked WebGL resources. Coordinate mounts with a generation token or abort/cancel the previous mount before refreshing.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment thread main-panel.html
<div>
<h3 data-i18n="app.inventory">Inventory</h3>
<div class="bag-scope" id="bagScope">Account bag · UUID stacks</div>
<div class="bag-scope" id="bagScope" data-i18n="app.bagScope">Account bag · UUID stacks</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: This newly added localized bagScope element is overwritten on every renderInventory() call by the existing assignment of the hard-coded English Account bag · UUID stacks · max ... text. Since locale changes call refreshAll(), the bag scope reverts to English immediately after switching to another language; obtain the text through MainPanelI18n.t('app.bagScope') and append the dynamic maximum separately. [incomplete implementation]

Severity Level: Major ⚠️
- ⚠️ Bag scope reverts to English after locale changes.
- ⚠️ Inventory localization becomes inconsistent across supported languages.

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** main-panel.html
**Line:** 861:861
**Comment:**
	*Incomplete Implementation: This newly added localized `bagScope` element is overwritten on every `renderInventory()` call by the existing assignment of the hard-coded English `Account bag · UUID stacks · max ...` text. Since locale changes call `refreshAll()`, the bag scope reverts to English immediately after switching to another language; obtain the text through `MainPanelI18n.t('app.bagScope')` and append the dynamic maximum separately.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Idle mixer writes quaternions on the kit root. Every frame we then set
root.rotation to (0, yaw, 0), which destroys FBX/Bip001 Y-up and folds
the character in half. Plant scale and feet only; facing lives on an
un-animated wrapper. Do not call fitRootUniformSi after mixer sample.

@vercel vercel 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.

Additional Suggestion:

renderInventory() overwrites #bagScope with a hard-coded English string, reverting the localized app.bagScope label on every refresh so it never displays in non-English locales.

Fix on Vercel

…aint.

Bind stands because Bip001 carries authored -90. CDN idle is Mixamo-local Y-up. Playing both is two orientation systems: looks fine, then folds and stays folded. Identity kit quaternion once before mixer, sample idle, plant, then tick. No Euler after mixer. CDN idle only.
…ane.

Paperdoll stance uses L/R foot midpoint, not mesh bbox. After mixer: placeRootBetweenFeet then applyFootIk. No Euler on Bip001. Sampler is y=0 in the viewport (play kits pass terrain).
Post-mixer clamped yaw/pitch on Bip001 Neck and Head only. Cursor while the pointer is over the canvas; camera (the user) otherwise. No kit-root Euler.
Comment thread js/grudge6-head-look.js

if (neck) {
_e.set(0, yaw * 0.38, 0);
_q.setFromEuler(_e);

@vercel vercel Bot Aug 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

createHeadLook().update() premultiplies the head/neck bone quaternions every frame without a stable base, so the rotation compounds unboundedly (head/neck spin) whenever the mixer does not re-sample those bones.

Fix on Vercel

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

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants