fix(jetbrains): fill session dialog cards with a raised surface - #13797
Conversation
Session dialog cards (question, permission, login-required, outcome, revert banner, onboarding) filled with SessionUiStyle.View.Surface.bgColor(), which is the session backdrop itself, so only the outline was visible. Add SessionUiStyle.View.Dialog with a card fill derived as a contrast shift off the backdrop, and a border derived as the midpoint between the backdrop and that fill, so the card reads as a raised panel with a soft edge in every theme instead of an outline-only shape. DialogView.contentColor() now returns the new surface while outlined and falls back to the backdrop when setOutlined(false), keeping chrome-free states (e.g. an interrupted-run note) unchanged. Override getBackground() so the reported background always matches what the card actually paints, since the super constructor reads contentColor() before the outlined field is initialized. PermissionView's rule-toggle chip blended its active fill over the session backdrop while nested inside the dialog card; switch it to blend over the card surface it actually paints on.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (6 files)
Previous Review Summary (commit 13ca51d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 13ca51d)Status: No Issues Found | Recommendation: Merge Files Reviewed (6 files)
Reviewed by grok-4.6 · Input: 75.6K · Output: 5.3K · Cached: 230K Review guidance: REVIEW.md from base branch |
DIALOG_DELTA=24 made the card fill too bright/prominent in dark themes, drowning out the button outlines nested on it. Halve it to 12 so the card sits closer to the transcript backdrop while staying visibly distinct, and the border (already derived as the midpoint between backdrop and fill) softens along with it.
| * which the code/diff bodies nested inside these cards paint. | ||
| */ | ||
| fun bgColor(): Color = JBColor.lazy { | ||
| UiStyle.Colors.contrast(Colors.sessionBackground(), DIALOG_DELTA) |
There was a problem hiding this comment.
bot: The dialog fill can still equal the independently configured code-block surface.
Suggested fix: After deriving the candidate from sessionBackground(), compare it with Colors.codeBlockBackground() and choose an alternate contrast/fallback when their RGB values match. Add a test with a session background whose 12-step contrast equals a configured code-block background, asserting the dialog fill remains distinct from both surfaces.
Issue
No linked issue — direct UI feedback from the JetBrains session dialog styling.
Context
Session dialog cards in the JetBrains plugin (question, permission, login-required, outcome, revert banner, onboarding) filled with
SessionUiStyle.View.Surface.bgColor(), which is exactly the session backdrop color. So the card had no visible fill of its own — only the border read as a card, which looked flat/outline-only against the chat transcript.Implementation
SessionUiStyle.View.Dialog:bgColor()— the card fill, a contrast shift off the session backdrop (DIALOG_DELTA = 24), so the card reads as its own raised panel in every theme, including Islands Dark/Darcula where the backdrop and editor surface are identical.outlineColor()— the card border, the midpoint blend between the backdrop andbgColor(), so the edge is a soft transition between the two surfaces instead of a hard delineating line.DialogView.contentColor()now returns the new dialog surface whileoutlinedis true, and falls back to the plain backdrop whensetOutlined(false)— keeping chrome-free states (e.g.SessionOutcomeView's interrupted-run note) visually unchanged.getBackground()override onDialogView. TheRoundedContentPanelsuper constructor assignsbackground = contentColor()before theoutlinedfield is initialized, so the reported background property could go stale relative to what the card actually paints (notably aftersetOutlined()toggles). Deriving it dynamically keeps the two in sync.PermissionView's rule-toggle chip blended its active fill over the session backdrop while sitting nested inside the dialog card; switched it to blend over the new dialog surface it actually paints on.packages/kilo-jetbrains/AGENTS.md's Session UI Background Strategy section.Screenshots / Video
How to Test
Manual/local verification
./gradlew typecheckand./gradlew :frontend:test :backend:testfrompackages/kilo-jetbrains/after each change — 4635 tests, 0 failures.Reviewer test steps
./gradlew --no-configuration-cache runIdefrompackages/kilo-jetbrains/.Blocked checks and substitute verification
runIdevisual verification across themes was not performed by the agent in this session (no interactive IDE session available); substitute verification was computing exact resulting hex values per theme from the color formulas and confirming viaDialogViewTestthat the border channel values fall strictly between the backdrop and fill channel values.Checklist
Get in Touch