[PR #7249] [MERGED] fix(chat): keep framed chat buttons' inner ring when the border colour changes #7645

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

📋 Pull Request Information

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

Base: staging ← Head: fix/arched-widget-icon-7244


📝 Commits (7)

  • c4f3f23 fix(chat): keep framed chat buttons' inner ring when the border colour changes
  • 4887dea Merge origin/staging into fix/arched-widget-icon-7244
  • 5faf72b test(chat): check the inner button ring on every preset shape (#7244)
  • 1ccac28 docs(changelog): match the Chat widget style label in the #7244 entry
  • 6da20ca Merge remote-tracking branch 'origin/fix/arched-widget-icon-7244' into HEAD
  • a51691d test(chat): check the inner ring on Cut corners buttons with custom colours
  • 7a9d3d3 Merge origin/staging into fix/arched-widget-icon-7244

📊 Changes

4 files changed (+41 additions, -3 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 e2e/chat-widget-style.e2e.ts (+20 -0)
📝 e2e/phone-bubbles.e2e.ts (+8 -0)
📝 packages/client/src/styles/themes/chat-widgets.css (+12 -3)

📄 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 #7244

Why this change

  • Dreamy reported on Discord (v2.5.0, Windows Edge app) that the arched chat widget icon loses its inner circle as soon as Border & Buttons Color is changed. It is Mari's preset: Mari's Preset shape is Arched, and the inner circle is Mari's thin gold inner button ring.
  • The cause is the custom-border mode itself, not the colour. Picking Mari's own gold also removes the ring. So does a gradient. Background Color and Text Color alone keep it.
  • In that mode a button stops drawing its own frame. The .mari-window-bubble__paint layer draws it instead, so gradients work. That layer redraws only the outline and the fill. The two things that drew the inner ring are switched off: the button shadow (Mari) and the ::after ornament (Dottore, and every preset with Cut corners). Window frames don't have this problem because .mari-window::after already redraws their inner frame with --mari-widget-frame-shadow.
  • The same loss happens for Mari on every shape, for Dottore on every shape, and for Default + Cut corners. It affects the preview cards, the real Chat Settings button, minimized-window buttons and the phone tool buttons, because they all use the same markup. Default on its other shapes has no inner ring.

What changed

  • packages/client/src/styles/themes/chat-widgets.css: the paint layer's inner fill now redraws the preset's inner ring, the same way window frames redraw theirs.
    • New --mari-widget-button-ring for Mari and Dottore: a 2px gap in the background colour, then a 1px ring in the border colour. In custom-border mode those are the user's chosen colours.
    • Mari's existing --mari-widget-button-shadow now reuses it. The computed value is unchanged.
    • .mari-window-bubble__paint::after gets box-shadow: var(--mari-widget-ornament-shadow, var(--mari-widget-button-ring, none)). Cut corners already defines exactly that ring as --mari-widget-ornament-shadow, so every preset with Cut corners is covered without touching that block. Default on other shapes stays none.
    • Preview cards reset --mari-widget-button-ring like the other preset tokens, so an unselected card never picks up the live preset's ring.
    • The geometry matches the original ring: same 2px gap, same 1px ring, cut the same way on cut corners. No hard-coded colours; nothing pulses.
  • e2e/chat-widget-style.e2e.ts: new expectButtonRing check in the existing colour-controls flow. No existing assertion changed. After gradient colours are applied, the selected preview button and the real Chat Settings button must draw the gap in the background's first colour and the ring in the border's first colour. It covers Mari (Arched, button-ring path) and Dottore (Cut corners, ornament path), and checks that Default stays none.
  • e2e/phone-bubbles.e2e.ts: the existing phone Chat tools preset and shape loop now also checks the inner ring under custom gradient paint. It covers Dottore on Rounded and Arched, Mari on Square and Cut corners, and Default with no ring. No existing assertion changed. Without this, removing Dottore from the new ring token would pass every test.
  • CHANGELOG.md: entry under [Unreleased].
  • No copy, localization, docs or TypeScript changes.

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-run checks (for reference; the boxes above are for the human reviewer):

  • pnpm check exited 0.
  • playwright test e2e/chat-widget-style.e2e.ts on desktop-chromium and mobile-webkit: 11 passed, 1 skipped (the existing desktop-only skip).
  • The new assertion with the origin/staging CSS: widget presets preserve Default… failed in dark and light on both projects (4 failed, Received: "none"). With this fix it passes.
  • playwright test e2e/phone-bubbles.e2e.ts -g "follows every preset and shape override" on mobile-chromium and mobile-webkit: 4 passed with the fix. It fails on dottore/rounded when Dottore is removed from the ring token, and in all 4 runs with the origin/staging CSS (Received: "none").
  • Before the fix, a sweep captured the selected preview button for every combination: 3 presets x 5 shapes x 9 colour cases x light/dark, on both browsers. With the fix, every case without a custom border keeps identical layers. Under a custom border, only the paint layer's inner ring changes, and only in the 22 combinations that had lost it.

Manual verification notes

  • Manually verify in a browser: Settings > Appearance > Chat Widget Style, pick Mari with Preset shape (Arched), then set Border & Buttons Color to any solid colour. The preview button and the real Chat Settings button in a chat should keep both circles: the outer outline and the thin inner ring, both in the chosen colour. Check light and dark mode.
  • Manually verify the same with Dottore (Preset shape and Arched) and with Cut corners, including a gradient border. The inner ring should take the gradient's first colour.
  • Manually verify Default with Rounded is unchanged with and without a border colour (no inner ring).
  • Manually verify that minimized-window buttons and the phone tool buttons on a phone-width viewport keep the inner ring under a custom border.
  • Manually verify that Background Color or Text Color alone still leaves the buttons looking as before.

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)

The only doc change is the CHANGELOG entry. The --mari-widget-* variables are internal, and the public --mari-window-bubble-* hooks are unchanged.

UI evidence (if applicable)

Screenshots were captured locally and are not attached. What they show, for Mari + Arched in dark mode on desktop Chromium:

  • Before, with no custom colour: two gold circles, the outer outline and a thin inner ring.
  • On staging after setting a teal Border & Buttons Color: a single teal outline; the inner ring is gone.
  • With this fix: the teal outline plus a thin teal inner ring, with a dark gap between them, matching the original layout.

The same holds on mobile WebKit, in light mode, for Dottore, and for the real Chat Settings button.

Summary by CodeRabbit

  • Bug Fixes
    • Changing Border & Buttons Color in Chat Widget Style preserves the thin inner ring on Mari’s arched round buttons, Dottore’s buttons, and Cut corners buttons. The ring uses the selected border color and remains visible in the preview and chat settings.
    • Phone chat buttons with customized gradient colors retain their inner ring. The default preset continues to display no inner ring.

🔄 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/7249 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/7/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/arched-widget-icon-7244` --- ### 📝 Commits (7) - [`c4f3f23`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c4f3f23e5d8d88ce21b9d459c299d14a247baee0) fix(chat): keep framed chat buttons' inner ring when the border colour changes - [`4887dea`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4887dea9a67fee4a8127f562dca64c415bac553b) Merge origin/staging into fix/arched-widget-icon-7244 - [`5faf72b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5faf72bb152755ca09e35e392b663ec52007b602) test(chat): check the inner button ring on every preset shape (#7244) - [`1ccac28`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1ccac28c6e67110230fceece96f9ebbc9512a812) docs(changelog): match the Chat widget style label in the #7244 entry - [`6da20ca`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6da20ca481a98c8b57278a08f648f9daa05ca31e) Merge remote-tracking branch 'origin/fix/arched-widget-icon-7244' into HEAD - [`a51691d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a51691dc6e4ea0ce53f9289b149d9808ed9c06f7) test(chat): check the inner ring on Cut corners buttons with custom colours - [`7a9d3d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7a9d3d3d90e2b362ba7c71d1ea0a1237b5e04be4) Merge origin/staging into fix/arched-widget-icon-7244 ### 📊 Changes **4 files changed** (+41 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `e2e/chat-widget-style.e2e.ts` (+20 -0) 📝 `e2e/phone-bubbles.e2e.ts` (+8 -0) 📝 `packages/client/src/styles/themes/chat-widgets.css` (+12 -3) </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 #7244 ## Why this change - Dreamy reported on Discord (v2.5.0, Windows Edge app) that the arched chat widget icon loses its inner circle as soon as **Border & Buttons Color** is changed. It is Mari's preset: Mari's **Preset shape** is Arched, and the inner circle is Mari's thin gold inner button ring. - The cause is the custom-border mode itself, not the colour. Picking Mari's own gold also removes the ring. So does a gradient. **Background Color** and **Text Color** alone keep it. - In that mode a button stops drawing its own frame. The `.mari-window-bubble__paint` layer draws it instead, so gradients work. That layer redraws only the outline and the fill. The two things that drew the inner ring are switched off: the button shadow (Mari) and the `::after` ornament (Dottore, and every preset with **Cut corners**). Window frames don't have this problem because `.mari-window::after` already redraws their inner frame with `--mari-widget-frame-shadow`. - The same loss happens for Mari on every shape, for Dottore on every shape, and for Default + **Cut corners**. It affects the preview cards, the real Chat Settings button, minimized-window buttons and the phone tool buttons, because they all use the same markup. Default on its other shapes has no inner ring. ## What changed - `packages/client/src/styles/themes/chat-widgets.css`: the paint layer's inner fill now redraws the preset's inner ring, the same way window frames redraw theirs. - New `--mari-widget-button-ring` for Mari and Dottore: a 2px gap in the background colour, then a 1px ring in the border colour. In custom-border mode those are the user's chosen colours. - Mari's existing `--mari-widget-button-shadow` now reuses it. The computed value is unchanged. - `.mari-window-bubble__paint::after` gets `box-shadow: var(--mari-widget-ornament-shadow, var(--mari-widget-button-ring, none))`. **Cut corners** already defines exactly that ring as `--mari-widget-ornament-shadow`, so every preset with Cut corners is covered without touching that block. Default on other shapes stays `none`. - Preview cards reset `--mari-widget-button-ring` like the other preset tokens, so an unselected card never picks up the live preset's ring. - The geometry matches the original ring: same 2px gap, same 1px ring, cut the same way on cut corners. No hard-coded colours; nothing pulses. - `e2e/chat-widget-style.e2e.ts`: new `expectButtonRing` check in the existing colour-controls flow. No existing assertion changed. After gradient colours are applied, the selected preview button and the real Chat Settings button must draw the gap in the background's first colour and the ring in the border's first colour. It covers Mari (Arched, button-ring path) and Dottore (Cut corners, ornament path), and checks that Default stays `none`. - `e2e/phone-bubbles.e2e.ts`: the existing phone Chat tools preset and shape loop now also checks the inner ring under custom gradient paint. It covers Dottore on Rounded and Arched, Mari on Square and Cut corners, and Default with no ring. No existing assertion changed. Without this, removing Dottore from the new ring token would pass every test. - `CHANGELOG.md`: entry under `[Unreleased]`. - No copy, localization, docs or TypeScript changes. ## 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-run checks (for reference; the boxes above are for the human reviewer): - `pnpm check` exited 0. - `playwright test e2e/chat-widget-style.e2e.ts` on `desktop-chromium` and `mobile-webkit`: 11 passed, 1 skipped (the existing desktop-only skip). - The new assertion with the `origin/staging` CSS: `widget presets preserve Default…` failed in dark and light on both projects (4 failed, `Received: "none"`). With this fix it passes. - `playwright test e2e/phone-bubbles.e2e.ts -g "follows every preset and shape override"` on `mobile-chromium` and `mobile-webkit`: 4 passed with the fix. It fails on `dottore/rounded` when Dottore is removed from the ring token, and in all 4 runs with the `origin/staging` CSS (`Received: "none"`). - Before the fix, a sweep captured the selected preview button for every combination: 3 presets x 5 shapes x 9 colour cases x light/dark, on both browsers. With the fix, every case without a custom border keeps identical layers. Under a custom border, only the paint layer's inner ring changes, and only in the 22 combinations that had lost it. ### Manual verification notes - Manually verify in a browser: **Settings > Appearance > Chat Widget Style**, pick **Mari** with **Preset shape** (Arched), then set **Border & Buttons Color** to any solid colour. The preview button and the real **Chat Settings** button in a chat should keep both circles: the outer outline and the thin inner ring, both in the chosen colour. Check light and dark mode. - Manually verify the same with **Dottore** (Preset shape and Arched) and with **Cut corners**, including a gradient border. The inner ring should take the gradient's first colour. - Manually verify **Default** with **Rounded** is unchanged with and without a border colour (no inner ring). - Manually verify that minimized-window buttons and the phone tool buttons on a phone-width viewport keep the inner ring under a custom border. - Manually verify that **Background Color** or **Text Color** alone still leaves the buttons looking as before. ## 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) The only doc change is the CHANGELOG entry. The `--mari-widget-*` variables are internal, and the public `--mari-window-bubble-*` hooks are unchanged. ## UI evidence (if applicable) Screenshots were captured locally and are not attached. What they show, for Mari + Arched in dark mode on desktop Chromium: - Before, with no custom colour: two gold circles, the outer outline and a thin inner ring. - On `staging` after setting a teal **Border & Buttons Color**: a single teal outline; the inner ring is gone. - With this fix: the teal outline plus a thin teal inner ring, with a dark gap between them, matching the original layout. The same holds on mobile WebKit, in light mode, for Dottore, and for the real Chat Settings button. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Changing **Border & Buttons Color** in **Chat Widget Style** preserves the thin inner ring on Mari’s arched round buttons, Dottore’s buttons, and **Cut corners** buttons. The ring uses the selected border color and remains visible in the preview and chat settings. * Phone chat buttons with customized gradient colors retain their inner ring. The default preset continues to display no inner ring. <!-- 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-24 04:06:09 +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#7645
No description provided.