Skip to content

Add Olive Nights theme#1038

Merged
pedramamini merged 1 commit into
RunMaestro:rcfrom
felipeggv:feat/olive-nights-theme
May 23, 2026
Merged

Add Olive Nights theme#1038
pedramamini merged 1 commit into
RunMaestro:rcfrom
felipeggv:feat/olive-nights-theme

Conversation

@felipeggv
Copy link
Copy Markdown

@felipeggv felipeggv commented May 23, 2026

Summary

Adds Olive Nights as a built-in dark theme based on the current custom theme palette.

Changes

  • Adds the olive-nights theme to the shared theme registry.
  • Registers olive-nights as a valid ThemeId.
  • Updates theme count and valid ID tests.

Validation

  • npm run test -- src/__tests__/renderer/constants/themes.test.ts src/__tests__/shared/theme-types.test.ts src/__tests__/main/themes.test.ts
  • npx prettier --check src/shared/themes.ts src/shared/theme-types.ts src/__tests__/renderer/constants/themes.test.ts src/__tests__/shared/theme-types.test.ts
  • npm run lint

Note: the branch contains only theme-related files. The local workspace has unrelated Usage Dashboard changes, so the branch was built from origin/rc with only the theme patch applied.

Summary by CodeRabbit

  • New Features
    • Added "Olive Nights" dark theme option to the application.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 33abee4f-5a4b-4acb-804c-1c79d1044a45

📥 Commits

Reviewing files that changed from the base of the PR and between 415cfc4 and 4d0769d.

📒 Files selected for processing (4)
  • src/__tests__/renderer/constants/themes.test.ts
  • src/__tests__/shared/theme-types.test.ts
  • src/shared/theme-types.ts
  • src/shared/themes.ts

📝 Walkthrough

Walkthrough

A new dark "Olive Nights" theme is added to the theme system. The type contract is extended to recognize 'olive-nights' as a valid ThemeId, the theme implementation is registered with color definitions, and test expectations are updated to cover the new theme.

Changes

Olive Nights Theme Addition

Layer / File(s) Summary
Theme type contract
src/shared/theme-types.ts
The ThemeId union type adds 'olive-nights' and the isValidThemeId type guard allowlist recognizes it as valid.
Theme definition
src/shared/themes.ts
The THEMES map includes a new "Olive Nights" dark theme entry with background, border, text, accent, and status colors.
Test coverage updates
src/__tests__/shared/theme-types.test.ts, src/__tests__/renderer/constants/themes.test.ts
Valid theme ID test data includes 'olive-nights' and theme count assertion is updated from 19 to 20.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • RunMaestro/Maestro#745: Both PRs extend src/shared/theme-types.ts and src/shared/themes.ts to register additional theme entries.
  • RunMaestro/Maestro#532: Both PRs add a new ThemeId to the type system and corresponding theme definition with test updates.

Poem

🐰 A theme so deep, so olive and fine,
With colors that shimmer through night's design,
The type system knows it by name,
And tests celebrate the addition—all the same! 🌙

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and accurately summarizes the main change: adding a new theme called 'Olive Nights' to the codebase.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@felipeggv felipeggv marked this pull request as ready for review May 23, 2026 22:36
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 23, 2026

Greptile Summary

This PR adds olive-nights as a new built-in dark theme by registering it in the ThemeId union type, isValidThemeId guard, and THEMES record, and updating the theme-count test from 19 to 20.

  • All three registration sites (ThemeId, isValidThemeId, THEMES) are updated consistently, and the test changes are correct.
  • The accentDim value uses rgba(31, 43, 31, 1) (alpha = 1, fully opaque), which deviates from every other theme that uses a low-alpha value for this field; this may produce a solid block rather than a transparent tint in overlay contexts.

Confidence Score: 4/5

Safe to merge; the change is purely additive and self-contained. One color value warrants a quick look before landing.

The theme registration is complete and consistent across all three required locations. The only concern is accentDim being fully opaque, which could render as a solid block in UI components that expect a transparent tint — worth confirming intent before the theme ships.

src/shared/themes.ts — specifically the accentDim value in the olive-nights definition

Important Files Changed

Filename Overview
src/shared/themes.ts Adds the olive-nights dark theme definition; accentDim uses full opacity (alpha=1) unlike every other theme in the file
src/shared/theme-types.ts Adds 'olive-nights' to the ThemeId union type and the isValidThemeId guard array; consistent placement and no issues
src/tests/renderer/constants/themes.test.ts Updates expected theme count from 19 to 20; straightforward and correct
src/tests/shared/theme-types.test.ts Adds 'olive-nights' to the sample of valid IDs used in the isValidThemeId test; correct

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["'olive-nights' string"] --> B{isValidThemeId?}
    B -->|yes| C[ThemeId union type]
    C --> D[THEMES Record lookup]
    D --> E[Theme object\nmode: dark\n20 colors]
    E --> F[UI renders\nolive-nights palette]
Loading

Reviews (1): Last reviewed commit: "Add Olive Nights theme" | Re-trigger Greptile

Comment thread src/shared/themes.ts
textMain: '#f2ebc0',
textDim: '#cec8ba',
accent: '#5b675b',
accentDim: 'rgba(31, 43, 31, 1)',
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 Every other theme in the codebase uses a fractional alpha for accentDim (e.g. rgba(38, 139, 210, 0.2)) so the overlay blends with whatever sits beneath it. Using rgba(31, 43, 31, 1) makes it fully opaque, which can produce a solid-colored block instead of a subtle tint in any UI component that layers accentDim over other content (e.g. hover highlights, selection overlays). If a solid dark-green fill was intended, a hex value would be clearer and more honest about the intent; if a transparent tint was intended, the alpha needs to be reduced.

Suggested change
accentDim: 'rgba(31, 43, 31, 1)',
accentDim: 'rgba(31, 43, 31, 0.15)',

@pedramamini
Copy link
Copy Markdown
Collaborator

Thanks for the contribution, @felipeggv — and for the thorough validation notes. 🫒

Reviewed and merging as-is. A note on the one item the bots flagged: accentDim: rgba(31, 43, 31, 1) being fully opaque is the right call here, not a deviation to fix. With a near-black base (bgMain: #0a0b0a), a conventional low-alpha tint would blend down to ~#0c0e0c and render active/selected highlights nearly invisible. The opaque #1f2b1f keeps them perceptible. Nicely tuned for a dark palette.

Verified locally: theme tests green (themes, theme-types, main/themes) and npm run lint clean across all three TS configs. Appreciate the clean, self-contained patch.

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