From 5f26879bcd4190750c79cbff92454e400166ca98 Mon Sep 17 00:00:00 2001 From: JJ Liebig Date: Sun, 13 Sep 2026 20:17:42 +0400 Subject: fix(ui): keep muted sidebar and tab labels readable (#4062) refs #2692 --- src/client/shell/tests/keybindings_settings.rs | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/client/shell/tests/keybindings_settings.rs') diff --git a/src/client/shell/tests/keybindings_settings.rs b/src/client/shell/tests/keybindings_settings.rs index 1654d0df..e1b43a01 100644 --- a/src/client/shell/tests/keybindings_settings.rs +++ b/src/client/shell/tests/keybindings_settings.rs @@ -164,6 +164,39 @@ fn tab_bar_renders_endpoint_status_ellipses_and_clamps_to_useful_scroll() { assert!(!top.contains("ZOOM ยท host")); } +#[test] +fn inactive_auto_named_tab_label_does_not_stack_terminal_faint() { + let mut projected = snapshot(); + projected.tabs.push(ClientShellTab { + tab_id: "tab_2".into(), + workspace_id: "ws_1".into(), + number: 2, + label: "beta".into(), + custom_label: false, + zoomed: false, + focused: false, + agent_status: AgentStatus::Idle, + }); + let mut state = ClientShellState::new(ClientShellConfig::from_config(&Config::default())); + state.set_snapshot(Box::new(projected)); + state.set_pane_surface(surface()); + let frame = state.compose(106, 20).expect("tab bar frame"); + let rect = state + .hits + .tabs + .iter() + .find(|(_, tab_id)| tab_id == "tab_2") + .expect("inactive tab hit") + .0; + let buffer = frame.to_ratatui_buffer().expect("tab bar buffer"); + let (x, y) = cell_symbol_position(&frame, rect, "beta"); + let cell = buffer.cell((x, y)).expect("inactive tab cell"); + assert!( + !cell.modifier.contains(Modifier::DIM), + "inactive tab label at ({x},{y}) should not stack terminal faint: {cell:?}" + ); +} + #[test] fn configured_prefix_is_client_owned_and_renders_its_bar() { let config = toml::from_str::( -- cgit v1.2.3