[PR #217] [CLOSED] bugfix: Replace hardcoded dark colors with CSS theme variables for light mode support #4512

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/217
Author: @Javedz678
Created: 4/24/2026
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (2)

  • be9523b bugfix: Remove hardcoded darkmode
  • 9acc060 Merge branch 'main' into main

📊 Changes

15 files changed (+280 additions, -266 deletions)

View changed files

📝 packages/client/src/components/chat/ChatInput.tsx (+14 -14)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+26 -21)
📝 packages/client/src/components/chat/ConversationInput.tsx (+3 -3)
📝 packages/client/src/components/chat/ConversationMessage.tsx (+4 -4)
📝 packages/client/src/components/chat/ConversationView.tsx (+23 -28)
📝 packages/client/src/components/chat/CyoaChoices.tsx (+10 -10)
📝 packages/client/src/components/chat/EncounterModal.tsx (+21 -21)
📝 packages/client/src/components/chat/HomeFaq.tsx (+17 -17)
📝 packages/client/src/components/chat/RoleplayHUD.tsx (+21 -21)
📝 packages/client/src/components/chat/RoleplayHUDPanels.tsx (+72 -70)
📝 packages/client/src/components/game/GameInput.tsx (+14 -14)
📝 packages/client/src/components/game/GameNarration.tsx (+29 -24)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+3 -3)
📝 packages/client/src/components/game/GameSurface.tsx (+16 -14)
📝 packages/client/src/styles/globals.css (+7 -2)

📄 Description

Make UI clean and readable

Why this change

User raised bug.
All UI was built dark-first with hardcoded white/, bg-black/, and #1a1a2e values. Switching to light mode made text invisible, backgrounds black, and borders disappear throughout.

What changed

Replaced hardcoded dark colors with CSS variable equivalents (var(--foreground), var(--card), var(--border), var(--muted)) + dark: fallbacks across 15 files
Scoped .rpg-chat-area .mari-message-content to keep RP message text light on its always-dark background regardless of theme
Suppressed the default dark chat gradient in light mode (ConversationView)
Extracted repeated class strings into named constants to eliminate duplication (SURFACE_BTN, NARRATION_ACTION_BTN, HEADER_BTN, EMPTY_STATE, PANEL_BACKDROP/PANEL_CONTAINER)
Fixed purple-300 active states (agent processing, EchoChamber, Characters widget) to use purple-600 dark:purple-300 for legible contrast on light backgrounds

Validation

  • pnpm check
  • Manual verification completed (describe below)

Manual verification notes

Visually confirmed UI wherever changes were made.

Docs and release impact

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

UI evidence (if applicable)

Screenshot 2026-04-25 at 12 36 32 AM Screenshot 2026-04-25 at 12 27 02 AM Screenshot 2026-04-25 at 12 26 42 AM Screenshot 2026-04-25 at 12 26 13 AM Screenshot 2026-04-25 at 12 25 09 AM Screenshot 2026-04-25 at 12 24 46 AM

Summary by CodeRabbit

  • Style
    • Enhanced UI theming system across chat, roleplay, game, and interface components for improved visual consistency.
    • Improved dark mode support with refined color palettes and explicit dark-mode styling variants.
    • Standardized component styling using shared design tokens for more cohesive appearance.

🔄 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/217 **Author:** [@Javedz678](https://github.com/Javedz678) **Created:** 4/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`be9523b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/be9523becfa9ae067d2e5feb3ab36ae88845e7cd) bugfix: Remove hardcoded darkmode - [`9acc060`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9acc060fca500d25911c85d4aa8773866bef8401) Merge branch 'main' into main ### 📊 Changes **15 files changed** (+280 additions, -266 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatInput.tsx` (+14 -14) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+26 -21) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+3 -3) 📝 `packages/client/src/components/chat/ConversationMessage.tsx` (+4 -4) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+23 -28) 📝 `packages/client/src/components/chat/CyoaChoices.tsx` (+10 -10) 📝 `packages/client/src/components/chat/EncounterModal.tsx` (+21 -21) 📝 `packages/client/src/components/chat/HomeFaq.tsx` (+17 -17) 📝 `packages/client/src/components/chat/RoleplayHUD.tsx` (+21 -21) 📝 `packages/client/src/components/chat/RoleplayHUDPanels.tsx` (+72 -70) 📝 `packages/client/src/components/game/GameInput.tsx` (+14 -14) 📝 `packages/client/src/components/game/GameNarration.tsx` (+29 -24) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+3 -3) 📝 `packages/client/src/components/game/GameSurface.tsx` (+16 -14) 📝 `packages/client/src/styles/globals.css` (+7 -2) </details> ### 📄 Description Make UI clean and readable ## Why this change User raised bug. All UI was built dark-first with hardcoded white/, bg-black/, and #1a1a2e values. Switching to light mode made text invisible, backgrounds black, and borders disappear throughout. ## What changed Replaced hardcoded dark colors with CSS variable equivalents (var(--foreground), var(--card), var(--border), var(--muted)) + dark: fallbacks across 15 files Scoped .rpg-chat-area .mari-message-content to keep RP message text light on its always-dark background regardless of theme Suppressed the default dark chat gradient in light mode (ConversationView) Extracted repeated class strings into named constants to eliminate duplication (SURFACE_BTN, NARRATION_ACTION_BTN, HEADER_BTN, EMPTY_STATE, PANEL_BACKDROP/PANEL_CONTAINER) Fixed purple-300 active states (agent processing, EchoChamber, Characters widget) to use purple-600 dark:purple-300 for legible contrast on light backgrounds ## Validation - [x] `pnpm check` - [x] Manual verification completed (describe below) ### Manual verification notes Visually confirmed UI wherever changes were made. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <img width="1312" height="452" alt="Screenshot 2026-04-25 at 12 36 32 AM" src="https://github.com/user-attachments/assets/d036c03f-31ca-44ec-a269-77d9e471ebae" /> <img width="1312" height="696" alt="Screenshot 2026-04-25 at 12 27 02 AM" src="https://github.com/user-attachments/assets/cd5ae538-5a3b-4806-8b93-cf74a0262782" /> <img width="1312" height="696" alt="Screenshot 2026-04-25 at 12 26 42 AM" src="https://github.com/user-attachments/assets/5b72a60f-f426-4d20-a824-50ba1afa3595" /> <img width="1312" height="697" alt="Screenshot 2026-04-25 at 12 26 13 AM" src="https://github.com/user-attachments/assets/17e0f108-6e2b-4e07-a084-171c53ed6c06" /> <img width="1312" height="697" alt="Screenshot 2026-04-25 at 12 25 09 AM" src="https://github.com/user-attachments/assets/f2c5f9b8-60ed-4712-acd0-e9828ba42708" /> <img width="1312" height="700" alt="Screenshot 2026-04-25 at 12 24 46 AM" src="https://github.com/user-attachments/assets/29e006d1-8b55-49cb-8464-038d0247a4d5" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Enhanced UI theming system across chat, roleplay, game, and interface components for improved visual consistency. * Improved dark mode support with refined color palettes and explicit dark-mode styling variants. * Standardized component styling using shared design tokens for more cohesive appearance. <!-- 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:18 +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#4512
No description provided.