Skip to content

Use correct theme colors for project headers and thread items - #62597

Open
Robot-Inventor wants to merge 5 commits into
zed-industries:mainfrom
Robot-Inventor:fix-thread-item-color
Open

Use correct theme colors for project headers and thread items#62597
Robot-Inventor wants to merge 5 commits into
zed-industries:mainfrom
Robot-Inventor:fix-thread-item-color

Conversation

@Robot-Inventor

@Robot-Inventor Robot-Inventor commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Objective

The Threads Sidebar header and ThreadItem use element.active for their selected and hover states instead of the theme colors intended for those states. As a result, you can see a low text contrast ratio when selecting a thread in some themes, such as Moonlight. According to a comment in the existing code, the UI should use element.active for interactions such as clicks, so it does not belong as the background color for a selected thread.

Threads SidebarのヘッダーやThreadItemを選択した際とホバーした際の色が本来対応するテーマカラーではなくelement.activeになっています。これにより、Moonlightのような一部のテーマでは、スレッドを選択した際のテキストのコントラスト比が低くなっていました。既存のコードのコメントによれば、element.activeはクリックしたときなどに適用されるべきで、選択されたスレッドの背景色としては正しくありません。

/// Background Color. Used for the active state of an element that should have a different background than the surface it's on.
///
/// Active states are triggered by the mouse button being pressed down on an element, or the Return button or other activator being pressed.
#[serde(rename = "element.active")]
pub element_active: Option<ThemeColor>,

Solution

Using the existing branch picker and worktree picker implementations as references, I updated the Threads Sidebar header and ThreadItem to use ghost_element_selected for the selected-state background, ghost_element_hover on hover, and ghost_element_active on click. This aligns the implementation with the intended use of the theme variables.

ブランチピッカーやワークツリーピッカーの既存の実装を参考に、Threads SidebarのヘッダーとThreadItemの選択状態の背景色をghost_element_selectedに、ホバーしたときの色をghost_element_hoverに、クリックしたときの色をghost_element_activeに変更することでテーマ変数の意図に沿った実装になるようにしました。

Testing

I built the updated code and confirmed that the thread colors now match the colors used for selected list items in UIs such as the branch picker. You can test this change by opening the Threads Sidebar with one or more agent threads present.

変更済みのコードをビルドして、スレッドの配色が、ブランチピッカーのようなリストアイテムを選択するUIの配色と一致していることを確認しました。この変更は1つ以上のエージェントスレッドが存在している状態でThreads Sidebarを表示することでテストできます。

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards (UX/UI and icon guidelines)
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Showcase

Before After
image image

Release Notes:

  • Fixed incorrect selected and hover colors for threads in the Threads sidebar

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Aug 13, 2026
@Robot-Inventor
Robot-Inventor marked this pull request as draft August 14, 2026 04:13
@Robot-Inventor
Robot-Inventor marked this pull request as ready for review August 14, 2026 10:51
@Robot-Inventor Robot-Inventor changed the title Fix ThreadItem colors for selected and hover states Use correct theme colors for project headers and thread items Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant