[GH-ISSUE #1805] Bot Browser refactor loses imported-card tracking and provider parity #887

Closed
opened 2026-10-21 05:22:58 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Jun 1, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1805

Originally assigned to: @cha1latte on GitHub.

Bot Browser refactor loses imported-card tracking and provider parity

Summary

Bot Browser has several likely refactor regressions compared with the legacy implementation. The highest-confidence bug is that imported browser cards are tagged during import request construction but the Rust ST character importer does not persist the source marker that the Browser side panel uses, so imported characters can disappear from the Browser imported list.

A static parity pass also found two provider/data parity gaps that should be checked and fixed in the same area: JannyAI no longer uses the browser-side Cloudflare workaround from legacy, and Chub detail enrichment no longer preserves several definition fields before importing downloaded PNG cards.

Expected behavior

  • Characters imported from Bot Browser should be marked with extensions.botBrowserSource and appear in the Browser panel's imported-character list.
  • JannyAI search/detail should retain a route that works when server/native requests hit Cloudflare, matching the legacy browser-side fallback behavior where possible.
  • Chub imports should preserve detail fields that legacy merged into card JSON, including system_prompt, post_history_instructions, character_version, and provider extensions when present.

Actual behavior

  • BotBrowserView still sends _botBrowserSource, but the refactor Rust import path appears to ignore it. BotBrowserPanel filters imported characters by data.extensions.botBrowserSource, so the marker loss breaks the Browser imported-list workflow.
  • JannyAI search/detail now goes through bot_browser_post / bot_browser_get into the Tauri backend. Legacy intentionally performed JannyAI search from the browser after fetching the token, because server-side search was blocked by Cloudflare. Refactor can detect a Cloudflare block, but no longer has the browser-side path.
  • Refactor Chub detail mapping returns fewer fields than legacy and no longer uses the merge helper that wrote detail fields into the imported PNG JSON.

Steps to reproduce

  1. Open the refactor app on a build with Bot Browser available.
  2. Import a character from Bot Browser.
  3. Reopen the Browser panel and check whether the imported character appears in the imported-character list.
  4. For JannyAI, attempt search/detail fetches from a network where native/server requests are Cloudflare-blocked and compare with the legacy browser-side request behavior.
  5. For Chub, import a card whose detail endpoint includes system_prompt, post_history_instructions, character_version, or extensions, then inspect the imported character data.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor checkout, observed at 84f40efd
  • Run mode: not app-run; static parity review against legacy implementation
  • OS + version: not verified
  • Node + pnpm versions: not verified
  • Rust version, if relevant: not verified
  • Remote Runtime URL configured? not verified
  • Provider, model, or integration, if relevant: Bot Browser providers: JannyAI, Chub

Logs, screenshots, or video

No runtime logs or screenshots. Evidence from code inspection:

  • Refactor sends _botBrowserSource from src/features/shell/bot-browser/components/BotBrowserView.tsx during import.
  • Refactor Browser side panel filters imported characters with d.extensions?.botBrowserSource in src/features/shell/bot-browser/components/BotBrowserPanel.tsx.
  • Refactor Rust import normalization in src-tauri/src/commands/storage/imports/normalization.rs builds extensions but does not appear to consume _botBrowserSource.
  • Legacy importer consumed _botBrowserSource and wrote data.extensions.botBrowserSource in packages/server/src/services/import/st-character.importer.ts.
  • Legacy JannyAI search comments state browser-side search was deliberate because server-side search.jannyai.com calls were blocked by Cloudflare; refactor routes search through Tauri bot_browser_post("janny/search").
  • Legacy Chub import used mergeChubDetailIntoCharacterJson to preserve extra fields; refactor Chub detail does not return those fields.

Regression notes

Legacy implementation supported the imported-source marker and had browser-side JannyAI fallback behavior. Refactor appears to have lost those behaviors during the Tauri/runtime migration.

Additional context

Suggested repair order:

  1. Preserve _botBrowserSource in the Rust ST character import path and add focused proof that imported Bot Browser cards appear in BotBrowserPanel.
  2. Reintroduce or replace the JannyAI browser-side fallback with a refactor-safe path, then prove it under the failure mode the legacy comments describe.
  3. Restore Chub detail enrichment fields and merge behavior, or document intentional removal.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1805 Originally assigned to: @cha1latte on GitHub. Bot Browser refactor loses imported-card tracking and provider parity ## Summary Bot Browser has several likely refactor regressions compared with the legacy implementation. The highest-confidence bug is that imported browser cards are tagged during import request construction but the Rust ST character importer does not persist the source marker that the Browser side panel uses, so imported characters can disappear from the Browser imported list. A static parity pass also found two provider/data parity gaps that should be checked and fixed in the same area: JannyAI no longer uses the browser-side Cloudflare workaround from legacy, and Chub detail enrichment no longer preserves several definition fields before importing downloaded PNG cards. ## Expected behavior - Characters imported from Bot Browser should be marked with `extensions.botBrowserSource` and appear in the Browser panel's imported-character list. - JannyAI search/detail should retain a route that works when server/native requests hit Cloudflare, matching the legacy browser-side fallback behavior where possible. - Chub imports should preserve detail fields that legacy merged into card JSON, including `system_prompt`, `post_history_instructions`, `character_version`, and provider `extensions` when present. ## Actual behavior - `BotBrowserView` still sends `_botBrowserSource`, but the refactor Rust import path appears to ignore it. `BotBrowserPanel` filters imported characters by `data.extensions.botBrowserSource`, so the marker loss breaks the Browser imported-list workflow. - JannyAI search/detail now goes through `bot_browser_post` / `bot_browser_get` into the Tauri backend. Legacy intentionally performed JannyAI search from the browser after fetching the token, because server-side search was blocked by Cloudflare. Refactor can detect a Cloudflare block, but no longer has the browser-side path. - Refactor Chub detail mapping returns fewer fields than legacy and no longer uses the merge helper that wrote detail fields into the imported PNG JSON. ## Steps to reproduce 1. Open the refactor app on a build with Bot Browser available. 2. Import a character from Bot Browser. 3. Reopen the Browser panel and check whether the imported character appears in the imported-character list. 4. For JannyAI, attempt search/detail fetches from a network where native/server requests are Cloudflare-blocked and compare with the legacy browser-side request behavior. 5. For Chub, import a card whose detail endpoint includes `system_prompt`, `post_history_instructions`, `character_version`, or `extensions`, then inspect the imported character data. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [x] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor checkout, observed at 84f40efd - Run mode: not app-run; static parity review against legacy implementation - OS + version: not verified - Node + pnpm versions: not verified - Rust version, if relevant: not verified - Remote Runtime URL configured? not verified - Provider, model, or integration, if relevant: Bot Browser providers: JannyAI, Chub ## Logs, screenshots, or video No runtime logs or screenshots. Evidence from code inspection: - Refactor sends `_botBrowserSource` from `src/features/shell/bot-browser/components/BotBrowserView.tsx` during import. - Refactor Browser side panel filters imported characters with `d.extensions?.botBrowserSource` in `src/features/shell/bot-browser/components/BotBrowserPanel.tsx`. - Refactor Rust import normalization in `src-tauri/src/commands/storage/imports/normalization.rs` builds `extensions` but does not appear to consume `_botBrowserSource`. - Legacy importer consumed `_botBrowserSource` and wrote `data.extensions.botBrowserSource` in `packages/server/src/services/import/st-character.importer.ts`. - Legacy JannyAI search comments state browser-side search was deliberate because server-side `search.jannyai.com` calls were blocked by Cloudflare; refactor routes search through Tauri `bot_browser_post("janny/search")`. - Legacy Chub import used `mergeChubDetailIntoCharacterJson` to preserve extra fields; refactor Chub detail does not return those fields. ## Regression notes Legacy implementation supported the imported-source marker and had browser-side JannyAI fallback behavior. Refactor appears to have lost those behaviors during the Tauri/runtime migration. ## Additional context Suggested repair order: 1. Preserve `_botBrowserSource` in the Rust ST character import path and add focused proof that imported Bot Browser cards appear in `BotBrowserPanel`. 2. Reintroduce or replace the JannyAI browser-side fallback with a refactor-safe path, then prove it under the failure mode the legacy comments describe. 3. Restore Chub detail enrichment fields and merge behavior, or document intentional removal. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:22:58 +07:00
Author
Owner

@cha1latte commented on GitHub (Jun 1, 2026):

Fixed in #1837

<!-- gh-comment-id:4595487872 --> @cha1latte commented on GitHub (Jun 1, 2026): Fixed in #1837
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#887
No description provided.