[PR #5701] [MERGED] feat(client): enlarge a browsed character card image on click #6891

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5701
Author: @Gunterlie
Created: 8/31/2026
Status: ✅ Merged
Merged: 8/31/2026
Merged by: @Gunterlie

Base: staging ← Head: feat/bot-browser-avatar-zoom


📝 Commits (3)

  • 9be9d02 feat(client): enlarge a browsed character card image on click
  • 5aa4840 feat(bot-browser): serve the card PNG to the enlarged image view
  • 3688d9e Merge branch 'staging' into feat/bot-browser-avatar-zoom

📊 Changes

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

View changed files

📝 packages/client/src/components/bot-browser/BotBrowserView.tsx (+73 -6)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/server/src/routes/bot-browser.routes.ts (+8 -3)

📄 Description

Closes #5691

Why

In the online card browser, the card image on the detail page is a 224px square with object-cover, so it is both small and cropped, and clicking it did nothing. The request was to enlarge it "and in better quality".

What

1. Click to enlarge. The detail-page image is now a button that opens a full-screen overlay showing the image uncropped (object-contain, up to 90vw/90vh). Escape or a backdrop click closes it.

2. Actually higher quality. The thumbnail the browser shows is ChubAI's compressed avatar.webp. GET /api/bot-browser/chub/avatar/* now accepts full=1, which prefers chara_card_v2.png — the same full card PNG the import path downloads — and still falls back to avatar.webp. The overlay requests full=1, and falls back to the thumbnail URL if that image fails to load.

Providers other than ChubAI expose one image through their proxy route, so the overlay shows that same asset, larger and uncropped.

Adds two en.json keys; other locales fall back to English until translated.

Test plan

  • pnpm check
  • Manually open the bot browser on a ChubAI card and click the detail-page image
  • Manually confirm in devtools that the overlay requests ?full=1 and that the returned image is larger than the thumbnail
  • Manually verify a ChubAI card that has no chara_card_v2.png still shows the thumbnail in the overlay rather than a broken image
  • Manually verify the overlay on a non-Chub provider (JannyAI, CharacterTavern, Pygmalion, Wyvern, DataCat)
  • Manually verify Escape and a backdrop click both close the overlay
  • Manually verify keyboard focus reaches the image button and Enter opens the overlay
  • Manually verify a card with a broken or missing avatar still shows the placeholder and is not clickable

🔄 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/5701 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 8/31/2026 **Status:** ✅ Merged **Merged:** 8/31/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `feat/bot-browser-avatar-zoom` --- ### 📝 Commits (3) - [`9be9d02`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9be9d027f4f23772ad66243426ab3dbd5476b483) feat(client): enlarge a browsed character card image on click - [`5aa4840`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5aa4840c25a47e719164e072b6b87e12438c49a5) feat(bot-browser): serve the card PNG to the enlarged image view - [`3688d9e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3688d9ed9c8e2123a245ed21653eac83b9cbae20) Merge branch 'staging' into feat/bot-browser-avatar-zoom ### 📊 Changes **3 files changed** (+83 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/bot-browser/BotBrowserView.tsx` (+73 -6) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/server/src/routes/bot-browser.routes.ts` (+8 -3) </details> ### 📄 Description Closes #5691 ## Why In the online card browser, the card image on the detail page is a 224px square with `object-cover`, so it is both small and cropped, and clicking it did nothing. The request was to enlarge it "and in better quality". ## What **1. Click to enlarge.** The detail-page image is now a button that opens a full-screen overlay showing the image uncropped (`object-contain`, up to 90vw/90vh). Escape or a backdrop click closes it. **2. Actually higher quality.** The thumbnail the browser shows is ChubAI's compressed `avatar.webp`. `GET /api/bot-browser/chub/avatar/*` now accepts `full=1`, which prefers `chara_card_v2.png` — the same full card PNG the import path downloads — and still falls back to `avatar.webp`. The overlay requests `full=1`, and falls back to the thumbnail URL if that image fails to load. Providers other than ChubAI expose one image through their proxy route, so the overlay shows that same asset, larger and uncropped. Adds two `en.json` keys; other locales fall back to English until translated. ## Test plan - [ ] `pnpm check` - [ ] Manually open the bot browser on a ChubAI card and click the detail-page image - [ ] Manually confirm in devtools that the overlay requests `?full=1` and that the returned image is larger than the thumbnail - [ ] Manually verify a ChubAI card that has no `chara_card_v2.png` still shows the thumbnail in the overlay rather than a broken image - [ ] Manually verify the overlay on a non-Chub provider (JannyAI, CharacterTavern, Pygmalion, Wyvern, DataCat) - [ ] Manually verify Escape and a backdrop click both close the overlay - [ ] Manually verify keyboard focus reaches the image button and Enter opens the overlay - [ ] Manually verify a card with a broken or missing avatar still shows the placeholder and is not clickable --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:14:39 +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#6891
No description provided.