Skip to content

feat(native): wire chrome, sidebar, panel, and settings THEME_CSS_HOOKS slots - #470

Merged
rynfar merged 1 commit into
nativefrom
swarm-h4b-chrome-panels-6429e736
Nov 20, 2026
Merged

rynfar merged 1 commit into
nativefrom
swarm-h4b-chrome-panels-6429e736

Conversation

@rynfar

@rynfar rynfar commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Part of #457 (Wave H4B Part 1).

Problem

The THEME_CSS_HOOKS slot compiler and GPUI ThemeSlot engine landed in #467, but the 9 chrome, sidebar, panel, and settings surfaces had not yet been wired to read compiled slot overrides or scoped var(--theme-background-image) layers.

Changes

Wired all 9 chrome/sidebar/panel/settings ThemeSlot hooks across the 8 owned files without introducing duplicate .hover()/.active() closures:

  • workspace.rs: ThemeSlot::Sidebar + theme_slot_background_layer on inline sidebar (open & closing) and narrow sheet (render_sidebar_sheet); ThemeSlot::ConversationArea + theme_slot_background_layer on thread & draft conversation area containers; titlebar delegates outer chrome bar to chat_header::container.
  • sidebar/mod.rs: ThemeSlot::SidebarInner + theme_slot_background_layer on SidebarPane (sidebar-folder-drop), keeping inner background transparent when ThemeSlot::Sidebar supplies a custom background/wallpaper so outer sidebar backgrounds show through.
  • sidebar/row.rs: ThemeSlot::ThreadItem on row_surface, applying base overrides via .theme_slot and composing refine_slot_hover / refine_slot_active safely inside the single .hover(...) / .active(...) blocks.
  • project_icon.rs: ThemeSlot::ProjectMonogram on monogram tiles (including image fallback/loading closures and preview), propagating text color/font overrides to the inner monogram label and supporting :hover.
  • chat_header.rs: chat_header::container wiring ThemeSlot::ChatHeader + theme_slot_background_layer on the full-width titlebar bar.
  • thread_details/view.rs: ThemeSlot::ThreadDetailsCard + theme_slot_background_layer on thread-details-card, yielding glass::backdrop cleanly when CSS overrides background, border, or corner radius.
  • terminal/drawer_view.rs: ThemeSlot::ThreadTerminalDrawer + theme_slot_background_layer on open and closing terminal drawer containers.
  • settings/mod.rs: ThemeSlot::SettingsPageScroll on both scrollable (settings-content) and list-backed (settings-page-scroll-list) settings containers, with theme_slot_background_layer mounted behind the scroll viewport so scroll_to_item indices stay exact.

Tests

  • workspace::tests::theme_css_hooks_chrome_panels_render_cleanly_with_preview_and_scoped_background_image (exercises preview_with_css across all 9 hooks including :hover, :active, and var(--theme-background-image) scoping on inline/sheet sidebar, active/inactive/receding-working thread rows, project monograms, chat header, conversation area, inline/popover thread details cards, terminal drawer, and scrollable/list settings pages).
  • project_icon::tests::project_monogram_slot_refines_tile_and_clears_on_stock_theme
  • chat_header::tests::chat_header_container_applies_theme_slot_and_restores_on_clear

Implemented with Antigravity.

@rynfar
rynfar merged commit df73fbd into native Nov 20, 2026
2 checks passed
@rynfar
rynfar deleted the swarm-h4b-chrome-panels-6429e736 branch November 20, 2026 11:01
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