[PR #7076] [MERGED] fix(bot-browser): show CharacterTavern as unavailable instead of failing (#7072) #7461

Closed
opened 2026-10-23 04:20:02 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7076
Author: @SpicyMarinara
Created: 10/4/2026
Status: ✅ Merged
Merged: 10/4/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/remove-charactertavern-7072


📝 Commits (4)

  • 27f852d fix(bot-browser): show CharacterTavern as unavailable instead of failing (#7072)
  • 7729f43 fix(bot-browser): ignore searches that finish after a source switch (#7072)
  • f1ed5a9 Merge remote-tracking branch 'origin/staging' into fix/remove-charactertavern-7072
  • 3093360 fix(bot-browser): let only the newest search update the Card Browser (#7072)

📊 Changes

10 files changed (+219 additions, -593 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 README.md (+2 -2)
📝 docs/TROUBLESHOOTING.md (+2 -1)
📝 docs/characters/bot-browser.md (+32 -28)
📝 docs/development/frontend.md (+0 -1)
📝 e2e/bot-browser-download.e2e.ts (+80 -0)
📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+97 -254)
📝 packages/client/src/localization/locales/en.json (+4 -18)
➖ packages/server/src/routes/bot-browser-chartavern.routes.ts (+0 -287)
📝 packages/server/src/routes/index.ts (+0 -2)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #7072

Why this change

  • CharacterTavern rebuilt its website, and https://character-tavern.com/api/search/cards now returns 404 for everyone. Searching, opening cards and logging in to CharacterTavern from the Card Browser all failed, and users were reporting errors that Marinara can't fix from its side.
  • CharacterTavern stays in the source picker, marked Unavailable. Choosing it explains plainly why it can't be browsed, so nobody runs into a failed search. Browsing may come back if CharacterTavern offers API access. Until then, cards downloaded from character-tavern.com can still be imported as files.

What changed

  • Removed packages/server/src/routes/bot-browser-chartavern.routes.ts and its registration in routes/index.ts. This covers search, character detail, top tags, card download, the avatar proxy and the session-cookie login. CharacterTavern's site addresses appeared only in that file, and the security headers don't list individual sites, so no other allowlist needed editing.
  • Removed from the client (BotBrowserView.tsx): CharacterTavern's search and detail code, card download, login state, the startup session check, the "Session active" label, and the CharacterTavern part of the login window. Pygmalion's login lines are unchanged.
  • Added a notice. CharacterTavern is marked Unavailable in the picker. Choosing it shows a notice with Open CharacterTavern, which opens character-tavern.com in a new tab, and Import Character, which opens the existing Import Character window. No search box, filters, NSFW toggle or Log In is shown for it. The notice comes from an optional unavailable field on the provider entry, so another source can reuse it. It uses theme colours only.
  • Header: for an unavailable source the header shows just the site name instead of "Browsing CharacterTavern".
  • Fixed a race when switching sites. A search that finishes after you switch sites no longer puts the previous site's cards or card count into the new one. Before, "4,321 cards from CharacterTavern" could appear above the notice. This also affected switching between any two sites on staging.
  • en.json: removed 18 keys only CharacterTavern used and added 4 under ui.botBrowser.providerUnavailable.*.
  • Docs: docs/characters/bot-browser.md, docs/TROUBLESHOOTING.md, docs/development/frontend.md and README.md. One CHANGELOG bullet under [Unreleased].
  • Kept, and why: general PNG card-file importing, including compressed (zTXt) card data, in packages/server/src/routes/import.routes.ts, packages/server/src/services/import/st-bulk.importer.ts and packages/client/src/lib/png-parser.ts, plus export cleanup of stale compressed data in characters.routes.ts. CharacterTavern cards store their data this way, so this is what keeps downloaded cards importable. It is not CharacterTavern-specific, and the #4002 regression covers it. Characters already imported from CharacterTavern still show in the Card Browser panel.
  • No saved site to restore: the Card Browser never saved which site was selected (lastSource was declared but never used), so after a reload everyone lands on ChubAI. Old CharacterTavern login and NSFW flags left in a browser are ignored. There is no "session expired" message, no request and no error.

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

Checks run by the agent (results to confirm yourself; boxes above left unticked):

  • pnpm check: passed
  • pnpm localization:check: passed
  • Node regressions bot-browser-route, janny-character-import, code-scanning-content-parsing, persona-client-contract, extension-security, open-issues (includes the card-file test) and capability-gm-verbs: passed. Only bot-browser-route and open-issues were rerun after the second commit.
  • e2e/bot-browser-download.e2e.ts on desktop Chromium: 3/3 passed
  • The CharacterTavern test on mobile Chromium: passed
  • core-flows Card Browser tests on desktop: 3/3 passed
  • pnpm smoke:ui on desktop: 7/7 passed
  • The new e2e test checks that:
    • the picker shows CharacterTavern as Unavailable
    • choosing it shows the notice with no search box or Log In
    • the site link is correct and Import Character opens the import window
    • a search that finishes late doesn't show its count under the newly selected site
    • after a reload with leftover CharacterTavern data, the browser opens on ChubAI
    • nothing requests the old routes or character-tavern.com, and there are no page errors

Manual verification notes

Local CodeRabbit CLI was rate-limited (shared quota) when this was opened; GitHub CodeRabbit reviews the PR.

  • Open the Card Browser, open the source picker, and confirm CharacterTavern shows an "Unavailable" label in light and dark mode.
  • Select CharacterTavern and confirm the notice is readable and shows no search box, filters, NSFW toggle or Log In, and that the header reads just "CharacterTavern".
  • Click Open CharacterTavern and confirm character-tavern.com opens in a new tab.
  • Click Import Character, import a PNG card downloaded from character-tavern.com, and confirm the character imports with its details.
  • On a phone-width viewport, confirm the notice fits with no sideways scrolling.
  • Switch from ChubAI to another site while the first search is still loading, and confirm the header doesn't show ChubAI's card count.
  • With an old CharacterTavern login in the browser, reload and open the Card Browser. Confirm there is no "session expired" message and no failed request in the network tab.
  • Confirm Pygmalion search and its login still work.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Docs changed: docs/characters/bot-browser.md, docs/TROUBLESHOOTING.md, docs/development/frontend.md, README.md, CHANGELOG.md. The 18 removed English keys may also need removing from community locale files on docs-i18n/ui.

UI evidence (if applicable)

Desktop screenshot of the CharacterTavern notice: e2e attachment chartavern-unavailable.

Summary by CodeRabbit

  • Changes
    • CharacterTavern browsing and login are no longer available. The browser displays a notice with a link to CharacterTavern and guidance for downloading and importing cards.
    • Switching providers during a search no longer shows results or counts from the previous provider.
    • Pygmalion login guidance now clarifies that tokens must be entered again after a server restart.

🔄 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/7076 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/4/2026 **Status:** ✅ Merged **Merged:** 10/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/remove-charactertavern-7072` --- ### 📝 Commits (4) - [`27f852d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/27f852d884426e4036a2675afc8a83bfaa6f0726) fix(bot-browser): show CharacterTavern as unavailable instead of failing (#7072) - [`7729f43`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7729f43332185dd9f980a68322341a0d50993105) fix(bot-browser): ignore searches that finish after a source switch (#7072) - [`f1ed5a9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f1ed5a91aac4c0f3a69afd847dd3351104076865) Merge remote-tracking branch 'origin/staging' into fix/remove-charactertavern-7072 - [`3093360`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3093360ef187c8a3a515de076fe628f067cc90f8) fix(bot-browser): let only the newest search update the Card Browser (#7072) ### 📊 Changes **10 files changed** (+219 additions, -593 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `README.md` (+2 -2) 📝 `docs/TROUBLESHOOTING.md` (+2 -1) 📝 `docs/characters/bot-browser.md` (+32 -28) 📝 `docs/development/frontend.md` (+0 -1) 📝 `e2e/bot-browser-download.e2e.ts` (+80 -0) 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+97 -254) 📝 `packages/client/src/localization/locales/en.json` (+4 -18) ➖ `packages/server/src/routes/bot-browser-chartavern.routes.ts` (+0 -287) 📝 `packages/server/src/routes/index.ts` (+0 -2) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #7072 ## Why this change - CharacterTavern rebuilt its website, and `https://character-tavern.com/api/search/cards` now returns 404 for everyone. Searching, opening cards and logging in to CharacterTavern from the Card Browser all failed, and users were reporting errors that Marinara can't fix from its side. - CharacterTavern stays in the source picker, marked **Unavailable**. Choosing it explains plainly why it can't be browsed, so nobody runs into a failed search. Browsing may come back if CharacterTavern offers API access. Until then, cards downloaded from character-tavern.com can still be imported as files. ## What changed - **Removed** `packages/server/src/routes/bot-browser-chartavern.routes.ts` and its registration in `routes/index.ts`. This covers search, character detail, top tags, card download, the avatar proxy and the session-cookie login. CharacterTavern's site addresses appeared only in that file, and the security headers don't list individual sites, so no other allowlist needed editing. - **Removed from the client** (`BotBrowserView.tsx`): CharacterTavern's search and detail code, card download, login state, the startup session check, the "Session active" label, and the CharacterTavern part of the login window. Pygmalion's login lines are unchanged. - **Added a notice.** CharacterTavern is marked **Unavailable** in the picker. Choosing it shows a notice with **Open CharacterTavern**, which opens character-tavern.com in a new tab, and **Import Character**, which opens the existing Import Character window. No search box, filters, NSFW toggle or Log In is shown for it. The notice comes from an optional `unavailable` field on the provider entry, so another source can reuse it. It uses theme colours only. - **Header:** for an unavailable source the header shows just the site name instead of "Browsing CharacterTavern". - **Fixed a race when switching sites.** A search that finishes after you switch sites no longer puts the previous site's cards or card count into the new one. Before, "4,321 cards from CharacterTavern" could appear above the notice. This also affected switching between any two sites on staging. - **`en.json`:** removed 18 keys only CharacterTavern used and added 4 under `ui.botBrowser.providerUnavailable.*`. - **Docs:** `docs/characters/bot-browser.md`, `docs/TROUBLESHOOTING.md`, `docs/development/frontend.md` and `README.md`. One CHANGELOG bullet under [Unreleased]. - **Kept, and why:** general PNG card-file importing, including compressed (zTXt) card data, in `packages/server/src/routes/import.routes.ts`, `packages/server/src/services/import/st-bulk.importer.ts` and `packages/client/src/lib/png-parser.ts`, plus export cleanup of stale compressed data in `characters.routes.ts`. CharacterTavern cards store their data this way, so this is what keeps downloaded cards importable. It is not CharacterTavern-specific, and the #4002 regression covers it. Characters already imported from CharacterTavern still show in the Card Browser panel. - **No saved site to restore:** the Card Browser never saved which site was selected (`lastSource` was declared but never used), so after a reload everyone lands on ChubAI. Old CharacterTavern login and NSFW flags left in a browser are ignored. There is no "session expired" message, no request and no error. ## 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` **Checks run by the agent** (results to confirm yourself; boxes above left unticked): - `pnpm check`: passed - `pnpm localization:check`: passed - Node regressions `bot-browser-route`, `janny-character-import`, `code-scanning-content-parsing`, `persona-client-contract`, `extension-security`, `open-issues` (includes the card-file test) and `capability-gm-verbs`: passed. Only `bot-browser-route` and `open-issues` were rerun after the second commit. - `e2e/bot-browser-download.e2e.ts` on desktop Chromium: 3/3 passed - The CharacterTavern test on mobile Chromium: passed - `core-flows` Card Browser tests on desktop: 3/3 passed - `pnpm smoke:ui` on desktop: 7/7 passed - The new e2e test checks that: - the picker shows CharacterTavern as Unavailable - choosing it shows the notice with no search box or Log In - the site link is correct and Import Character opens the import window - a search that finishes late doesn't show its count under the newly selected site - after a reload with leftover CharacterTavern data, the browser opens on ChubAI - nothing requests the old routes or character-tavern.com, and there are no page errors ### Manual verification notes Local CodeRabbit CLI was rate-limited (shared quota) when this was opened; GitHub CodeRabbit reviews the PR. - [ ] Open the Card Browser, open the source picker, and confirm CharacterTavern shows an "Unavailable" label in light and dark mode. - [ ] Select CharacterTavern and confirm the notice is readable and shows no search box, filters, NSFW toggle or Log In, and that the header reads just "CharacterTavern". - [ ] Click **Open CharacterTavern** and confirm character-tavern.com opens in a new tab. - [ ] Click **Import Character**, import a PNG card downloaded from character-tavern.com, and confirm the character imports with its details. - [ ] On a phone-width viewport, confirm the notice fits with no sideways scrolling. - [ ] Switch from ChubAI to another site while the first search is still loading, and confirm the header doesn't show ChubAI's card count. - [ ] With an old CharacterTavern login in the browser, reload and open the Card Browser. Confirm there is no "session expired" message and no failed request in the network tab. - [ ] Confirm Pygmalion search and its login still work. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) Docs changed: `docs/characters/bot-browser.md`, `docs/TROUBLESHOOTING.md`, `docs/development/frontend.md`, `README.md`, `CHANGELOG.md`. The 18 removed English keys may also need removing from community locale files on `docs-i18n/ui`. ## UI evidence (if applicable) Desktop screenshot of the CharacterTavern notice: e2e attachment `chartavern-unavailable`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Changes** * CharacterTavern browsing and login are no longer available. The browser displays a notice with a link to CharacterTavern and guidance for downloading and importing cards. * Switching providers during a search no longer shows results or counts from the previous provider. * Pygmalion login guidance now clarifies that tokens must be entered again after a server restart. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:20:02 +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#7461
No description provided.