Skip to content

Make terminal error overlays opaque - #18231

Merged
brennanb2025 merged 3 commits into
mainfrom
brennanb2025/greeting-hi
Sep 2, 2026
Merged

brennanb2025 merged 3 commits into
mainfrom
brennanb2025/greeting-hi

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 0 0 0 0
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​10 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​2

Summary

  • Make yellow SSH and red terminal error overlays fully opaque.
  • Preserve theme-aware tinted surfaces so terminal output remains readable.

Validation

  • pnpm test src/renderer/src/components/terminal-pane/TerminalErrorToast.test.ts (39 passed)
  • pnpm exec oxlint src/renderer/src/components/terminal-pane/TerminalErrorToast.tsx
  • pnpm tc is currently blocked by an existing staleCleanupInFlight type error in src/main/worktree-create-preparation.ts:66.

Visual proof

Yellow SSH reconnect overlay:

Before After
Before: yellow SSH overlay After: yellow SSH overlay

Red terminal error overlay:

Before After
Before: red terminal overlay After: red terminal overlay

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Visual proof

Yellow SSH reconnect overlay:

Before After
Before: yellow SSH overlay After: yellow SSH overlay

Red terminal error overlay:

Before After
Before: red terminal overlay After: red terminal overlay

@coderabbitai

coderabbitai Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 86228646-b080-43a1-ad35-e4f3f18f5684

📥 Commits

Reviewing files that changed from the base of the PR and between 557a040 and 6a773fe.

📒 Files selected for processing (1)
  • src/renderer/src/components/terminal-pane/TerminalErrorToast.tsx

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


📝 Walkthrough

Walkthrough

Updated the terminal error toast to use a solid var(--popover) background with an optional theme-aware tint. SSH errors use an amber tint, generic errors use a destructive tint, and owner-unverified panes use no tint. The toast message uses var(--popover-foreground). The issue link and dismiss button inherit the toast text color.

Merge Risk: ⚪ Minimal · up to 6a773

This localized styling change makes terminal error overlays opaque while preserving theme-aware colors, without changing application behavior, access, data handling, or deployment. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change, includes validation results, reports the type-check blocker, and provides required before-and-after visual proof. It omits the required Linked Issue, ELI5, Why, Re… Add the required template sections. Provide a linked issue after “Fixes #”, complete the ELI5 and Why sections, document platform and SSH testing, complete or explain the Testing checklist, and address the remaining Review, Notes, Agent ski…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: making terminal error overlays opaque.
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.
Full details: Description check

Explanation

The description explains the change, includes validation results, reports the type-check blocker, and provides required before-and-after visual proof. It omits the required Linked Issue, ELI5, Why, Review, Notes, Agent skill upstream boundary, and checklist sections. It also does not state which platforms were tested.

Resolution

Add the required template sections. Provide a linked issue after “Fixes #”, complete the ELI5 and Why sections, document platform and SSH testing, complete or explain the Testing checklist, and address the remaining Review, Notes, Agent skill upstream boundary, and Checklist items.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 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.

@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: Team

Run ID: 7ace97d3-69bc-4c53-b54d-58dfa242b187

📥 Commits

Reviewing files that changed from the base of the PR and between 616fa75 and 557a040.

📒 Files selected for processing (1)
  • src/renderer/src/components/terminal-pane/TerminalErrorToast.tsx

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

@pullfrog pullfrog 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.

Important

The opaque, theme-aware background breaks text contrast in light mode: the SSH and error foreground colors are still hardcoded light values chosen for a dark terminal surface.

Reviewed changes

  • Opaque terminal error overlays — the SSH and generic error toast backgrounds switch from translucent rgba() to opaque color-mix(in srgb, … 20%, var(--popover)), so terminal output no longer bleeds through while the tint stays theme-aware.

ℹ️ Nitpicks

  • The SSH background now uses var(--color-amber-500) (#f59e0b) while its border on line 214 still uses rgba(234, 179, 8, 0.35) (#eab308, yellow-500), so the SSH border and background hues no longer match. Consider mixing the border from the same token.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes — since the prior pullfrog review, two commits:

  • Theme-aware foreground colors — the SSH/error toast text, the issue link, and the dismiss control switched from hardcoded light values (#fde68a / #fca5a5) to var(--popover-foreground) / inherit, resolving the light-mode contrast problem.
  • Opaque fallback on older browsers — the tint moved off the background shorthand onto a backgroundImage: linear-gradient(${tint}, ${tint}) layer over a solid var(--popover) base, so runtimes without color-mix support still render an opaque overlay.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Grok UI QA — terminal error overlay opacity (PR worktree)

Launched a CDP Orca dev instance from waspfish @ brennanb2025/greeting-hi (http://127.0.0.1:5177/, identity Orca: brennanb2025/greeting-hi). Opened a real terminal pane, filled it with OPAQUE-OVERLAY-CHECK output, then rendered the live TerminalErrorToast for both the red error kind and the yellow ssh kind.

Visible evidence

Before (no overlay): marker lines 20–27 are fully readable at the bottom of the terminal.

Before: no overlay

After — red error overlay: data-terminal-error-kind="error" shows an opaque dark-red tinted card. Lines 20–21 disappear behind the toast. Copy is readable (Paste failed: clipboard text is too large for a safe terminal paste. + file-an-issue + environment footer).

After: red terminal error overlay

After — yellow SSH overlay: data-terminal-error-kind="ssh" shows an opaque dark-amber tinted card. Terminal text under the toast does not show through. Copy: SSH connection is not active. Use the reconnect dialog or Settings to connect.

After: yellow SSH overlay

Computed styles (CDP)

Kind Inline tint Computed fill Opacity
error linear-gradient(color-mix(in srgb, var(--destructive) 20%, var(--popover)), …) with opaque background: var(--popover) fallback opaque red-tinted card 1
ssh linear-gradient(color-mix(in srgb, var(--color-amber-500) 20%, var(--popover)), …) linear-gradient(color(srgb 0.271 0.193 0.029), …) — no alpha 1

--popover is #171717. Overlay text uses var(--popover-foreground) → rgb(250, 250, 250) and stays readable on both tints.

Notes / remaining gaps

  • These shots are target-branch after, not a re-capture of the old translucent rgba(..., 0.12/0.15) overlay. That historical before already lives in the PR description.
  • Overlay state was set through the live pane controller (setTerminalError) so the real TerminalErrorToast painted. Clipboard IPC is not overridable from CDP, so the native paste-too-large keystroke path was not driven.
  • Not exercised: TerminalSshReconnectOverlay (separate reconnect banner), owner-unverified toast, light theme.
  • No UI blocker on the opacity goal: both toasts are fully opaque, tinted, and hide the terminal cells behind them.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review status: land after fixes.

  • The same-model senior review found and fixed two concrete regressions introduced by the opacity change: light-theme contrast loss from fixed pale text over an opaque light popover, and loss of the opaque surface on older engines that drop color-mix().
  • Pushed commits 1a95e3ee81 and 6a773fea5c. The final component uses var(--popover) as a fallback, a modern tinted gradient where supported, and var(--popover-foreground) for readable text/controls.
  • Validation: focused TerminalErrorToast tests 39/39, changed-code quality, oxlint, web typecheck, and Electron Vite build pass. Full pnpm tc remains blocked by the unrelated pre-existing staleCleanupInFlight error at src/main/worktree-create-preparation.ts:66.
  • Final readiness checklist pass found no P0/P1/P2 issues, no mobile-facing surface, and no scope expansion.
  • Grok Electron QA exercised live red and yellow terminal overlays via Playwright CDP, confirmed opaque/tinted rendering with terminal content hidden underneath, and attached screenshots to this PR. Remaining QA gaps are native paste-keystroke triggering, the dedicated SSH reconnect overlay, owner-unverified state, and light-theme rendering.

@brennanb2025
brennanb2025 merged commit 974f316 into main Sep 2, 2026
27 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Make terminal error overlays opaque

* fix(terminal): keep opaque error toast text readable

* fix(terminal): keep toast fallback opaque on older browsers

---------

Co-authored-by: Merge Sim <sim@local>
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