Skip to content

fix(app): improve contrast and elevation for selection quote toolbars - #61330

Open
Realmagnum wants to merge 2 commits into
anomalyco:devfrom
Realmagnum:fix/quote-toolbar-contrast
Open

Realmagnum wants to merge 2 commits into
anomalyco:devfrom
Realmagnum:fix/quote-toolbar-contrast

Conversation

@Realmagnum

@Realmagnum Realmagnum commented Nov 3, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #61329

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

In dark mode, the floating quote toolbar (timeline-quote and terminal-quote) blends directly into the transcript and code blocks because it uses bg-layer-01 with shallow elevation-raised shadow.

This PR improves its visibility:

  • Elevates the dark background surface from bg-layer-01 to bg-layer-02.
  • Upgrades shadow from elevation-raised to elevation-floating (matching menus and other floating popovers, relying on its built-in 0 0 0 0.5px outline ring without adding extra borders or altering element dimensions).

How did you verify your code works?

  • Verified in dark mode: toolbar background is clearly distinct against messages and code blocks.
  • Checked both timeline and terminal quote toolbars: consistent elevation-floating shadow ring and matching surface elevation across both surfaces.

Screenshots / recordings

Before After
Before After

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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

Thanks for the change. It's small and on target, but one part doesn't work as described and the two toolbars end up different. I checked it by reading the CSS cascade; I couldn't run the desktop app here.

Public API: unchanged.

  • Dark-mode border colour only applies to the terminal toolbar. The timeline override in index.css is inside @layer components, so the Tailwind utility border-v2-border-border-base (utilities layer) beats it, and the timeline toolbar keeps border-base in dark mode. The terminal's quote.css is injected as an unlayered <style>, so it does get border-strong. See the inline comments.
  • Double outline: both --v2-elevation-raised and --v2-elevation-floating already draw a 0.5px ring. A 1px border on top gives two outlines. Consider dropping one of them, e.g. keep the shadow ring and just raise the background to bg-layer-02. #61329 was triaged as a design request, so maintainers may have a view on the look.
  • The screenshot in the description is the same image as the one in #61329. Could you add real before/after screenshots of both toolbars in light and dark mode?

Comment thread packages/app/src/index.css Outdated
[data-color-scheme="dark"] [data-component="timeline-quote"] {
background-color: var(--v2-background-bg-layer-01);
background-color: var(--v2-background-bg-layer-02);
border-color: var(--v2-border-border-strong);

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.

This rule is inside @layer components, but the border-v2-border-border-base class on the toolbar is a Tailwind utility (utilities layer). A later layer wins whatever the specificity, so this border-color never applies and the timeline toolbar keeps border-base in dark mode. The terminal toolbar's quote.css is unlayered, so it does get border-strong, and the two toolbars no longer match. One fix: set the dark border on the element itself, e.g. [[data-color-scheme=dark]_&]:border-v2-border-border-strong, as runtime/plugin/mobile.tsx does for its background. Then drop the CSS override.

role="toolbar"
aria-label={language.t("session.quote.actions")}
class="fixed z-50 flex items-center gap-0.5 rounded-[8px] p-0.5 shadow-[var(--v2-elevation-raised)]"
class="fixed z-50 flex items-center gap-0.5 rounded-[8px] border border-v2-border-border-base p-0.5 shadow-[var(--v2-elevation-floating)]"

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.

--v2-elevation-floating (like raised) already includes a 0 0 0 0.5px ring, so adding a 1px border draws a second outline right next to it. It also makes the toolbar 2px larger than before. Unless the double edge is intended, use either the border or the shadow ring. The same applies to gui-plugins/src/terminal/quote.tsx.

@Realmagnum

Copy link
Copy Markdown
Author

Good catch! Updated the PR to drop the redundant 1px border and instead rely on the built-in 0.5px outline ring of elevation-floating (matching menu-v2 and other floating controls), while raising the dark surface to bg-layer-02. Both timeline and terminal toolbars are now consistent without double outlines or dimensional shifts.

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

Both earlier points are fixed. With the border classes and overrides gone, the layer conflict and the double outline are both resolved. In dark mode both toolbars now use the bg-layer-02 background and the elevation-floating shadow, so they match. I found nothing else to flag. I checked by reading the code; I couldn't run the desktop app here.

Public API: unchanged.

Could you add before/after screenshots of the quote toolbar in dark mode? The old screenshot was the one from the issue.

@Realmagnum

Realmagnum commented Nov 3, 2026 •

Copy link
Copy Markdown
Author

Added before/after comparison screenshots to the description.

Before After
Before After

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.

desktop: selection quote toolbar blends into dark theme background

1 participant