[PR #323] [MERGED] Per scheme convocolors #4559

Closed
opened 2026-10-22 04:08:43 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/323
Author: @jake9000
Created: 4/30/2026
Status: ✅ Merged
Merged: 5/3/2026
Merged by: @SpicyMarinara

Base: main ← Head: per-scheme-convocolors


📝 Commits (7)

  • bdd11d6 feat: save conversation theme per color-scheme
  • 68213d5 fix: use primary accent color for conversation theme scheme tabs
  • 237ebde Merge branch 'Pasta-Devs:main' into per-scheme-convocolors
  • 72fbe0f fix: restore theme override of default conversation gradient
  • 0451cb8 Merge branch 'main' into per-scheme-convocolors
  • 8a76d5b Added ConvoGradientTo
  • 04403a2 Merge branch 'main' into per-scheme-convocolors

📊 Changes

4 files changed (+125 additions, -49 deletions)

View changed files

📝 packages/client/src/components/chat/ConversationView.tsx (+12 -10)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+68 -25)
📝 packages/client/src/hooks/use-settings-sync.ts (+12 -0)
📝 packages/client/src/stores/ui.store.ts (+33 -14)

📄 Description

Linked issue

Closes #322

Summary

Stores the Conversation Theme background gradient separately for dark and light color schemes, so switching OS/browser theme automatically loads the correct gradient.

Why this change

Previously, the gradient was a single global setting. Users who customized it for dark mode would get a near-black background when switching to light mode — unreadable against dark text — and had to manually reconfigure each time. The code had a
workaround that detected the uncustomized default, but it broke as soon as anyone touched the color picker.

What changed

  • State shape (ui.store.ts): flat convoGradientFrom/convoGradientTo → nested convoGradient: { dark: { from, to }, light: { from, to } }. Store version bumped 10→11 with migration.
  • Settings UI (SettingsPanel.tsx): dark/light tab toggle added above the gradient controls. Preview and color pickers follow the active tab. Reset button is scheme-aware.
  • Conversation view (ConversationView.tsx): simplified to convoGradient[theme] — no more default-detection hack.
  • Settings sync (use-settings-sync.ts): runtime migration for incoming cross-device settings that may still use the old flat format.

Known limitations

  • Migration places old flat convoGradientFrom/convoGradientTo values into the dark bucket and gives light a fresh default (#f2eff7 / #eae6f0). This is correct for nearly all users (the old defaults were dark-mode colors), but if someone had
    customized the gradient specifically while in light mode, they'll need to re-set it once.

Validation

Stood up a fresh distrobox with fedora:latest and ran a clean install of ME using the per-scheme-convocolors branch.

  • 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
  • Read and followed CONTRIBUTING.md

Manual verification notes

  1. Verify original functionality
  • convo background changes between light and dark when on default colors just like it used to.
  1. Verify new functionality
  • Set custom convo colors in both modes. verified that they change when changing color scheme as intended.
  1. Edge cases
  • Used the F12 browser utility to change viewport to an iphone SE. did not observe any issues, and all functionality still worked.

Docs and release impact

  • No docs changes needed
  • [N/A] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • [N/A] Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Screenshot_20260430_001041 Screenshot_20260430_001023

Summary by CodeRabbit

  • New Features
    • Conversation background gradients can now be set separately for dark and light color schemes, with live preview and scheme-aware reset controls.
  • Bug Fixes / Improvements
    • Theme rendering now uses the active scheme’s gradient and falls back to the secondary color when using default endpoints.
  • Chores / Migration
    • Existing flat gradient settings are automatically migrated and preserved into the new per-scheme format.

🔄 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/323 **Author:** [@jake9000](https://github.com/jake9000) **Created:** 4/30/2026 **Status:** ✅ Merged **Merged:** 5/3/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `per-scheme-convocolors` --- ### 📝 Commits (7) - [`bdd11d6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bdd11d659902ed4fa7920b4ea41a3f961d7e78af) feat: save conversation theme per color-scheme - [`68213d5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68213d5e0ae4d18cf4752fcafae7f4905405f8ef) fix: use primary accent color for conversation theme scheme tabs - [`237ebde`](https://github.com/Pasta-Devs/Marinara-Engine/commit/237ebde007aa070b6c4661364f59bbe1d2cfec7f) Merge branch 'Pasta-Devs:main' into per-scheme-convocolors - [`72fbe0f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/72fbe0fba23fc2a1bca029a3696e8585bbb75368) fix: restore theme override of default conversation gradient - [`0451cb8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0451cb85d9167a49c655cfe76452451f3199e29f) Merge branch 'main' into per-scheme-convocolors - [`8a76d5b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8a76d5b1f1fd14abf08a3fb64d582b2cab24473a) Added ConvoGradientTo - [`04403a2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/04403a21eb9d43d05168b7f76c53a19cd9d86ba4) Merge branch 'main' into per-scheme-convocolors ### 📊 Changes **4 files changed** (+125 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ConversationView.tsx` (+12 -10) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+68 -25) 📝 `packages/client/src/hooks/use-settings-sync.ts` (+12 -0) 📝 `packages/client/src/stores/ui.store.ts` (+33 -14) </details> ### 📄 Description ## Linked issue Closes #322 ## Summary Stores the Conversation Theme background gradient separately for dark and light color schemes, so switching OS/browser theme automatically loads the correct gradient. ## Why this change Previously, the gradient was a single global setting. Users who customized it for dark mode would get a near-black background when switching to light mode — unreadable against dark text — and had to manually reconfigure each time. The code had a workaround that detected the uncustomized default, but it broke as soon as anyone touched the color picker. ## What changed - **State shape** (`ui.store.ts`): flat `convoGradientFrom`/`convoGradientTo` → nested `convoGradient: { dark: { from, to }, light: { from, to } }`. Store version bumped 10→11 with migration. - **Settings UI** (`SettingsPanel.tsx`): dark/light tab toggle added above the gradient controls. Preview and color pickers follow the active tab. Reset button is scheme-aware. - **Conversation view** (`ConversationView.tsx`): simplified to `convoGradient[theme]` — no more default-detection hack. - **Settings sync** (`use-settings-sync.ts`): runtime migration for incoming cross-device settings that may still use the old flat format. ## Known limitations - Migration places old flat `convoGradientFrom`/`convoGradientTo` values into the **dark** bucket and gives light a fresh default (`#f2eff7` / `#eae6f0`). This is correct for nearly all users (the old defaults were dark-mode colors), but if someone had customized the gradient specifically while in light mode, they'll need to re-set it once. ## Validation <!-- Required: include commands run and/or manual checks performed --> Stood up a fresh distrobox with fedora:latest and ran a clean install of ME using the per-scheme-convocolors branch. - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed - [X] Read and followed `CONTRIBUTING.md` ### Manual verification notes 1. Verify original functionality - convo background changes between light and dark when on default colors just like it used to. 2. Verify new functionality - Set custom convo colors in both modes. verified that they change when changing color scheme as intended. 3. Edge cases - Used the F12 browser utility to change viewport to an iphone SE. did not observe any issues, and all functionality still worked. ## Docs and release impact - [x] No docs changes needed - [N/A] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [N/A] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <img width="818" height="477" alt="Screenshot_20260430_001041" src="https://github.com/user-attachments/assets/8f585155-42e0-4922-859c-d2d802219908" /> <img width="818" height="477" alt="Screenshot_20260430_001023" src="https://github.com/user-attachments/assets/510a5cf1-f5ac-4442-ad8c-266aacc93abe" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Conversation background gradients can now be set separately for dark and light color schemes, with live preview and scheme-aware reset controls. * **Bug Fixes / Improvements** * Theme rendering now uses the active scheme’s gradient and falls back to the secondary color when using default endpoints. * **Chores / Migration** * Existing flat gradient settings are automatically migrated and preserved into the new per-scheme format. <!-- 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-22 04:08:43 +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#4559
No description provided.