mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2698] [Issue]: Bot Browser (Chub/Janny) drops/clobbers card fields — alternate greetings, system prompt, post-history, character_version, tags #1343
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1343
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jun 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2698
Originally assigned to: @SpicyMarinara on GitHub.
Summary
The Bot Browser (Chub.AI / Janny.AI / others) drops or clobbers character-card fields on import, so a bot imported from a repository is missing data it had at the source: alternate greetings, system prompt, post-history (jailbreak) instructions, character_version, tags, and even creator/name in some cases.
Expected behavior
Importing a bot via the Bot Browser should preserve every field present on the source card (embedded PNG card and/or the provider API), matching what a direct card import would yield.
Actual behavior
alternate_greetingswith[]. The import parses the full V2 PNG card, then merges the Chub API detail over it;fetchDetailmaps greetings viaoptionalStringArray(def.alternate_greetings)which always returns an array ([]when absent), and the merge guardif (detail.alternateGreetings) ...treats[]as truthy → overwrites the PNG's authored greetings with empty.tagswith[]when the search node has no topics (same empty-array-truthy pattern), and overwrites authored PNGcreator/namewith search-derived values, including empty strings.detailFromCharacter()builds the CardDetail from the decoded Astrocharacterobject reading only personality/scenario/firstMessage/exampleDialogs/description; it never reads any alternate-greetings field, soalternateGreetingsstays undefined and import setsalternate_greetings: [...] || [].system_prompt/post_history_instructions/character_version. The non-Chub import builder constructs the v2 object without readingcardDetail.systemPrompt/postHistoryInstructions/characterVersion, and the PNG export hardcodes all three to"". So any card carrying a system prompt, jailbreak, or version loses them on import and zeroes them on export.How it breaks the pipeline
Code trace (staging @
b826f8f4) —packages/client/src/components/bot-browser/BotBrowserView.tsx+packages/client/src/lib/chub-character-card.ts:optionalStringArray(BotBrowserView.tsx:191-193),fetchDetail(:441), merge guard (chub-character-card.ts:68); legacy pathBotBrowserModal.tsx:227. Server readsraw.alternate_greetingsdirectly (st-character.importer.ts:628).detailFromCharacter()(:692-705); import builder (:1584-1594,alternate_greetings: cardDetail?.alternateGreetings || []); PNG export (~:2735). Sibling providers Chub (:441), Pygmalion (:937), Wyvern (:1043), DataCat (:1251) all surfacealternateGreetings.CardDetailmodelssystemPrompt(:130),postHistoryInstructions(:131); import builder (:1584) omits them;buildCharacterCardPnghardcodes them empty (:2989-2993);charData(:2725-2737) omits them.Steps to reproduce
alternate_greetings/tagswhile the Chub detail API returns them empty/absent → the imported character loses them.first_mes.Suggested fix
if (detail.alternateGreetings && detail.alternateGreetings.length > 0)(and havefetchDetailreturnundefined, not[], when absent) — apply the same for tags/creator/name.detailFromCharacter, read the greetings field (char.alternateGreetings/alternate_greetings).systemPrompt/postHistoryInstructions/characterVersionin the non-Chub import builder, and emit them (not"") inbuildCharacterCardPng/charData.Environment
b826f8f4)Additional context
Found via a systematic multi-agent audit of import/export round-trips. Directly affects the common "import a bot from Chub/Janny" flow. Part of a set of import/export fidelity issues filed together.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@SpicyMarinara commented on GitHub (Jun 21, 2026):
Fixed in branch
codex/spicy-issue-sweep-2026-06-21.What changed:
Final repo checks will run after the full issue sweep.