Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between d9bbc8a1c8e97b64b328d32050df0a1f85ac2bbc and c4d86e9d00c954dbf3010fbfb74dc68c81f871f2. 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe PR adds persisted status-bar usage templates with provider-specific overrides, normalization, previews, and dynamic rendering. It adds workspace chrome appearance settings that can apply terminal-derived colors to document-level UI surfaces. Shared color helpers now serve workspace chrome, left-sidebar styling, and editor themes. Editor and diff components use centralized surface and Monaco theme resolution. Search catalogs, localization strings, defaults, hydration, RPC validation, and tests support these changes. Merge Risk: ⚪ Minimal · up to The PR adds opt-in terminal-matched appearance and configurable status-bar formatting while preserving existing defaults; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Out of Scope Changes checkExplanation The changes remain focused on the linked appearance and status-bar objectives. Shared color utilities, editor integrations, localization, search entries, persistence, and tests directly support those objectives. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e94d8197-88c9-4724-8599-1386ae6d729f
📒 Files selected for processing (28)
src/main/runtime/rpc/methods/client-ui-schemas.tssrc/renderer/src/app-shell/use-app-chrome-layout.tssrc/renderer/src/components/settings/AppearancePane.test.tsxsrc/renderer/src/components/settings/AppearanceWindowSidebarSection.tsxsrc/renderer/src/components/settings/StatusBarUsageFormatSetting.test.tsxsrc/renderer/src/components/settings/StatusBarUsageFormatSetting.tsxsrc/renderer/src/components/settings/WorkspaceChromeAppearanceSetting.tsxsrc/renderer/src/components/settings/appearance-search.tssrc/renderer/src/components/settings/appearance-sidebar-search.tssrc/renderer/src/components/settings/appearance-status-bar-usage-format-search.tssrc/renderer/src/components/settings/terminal-search.test.tssrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/provider-segment-usage-format.test.tsxsrc/renderer/src/components/status-bar/usage-format-template.test.tssrc/renderer/src/components/status-bar/usage-format-template.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/left-sidebar-appearance.tssrc/renderer/src/lib/terminal-surface-colors.tssrc/renderer/src/lib/use-workspace-chrome-document-style.tssrc/renderer/src/lib/workspace-chrome-appearance.test.tssrc/renderer/src/lib/workspace-chrome-appearance.tssrc/renderer/src/store/slices/ui.tssrc/shared/constants.tssrc/shared/global-settings-types.tssrc/shared/persisted-ui-state-types.tssrc/shared/status-bar-usage-format.test.tssrc/shared/status-bar-usage-format.tssrc/shared/ui-chrome-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
975f2cd to
1be5a05
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Greptile SummaryThe PR adds terminal-matched application chrome and editor themes, plus configurable status-bar usage templates.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/status-bar/StatusBar.tsx | Routes configured usage templates through the verbose renderer in both usage modes; the previously reported compact-mode bypass is fixed. |
| src/renderer/src/components/status-bar/usage-format-template.ts | Builds provider usage placeholder values and renders optional template groups as text. |
| src/renderer/src/lib/terminal-editor-palette.ts | Derives editor surface and syntax colors from terminal themes and produces Monaco theme data. |
| src/renderer/src/lib/use-workspace-chrome-document-style.ts | Applies terminal-derived document-level chrome variables when match-terminal appearance is enabled. |
| src/renderer/src/components/editor/use-monaco-editor-theme.ts | Resolves and reapplies the appropriate built-in or terminal-derived Monaco theme. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
Settings[Appearance settings] --> ChromeMode[App chrome appearance]
TerminalTheme[Active terminal theme] --> Palette[Derived surface and syntax palette]
ChromeMode --> Palette
Palette --> CSS[Document chrome variables]
Palette --> Monaco[Monaco terminal theme]
Format[Usage format template] --> Resolver[Global/provider template resolver]
Usage[Provider usage data] --> Values[Placeholder values]
Resolver --> Renderer[Template renderer]
Values --> Renderer
Renderer --> StatusBar[Status-bar provider segment]
Reviews (6): Last reviewed commit: "fix(editor): keep Monaco theme registrat..." | Re-trigger Greptile
|
Re Greptile's "Compact mode bypasses templates" (StatusBar.tsx |
f6571e8 to
dec5d39
Compare
Add an "App Chrome Appearance" setting (Default / Match Terminal) next to Left Sidebar Appearance. In match-terminal mode the terminal theme's background/foreground are written as document-root CSS variables (--bg-titlebar, --background/--card/--popover/..., both sidebar token families), so the tab strip, status bar, side panels, full-page views and popovers all follow the terminal instead of the app theme. Left-sidebar modes still win because they scope their own variables below the root. The terminal color pair and token derivation move into terminal-surface-colors.ts and are shared with the sidebar resolver. Co-Authored-By: Claude Fable 5 <[email protected]>
Add Settings → Appearance → Status Bar → "Usage format": a template that
replaces the built-in per-provider usage text when non-empty. Placeholders
cover {provider}, {plan}, the 5h/7d/fable/30d windows as percentages
(following Used/Remaining), {x.reset} countdowns, {x.resetAt} clock times
and Gemini {buckets}; "[...]" groups drop out when a placeholder inside is
empty so one template works across providers with different windows.
Whitespace is rendered as authored (whitespace-pre).
Persisted as PersistedUIState.statusBarUsageFormat with a byProvider
override map reserved for later; the RPC UI-update schema gains the
optional field.
Co-Authored-By: Claude Fable 5 <[email protected]>
…n search Add one-line JSDoc to every function this branch adds or edits so the review docstring gate passes. Include the usage-format entry in the Status Bar section's search match so searching "template" or "placeholder" no longer hides the parent row, and mention popovers in the App Chrome Appearance descriptions since the setting styles them. Co-Authored-By: Claude Fable 5 <[email protected]>
…-terminal mode With App Chrome Appearance = Match Terminal, the tab strip, status bar and side panels took the terminal palette but every file pane kept the stock app theme: Monaco (code, plain text, diffs, notebooks, markdown source) was hard-wired to `vs`/`vs-dark`, and the markdown preview / rich editor painted the fixed `--editor-surface` with GitHub-colored hljs tokens. - `terminal-editor-palette.ts` derives an editor palette from the active terminal theme (background/foreground/cursor/selection + syntax roles mapped onto the ANSI slots) and builds a Monaco theme (`orca-terminal`) from it; light/dark is rated by the terminal background, so a light terminal theme under a dark OS setting still gets light styling. - match-terminal chrome variables now include `--editor-surface` and `--syntax-*`; the hljs stylesheets read those ahead of their defaults. - `useEditorSurfaceAppearance` / `useMonacoEditorTheme` replace the inline `isDark ? 'vs-dark' : 'vs'` computations; the diff-section chain passes the Monaco theme name instead of a dark flag. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VbWbChctXeMvaR2zdbFY99 (cherry picked from commit dc85fad)
ProviderSegment only rendered a user template on the verbose branch, so switching usage mode to compact silently fell back to the built-in tightest-window label. A non-empty template now replaces the built-in text in both modes; the mini bar stays verbose-only. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VbWbChctXeMvaR2zdbFY99
Adds one-line JSDoc to the editor surfaces, diff viewers, palette helpers and UI-slice entry points this branch modifies so the diff's docstring coverage clears the pre-merge threshold. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VbWbChctXeMvaR2zdbFY99
…render The upgraded oxlint React rules flag reassigning a module variable during render and calling Date.now() inside useMemo. Move the terminal Monaco theme's signature cache into ensureTerminalMonacoTheme() and pin the usage-format preview clock with a lazy useState initializer. Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VbWbChctXeMvaR2zdbFY99
d0a5c2f to
80c1c1a
Compare
|
@brennanb2025 Hi! Just checking in on this PR — is it something you'd be willing to merge? It keeps drifting into merge conflicts with main, so I'd rather not keep rebasing blindly. If it's a yes, please @ me (@seedotlee) and I'll resolve the conflicts right away. If it's not a fit, no worries, just let me know and I'll close it. Thanks! |
|
+1 from a daily user. I'd love to run Orca with Rosé Pine Moon throughout. Right now "Match terminal" only recolours the left sidebar, and the rest of the default dark chrome is too dark for me. This PR (the app chrome and editors following the terminal theme) is exactly what I'm after. @brennanb2025, could you let the author know whether this direction will be merged, so the conflicts can be resolved? |
|
any update on this? |
|
+1, daily user on macOS (two Macs plus a remote Orca server). This PR is the piece we are missing. Concrete case: I am protanopic, so I need a terminal theme where red and green stay apart (GitHub Dark Colorblind, Tokyo Night). Those themes have a tinted background, and with the current chrome only the left sidebar follows it ("Match Terminal") while the tab bar, status bar and right sidebar stay stock dark. The window ends up in two color systems, so in practice I'm limited to plain black or neutral grey terminal themes. Is anything blocking review here? Happy to test a build. |
…terminal theme Adds Settings > Appearance > "Title & Status Bar Appearance" (Default / Match Terminal). In match-terminal mode the terminal's background and foreground are scoped onto the title bar, tab strip, status bar, and window controls through the existing --bg-titlebar hook plus the surface/text tokens the left sidebar's match-terminal mode already derives, so tabs and text stay readable on light terminal themes. Nothing outside those bars changes, and the default keeps the current look. Persisted as workspaceChromeAppearanceMode, the same key as stablyai#16768, so that PR can widen the scope later without a migration. The left sidebar appearance fields move into ChromeAppearanceSettings because global-settings-types.ts is at its max-lines cap. Refs stablyai#10864, stablyai#16936
- Monaco (file editor, diffs, combined diffs, PR diffs, notebooks, code excerpts, automation prompt) gets an "orca-terminal" theme built from the terminal's background, foreground, cursor, selection, and ANSI colors. - Markdown preview, rich editor, and notebook panes paint --editor-surface and read --syntax-* hooks, falling back to their existing GitHub colors. Credit: the terminal editor palette and Monaco theme generation (terminal-editor-palette.ts and its tests, monaco-terminal-theme-registry.ts, use-monaco-editor-theme.ts), the --syntax-* hooks in markdown-preview.css and rich-markdown-editor.css, and the isDark -> monacoTheme prop change in the diff components are taken from stablyai#16768 by @seedotlee. Adapted to current main: stablyai#16768 predates useDocumentDarkTheme, so instead of a separate surface-appearance hook, useDocumentDarkTheme now honors the match-terminal light/dark decision, which also brings mermaid and markdown along. Light/dark is rated on the opaque background so editors and chrome always agree.
…he terminal Without these, match-terminal surfaces kept the app theme's greys for --secondary, --input, and --ring. Mix ratios match stablyai#16768.
|
Thank you @seedotlee for the appearance and status-bar work. We combined the remaining status-bar usage template into the draft replacement, #40456, preserved your original commits, and credited you in its description; current main already implements the related Match Terminal app and editor themes, so we kept that newer implementation. I will close this PR in favor of the combined draft, which still needs current-main conflicts resolved and its broad test failures investigated. |
ELI5
Two appearance settings: (1) the whole app frame (tab strip, status bar, side panels, popovers) can adopt the terminal theme's colors instead of the app theme, and (2) the status bar's usage text can be formatted with a user-defined template.
What Changed
feat(appearance): let file editors follow the terminal theme in match-terminal mode (closes #17199)
vs/vs-dark, and the Markdown preview / rich editor painted the fixed--editor-surfacewith GitHub-colored hljs tokens — so in match-terminal mode the editor pane was the one surface still on the app theme.terminal-editor-palette.tsderives an editor palette from the active terminal theme (background / foreground / cursor / selection + syntax roles mapped onto the ANSI slots) and builds a Monaco theme (orca-terminal) from it; light/dark is rated by the terminal background's luminance, so a light terminal theme under a dark OS setting still gets light styling.--editor-surfaceand a--syntax-*set that the hljs stylesheets read ahead of their defaults (non-match-terminal look unchanged).useEditorSurfaceAppearance/useMonacoEditorThemereplace the per-componentisDark ? 'vs-dark' : 'vs'; the diff-section chain passes the Monaco theme name instead of a dark flag.feat(appearance): let app chrome follow the terminal theme
--bg-titlebar,--background/--card/--popover/ …, both sidebar token families), so the tab strip, status bar, side panels, full-page views and popovers follow the terminal. Left-sidebar modes still win because they scope their own variables below the root.terminal-surface-colors.tsand shared with the sidebar resolver.workspaceChromeAppearancein global settings.feat(status-bar): configurable usage format template
{provider},{plan}, the 5h / 7d / fable / 30d windows as percentages (following Used/Remaining),{x.reset}countdowns,{x.resetAt}clock times, Gemini{buckets}.[...]groups drop out when a placeholder inside is empty so one template works across providers with different windows. Whitespace is rendered as authored.PersistedUIState.statusBarUsageFormat(with abyProvideroverride map reserved for later); the RPC UI-update schema gains the optional field.Why
Users who pick a terminal theme often want the surrounding chrome to match instead of clashing with the app theme, and the built-in usage text is fixed per provider — a template lets people show exactly the windows/format they care about in the limited status-bar space. Both are opt-in and default to existing behavior.
Linked Issue
Fixes #16936 (app chrome should be able to match the terminal theme)
Fixes #16937 (configurable status bar usage format)
Visual Proof
Terminal theme in these shots: Everforest Light (Settings → Appearance → Terminal Themes):
New settings — App Chrome Appearance = Match Terminal and Usage format with live preview:
After — with Match Terminal on, the sidebar, tab strip, panes and status bar all take the Everforest Light surface colors; the status bar shows the custom
{provider}[ | 5h: {5h} ( resets {5h.reset} ) ][ | 7d: {7d}]template:Before — with App Chrome Appearance = Default (the current behavior), the same window renders with the stock app-theme chrome; both settings default to the existing behavior, so this PR changes nothing unless opted in.
Testing
Unit tests added:
workspace-chrome-appearance.test.ts,usage-format-template.test.ts,provider-segment-usage-format.test.tsx,StatusBarUsageFormatSetting.test.tsx,status-bar-usage-format.test.ts; existing appearance/search tests updated.Rebased onto current
main(conflicts inconstants.ts/en.jsonresolved; the appearance default now lives indefault-global-settings.ts);pnpm tc, affected test files (126 tests),oxlintandoxfmt --checkon changed files all pass locally.Manually tested on macOS (local workspaces). Settings are renderer-only presentation state; no execution-host / SSH behavior is touched.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Implemented with Claude (Claude Code, Claude Fable 5); reviewed and tested by the author.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code