Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions app/src/settings_view/environments_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,23 @@ impl EnvironmentsPageView {
pub fn pane_configuration(&self) -> ModelHandle<crate::pane_group::pane::PaneConfiguration> {
self.pane_configuration.clone()
}

fn render_pane_header_content() -> HeaderContent {
HeaderContent::Standard(StandardHeader {
title: "Environments".to_string(),
title_secondary: None,
title_style: None,
title_clip_config: warpui::text_layout::ClipConfig::start(),
title_max_width: None,
left_of_title: None,
right_of_title: None,
left_of_overflow: None,
options: StandardHeaderOptions {
always_show_icons: true,
..Default::default()
},
})
}
pub fn set_github_auth_redirect_target(
&mut self,
target: GithubAuthRedirectTarget,
Expand Down Expand Up @@ -2045,7 +2062,7 @@ impl SettingsPageMeta for EnvironmentsPageView {
use crate::pane_group::{
focus_state::PaneFocusHandle,
pane::{
view::{HeaderContent, HeaderRenderContext},
view::{HeaderContent, HeaderRenderContext, StandardHeader, StandardHeaderOptions},
BackingView,
},
};
Expand Down Expand Up @@ -2078,7 +2095,7 @@ impl BackingView for EnvironmentsPageView {
_ctx: &HeaderRenderContext<'_>,
_app: &AppContext,
) -> HeaderContent {
HeaderContent::simple("Environments")
Self::render_pane_header_content()
}

fn set_focus_handle(&mut self, focus_handle: PaneFocusHandle, _ctx: &mut ViewContext<Self>) {
Expand Down
12 changes: 12 additions & 0 deletions app/src/settings_view/environments_page_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,18 @@ fn test_set_github_auth_redirect_target_updates_form() {
})
}

#[test]
fn test_environment_pane_header_always_shows_icons() {
let HeaderContent::Standard(header) = EnvironmentsPageView::render_pane_header_content() else {
panic!("Environment pane should use a standard header");
};

assert!(
header.options.always_show_icons,
"environment pane header icons should remain visible without hover"
);
}

#[test]
fn test_render_empty_state_shows_github_remote_and_local_rows() {
// Empty-state UI should include GitHub-remote (suggested) and agent-assisted local repos paths.
Expand Down