[PR #7562] [MERGED] fix(chat): let Load More and history buttons follow the chat widget style #7798

Closed
opened 2026-10-24 04:07:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/themed-load-more-buttons


📝 Commits (2)

  • 6d534a3 fix(chat): let Load More and history pagers follow the chat style
  • a654fdd test(chat): prove Load More and Show older follow the chat style switches

📊 Changes

8 files changed (+289 additions, -28 deletions)

View changed files

➕ e2e/history-pager-widget-style.e2e.ts (+255 -0)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+2 -2)
📝 packages/client/src/components/chat/ConversationView.tsx (+2 -6)
📝 packages/client/src/components/chat/TranscriptWindowControls.tsx (+6 -4)
📝 packages/client/src/components/game/GameNarration.tsx (+4 -3)
📝 packages/client/src/components/game/GameSurface.tsx (+2 -1)
📝 packages/client/src/styles/themes/chat-widget-surfaces.css (+16 -10)
📝 scripts/regressions/open-issues.regression.ts (+2 -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 #7561

Why this change

  • With a chat widget style such as Mari or Dottore and its Apply preset font / shape / colors switches on, the chat's messages, input box and controls follow the preset, but the buttons that load older history did not. Load More, Show older and the Game log buttons kept their own card look and stood out from every other chat button. Mari asked for them to use the chat style.

What changed

  • One shared class, HISTORY_PAGER_BUTTON_CLASS in TranscriptWindowControls.tsx, now styles every in-chat history button. It is the class Show older already used, plus the chat-style opt-in (mari-chat-style-control) and a mari-chat-history-pager marker:
    • Roleplay and Visual Novel history Load More (ChatRoleplaySurface.tsx)
    • Conversation Load More (ConversationView.tsx)
    • Show older (N), Show newer (N) and Latest in Roleplay and Conversation (TranscriptWindowControls.tsx)
    • Game session logs Older (N), All and Show more older logs (N) (GameNarration.tsx), and combat logs Show more older logs (N) (GameSurface.tsx)
  • chat-widget-surfaces.css: the existing action-panel rules now also cover history pagers, so they keep their normal and hover fill under Apply preset shape alone, and keep the preset paint (not the gradient chrome) when the app accent is a gradient. The action-panel buttons keep the same selector weight as before, and the production build keeps the :is() selectors as written.
  • With the switches off, Load More now matches the Show older button beside it (the shared chat chrome button: same card fill, with the theme accent for border and text). The Game log buttons used fixed white-on-dark colors and now use theme colors, which also makes Older and All readable in light mode.
  • Copy, the loading spinner, the disabled state, the focus ring and accessible names are unchanged.
  • New e2e e2e/history-pager-widget-style.e2e.ts: Roleplay and Conversation, Dottore (dark) and Mari (light), with a gradient app accent, on desktop and phone. It checks that Load More matches Show older; that font, shape and colors each apply on their own; that custom gradient colors paint both buttons; that hover keeps the preset paint; and that turning the switches off restores the Default look. It fails on staging's code.
  • scripts/regressions/open-issues.regression.ts: the #3798 guard pinned the old constant TRANSCRIPT_WINDOW_BUTTON_CLASS. It now pins the renamed shared class. It still requires the same mari-chrome-control mari-chrome-control--small px-3 text-xs classes, all three transcript buttons using the class, and no muted text. It now also requires the chat-style opt-in, so it is stricter, not looser. This is the behaviour change requested in #7561.

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

Agent command notes (for the reviewer to confirm; boxes above are left for the human):

  • pnpm check: passed (localization, format, lint, e2e types, build).
  • pnpm localization:check: passed. No copy changed.
  • node ./scripts/run-regressions.mjs --filter agent-activation: passed (2/2).
  • node ./scripts/run-regressions.mjs --filter spatial-context: passed (1/1).
  • node ./scripts/run-regressions.mjs --filter open-issues: passed after the guard update described above (it failed before the update only on the renamed constant).
  • playwright test e2e/history-pager-widget-style.e2e.ts --project=desktop-chromium --project=mobile-chromium: 4/4 passed. With the component and CSS changes reverted to staging, the Dottore test fails at "Load More matches Show older".
  • playwright test e2e/message-action-widget-style.e2e.ts (shares the CSS rules I extended), desktop and phone: 4/4 passed.
  • core-flows "mobile Load More stays reachable beside the collapsed Echo Chamber" and "mobile reopening Echo Chamber and editing older Roleplay messages…": passed on rerun.
  • client-runtime-diagnostics "Roleplay edit and older-message scrolling…" (mobile): flaky on staging too. The first run after a server start hangs on the "Loading..." screen before the chat opens, and later runs pass. That happened on both staging's code (1 failed, 1 passed) and this branch (1 failed, 2 passed).
  • Local CodeRabbit (coderabbit review --agent --committed): one finding, on the guard update in open-issues.regression.ts. Kept, because Mari requested this behaviour change in #7561 and the guard is stricter, not looser (see What changed).

Manual verification notes

Manual verification needed:

  • Set Chat widget style to Dottore, turn on Apply preset font, Apply preset shape and Apply preset colors, open a long Roleplay chat with Messages per page set low, and confirm Load More and Show older match the other chat buttons on desktop and phone.
  • Repeat with Mari, with Default, and with custom Border, Background and Text colors, in light and dark mode.
  • Open the Visual Novel history in a long Roleplay chat and confirm its Load More matches.
  • In a long Conversation chat, confirm Load More and Show older match.
  • In Game mode, open Logs in a long session and confirm Older, All and Show more older logs follow the preset; do the same for the combat logs. These only appear once a session holds more messages than one page.
  • With the app accent set to a gradient and Apply preset colors on, hover the buttons and confirm they keep the preset paint.
  • With all three switches off, confirm Load More looks like the Show older button.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) 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)

UI evidence (if applicable)

Before/after screenshots (private page for the maintainer): https://claude.ai/artifact/NymMQDqLCqtwbUa8RVetHX

All shots come from the repo's Playwright setup, on desktop (1440 px) and phone (390 px):

  • Roleplay, Dottore dark, switches on: before, Load More is grey sans and Show older uses the pink app accent. After, both have cut corners, navy fill, blue text and monospace, matching the swipe arrows and composer buttons.
  • Roleplay, Mari light, phone: after, both use the cream fill, arched corners and serif font of the message bubbles.
  • Visual Novel history, Dottore dark: the history Load More follows the preset.
  • Game session logs, Dottore dark: Older, All and Show more older logs follow the preset, like the Logs button. These shots used a temporary page size of 2 so the buttons appear; that patch was not committed.
  • Game session logs, Default light, phone, switches off: before, Older and All are white on white. After, they are readable.
  • Roleplay, Default dark, phone, switches off: Load More now matches Show older.
  • Custom gradient colors and Conversation Mari light: after only.

🔄 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/7562 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/themed-load-more-buttons` --- ### 📝 Commits (2) - [`6d534a3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6d534a3ff1a9221cad107c7d6104e555503dfefd) fix(chat): let Load More and history pagers follow the chat style - [`a654fdd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a654fdd6f3a7229112c5962a2c04d254bb135a00) test(chat): prove Load More and Show older follow the chat style switches ### 📊 Changes **8 files changed** (+289 additions, -28 deletions) <details> <summary>View changed files</summary> ➕ `e2e/history-pager-widget-style.e2e.ts` (+255 -0) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+2 -2) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+2 -6) 📝 `packages/client/src/components/chat/TranscriptWindowControls.tsx` (+6 -4) 📝 `packages/client/src/components/game/GameNarration.tsx` (+4 -3) 📝 `packages/client/src/components/game/GameSurface.tsx` (+2 -1) 📝 `packages/client/src/styles/themes/chat-widget-surfaces.css` (+16 -10) 📝 `scripts/regressions/open-issues.regression.ts` (+2 -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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #7561 ## Why this change - With a chat widget style such as Mari or Dottore and its **Apply preset font / shape / colors** switches on, the chat's messages, input box and controls follow the preset, but the buttons that load older history did not. Load More, Show older and the Game log buttons kept their own card look and stood out from every other chat button. Mari asked for them to use the chat style. ## What changed - One shared class, `HISTORY_PAGER_BUTTON_CLASS` in `TranscriptWindowControls.tsx`, now styles every in-chat history button. It is the class Show older already used, plus the chat-style opt-in (`mari-chat-style-control`) and a `mari-chat-history-pager` marker: - Roleplay and Visual Novel history **Load More** (`ChatRoleplaySurface.tsx`) - Conversation **Load More** (`ConversationView.tsx`) - **Show older (N)**, **Show newer (N)** and **Latest** in Roleplay and Conversation (`TranscriptWindowControls.tsx`) - Game session logs **Older (N)**, **All** and **Show more older logs (N)** (`GameNarration.tsx`), and combat logs **Show more older logs (N)** (`GameSurface.tsx`) - `chat-widget-surfaces.css`: the existing action-panel rules now also cover history pagers, so they keep their normal and hover fill under **Apply preset shape** alone, and keep the preset paint (not the gradient chrome) when the app accent is a gradient. The action-panel buttons keep the same selector weight as before, and the production build keeps the `:is()` selectors as written. - With the switches off, Load More now matches the Show older button beside it (the shared chat chrome button: same card fill, with the theme accent for border and text). The Game log buttons used fixed white-on-dark colors and now use theme colors, which also makes Older and All readable in light mode. - Copy, the loading spinner, the disabled state, the focus ring and accessible names are unchanged. - New e2e `e2e/history-pager-widget-style.e2e.ts`: Roleplay and Conversation, Dottore (dark) and Mari (light), with a gradient app accent, on desktop and phone. It checks that Load More matches Show older; that font, shape and colors each apply on their own; that custom gradient colors paint both buttons; that hover keeps the preset paint; and that turning the switches off restores the Default look. It fails on staging's code. - `scripts/regressions/open-issues.regression.ts`: the #3798 guard pinned the old constant `TRANSCRIPT_WINDOW_BUTTON_CLASS`. It now pins the renamed shared class. It still requires the same `mari-chrome-control mari-chrome-control--small px-3 text-xs` classes, all three transcript buttons using the class, and no muted text. It now also requires the chat-style opt-in, so it is stricter, not looser. This is the behaviour change requested in #7561. ## 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` Agent command notes (for the reviewer to confirm; boxes above are left for the human): - `pnpm check`: passed (localization, format, lint, e2e types, build). - `pnpm localization:check`: passed. No copy changed. - `node ./scripts/run-regressions.mjs --filter agent-activation`: passed (2/2). - `node ./scripts/run-regressions.mjs --filter spatial-context`: passed (1/1). - `node ./scripts/run-regressions.mjs --filter open-issues`: passed after the guard update described above (it failed before the update only on the renamed constant). - `playwright test e2e/history-pager-widget-style.e2e.ts --project=desktop-chromium --project=mobile-chromium`: 4/4 passed. With the component and CSS changes reverted to staging, the Dottore test fails at "Load More matches Show older". - `playwright test e2e/message-action-widget-style.e2e.ts` (shares the CSS rules I extended), desktop and phone: 4/4 passed. - `core-flows` "mobile Load More stays reachable beside the collapsed Echo Chamber" and "mobile reopening Echo Chamber and editing older Roleplay messages…": passed on rerun. - `client-runtime-diagnostics` "Roleplay edit and older-message scrolling…" (mobile): flaky on staging too. The first run after a server start hangs on the "Loading..." screen before the chat opens, and later runs pass. That happened on both staging's code (1 failed, 1 passed) and this branch (1 failed, 2 passed). - Local CodeRabbit (`coderabbit review --agent --committed`): one finding, on the guard update in `open-issues.regression.ts`. Kept, because Mari requested this behaviour change in #7561 and the guard is stricter, not looser (see What changed). ### Manual verification notes Manual verification needed: - Set **Chat widget style** to Dottore, turn on **Apply preset font**, **Apply preset shape** and **Apply preset colors**, open a long Roleplay chat with **Messages per page** set low, and confirm **Load More** and **Show older** match the other chat buttons on desktop and phone. - Repeat with Mari, with Default, and with custom Border, Background and Text colors, in light and dark mode. - Open the Visual Novel history in a long Roleplay chat and confirm its Load More matches. - In a long Conversation chat, confirm Load More and Show older match. - In Game mode, open Logs in a long session and confirm **Older**, **All** and **Show more older logs** follow the preset; do the same for the combat logs. These only appear once a session holds more messages than one page. - With the app accent set to a gradient and Apply preset colors on, hover the buttons and confirm they keep the preset paint. - With all three switches off, confirm Load More looks like the Show older button. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) 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) ## UI evidence (if applicable) Before/after screenshots (private page for the maintainer): https://claude.ai/artifact/NymMQDqLCqtwbUa8RVetHX All shots come from the repo's Playwright setup, on desktop (1440 px) and phone (390 px): - Roleplay, Dottore dark, switches on: before, Load More is grey sans and Show older uses the pink app accent. After, both have cut corners, navy fill, blue text and monospace, matching the swipe arrows and composer buttons. - Roleplay, Mari light, phone: after, both use the cream fill, arched corners and serif font of the message bubbles. - Visual Novel history, Dottore dark: the history Load More follows the preset. - Game session logs, Dottore dark: Older, All and Show more older logs follow the preset, like the Logs button. These shots used a temporary page size of 2 so the buttons appear; that patch was not committed. - Game session logs, Default light, phone, switches off: before, Older and All are white on white. After, they are readable. - Roleplay, Default dark, phone, switches off: Load More now matches Show older. - Custom gradient colors and Conversation Mari light: after only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:07:35 +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#7798
No description provided.