aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/tests/keybindings_settings.rs
diff options
context:
space:
mode:
authorJJ Liebig <jonathan.liebig@gmail.com>2026-09-13 20:17:42 +0400
committerGitHub <noreply@github.com>2026-09-13 18:17:42 +0200
commit5f26879bcd4190750c79cbff92454e400166ca98 (patch)
tree5843579cb70ad81b3dc102294496cdc6868e99da /src/client/shell/tests/keybindings_settings.rs
parent981fe83ca2e23474255f4cacc4da2814f9de0744 (diff)
fix(ui): keep muted sidebar and tab labels readable (#4062)
refs #2692
Diffstat (limited to 'src/client/shell/tests/keybindings_settings.rs')
-rw-r--r--src/client/shell/tests/keybindings_settings.rs33
1 files changed, 33 insertions, 0 deletions
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
@@ -165,6 +165,39 @@ fn tab_bar_renders_endpoint_status_ellipses_and_clamps_to_useful_scroll() {
}
#[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::<Config>(
r#"