Distinguish local and SSH tabs by color and hostname

Replace the window-wide connection badge with purple local tabs and teal SSH tabs. Show the SSH hostname below the remote tab title, including during tab renaming.
This commit is contained in:
James Magahern
2026-11-17 14:51:14 -08:00
parent d980799648
commit 57ec12d238
4 changed files with 96 additions and 47 deletions
+5 -4
View File
@@ -38,7 +38,6 @@ struct TabRename {
pub struct Workspace {
client: Client,
connection: SharedString,
font: TerminalFont,
snapshot: Option<Arc<Snapshot>>,
panes: HashMap<u64, Entity<TerminalPane>>,
@@ -328,7 +327,6 @@ impl Workspace {
pub fn new(
client: Client,
updates: Updates,
connection: SharedString,
window: &mut Window,
cx: &mut Context<Self>,
) -> Self {
@@ -479,7 +477,6 @@ impl Workspace {
});
Self {
client,
connection,
font,
snapshot: None,
panes: HashMap::new(),
@@ -529,6 +526,11 @@ impl Render for Workspace {
.map(|tab| chrome::ChromeTab {
id: tab.id,
label: tab.title.clone().into(),
remote: tab
.remote
.as_deref()
.or(self.client.remote())
.map(str::to_owned),
active: tab.id == s.active_tab,
editor: self
.tab_rename
@@ -542,7 +544,6 @@ impl Render for Workspace {
let client = self.client.clone();
let new_client = self.client.clone();
let header = chrome::header(
self.connection.clone(),
tabs,
cfg!(target_os = "macos") && !window.is_fullscreen(),
move |tab, _, _| {