Skip to content

feat(settings): add live appearance previews and backgrounds - #15525

Open
Sylen00 wants to merge 5 commits into
stablyai:mainfrom
Sylen00:feat/appearance-live-preview-backgrounds
Open

Sylen00 wants to merge 5 commits into
stablyai:mainfrom
Sylen00:feat/appearance-live-preview-backgrounds

Conversation

@Sylen00

@Sylen00 Sylen00 commented Aug 19, 2026

Copy link
Copy Markdown

ELI5

Appearance settings now work like a safe draft: changes appear immediately in a fixed preview, can be saved or discarded, and the terminal plus both sidebars can each use their own background image and effects.

What Changed

  • Added a live draft/save/discard lifecycle with navigation and close guards.
  • Added one fixed preview for Orca chrome and the terminal, synchronized with theme mode, font, colors, and background settings.
  • Added independent image selection, enablement, opacity, blur, and reset controls for the terminal, left sidebar, and right sidebar; fit remains shared.
  • Rendered the saved background layers in the real workspace.
  • Added a local Electron image library with a parented picker, validated/copy-on-import files, preload APIs, and a safe web fallback.
  • Guarded Ghostty/Warp imports and image decoding against stale asynchronous results.
  • Added coverage for draft behavior, previews, runtime rendering, IPC, image validation, and decode failures.

Why

The previous preview did not represent terminal background changes, sidebar images were not previewed, and all areas were tied to one image. Reusing the same background resolver in the editor preview and runtime keeps both views consistent. The settings remain optional and client-local, so this adds no remote wire dependency and preserves existing configurations.

Linked Issue

Fixes #15524

Visual Proof

Before: static terminal preview After: live per-area previews
Appearance settings before Appearance settings after

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Manual validation used Electron on Windows 11 with an isolated profile:

  • Selected different images for all three areas and changed opacity/blur.
  • Confirmed Reset restores opacity 1 and blur 0.
  • Confirmed light/dark mode and editor/central preview synchronization.
  • Saved and confirmed terminal, left-sidebar, and right-sidebar layers render in the workspace.
  • Confirmed there were no renderer page errors.

Local automated checks:

  • corepack pnpm typecheck
  • 28 related Vitest files: 237 passed, 1 platform skip
  • corepack pnpm exec oxlint src
  • corepack pnpm check:max-lines-ratchet
  • corepack pnpm run build:electron-vite
  • Localization catalog, extraction, and coverage checks
  • Type-aware code-quality audit and reliability gates
  • React Doctor changed-lines blocking check: 0 errors

macOS, Linux, and SSH were not manually exercised; full root lint/test/build wrappers are left to CI. No remote protocol, shortcut, or Git command changed.

AI Disclosure

Claude (exact model/version unavailable from the continued session) and OpenAI Codex (GPT-5) were used for implementation, review, and testing.

Review

  • Security: imported images are copied into Orca-owned storage and checked for supported content, bounded file size/dimensions, symlinks, and decode failures; failed/stale object URLs are revoked.
  • Cross-platform: uses Electron/Node path and dialog APIs without hard-coded separators. Windows was manually tested; macOS/Linux remain covered by CI.
  • Remote SSH/folder workspaces: settings and image storage are client-local and do not assume a Git worktree or alter the remote wire contract.
  • Mobile/web: no mobile behavior changed; the web preload fallback safely reports the image library as unavailable.
  • Backward compatibility: optional fields are normalized to existing defaults; old settings keep their prior appearance.
  • Performance: images load only for enabled areas, decode before activation, and reuse/revoke object URLs deterministically.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

The scope is cohesive but not small in line count because it spans settings state, Electron IPC, the runtime layers, and their tests. The PR branch itself contains no screenshots; visual proof is hosted on a separate fork branch after the gh image browser-session fallback was unavailable.

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Author

  • X / Twitter: Not provided (GitHub: @Sylen00)

@Sylen00
Sylen00 requested a review from brennanb2025 as a code owner August 19, 2026 20:35
@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2fb9e2d8-1f2c-41a0-bbb6-f932ae9410ae

📥 Commits

Reviewing files that changed from the base of the PR and between c3a1694 and 6c728b2.

📒 Files selected for processing (85)
  • src/main/ipc/orca-background-library.test.ts
  • src/main/ipc/orca-background-library.ts
  • src/main/ipc/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers.ts
  • src/main/persistence-settings-update.test.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/main/persistence/loading-store/store.ts
  • src/preload/api-types.ts
  • src/preload/api/orca-background-api.ts
  • src/preload/index.ts
  • src/preload/orca-background-api.test.ts
  • src/preload/orca-background-api.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/app-shell/use-appearance-background-runtime.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundImageSelector.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSlider.tsx
  • src/renderer/src/components/settings/AppearanceInterfaceSection.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/AppearancePane.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.test.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.tsx
  • src/renderer/src/components/settings/AppearanceSection.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.test.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.tsx
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/GhosttyImportModal.test.ts
  • src/renderer/src/components/settings/GhosttyImportModal.tsx
  • src/renderer/src/components/settings/Settings.tsx
  • src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts
  • src/renderer/src/components/settings/TerminalAppearanceSection.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.lifecycle.test.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx
  • src/renderer/src/components/settings/TerminalThemeSections.lifecycle.test.ts
  • src/renderer/src/components/settings/TerminalThemeSections.tsx
  • src/renderer/src/components/settings/TerminalWindowSection.tsx
  • src/renderer/src/components/settings/WarpThemeImportModal.tsx
  • src/renderer/src/components/settings/appearance-background-section-model.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.test.tsx
  • src/renderer/src/components/settings/appearance-chrome-mock.tsx
  • src/renderer/src/components/settings/appearance-draft-diff.test.ts
  • src/renderer/src/components/settings/appearance-draft-diff.ts
  • src/renderer/src/components/settings/appearance-preview-background.test.tsx
  • src/renderer/src/components/settings/appearance-preview-background.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.ts
  • src/renderer/src/components/settings/settings-section-navigation.test.ts
  • src/renderer/src/components/settings/settings-section-navigation.ts
  • src/renderer/src/components/settings/use-appearance-background-library.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/components/settings/use-appearance-settings-draft.test.tsx
  • src/renderer/src/components/settings/use-appearance-settings-draft.ts
  • src/renderer/src/components/settings/useGhosttyImport.test.ts
  • src/renderer/src/components/settings/useGhosttyImport.ts
  • src/renderer/src/components/settings/useWarpThemeImport.sequencing.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/renderer/src/hooks/useSettingsNavigationMetadata.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/appearance-background-runtime.test.ts
  • src/renderer/src/lib/appearance-background-runtime.ts
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/renderer/src/lib/background-image-object-url.test.ts
  • src/renderer/src/lib/background-image-object-url.ts
  • src/renderer/src/lib/pane-manager/pane-divider.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/constants.test.ts
  • src/shared/constants.ts
  • src/shared/global-settings-types.ts
  • src/shared/orca-background-library-types.ts
  • src/shared/orca-background-settings.test.ts
  • src/shared/orca-background-settings.ts
🚧 Files skipped from review as they are similar to previous changes (81)
  • src/renderer/src/app-shell/use-appearance-background-runtime.ts
  • src/main/ipc/register-core-handlers.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.test.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/shared/orca-background-settings.test.ts
  • src/shared/constants.test.ts
  • src/renderer/src/lib/background-image-object-url.ts
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/App.tsx
  • src/renderer/src/lib/pane-manager/pane-divider.ts
  • src/preload/orca-background-api.test.ts
  • src/shared/orca-background-library-types.ts
  • src/shared/constants.ts
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/GhosttyImportModal.tsx
  • src/preload/index.ts
  • src/renderer/src/components/settings/useGhosttyImport.test.ts
  • src/preload/api/orca-background-api.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/settings/GhosttyImportModal.test.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/renderer/src/components/settings/settings-section-navigation.test.ts
  • src/renderer/src/components/settings/AppearanceSection.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/useWarpThemeImport.sequencing.test.ts
  • src/renderer/src/components/settings/use-appearance-background-library.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.test.tsx
  • src/renderer/src/components/settings/settings-page-leave-transaction.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/main/persistence/loading-store/store.ts
  • src/renderer/src/components/settings/AppearancePreviewColumn.test.tsx
  • src/renderer/src/components/settings/appearance-preview-background.test.tsx
  • src/renderer/src/components/settings/AppearanceInterfaceSection.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/renderer/src/components/settings/AppearancePreviewColumn.tsx
  • src/main/ipc/register-core-handlers.test.ts
  • src/main/ipc/orca-background-library.test.ts
  • src/renderer/src/components/settings/useGhosttyImport.ts
  • src/preload/orca-background-api.ts
  • src/shared/global-settings-types.ts
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/preload/api-types.ts
  • src/main/persistence-settings-update.test.ts
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/renderer/src/components/settings/AppearanceBackgroundImageSelector.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.tsx
  • src/renderer/src/components/settings/appearance-draft-diff.ts
  • src/renderer/src/hooks/useSettingsNavigationMetadata.ts
  • src/renderer/src/components/settings/appearance-draft-diff.test.ts
  • src/renderer/src/lib/background-image-object-url.test.ts
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/settings-section-navigation.ts
  • src/renderer/src/components/settings/TerminalThemeSections.tsx
  • src/renderer/src/components/settings/WarpThemeImportModal.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/shared/orca-background-settings.ts
  • src/renderer/src/components/settings/TerminalWindowSection.tsx
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/settings/TerminalThemeSections.lifecycle.test.ts
  • src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.test.tsx
  • src/renderer/src/components/settings/AppearancePane.tsx
  • src/renderer/src/lib/appearance-background-runtime.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.test.ts
  • src/renderer/src/components/settings/TerminalSettingsPreview.lifecycle.test.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/main/ipc/orca-background-library.ts
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/renderer/src/components/settings/use-appearance-settings-draft.ts
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx
  • src/renderer/src/components/settings/Settings.tsx
  • src/renderer/src/components/settings/use-appearance-settings-draft.test.tsx
  • src/renderer/src/components/settings/appearance-preview-background.ts
  • src/renderer/src/components/settings/TerminalAppearanceSection.tsx
  • src/renderer/src/components/settings/appearance-background-section-model.ts
  • src/renderer/src/components/settings/useWarpThemeImport.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

Adds an Orca background-image library with secure validation, collision-safe imports, IPC handlers, preload APIs, and web fallbacks. Adds normalized per-area background settings and persistence. Adds renderer runtime support for asynchronous image loading, CSS variables, object URLs, terminal transparency, and sidebar backgrounds. Adds appearance controls, live previews, image selection, save/discard drafts, leave guards, and stale-operation protection for theme imports.

Merge Risk: 🟡 Moderate · up to 6c728

This PR adds live appearance drafts and per-area backgrounds, but the current head still likely contains a TypeScript compile failure, a localization integration gap, and navigation behavior that can prompt users to discard an unrelated preserved draft. These issues can block validation or cause confusing data loss, so the PR is not merge-ready until fixed or explicitly accepted.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: live appearance previews and background support.
Description check ✅ Passed The description includes all required sections, linked issue, visual proof, testing details, review notes, and checklist status.
Linked Issues check ✅ Passed The changes implement immediate previews, independent per-area backgrounds and effects, reset behavior, runtime rendering, and safe image validation [#15524].
Out of Scope Changes check ✅ Passed The changes support the linked issue through draft lifecycle, previews, background runtime, IPC, validation, and related tests.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (6)
src/renderer/src/lib/appearance-background-settings.ts (1)

96-113: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Export the effect bounds as named constants.

The opacity range 0..1 and blur range 0..40 are inline literals here. The appearance slider controls in the settings layer must use the same limits. If either side changes, the UI can offer values that this resolver silently clamps. Export shared constants from this module and consume them in the slider components.

♻️ Proposed refactor
+export const APPEARANCE_BACKGROUND_OPACITY_RANGE = { min: 0, max: 1 } as const
+export const APPEARANCE_BACKGROUND_BLUR_PX_RANGE = { min: 0, max: 40 } as const
+
 export function resolveAppearanceBackground(
   settings: Partial<OrcaBackgroundSettings> | null | undefined,
   area: AppearanceBackgroundArea
 ): ResolvedAppearanceBackground {
     opacity: resolveAreaNumber(
       background.orcaBackgroundOpacityByArea,
       area,
       background.orcaBackgroundOpacity,
       DEFAULT_ORCA_BACKGROUND_SETTINGS.orcaBackgroundOpacity,
-      0,
-      1
+      APPEARANCE_BACKGROUND_OPACITY_RANGE.min,
+      APPEARANCE_BACKGROUND_OPACITY_RANGE.max
     ),
     blurPx: resolveAreaNumber(
       background.orcaBackgroundBlurByArea,
       area,
       background.orcaBackgroundBlur,
       DEFAULT_ORCA_BACKGROUND_SETTINGS.orcaBackgroundBlur,
-      0,
-      40
+      APPEARANCE_BACKGROUND_BLUR_PX_RANGE.min,
+      APPEARANCE_BACKGROUND_BLUR_PX_RANGE.max
     ),
src/shared/orca-background-settings.ts (1)

117-133: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Iterate ORCA_BACKGROUND_AREAS instead of hardcoding area names.

normalizeEnabledAreas hardcodes terminal, leftSidebar, and rightSidebar by name. normalizeImageMap and normalizeNumberMap in the same file iterate ORCA_BACKGROUND_AREAS instead. If an area is ever added to ORCA_BACKGROUND_AREAS, normalizeEnabledAreas needs a separate manual update, and a missed update silently drops the new area's enablement default.

♻️ Proposed refactor for consistency
 function normalizeEnabledAreas(value: unknown): Record<OrcaBackgroundArea, boolean> {
   const source = isRecord(value) ? value : {}
-  return {
-    terminal:
-      typeof source.terminal === 'boolean'
-        ? source.terminal
-        : DEFAULT_ORCA_BACKGROUND_SETTINGS.orcaBackgroundAreas.terminal,
-    leftSidebar:
-      typeof source.leftSidebar === 'boolean'
-        ? source.leftSidebar
-        : DEFAULT_ORCA_BACKGROUND_SETTINGS.orcaBackgroundAreas.leftSidebar,
-    rightSidebar:
-      typeof source.rightSidebar === 'boolean'
-        ? source.rightSidebar
-        : DEFAULT_ORCA_BACKGROUND_SETTINGS.orcaBackgroundAreas.rightSidebar
-  }
+  const result = {} as Record<OrcaBackgroundArea, boolean>
+  for (const area of ORCA_BACKGROUND_AREAS) {
+    result[area] =
+      typeof source[area] === 'boolean'
+        ? (source[area] as boolean)
+        : DEFAULT_ORCA_BACKGROUND_SETTINGS.orcaBackgroundAreas[area]
+  }
+  return result
 }
src/renderer/src/components/settings/AppearanceSaveBar.tsx (1)

37-44: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use i18next plural resolution instead of a manual one-versus-many branch.

The current code selects between two hardcoded keys. Locales with more than two plural categories (for example Russian or Polish, which plugin language packs can declare) cannot express the correct form. Pass count to a single key so i18next applies CLDR plural rules.

Based on learnings, do not bypass i18next plural resolution for languages that require more than _one and _other forms.

♻️ Proposed refactor
-  const changeLabel =
-    changeCount === 1
-      ? translate('auto.components.settings.AppearanceSaveBar.singleChange', '1 unsaved change')
-      : translate(
-          'auto.components.settings.AppearanceSaveBar.multipleChanges',
-          '{{value0}} unsaved changes',
-          { value0: changeCount }
-        )
+  const changeLabel = translate(
+    'auto.components.settings.AppearanceSaveBar.unsavedChanges',
+    '{{count}} unsaved changes',
+    { count: changeCount }
+  )

Add the matching _one / _other entries for unsavedChanges in en.json, then run the catalog sync and verification scripts.

Source: Learnings

src/renderer/src/components/settings/use-appearance-leave-dialog.ts (2)

78-90: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a short comment for the in-flight save branch.

The condition draftSavingRef.current reads as inverted at first glance. The intent is: a draft save is already running, so attach to it and close the dialog automatically when it finishes clean. saveDraft() returns the in-flight promise, so no second save starts. One line of context prevents a later reader from "fixing" this into a duplicate save.

♻️ Proposed change
       pendingPromiseRef.current = pending
+      // Why: a save is already running; attach to it and auto-close when it lands clean.
       if (draftSavingRef.current) {

36-49: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Consider syncing the refs during render.

The refs update in a useEffect, so hasChangesRef.current lags by one commit. confirmLeave reads that ref synchronously. If a caller invokes confirmLeave before the effect flushes for the latest hasChanges value, the guard can skip the prompt and discard a fresh edit. Settings.tsx already uses the render-time pattern for hasUnsavedSourceControlAiPromptChangesRef.

♻️ Proposed change
-  useEffect(() => {
-    hasChangesRef.current = hasChanges
-    draftSavingRef.current = draftSaving
-    saveDraftRef.current = saveDraft
-    discardDraftRef.current = discardDraft
-  }, [discardDraft, draftSaving, hasChanges, saveDraft])
+  hasChangesRef.current = hasChanges
+  draftSavingRef.current = draftSaving
+  saveDraftRef.current = saveDraft
+  discardDraftRef.current = discardDraft
src/renderer/src/components/settings/settings-page-leave-transaction.test.ts (1)

106-153: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a close-guard case where Appearance vetoes.

The close-guard suite covers the source-control veto and the intentional restart, but not the appearance veto. That path decides whether the window stays open, so a direct assertion is worth the two lines.

💚 Proposed test
   it('bypasses draft prompts during an intentional restart', async () => {
+    // ...
+  })
+
+  it('keeps the window open when Appearance vetoes the close', async () => {
+    await expect(
+      runSettingsWindowCloseGuard({
+        intentionalRestart: false,
+        sourceControlDirty: false,
+        confirmAppearanceLeave: vi.fn(async () => false),
+        confirmSourceControlDiscard: vi.fn(async () => true)
+      })
+    ).resolves.toBe(false)
+  })

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5feedcb6-b0d3-49fd-bc7d-b3dd6ad015ed

📥 Commits

Reviewing files that changed from the base of the PR and between 0b8107a and f7f4904.

📒 Files selected for processing (82)
  • src/main/ipc/orca-background-library.test.ts
  • src/main/ipc/orca-background-library.ts
  • src/main/ipc/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers.ts
  • src/main/persistence-settings-update.test.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/main/persistence/loading-store/store.ts
  • src/preload/api-types.ts
  • src/preload/api/orca-background-api.ts
  • src/preload/index.ts
  • src/preload/orca-background-api.test.ts
  • src/preload/orca-background-api.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/app-shell/use-appearance-background-runtime.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundImageSelector.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSlider.tsx
  • src/renderer/src/components/settings/AppearanceInterfaceSection.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/AppearancePane.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.test.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.tsx
  • src/renderer/src/components/settings/AppearanceSection.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.test.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.tsx
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/GhosttyImportModal.test.ts
  • src/renderer/src/components/settings/GhosttyImportModal.tsx
  • src/renderer/src/components/settings/Settings.tsx
  • src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts
  • src/renderer/src/components/settings/TerminalAppearanceSection.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.lifecycle.test.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx
  • src/renderer/src/components/settings/TerminalThemeSections.lifecycle.test.ts
  • src/renderer/src/components/settings/TerminalThemeSections.tsx
  • src/renderer/src/components/settings/TerminalWindowSection.tsx
  • src/renderer/src/components/settings/WarpThemeImportModal.tsx
  • src/renderer/src/components/settings/appearance-background-section-model.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.test.tsx
  • src/renderer/src/components/settings/appearance-chrome-mock.tsx
  • src/renderer/src/components/settings/appearance-draft-diff.test.ts
  • src/renderer/src/components/settings/appearance-draft-diff.ts
  • src/renderer/src/components/settings/appearance-preview-background.test.tsx
  • src/renderer/src/components/settings/appearance-preview-background.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.ts
  • src/renderer/src/components/settings/use-appearance-background-library.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/components/settings/use-appearance-settings-draft.test.tsx
  • src/renderer/src/components/settings/use-appearance-settings-draft.ts
  • src/renderer/src/components/settings/useGhosttyImport.test.ts
  • src/renderer/src/components/settings/useGhosttyImport.ts
  • src/renderer/src/components/settings/useWarpThemeImport.sequencing.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/renderer/src/hooks/useSettingsNavigationMetadata.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/appearance-background-runtime.test.ts
  • src/renderer/src/lib/appearance-background-runtime.ts
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/renderer/src/lib/background-image-object-url.test.ts
  • src/renderer/src/lib/background-image-object-url.ts
  • src/renderer/src/lib/pane-manager/pane-divider.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/constants.test.ts
  • src/shared/constants.ts
  • src/shared/global-settings-types.ts
  • src/shared/orca-background-library-types.ts
  • src/shared/orca-background-settings.test.ts
  • src/shared/orca-background-settings.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/main/ipc/orca-background-library.ts Resolved
@Sylen00
Sylen00 force-pushed the feat/appearance-live-preview-backgrounds branch from f7f4904 to e97b44e Compare August 19, 2026 21:38
@Sylen00

Sylen00 commented Aug 19, 2026

Copy link
Copy Markdown
Author

Addressed all 4 actionable review threads and all 6 nitpicks in e97b44e5ec:

  • hardened Windows background reads with pre-read file identity and hard-link checks;
  • scoped Appearance section leave so Git AI drafts are preserved;
  • released stale navigation guards safely;
  • kept dirty Appearance visible during filtered searches;
  • shared effect bounds, CLDR pluralization, ref timing, explanatory comment, and close-veto coverage.

Validation: 29 PR suites passed (250 tests, 1 platform skip), typecheck, native and type-aware oxlint, formatting, localization catalog/extraction/coverage, max-lines, reliability gates, React Doctor with no blocking errors, production build, and a Playwright/CDP rendered check of the dirty-search behavior.

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

@Sylen00 I will review the updated changes and the reported validation results.


🧠 Learnings used
Learnt from: ioitiki
Repo: stablyai/orca PR: 9076
File: src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx:127-170
Timestamp: 2026-07-16T22:08:51.855Z
Learning: In the stablyai/orca renderer settings localization code, semantic locale keys are valid and should be preferred when they match established neighboring namespaces. For example, `src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx` uses semantic keys such as `AppearanceWindowSidebarSection.usagePercentageDisplayUsed` and `AppearancePane.statusBarDescription`, while `src/renderer/src/components/settings/appearance-sidebar-search.ts` uses semantic `appearance.search.leftSidebarAppearance.*` and `workspaceCardLayout.*` keys. Hash-based keys are generated for unnamed strings, not a universal requirement. Validate localization changes with `pnpm sync:localization-catalog`, `pnpm verify:localization-catalog`, and `pnpm verify:localization-coverage`.

Learnt from: tomdebres
Repo: stablyai/orca PR: 9614
File: src/renderer/src/i18n/locales/ja.json:4687-4689
Timestamp: 2026-07-21T06:40:47.031Z
Learning: In stablyai/orca locale JSON catalogs under `src/renderer/src/i18n/locales/`, `pnpm run sync:localization-catalog` may generate and preserve descriptive localization keys alongside SHA1-style keys. When reviewing keys such as `auto.components.sidebar.HostSectionHeaderMenu.skewUpdateServer` or `auto.components.sidebar.WorktreeList.hostServerOutdated`, do not require SHA1-only keys if catalog verification passes and existing nearby entries use the same descriptive-key convention. Inspect the full JSON nesting rather than inferring a missing path segment from an abbreviated diff hunk.
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (5)
src/main/ipc/orca-background-library.ts (2)

129-138: 🚀 Performance & Scalability | 🔵 Trivial | ⚖️ Poor tradeoff

Consider validating list entries without reading every file in full.

listOrcaBackgroundLibrary calls readValidatedImage for each entry. Each call reads the complete file into memory, up to 12 MiB per image, and the loop runs sequentially. importOrcaBackgroundImages calls the list function again after each import, so a folder with many large images makes backgrounds:listLibrary slow and memory-heavy.

Dimension validation only needs the image header. Consider reading a bounded prefix (for example the first few kilobytes) for listing, and keeping the full read for backgrounds:loadImage.


113-115: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

close() in finally can replace the returned result with a rejection.

If handle.close() rejects, the awaited call in finally overrides the already computed return value and propagates an error to the IPC caller. The bytes are already read at that point, so a close failure should not fail the operation.

♻️ Proposed change
   } finally {
-    await handle?.close()
+    await handle?.close().catch(() => undefined)
   }
src/renderer/src/lib/appearance-background-settings.ts (1)

26-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Background constants are re-declared instead of shared. src/shared/orca-background-settings.ts keeps the fit list, the numeric bounds, and the default opacity private, so each consumer restates them. The values can drift between the renderer and the normalizer.

  • src/renderer/src/lib/appearance-background-settings.ts#L26-L29: import an exported fit list and exported opacity/blur bounds from src/shared/orca-background-settings.ts instead of declaring BACKGROUND_FITS, APPEARANCE_BACKGROUND_OPACITY_RANGE, and APPEARANCE_BACKGROUND_BLUR_PX_RANGE locally.
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx#L40-L46: replace the literal 0.35 with DEFAULT_ORCA_BACKGROUND_SETTINGS.orcaBackgroundOpacity.
src/renderer/src/components/settings/settings-section-navigation.test.ts (1)

10-30: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a case for the non-appearance routing branch.

The suite covers runSettingsSectionLeaveConfirmation only for sectionId === 'appearance'. The sourceControl branch is never exercised. A future change to the routing condition would not fail any test.

♻️ Proposed additional test
+  it('routes non-Appearance sections to the Source Control confirmation', async () => {
+    const appearance = vi.fn().mockResolvedValue(true)
+    const sourceControl = vi.fn().mockResolvedValue(false)
+
+    await expect(
+      runSettingsSectionLeaveConfirmation('git', { appearance, sourceControl })
+    ).resolves.toBe(false)
+
+    expect(appearance).not.toHaveBeenCalled()
+    expect(sourceControl).toHaveBeenCalledOnce()
+  })
src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx (1)

207-246: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the draftSaveFailed prop.

The suite exercises draftSaving but never draftSaveFailed. The hook merges that prop into the returned saveFailed at use-appearance-leave-dialog.ts line 146. A regression that drops the merge would not fail any test.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 273c323c-9722-470e-aec9-6ba1421ea0de

📥 Commits

Reviewing files that changed from the base of the PR and between f7f4904 and e97b44e5ec06686b95f8751e553adf84ca00c40c.

📒 Files selected for processing (16)
  • src/main/ipc/orca-background-library.test.ts
  • src/main/ipc/orca-background-library.ts
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.tsx
  • src/renderer/src/components/settings/Settings.tsx
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/renderer/src/components/settings/settings-section-navigation.test.ts
  • src/renderer/src/components/settings/settings-section-navigation.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/shared/orca-background-settings.test.ts
  • src/shared/orca-background-settings.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/i18n/locales/en.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@Sylen00
Sylen00 force-pushed the feat/appearance-live-preview-backgrounds branch from e97b44e to b02060f Compare August 20, 2026 12:34
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/renderer/src/components/settings/AppearancePane.tsx (1)

202-211: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Return the background state explicitly.

The final return backgroundMatches acts as the default for every key that is not interface, terminal, or window. If a new AppearanceSectionKey is added later, that new section silently inherits the background match state. Compare against 'background' and keep a false default so the compiler or the reader catches the gap.

♻️ Proposed refactor
       if (key === 'window') {
         return windowMatches
       }
-      return backgroundMatches
+      if (key === 'background') {
+        return backgroundMatches
+      }
+      return false
src/renderer/src/components/terminal-pane/terminal-appearance.test.ts (1)

20-22: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Preserve transitive runtime exports in the mock.

terminal-appearance.ts loads pane-tree-ops.ts, which loads pane-divider.ts; pane-divider.ts imports and calls markAppearanceBackgroundArea. Spread the real module with importOriginal and override only isTerminalAppearanceBackgroundActive.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b4bfc46c-d44a-40cb-920e-34132210d2c9

📥 Commits

Reviewing files that changed from the base of the PR and between 0f26ff4 and b02060f844873b2836262fbddd25670e8e11fb78.

📒 Files selected for processing (85)
  • src/main/ipc/orca-background-library.test.ts
  • src/main/ipc/orca-background-library.ts
  • src/main/ipc/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers.ts
  • src/main/persistence-settings-update.test.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/main/persistence/loading-store/store.ts
  • src/preload/api-types.ts
  • src/preload/api/orca-background-api.ts
  • src/preload/index.ts
  • src/preload/orca-background-api.test.ts
  • src/preload/orca-background-api.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/app-shell/use-appearance-background-runtime.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundImageSelector.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSlider.tsx
  • src/renderer/src/components/settings/AppearanceInterfaceSection.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/AppearancePane.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.test.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.tsx
  • src/renderer/src/components/settings/AppearanceSection.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.test.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.tsx
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/GhosttyImportModal.test.ts
  • src/renderer/src/components/settings/GhosttyImportModal.tsx
  • src/renderer/src/components/settings/Settings.tsx
  • src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts
  • src/renderer/src/components/settings/TerminalAppearanceSection.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.lifecycle.test.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx
  • src/renderer/src/components/settings/TerminalThemeSections.lifecycle.test.ts
  • src/renderer/src/components/settings/TerminalThemeSections.tsx
  • src/renderer/src/components/settings/TerminalWindowSection.tsx
  • src/renderer/src/components/settings/WarpThemeImportModal.tsx
  • src/renderer/src/components/settings/appearance-background-section-model.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.test.tsx
  • src/renderer/src/components/settings/appearance-chrome-mock.tsx
  • src/renderer/src/components/settings/appearance-draft-diff.test.ts
  • src/renderer/src/components/settings/appearance-draft-diff.ts
  • src/renderer/src/components/settings/appearance-preview-background.test.tsx
  • src/renderer/src/components/settings/appearance-preview-background.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.ts
  • src/renderer/src/components/settings/settings-section-navigation.test.ts
  • src/renderer/src/components/settings/settings-section-navigation.ts
  • src/renderer/src/components/settings/use-appearance-background-library.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/components/settings/use-appearance-settings-draft.test.tsx
  • src/renderer/src/components/settings/use-appearance-settings-draft.ts
  • src/renderer/src/components/settings/useGhosttyImport.test.ts
  • src/renderer/src/components/settings/useGhosttyImport.ts
  • src/renderer/src/components/settings/useWarpThemeImport.sequencing.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/renderer/src/hooks/useSettingsNavigationMetadata.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/appearance-background-runtime.test.ts
  • src/renderer/src/lib/appearance-background-runtime.ts
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/renderer/src/lib/background-image-object-url.test.ts
  • src/renderer/src/lib/background-image-object-url.ts
  • src/renderer/src/lib/pane-manager/pane-divider.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/constants.test.ts
  • src/shared/constants.ts
  • src/shared/global-settings-types.ts
  • src/shared/orca-background-library-types.ts
  • src/shared/orca-background-settings.test.ts
  • src/shared/orca-background-settings.ts
🚧 Files skipped from review as they are similar to previous changes (79)
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/hooks/useSettingsNavigationMetadata.ts
  • src/renderer/src/components/settings/useGhosttyImport.ts
  • src/main/ipc/register-core-handlers.ts
  • src/renderer/src/components/settings/GhosttyImportModal.tsx
  • src/preload/api-types.ts
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/shared/orca-background-library-types.ts
  • src/renderer/src/components/settings/useWarpThemeImport.sequencing.test.ts
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/renderer/src/components/settings/AppearanceSection.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/components/settings/TerminalThemeSections.lifecycle.test.ts
  • src/renderer/src/components/settings/AppearanceSaveBar.tsx
  • src/renderer/src/lib/pane-manager/pane-divider.ts
  • src/preload/orca-background-api.ts
  • src/shared/constants.test.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.test.tsx
  • src/renderer/src/app-shell/use-appearance-background-runtime.ts
  • src/renderer/src/lib/background-image-object-url.test.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/renderer/src/components/settings/settings-section-navigation.test.ts
  • src/preload/api/orca-background-api.ts
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.test.tsx
  • src/preload/orca-background-api.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/main/persistence-settings-update.test.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/shared/global-settings-types.ts
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.test.tsx
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/shared/orca-background-settings.test.ts
  • src/renderer/src/components/settings/WarpThemeImportModal.tsx
  • src/renderer/src/components/settings/GhosttyImportModal.test.ts
  • src/main/ipc/register-core-handlers.test.ts
  • src/shared/orca-background-settings.ts
  • src/renderer/src/lib/background-image-object-url.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/lib/appearance-background-runtime.ts
  • src/renderer/src/components/settings/useWarpThemeImport.test.ts
  • src/renderer/src/components/settings/AppearancePreviewColumn.tsx
  • src/renderer/src/components/settings/appearance-preview-background.ts
  • src/renderer/src/components/settings/useGhosttyImport.test.ts
  • src/renderer/src/components/settings/AppearanceInterfaceSection.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSlider.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/main/ipc/orca-background-library.test.ts
  • src/main/persistence/loading-store/store.ts
  • src/renderer/src/components/settings/appearance-preview-background.test.tsx
  • src/renderer/src/components/settings/settings-page-leave-transaction.ts
  • src/renderer/src/components/settings/appearance-draft-diff.test.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/lib/appearance-background-runtime.test.ts
  • src/renderer/src/components/settings/TerminalWindowSection.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.lifecycle.test.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/settings/useWarpThemeImport.ts
  • src/renderer/src/components/settings/Settings.tsx
  • src/renderer/src/components/settings/appearance-background-section-model.ts
  • src/renderer/src/components/settings/use-appearance-settings-draft.test.tsx
  • src/renderer/src/components/settings/TerminalAppearanceSection.tsx
  • src/renderer/src/components/settings/appearance-draft-diff.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.tsx
  • src/renderer/src/components/settings/use-appearance-settings-draft.ts
  • src/main/ipc/orca-background-library.ts
  • src/renderer/src/components/settings/TerminalThemeSections.tsx
  • src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts
  • src/renderer/src/components/settings/settings-section-navigation.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/shared/constants.ts
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@Sylen00
Sylen00 force-pushed the feat/appearance-live-preview-backgrounds branch from b02060f to 76633e1 Compare August 20, 2026 18:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/renderer/src/components/terminal-pane/terminal-appearance.ts (1)

202-204: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Shorten and separate these implementation comments.

Keep each comment to one concise non-obvious statement. Preserve the OSC-11 limitation and the contrast-cache reason as separate comments. As per coding guidelines, renderer comments must be concise, non-obvious, and brief.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2d9c164d-ea48-4105-8c9b-2e4879672cd1

📥 Commits

Reviewing files that changed from the base of the PR and between b02060f844873b2836262fbddd25670e8e11fb78 and 76633e1f2230e64a7ba126c3f88765bc5157b852.

📒 Files selected for processing (4)
  • src/renderer/src/components/settings/TerminalWindowSection.tsx
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@Sylen00
Sylen00 force-pushed the feat/appearance-live-preview-backgrounds branch from 76633e1 to 3412405 Compare August 22, 2026 23:00
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7fc2a76b-c7e8-48ef-bafb-1f7c7455b7ca

📥 Commits

Reviewing files that changed from the base of the PR and between 4828c6b and 3412405462af1baf6382209019903a0459272b32.

📒 Files selected for processing (85)
  • src/main/ipc/orca-background-library.test.ts
  • src/main/ipc/orca-background-library.ts
  • src/main/ipc/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers.ts
  • src/main/persistence-settings-update.test.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/main/persistence/loading-store/store.ts
  • src/preload/api-types.ts
  • src/preload/api/orca-background-api.ts
  • src/preload/index.ts
  • src/preload/orca-background-api.test.ts
  • src/preload/orca-background-api.ts
  • src/renderer/src/App.tsx
  • src/renderer/src/app-shell/use-appearance-background-runtime.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundImageSelector.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSlider.tsx
  • src/renderer/src/components/settings/AppearanceInterfaceSection.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/AppearancePane.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.test.tsx
  • src/renderer/src/components/settings/AppearancePreviewColumn.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/components/settings/AppearanceSaveBar.tsx
  • src/renderer/src/components/settings/AppearanceSection.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.test.tsx
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.tsx
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/GhosttyImportModal.test.ts
  • src/renderer/src/components/settings/GhosttyImportModal.tsx
  • src/renderer/src/components/settings/Settings.tsx
  • src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts
  • src/renderer/src/components/settings/TerminalAppearanceSection.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.lifecycle.test.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx
  • src/renderer/src/components/settings/TerminalThemeSections.lifecycle.test.ts
  • src/renderer/src/components/settings/TerminalThemeSections.tsx
  • src/renderer/src/components/settings/TerminalWindowSection.tsx
  • src/renderer/src/components/settings/WarpThemeImportModal.tsx
  • src/renderer/src/components/settings/appearance-background-section-model.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.test.tsx
  • src/renderer/src/components/settings/appearance-chrome-mock.tsx
  • src/renderer/src/components/settings/appearance-draft-diff.test.ts
  • src/renderer/src/components/settings/appearance-draft-diff.ts
  • src/renderer/src/components/settings/appearance-preview-background.test.tsx
  • src/renderer/src/components/settings/appearance-preview-background.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/renderer/src/components/settings/settings-page-leave-transaction.ts
  • src/renderer/src/components/settings/settings-section-navigation.test.ts
  • src/renderer/src/components/settings/settings-section-navigation.ts
  • src/renderer/src/components/settings/use-appearance-background-library.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/components/settings/use-appearance-settings-draft.test.tsx
  • src/renderer/src/components/settings/use-appearance-settings-draft.ts
  • src/renderer/src/components/settings/useGhosttyImport.test.ts
  • src/renderer/src/components/settings/useGhosttyImport.ts
  • src/renderer/src/components/settings/useWarpThemeImport.sequencing.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.test.ts
  • src/renderer/src/components/terminal-pane/terminal-appearance.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/renderer/src/hooks/useSettingsNavigationMetadata.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/appearance-background-runtime.test.ts
  • src/renderer/src/lib/appearance-background-runtime.ts
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/renderer/src/lib/background-image-object-url.test.ts
  • src/renderer/src/lib/background-image-object-url.ts
  • src/renderer/src/lib/pane-manager/pane-divider.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/shared/constants.test.ts
  • src/shared/constants.ts
  • src/shared/global-settings-types.ts
  • src/shared/orca-background-library-types.ts
  • src/shared/orca-background-settings.test.ts
  • src/shared/orca-background-settings.ts
🚧 Files skipped from review as they are similar to previous changes (78)
  • src/renderer/src/App.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.lifecycle.test.tsx
  • src/renderer/src/components/settings/settings-section-navigation.test.ts
  • src/renderer/src/components/settings/AppearanceSaveBar.tsx
  • src/preload/orca-background-api.test.ts
  • src/renderer/src/lib/background-image-object-url.ts
  • src/renderer/src/components/settings/use-appearance-settings-draft.test.tsx
  • src/renderer/src/components/settings/useWarpThemeImport.test.ts
  • src/renderer/src/hooks/useSettingsNavigationMetadata.ts
  • src/main/ipc/register-core-handlers.ts
  • src/shared/constants.test.ts
  • src/main/ipc/register-core-handlers.test.ts
  • src/renderer/src/components/settings/TerminalThemeSections.lifecycle.test.ts
  • src/renderer/src/components/right-sidebar/index.tsx
  • src/renderer/src/components/settings/use-appearance-leave-dialog.ts
  • src/renderer/src/components/settings/AppearancePreviewColumn.test.tsx
  • src/main/persistence-settings-update.test.ts
  • src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts
  • src/renderer/src/lib/background-image-object-url.test.ts
  • src/main/ipc/orca-background-library.ts
  • src/renderer/src/components/sidebar/index.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.tsx
  • src/renderer/src/components/settings/use-appearance-settings-draft.ts
  • src/preload/api/orca-background-api.ts
  • src/main/persistence/applying-settings/settings-update.ts
  • src/renderer/src/components/settings/AppearanceInterfaceSection.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-pane-lifecycle.ts
  • src/renderer/src/lib/pane-manager/pane-divider.ts
  • src/renderer/src/app-shell/use-appearance-background-runtime.ts
  • src/renderer/src/components/settings/appearance-search.ts
  • src/shared/orca-background-settings.test.ts
  • src/renderer/src/components/settings/AppearancePreviewColumn.tsx
  • src/shared/constants.ts
  • src/renderer/src/web/web-preload-api.ts
  • src/renderer/src/components/settings/useGhosttyImport.ts
  • src/renderer/src/components/terminal-pane/compose-active-terminal-theme.test.ts
  • src/shared/orca-background-library-types.ts
  • src/renderer/src/components/settings/AppearanceUnsavedChangesDialog.test.tsx
  • src/renderer/src/components/settings/appearance-draft-diff.test.ts
  • src/preload/orca-background-api.ts
  • src/renderer/src/components/settings/GhosttyImportModal.tsx
  • src/preload/api-types.ts
  • src/renderer/src/components/settings/AppearanceSaveBar.test.tsx
  • src/renderer/src/components/settings/WarpThemeImportModal.tsx
  • src/renderer/src/components/settings/settings-page-leave-transaction.test.ts
  • src/renderer/src/lib/appearance-background-settings.ts
  • src/renderer/src/components/settings/use-appearance-background-library.ts
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/settings/useWarpThemeImport.ts
  • src/renderer/src/components/settings/use-appearance-leave-dialog.test.tsx
  • src/shared/global-settings-types.ts
  • src/renderer/src/components/settings/appearance-chrome-mock.test.tsx
  • src/renderer/src/lib/appearance-background-settings.test.ts
  • src/renderer/src/components/settings/settings-section-navigation.ts
  • src/shared/orca-background-settings.ts
  • src/renderer/src/components/settings/AppearanceSection.tsx
  • src/renderer/src/components/settings/AppearancePane.test.tsx
  • src/renderer/src/components/settings/TerminalAppearanceSection.tsx
  • src/renderer/src/components/settings/useGhosttyImport.test.ts
  • src/renderer/src/components/settings/appearance-preview-background.test.tsx
  • src/main/ipc/orca-background-library.test.ts
  • src/renderer/src/lib/appearance-background-runtime.test.ts
  • src/renderer/src/components/settings/useWarpThemeImport.sequencing.test.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/components/settings/appearance-chrome-mock.tsx
  • src/renderer/src/components/settings/TerminalSettingsPreview.tsx
  • src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
  • src/renderer/src/components/settings/appearance-background-section-model.ts
  • src/main/persistence/loading-store/store.ts
  • src/renderer/src/lib/appearance-background-runtime.ts
  • src/renderer/src/components/settings/AppearancePane.tsx
  • src/renderer/src/components/settings/GhosttyImportModal.test.ts
  • src/renderer/src/components/settings/appearance-preview-background.ts
  • src/preload/index.ts
  • src/renderer/src/components/settings/TerminalThemeSections.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundSection.test.tsx
  • src/renderer/src/components/settings/AppearanceBackgroundImageSelector.tsx
  • src/renderer/src/components/settings/settings-page-leave-transaction.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@Sylen00
Sylen00 force-pushed the feat/appearance-live-preview-backgrounds branch from 3412405 to 6c728b2 Compare August 23, 2026 15:06
@Sylen00

Sylen00 commented Aug 23, 2026

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

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.

This branch has not been deployed

No deployments
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.

[Feat] Appearance settings live previews

1 participant