Skip to content

feat: Theme system with light/dark/night modes + compact user messages - #430

Closed
Emmanuek5 wants to merge 1 commit into
pingdotgg:mainfrom
Emmanuek5:main
Closed

feat: Theme system with light/dark/night modes + compact user messages#430
Emmanuek5 wants to merge 1 commit into
pingdotgg:mainfrom
Emmanuek5:main

Conversation

@Emmanuek5

@Emmanuek5 Emmanuek5 commented Mar 7, 2026

Copy link
Copy Markdown

Summary

Adds a three-tier theme system and improves the user message UI for a cleaner, more compact look.

Changes

Theme System

  • New theme selector in the sidebar header with a contextual icon (Sun / Moon / MoonStar)
  • Four options:
    • Light – bright mode
    • Dark – balanced dark (neutral-900 based, good everyday contrast)
    • Night – deepest dark (neutral-950 based, minimal light)
    • System – follows OS preference
  • Selected theme persists to localStorage

User Messages

  • Reduced card padding for a more compact appearance
  • Smaller text (13 px)
  • Copy button, rollback button, and timestamp now appear below the message card on hover instead of always being visible
  • Cleaner visual hierarchy with less wasted space

Files Changed

File Change
apps/web/src/hooks/useTheme.ts Extended Theme type, added exported THEME_OPTIONS and Theme type
apps/web/src/index.css Added @variant dark (balanced) and @variant night (darkest) CSS variable blocks
apps/web/src/components/Sidebar.tsx Added theme selector menu in sidebar header for both desktop and web layouts
apps/web/src/components/ChatView.tsx Compact user message card styling; actions moved below card on hover
CHANGELOG.md Created and documented all changes

Testing

  • bun typecheck passes
  • Manual verification of all three themes
  • Verify user message hover interactions (copy, rollback, timestamp)

Note

Add theme selector with light/dark/night/system options in Sidebar and make user message bubbles compact in ChatView

Introduce a night theme variant and apply dark/night classes via useTheme, add a sidebar theme menu with icons, and update user message bubble layout and actions below the bubble. Key files: apps/web/src/hooks/useTheme.ts, apps/web/src/components/Sidebar.tsx, apps/web/src/components/ChatView.tsx, apps/web/src/index.css.

📍Where to Start

Start with the useTheme hook and applyTheme logic in apps/web/src/hooks/useTheme.ts to see how dark and night classes are resolved and applied, then review the theme selector integration in apps/web/src/components/Sidebar.tsx.

Macroscope summarized d09f3ee.

…ser messages

- Add theme selector in sidebar with 4 options: light, dark, night, system
- Extend useTheme hook to support new theme types
- Add CSS variables for dark (balanced) and night (darkest) themes
- Make user message cards more compact:
  - Reduced padding (px-3 py-2)
  - Smaller text (13px)
  - Actions appear below card on hover
- Update CHANGELOG.md
@coderabbitai

coderabbitai Bot commented Mar 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3a39fa55-963e-4234-9dd6-a046486e7d19

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@t3dotgg

t3dotgg commented Mar 7, 2026

Copy link
Copy Markdown
Member

You need screenshots on PRs that make UI changes, cmon man

@t3dotgg t3dotgg closed this Mar 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d09f3ee500

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

export const THEME_OPTIONS = [
{ value: "light", label: "Light", description: "Light mode" },
{ value: "dark", label: "Dark", description: "Balanced dark mode" },
{ value: "night", label: "Night", description: "Darkest mode" },

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update settings theme options for the new night mode

This change introduces a persisted night theme choice, but the settings UI still hardcodes only system, light, and dark (apps/web/src/routes/_chat.settings.tsx lines 25-41), so once a user selects Night from the new sidebar picker, no option is shown as selected and the page reports the active theme as dark via resolvedTheme. That leaves the appearance state inconsistent across surfaces and can lead users to unintentionally reset their preference; the settings page should be driven by the same theme option source.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants