[GH-ISSUE #7738] [Feature]: Localize the tracker slices' validation messages (Agent Suite + State Editor) #4271

Closed
opened 2026-10-21 06:13:53 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @ylli-selmani on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7738

Originally assigned to: @SpicyMarinara, @ylli-selmani on GitHub.

What problem does this solve?

AGENT_SUITE_TRACKER_SLICES (packages/client/src/lib/agent-suite-tracker-slices.ts) returns its validation errors as hard-coded English strings, for example "Scene data must be a JSON object", "Present characters must be a JSON array", and the Inventory Tracker row errors. Both Agent Suite and the new State Editor (#7737) show them as they are, so users of other languages see English when a tracker block or State Editor section doesn't fit its shape.

CodeRabbit's "Localized UI text" pre-merge check flagged this on #7737. It was left for a follow-up on purpose, because the strings are older than that PR, Agent Suite uses them too, and open-issues.regression.ts checks their exact text.

Proposed solution

  • Have buildPatch return a typed error code plus parameters (for example { code: "notArray", field: "presentCharacters" }, or an inventory group and row problem) instead of an English sentence.
  • Add one shared mapper from those codes to ui.* localization keys, and use it in both Agent Suite and the State Editor's game-state modal.
  • Add the keys to en.json, and update the open-issues.regression.ts assertions to check the codes instead of the English text.

Alternatives considered

  • Localizing only on the State Editor side. That would leave Agent Suite in English and split the error wording across two places.

Additional context

  • Follow-up from #7737 (part of #7736).
  • Related: packages/client/src/lib/state-editor/game-state-editor-source.ts forwards the slice error, and GameStateEditorModal.tsx prefixes it with the section label.

Template check

  • I DID NOT read this template and provide the requested details.

🤖 Generated with Claude Code

Originally created by @ylli-selmani on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7738 Originally assigned to: @SpicyMarinara, @ylli-selmani on GitHub. ## What problem does this solve? `AGENT_SUITE_TRACKER_SLICES` (`packages/client/src/lib/agent-suite-tracker-slices.ts`) returns its validation errors as hard-coded English strings, for example "Scene data must be a JSON object", "Present characters must be a JSON array", and the Inventory Tracker row errors. Both Agent Suite and the new State Editor (#7737) show them as they are, so users of other languages see English when a tracker block or State Editor section doesn't fit its shape. CodeRabbit's "Localized UI text" pre-merge check flagged this on #7737. It was left for a follow-up on purpose, because the strings are older than that PR, Agent Suite uses them too, and `open-issues.regression.ts` checks their exact text. ## Proposed solution - Have `buildPatch` return a typed error code plus parameters (for example `{ code: "notArray", field: "presentCharacters" }`, or an inventory group and row problem) instead of an English sentence. - Add one shared mapper from those codes to `ui.*` localization keys, and use it in both Agent Suite and the State Editor's game-state modal. - Add the keys to `en.json`, and update the `open-issues.regression.ts` assertions to check the codes instead of the English text. ## Alternatives considered - Localizing only on the State Editor side. That would leave Agent Suite in English and split the error wording across two places. ## Additional context - Follow-up from #7737 (part of #7736). - Related: `packages/client/src/lib/state-editor/game-state-editor-source.ts` forwards the slice error, and `GameStateEditorModal.tsx` prefixes it with the section label. ## Template check - [ ] I DID NOT read this template and provide the requested details. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

@ylli-selmani commented on GitHub (Oct 19, 2026):

well, i'll close this as not planned temporarily then too

<!-- gh-comment-id:6264110690 --> @ylli-selmani commented on GitHub (Oct 19, 2026): well, i'll close this as not planned temporarily then too
Author
Owner

@SpicyMarinara commented on GitHub (Oct 19, 2026):

Done on staging by #7805.

<!-- gh-comment-id:6265176511 --> @SpicyMarinara commented on GitHub (Oct 19, 2026): Done on staging by #7805.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4271
No description provided.