[PR #1012] [MERGED] Fix Chub browser import card data #4883

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1012
Author: @cha1latte
Created: 5/19/2026
Status: ✅ Merged
Merged: 5/19/2026
Merged by: @cha1latte

Base: staging ← Head: fix/issue-1007-chub-direct-import


📝 Commits (1)

  • 3683496 Fix Chub browser import card data

📊 Changes

3 files changed (+149 additions, -9 deletions)

View changed files

📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+37 -8)
📝 packages/client/src/components/modals/BotBrowserModal.tsx (+31 -1)
➕ packages/client/src/lib/chub-character-card.ts (+81 -0)

📄 Description

Linked issue

Closes #1007

Why this change

  • Chub browser imports could use stale/reduced PNG card metadata even when Chub's detail API had the full current V2 card fields, causing imported characters to miss long description, first message, post-history instructions, and other card data compared with the source preview.

What changed

  • Added a Chub card merge helper that applies Chub detail API fields over the downloaded PNG/card payload while preserving the PNG avatar and wrapped V2/V3 card shape.
  • Updated the full bot browser import path to fetch and merge Chub detail fields before posting to the standard ST character importer.
  • Updated the legacy browser modal path to use the same merge helper so both Chub import surfaces preserve the same detail fields.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex reproduced the source mismatch with node scratch/repro-issue-1007-chub-import.mjs: the live Chub example's static PNG path had description length 128, first message length 4, and post-history instructions length 0, while Chub's detail API had description length 9666, first message length 1769, and post-history instructions length 6494.
  • Codex verified the fix with packages\server\node_modules\.bin\tsx.cmd scratch/verify-issue-1007-chub-import.ts: the production merge helper restored the Chub detail API field lengths over the stale PNG payload and passed edge cases for missing detail, wrapped V2 cards, and embedded lorebook fill-in.
  • Codex ran pnpm check; it passed impeccable:check, lint, and shared/server/client builds.
  • No true human-only blocker remains for the core claim. A human should still manually try one Chub browser import before merge because the source report was a user-facing import flow.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Docs/release note: no docs, schema, dependency, or version files changed.

UI evidence (if applicable)

Not applicable. This is a data import mapping fix; proof is the before/after Chub import field-length verifier above.


🔄 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/1012 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/19/2026 **Status:** ✅ Merged **Merged:** 5/19/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-1007-chub-direct-import` --- ### 📝 Commits (1) - [`3683496`](https://github.com/Pasta-Devs/Marinara-Engine/commit/36834966695b6e8085ae4161045be0fce3ba3a0f) Fix Chub browser import card data ### 📊 Changes **3 files changed** (+149 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+37 -8) 📝 `packages/client/src/components/modals/BotBrowserModal.tsx` (+31 -1) ➕ `packages/client/src/lib/chub-character-card.ts` (+81 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #1007 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - Chub browser imports could use stale/reduced PNG card metadata even when Chub's detail API had the full current V2 card fields, causing imported characters to miss long description, first message, post-history instructions, and other card data compared with the source preview. ## What changed <!-- List the key changes in this PR --> - Added a Chub card merge helper that applies Chub detail API fields over the downloaded PNG/card payload while preserving the PNG avatar and wrapped V2/V3 card shape. - Updated the full bot browser import path to fetch and merge Chub detail fields before posting to the standard ST character importer. - Updated the legacy browser modal path to use the same merge helper so both Chub import surfaces preserve the same detail fields. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex reproduced the source mismatch with `node scratch/repro-issue-1007-chub-import.mjs`: the live Chub example's static PNG path had description length 128, first message length 4, and post-history instructions length 0, while Chub's detail API had description length 9666, first message length 1769, and post-history instructions length 6494. - Codex verified the fix with `packages\server\node_modules\.bin\tsx.cmd scratch/verify-issue-1007-chub-import.ts`: the production merge helper restored the Chub detail API field lengths over the stale PNG payload and passed edge cases for missing detail, wrapped V2 cards, and embedded lorebook fill-in. - Codex ran `pnpm check`; it passed `impeccable:check`, lint, and shared/server/client builds. - No true human-only blocker remains for the core claim. A human should still manually try one Chub browser import before merge because the source report was a user-facing import flow. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Docs/release note: no docs, schema, dependency, or version files changed. ## UI evidence (if applicable) Not applicable. This is a data import mapping fix; proof is the before/after Chub import field-length verifier above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:25 +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#4883
No description provided.