Skip to content

fix(terminal): reduce inactive pane dimming - #11591

Merged
AmethystLiang merged 1 commit into
mainfrom
reduce-shade-for-inactive-terminal-pane
Jul 30, 2026
Merged

AmethystLiang merged 1 commit into
mainfrom
reduce-shade-for-inactive-terminal-pane

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

  • raise the default inactive terminal pane opacity from 0.8 to 0.9
  • keep the settings UI default label tied to the persisted default
  • cover the new default with a focused regression test

Validation

  • pnpm run lint
  • pnpm run typecheck
  • pnpm run test (3,925 files; 41,470 tests passed)
  • focused terminal/default suite (61 tests passed)
  • changed-code quality and React Doctor (0 findings)

@AmethystLiang
AmethystLiang merged commit e20554b into main Jul 30, 2026
2 of 40 checks passed
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: af3b8961-4953-4419-ad90-889cda813c84

📥 Commits

Reviewing files that changed from the base of the PR and between bbb3e7e and 39a992a.

📒 Files selected for processing (3)
  • src/renderer/src/components/settings/TerminalPaneAppearanceSection.tsx
  • src/shared/constants.test.ts
  • src/shared/constants.ts

📝 Walkthrough

Walkthrough

The inactive terminal pane opacity default is centralized in DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY, set to 0.9. Global settings initialization and the terminal appearance NumberField now reference this constant instead of hardcoded values. A test verifies that getDefaultSettings assigns the shared default.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

Comment on lines +49 to +53
it('keeps inactive terminal panes readable by default', () => {
expect(getDefaultSettings('/tmp').terminalInactivePaneOpacity).toBe(
DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY
)
})

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 Test is tautological — won't catch a value regression

Because getDefaultSettings is implemented by reading DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY directly, this assertion is always true regardless of what numeric value the constant holds. If someone later accidentally sets the constant to 0.5, the test still passes. Pinning the assertion to a concrete value (e.g. toBe(0.9)) would give the test independent verification power.

Suggested change
it('keeps inactive terminal panes readable by default', () => {
expect(getDefaultSettings('/tmp').terminalInactivePaneOpacity).toBe(
DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY
)
})
it('keeps inactive terminal panes readable by default', () => {
expect(DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY).toBe(0.9)
expect(getDefaultSettings('/tmp').terminalInactivePaneOpacity).toBe(
DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY
)
})

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown

Greptile Summary

This PR raises the default inactive terminal pane opacity from 0.8 to 0.9 and extracts the value into a named constant (DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY) so the settings UI default label and the persisted default always agree.

  • constants.ts: new export DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY = 0.9 replaces the inline literal in getDefaultSettings.
  • TerminalPaneAppearanceSection.tsx: imports and uses the constant for the NumberField defaultValue prop.
  • constants.test.ts: adds a regression test for the new default, though the assertion is currently tautological (see comment).

Confidence Score: 4/5

Safe to merge — the change is a small, well-contained default value bump with a single source of truth for the new constant.

All three files are consistent: the constant is defined once, consumed by both the default-settings factory and the UI component, and covered by a new test. The only weakness is that the test compares getDefaultSettings output against the same constant the function reads, so it cannot independently verify the numeric value 0.9 — a future accidental mutation of the constant would go undetected.

Files Needing Attention: constants.test.ts — the new test assertion should pin the concrete value 0.9 to provide independent coverage of the constant itself.

Important Files Changed

Filename Overview
src/shared/constants.ts Introduces DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY = 0.9 and replaces the inline 0.8 literal in getDefaultSettings — clean single-source-of-truth extraction.
src/renderer/src/components/settings/TerminalPaneAppearanceSection.tsx Replaces hardcoded 0.8 with the newly exported constant so the settings UI default label stays in sync with the persisted default.
src/shared/constants.test.ts Adds a regression test for the new default, but the assertion compares getDefaultSettings output against the same constant it reads internally, making it unable to detect a numeric value drift.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[constants.ts
DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY = 0.9] --> B[getDefaultSettings
terminalInactivePaneOpacity: DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY]
    A --> C[TerminalPaneAppearanceSection
NumberField defaultValue=DEFAULT_TERMINAL_INACTIVE_PANE_OPACITY]
    B --> D[(Persisted GlobalSettings
terminalInactivePaneOpacity)]
    D --> E[resolvePaneStyleOptions
paneStyleOptions.inactivePaneOpacity]
    E --> C
    C --> F[Settings UI
shows default label at 0.9]
Loading

Reviews (1): Last reviewed commit: "fix(terminal): reduce inactive pane dimm..." | Re-trigger Greptile

enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

1 participant