[PR #2238] [MERGED] Fix character display JSON data parsing #5502

Closed
opened 2026-10-22 04:16:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2238
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2161-character-display-json-data


📝 Commits (1)

  • 237a92e Fix character display JSON data parsing

📊 Changes

1 file changed (+8 additions, -3 deletions)

View changed files

📝 src/shared/lib/character-display.ts (+8 -3)

📄 Description

Linked issue

Closes #2161

Why this change

  • parseCharacterDisplayData regressed from legacy behavior by only reading raw.data when it was already an object. Refactor callers can still receive character data as a JSON string, which made valid character names display as Unknown.

What changed

  • Restored JSON-string parsing for raw.data in src/shared/lib/character-display.ts.
  • Restored the legacy try/catch fallback so malformed character payloads resolve to Unknown instead of throwing.

Refactor impact

Primary owner:

  • Shared character display parsing.

Impact areas reviewed:

  • Catalog resources and shared parser consumers in TTS config, tracker display/color metadata, chat surfaces, and setup wizards.

Boundary notes:

  • No React, Tauri, remote-runtime, storage, schema, dependency, or provider boundary changes. The change stays in src/shared/lib.

Pressure points touched:

  • None.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Focused before-proof: node scratch\character-display-repro.ts failed on json string data name: expected Professor Mari, received Unknown.
  • Focused after-proof: node scratch\character-display-repro.ts passed object data, JSON-string data, malformed JSON fallback, and blank-name fallback rows.
  • pnpm typecheck passed.
  • pnpm check passed.
  • Bunny review pass-for-draft completed locally.
  • Workflow-health script and proof-gate script referenced by local guidance were unavailable in this checkout/machine; this is a tooling availability gap, not a product validation failure.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix only; no new discoverable feature or workflow.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

  • N/A. This is shared parser behavior with no direct UI surface change; proof is the focused before/after command harness output in scratch/.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2238 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2161-character-display-json-data` --- ### 📝 Commits (1) - [`237a92e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/237a92ef6faed25e682d112ead56532bf4101706) Fix character display JSON data parsing ### 📊 Changes **1 file changed** (+8 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/shared/lib/character-display.ts` (+8 -3) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2161 ## Why this change - `parseCharacterDisplayData` regressed from legacy behavior by only reading `raw.data` when it was already an object. Refactor callers can still receive character `data` as a JSON string, which made valid character names display as `Unknown`. ## What changed - Restored JSON-string parsing for `raw.data` in `src/shared/lib/character-display.ts`. - Restored the legacy try/catch fallback so malformed character payloads resolve to `Unknown` instead of throwing. ## Refactor impact Primary owner: - Shared character display parsing. Impact areas reviewed: - Catalog resources and shared parser consumers in TTS config, tracker display/color metadata, chat surfaces, and setup wizards. Boundary notes: - No React, Tauri, remote-runtime, storage, schema, dependency, or provider boundary changes. The change stays in `src/shared/lib`. Pressure points touched: - None. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Focused before-proof: `node scratch\character-display-repro.ts` failed on `json string data name: expected Professor Mari, received Unknown`. - Focused after-proof: `node scratch\character-display-repro.ts` passed object data, JSON-string data, malformed JSON fallback, and blank-name fallback rows. - `pnpm typecheck` passed. - `pnpm check` passed. - Bunny review pass-for-draft completed locally. - Workflow-health script and proof-gate script referenced by local guidance were unavailable in this checkout/machine; this is a tooling availability gap, not a product validation failure. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix only; no new discoverable feature or workflow. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence - N/A. This is shared parser behavior with no direct UI surface change; proof is the focused before/after command harness output in `scratch/`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:53 +07:00
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#5502
No description provided.