[PR #7062] [MERGED] feat(ui): customize chat widget colors and refine presets #7451

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

📋 Pull Request Information

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

Base: staging ← Head: fix/mari-button-ornament


📝 Commits (10+)

  • 5d23fed fix(ui): remove Primogem from Mari widget buttons
  • 24e6faf fix(ui): join Mari sections and preserve preview palette
  • 2162639 feat(ui): customize widget colors and repair cut corners
  • d392078 fix(ui): apply solid widget text color to captions
  • fae5a3b test(ui): cover solid text and Default widget colors
  • 6e1e9fa Merge branch 'staging' into fix/mari-button-ornament
  • 78d0d22 Merge remote-tracking branch 'origin/staging' into fix/mari-button-ornament
  • 3944073 fix(ui): keep custom widget fields readable across modes
  • 505f898 Merge remote-tracking branch 'origin/fix/mari-button-ornament' into fix/mari-button-ornament
  • 9c701bb fix(ui): preserve native option contrast in custom widgets

📊 Changes

14 files changed (+1035 additions, -109 deletions)

View changed files

📝 CHANGELOG.md (+2 -1)
📝 docs/agents/memory.md (+1 -1)
📝 docs/appearance/custom-css-themes.md (+12 -2)
📝 e2e/chat-widget-style.e2e.ts (+295 -24)
📝 packages/client/src/App.tsx (+24 -0)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+116 -6)
📝 packages/client/src/components/ui/WindowBubble.tsx (+1 -0)
📝 packages/client/src/hooks/use-settings-sync.ts (+10 -0)
➕ packages/client/src/lib/chat-widget-colors.ts (+70 -0)
📝 packages/client/src/localization/locales/en.json (+10 -1)
📝 packages/client/src/stores/ui.store.ts (+36 -1)
📝 packages/client/src/styles/globals.css (+128 -43)
📝 packages/client/src/styles/themes/chat-widgets.css (+270 -21)
📝 scripts/regressions/chat-widget-style-persistence.regression.ts (+60 -9)

📄 Description

Linked issue

Closes #7061. Follow-up to the merged #7049. Targets staging.

Why this change

Changing a chat widget preset's colors currently requires custom CSS. This adds color controls below the existing Font and Shape options, and fixes the preset details requested after #7049: Mari's button ornament and separated section corners, Dottore's inner corners, and previews that inherit the animated app accent.

What changed

  • Add Border & Buttons Color, Background Color and Text Color below Font and Shape. Each supports a solid color picker or a gradient. Background Color fills buttons, windows, sections and editable fields together.
  • Border gradients use their first color for button icons. Text gradients appear on headings and labels; editable text uses the first text color. Decorative crests retain their original colors.
  • Save the colors with existing appearance preferences. Reset color restores that role's preset light/dark colors; choosing a preset resets Font, Shape and all three colors. Previews show the selected colors.
  • Remove Mari's button Primogem while keeping its window crest. Match its default button and window backgrounds, and give attached sections straight joining edges.
  • Align Dottore's inner corners with its cut-corner frame and make the shadow follow that shape. Keep preview icons on the selected preset palette when app accents pulse or cycle through RGB colors. Custom colors also reach title icons, editable fields and native dropdown arrows in light/dark mode.

Validation

Candidate revision: b0219a3451abfb7db32e2eddaae862c0277853f7, including current staging. Client source and widget tests are byte-identical to 807a29d5c.

  • Passed: pnpm check on the candidate (formatting, localization, type/lint checks and builds).

  • Passed: native ARM64 Docker build/runtime for the candidate, including health, built client HTML, guest JS/CSS, tutorial MP4, both ornament SVGs and exact commit/branch metadata. Image: sha256:1dd8328a4ec8819bccc00cef17d2b9cba71b8532c456aa28249618e8806faf8d.

  • Passed: node scripts/run-regressions.mjs --filter scripts/regressions/chat-widget-style-persistence.regression.ts — 1/1 on fae5a3bc7; persistence code is unchanged since that run. Covers normalization, local/server persistence and resets.

  • Passed: widget suite at 807a29d5c — 7 passed, 2 intentional mobile persistence skips. After integrating current staging, shell smoke passed 7/7 and compiled production startup passed 3/3 at the final candidate. Widget and production coverage includes desktop Chromium, mobile Chromium and mobile WebKit. The select-arrow regression assertion passes unchanged after correcting the CSS cascade.

  • Local CodeRabbit: completed on 2c2ef73be across 14 files with one minor suggestion, traced and not applied. It proposed an internal --mari-widget-bubble-bg fallback. That variable is only reset to initial and read; no current preset or caller assigns it. The documented public --mari-window-bubble-bg already takes precedence in both paint paths. Shared button/window backgrounds are intentional. The final one-line select-color delta at 807a29d5c was reviewed separately and completed with zero additional findings.

  • Hosted checks and hosted CodeRabbit review must complete on the final pushed head before merging.

  • 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

Manual verification notes

  • Manually verify all three color controls in Default, Dottore and Mari, in light/dark mode and desktop/phone views. Try solid colors and gradients; check the previews and actual chat controls.
  • Manually verify gradient headings/labels, first-color icons and editable text, and unchanged ornament colors.
  • Manually reset one color, switch light/dark mode, then choose another preset. Check that the individual reset leaves other choices intact and preset selection resets Font, Shape and all colors.
  • Manually reload and open another browser connected to the same server to verify saved appearance preferences.
  • Manually verify Mari's joined sections while expanding and scrolling, matching button/window fill, absent button Primogem and retained window crest. Check Dottore's inner corners and the Shape overrides.
  • Manually enable a pulsing or RGB app accent and verify that preset preview icons retain their selected colors.

Mobile browser checks use emulation; physical phones have not been tested.

Docs and release impact

Updated docs/appearance/custom-css-themes.md, corrected the Advanced Recall status path in docs/agents/memory.md, and updated canonical English UI copy and the Unreleased changelog. Translation follow-up #7054 is being implemented in separate language-pack PRs #7065, #7068, #7069 and #7070, including color controls, reset behavior and ornament clarification. No version or storage-format bump.

  • 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)

UI evidence

Visual evidence: 17-image gallery. The original eight images remain unchanged; nine inspected additions include historical before captures and final 807a29d5c130ac855e3d6d7790b777b7a15be634 captures. All 17 remote PNG SHA-256 hashes were verified against the local manifest.

At 807a29d5c: widget browser matrix 7 passed / 2 intentional mobile persistence skips; shell smoke 7/7; production smoke 3/3. Phone evidence uses browser emulation, not physical devices.

The final staging integration at b0219a345 leaves all client source, widget tests and persistence code byte-identical to the photographed 807a29d5c revision.

Summary by CodeRabbit

  • New Features
    • Customize chat widget border and button, background, and text colors with solid colors or gradients. Preview changes in settings and apply them to the chat widget.
    • Choosing a style preset or resetting appearance clears custom color overrides; individual color controls can be reset to their preset defaults.
  • Documentation
    • Updated style guides with details about widget colors and preset behavior.
    • Updated guidance on where to find scene-preparation status in chat settings.

🔄 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/7062 **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/mari-button-ornament` --- ### 📝 Commits (10+) - [`5d23fed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5d23fed68aa156a09b1c93987a2c49d3667d9bd8) fix(ui): remove Primogem from Mari widget buttons - [`24e6faf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/24e6faf37aa5700bdf9d29608e555c1b0e2d6311) fix(ui): join Mari sections and preserve preview palette - [`2162639`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2162639253e9261334a3834d318ff32c5e3ea8f6) feat(ui): customize widget colors and repair cut corners - [`d392078`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d392078789025c91d3685a0153d663207891a9ae) fix(ui): apply solid widget text color to captions - [`fae5a3b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fae5a3bc746511d753e3ca28996de0fc87911c63) test(ui): cover solid text and Default widget colors - [`6e1e9fa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6e1e9fae560ad7588baa43b9c55e3e51789cf6e6) Merge branch 'staging' into fix/mari-button-ornament - [`78d0d22`](https://github.com/Pasta-Devs/Marinara-Engine/commit/78d0d22213319c17f284b5e41a1584273896cc46) Merge remote-tracking branch 'origin/staging' into fix/mari-button-ornament - [`3944073`](https://github.com/Pasta-Devs/Marinara-Engine/commit/39440737a724e0afbe547a15f1138846b10daa26) fix(ui): keep custom widget fields readable across modes - [`505f898`](https://github.com/Pasta-Devs/Marinara-Engine/commit/505f8986915b1ebc1c55ee07808cd3dd7f47c1ba) Merge remote-tracking branch 'origin/fix/mari-button-ornament' into fix/mari-button-ornament - [`9c701bb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9c701bb4ca58e58ca0a4b8d09bc3843fcb42312d) fix(ui): preserve native option contrast in custom widgets ### 📊 Changes **14 files changed** (+1035 additions, -109 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -1) 📝 `docs/agents/memory.md` (+1 -1) 📝 `docs/appearance/custom-css-themes.md` (+12 -2) 📝 `e2e/chat-widget-style.e2e.ts` (+295 -24) 📝 `packages/client/src/App.tsx` (+24 -0) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+116 -6) 📝 `packages/client/src/components/ui/WindowBubble.tsx` (+1 -0) 📝 `packages/client/src/hooks/use-settings-sync.ts` (+10 -0) ➕ `packages/client/src/lib/chat-widget-colors.ts` (+70 -0) 📝 `packages/client/src/localization/locales/en.json` (+10 -1) 📝 `packages/client/src/stores/ui.store.ts` (+36 -1) 📝 `packages/client/src/styles/globals.css` (+128 -43) 📝 `packages/client/src/styles/themes/chat-widgets.css` (+270 -21) 📝 `scripts/regressions/chat-widget-style-persistence.regression.ts` (+60 -9) </details> ### 📄 Description ## Linked issue Closes #7061. Follow-up to the merged #7049. Targets `staging`. ## Why this change Changing a chat widget preset's colors currently requires custom CSS. This adds color controls below the existing Font and Shape options, and fixes the preset details requested after #7049: Mari's button ornament and separated section corners, Dottore's inner corners, and previews that inherit the animated app accent. ## What changed - Add **Border & Buttons Color**, **Background Color** and **Text Color** below Font and Shape. Each supports a solid color picker or a gradient. Background Color fills buttons, windows, sections and editable fields together. - Border gradients use their first color for button icons. Text gradients appear on headings and labels; editable text uses the first text color. Decorative crests retain their original colors. - Save the colors with existing appearance preferences. **Reset color** restores that role's preset light/dark colors; choosing a preset resets Font, Shape and all three colors. Previews show the selected colors. - Remove Mari's button Primogem while keeping its window crest. Match its default button and window backgrounds, and give attached sections straight joining edges. - Align Dottore's inner corners with its cut-corner frame and make the shadow follow that shape. Keep preview icons on the selected preset palette when app accents pulse or cycle through RGB colors. Custom colors also reach title icons, editable fields and native dropdown arrows in light/dark mode. ## Validation Candidate revision: `b0219a3451abfb7db32e2eddaae862c0277853f7`, including current staging. Client source and widget tests are byte-identical to `807a29d5c`. - **Passed:** `pnpm check` on the candidate (formatting, localization, type/lint checks and builds). - **Passed:** native ARM64 Docker build/runtime for the candidate, including health, built client HTML, guest JS/CSS, tutorial MP4, both ornament SVGs and exact commit/branch metadata. Image: `sha256:1dd8328a4ec8819bccc00cef17d2b9cba71b8532c456aa28249618e8806faf8d`. - **Passed:** `node scripts/run-regressions.mjs --filter scripts/regressions/chat-widget-style-persistence.regression.ts` — 1/1 on `fae5a3bc7`; persistence code is unchanged since that run. Covers normalization, local/server persistence and resets. - **Passed:** widget suite at `807a29d5c` — 7 passed, 2 intentional mobile persistence skips. After integrating current staging, shell smoke passed 7/7 and compiled production startup passed 3/3 at the final candidate. Widget and production coverage includes desktop Chromium, mobile Chromium and mobile WebKit. The select-arrow regression assertion passes unchanged after correcting the CSS cascade. - **Local CodeRabbit:** completed on `2c2ef73be` across 14 files with one minor suggestion, traced and not applied. It proposed an internal `--mari-widget-bubble-bg` fallback. That variable is only reset to `initial` and read; no current preset or caller assigns it. The documented public `--mari-window-bubble-bg` already takes precedence in both paint paths. Shared button/window backgrounds are intentional. The final one-line select-color delta at `807a29d5c` was reviewed separately and completed with zero additional findings. - Hosted checks and hosted CodeRabbit review must complete on the final pushed head before merging. - [ ] `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` ### Manual verification notes - [ ] Manually verify all three color controls in Default, Dottore and Mari, in light/dark mode and desktop/phone views. Try solid colors and gradients; check the previews and actual chat controls. - [ ] Manually verify gradient headings/labels, first-color icons and editable text, and unchanged ornament colors. - [ ] Manually reset one color, switch light/dark mode, then choose another preset. Check that the individual reset leaves other choices intact and preset selection resets Font, Shape and all colors. - [ ] Manually reload and open another browser connected to the same server to verify saved appearance preferences. - [ ] Manually verify Mari's joined sections while expanding and scrolling, matching button/window fill, absent button Primogem and retained window crest. Check Dottore's inner corners and the Shape overrides. - [ ] Manually enable a pulsing or RGB app accent and verify that preset preview icons retain their selected colors. Mobile browser checks use emulation; physical phones have not been tested. ## Docs and release impact Updated `docs/appearance/custom-css-themes.md`, corrected the Advanced Recall status path in `docs/agents/memory.md`, and updated canonical English UI copy and the Unreleased changelog. Translation follow-up #7054 is being implemented in separate language-pack PRs #7065, #7068, #7069 and #7070, including color controls, reset behavior and ornament clarification. No version or storage-format bump. - [ ] 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) ## UI evidence Visual evidence: [17-image gallery](https://gist.github.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b). The original eight images remain unchanged; nine inspected additions include historical before captures and final `807a29d5c130ac855e3d6d7790b777b7a15be634` captures. All 17 remote PNG SHA-256 hashes were verified against the local manifest. - Dottore cut corners: [before (24e6faf37)](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/before-dottore-corner-desktop-light.png) → [after (807a29d5c)](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/after-dottore-corner-desktop-light.png). - Light-mode custom native fields: [before (fae5a3bc7)](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/before-colors-profile-light.png) → [after (807a29d5c)](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/after-colors-profile-light.png). - Final examples: [Dottore dark](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/after-colors-dottore-desktop-dark.png), [Mari dark](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/after-colors-mari-desktop-dark.png), [Default light](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/after-colors-default-desktop-light.png), [Mari WebKit phone light](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/after-colors-mari-phone-light.png), [all three Appearance color controls](https://gist.githubusercontent.com/SpicyMarinara/26d9e059f3fff34322b907716047c59b/raw/bb4bfbfc074d5a9a1505db18f6c1f05f2fd7a566/after-colors-settings-controls.png). At `807a29d5c`: widget browser matrix 7 passed / 2 intentional mobile persistence skips; shell smoke 7/7; production smoke 3/3. Phone evidence uses browser emulation, not physical devices. The final staging integration at `b0219a345` leaves all client source, widget tests and persistence code byte-identical to the photographed `807a29d5c` revision. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Customize chat widget border and button, background, and text colors with solid colors or gradients. Preview changes in settings and apply them to the chat widget. * Choosing a style preset or resetting appearance clears custom color overrides; individual color controls can be reset to their preset defaults. * **Documentation** * Updated style guides with details about widget colors and preset behavior. * Updated guidance on where to find scene-preparation status in chat settings. <!-- 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:19:57 +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#7451
No description provided.