Add manual tab names with selected-pane fallback

This commit is contained in:
2026-11-17 08:56:02 -08:00
parent d8630c2d52
commit 6b2bd8c064
8 changed files with 281 additions and 20 deletions
+8 -1
View File
@@ -10,7 +10,7 @@ use anyhow::{Context, Result, bail};
use bincode::Options;
use serde::{Deserialize, Serialize, de::DeserializeOwned};
pub const VERSION: u32 = 3;
pub const VERSION: u32 = 4;
pub const MAX_MESSAGE_BYTES: usize = 16 * 1024 * 1024;
pub type PaneId = u64;
pub type TabId = u64;
@@ -96,6 +96,11 @@ pub enum ClientMessage {
CyclePane {
forward: bool,
},
/// A blank/absent name returns to the selected pane's effective name.
RenameTab {
tab: TabId,
name: Option<String>,
},
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
@@ -173,7 +178,9 @@ pub struct Snapshot {
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TabInfo {
pub id: TabId,
/// Effective display name: manual override, then the selected pane's name.
pub title: String,
pub manual_title: Option<String>,
/// All pane IDs, flattened in column/stack order.
pub panes: Vec<PaneId>,
pub active_pane: PaneId,