A modern terminal with a built-in multiplexer: close it and your sessions keep running. Run shells and tons of AI agents across your machines, then pick them up from desktop, browser, TUI and more. Written in Rust with no UI framework: interface drawn straight on the GPU. No Electron, GPUI or webview.
Rust agentagent-orchestrationaiai-agentsclaude-codecodexcoding-agentlinuxmacosmultiplayermultiplexerrustterminalterminal-emulatorterminal-multiplexertmuxtuiweztermwindows
fix(sidebar): let both sidebars run the full window height
RoversX3db20999ac0a
diff --git a/wezterm-gui/src/termwindow/ui/agent_panel.rs b/wezterm-gui/src/termwindow/ui/agent_panel.rsindex 8c4c4f08..fe4cb1b6 100644--- a/wezterm-gui/src/termwindow/ui/agent_panel.rs+++ b/wezterm-gui/src/termwindow/ui/agent_panel.rs@@ -247,26 +247,12 @@ impl TermWindow {let metrics = right_sidebar_file_row_metrics(ui_metrics);// The panel's bottom padding, which doubles as the mask that keeps// rows out of it. Whatever overshoots it runs past the panel, where- // the window edge cuts it -- unless a tab bar sits at the bottom:- // its background is painted on layer 0 while these glyphs are on- // layer 2, and layer index beats paint order, so overflow would land- // *on top of* the bar. In that configuration the panel bottom- // (already the tab bar's top edge, see right_sidebar_rect) must- // bound the rows instead.+ // the window edge cuts it: the panel runs the full window height.let viewport_bottom = content_bottom.saturating_sub(inset * 2);- let masked_below = self.show_tab_bar && self.config.tab_bar_at_bottom;- let overflow_bottom = if masked_below {- content_bottom- } else {- usize::MAX- };- // Unmasked, rows run to the window edge and are cut there; their- // hover chrome must reach as far, or glyphs outrun their tint.- let row_clip_bottom = if masked_below {- viewport_bottom- } else {- content_bottom- };+ let overflow_bottom = usize::MAX;+ // Rows run to the window edge and are cut there; their hover chrome+ // must reach as far, or glyphs outrun their tint.+ let row_clip_bottom = content_bottom;// An element is painted while it straddles an edge, because something// cuts it: the header mask above, the window edge below. That is the// whole difference between this and withholding it until it fits,@@ -460,18 +446,6 @@ impl TermWindow {}let scrolled = max_scroll > 0.0 && scroll > 0.0;- // Only a bottom tab bar needs protecting from row overflow; with- // the window edge below, rows run to it and are cut there.- if max_scroll > 0.0 && masked_below {- self.paint_right_sidebar_file_mask(- layers,- chrome,- content_x,- viewport_bottom,- content_width,- content_bottom.saturating_sub(viewport_bottom),- )?;- }// Above the list sits the toolbar strip and nothing paints over it// afterwards: repaint it opaque, put the toolbar back on top, then// soften the cut.diff --git a/wezterm-gui/src/termwindow/ui/right_sidebar.rs b/wezterm-gui/src/termwindow/ui/right_sidebar.rsindex 5b5b21a0..e95b6e87 100644--- a/wezterm-gui/src/termwindow/ui/right_sidebar.rs+++ b/wezterm-gui/src/termwindow/ui/right_sidebar.rs@@ -1725,11 +1725,7 @@ impl crate::TermWindow {/// the pointer is on its way to the tabs or the sidebar button.pub(crate) fn right_sidebar_hover_hot_zone(&self) -> Option<(usize, usize, usize, usize)> {let rect = self.right_sidebar_rect_for_width(self.right_sidebar_docked_width())?;- let top_tab_bar_height = if self.show_tab_bar && !self.config.tab_bar_at_bottom {- self.tab_bar_pixel_height().unwrap_or(0.0).ceil() as usize- } else {- 0- };+ let top_tab_bar_height = self.tab_bar_pixel_height().unwrap_or(0.0).ceil() as usize;let width = self.ui_px(crate::termwindow::ui::tokens::SIDEBAR_HOVER_HOT_ZONE_WIDTH);let right_edge = rect.x.saturating_add(rect.width);crate::termwindow::sidebar_hover::hot_zone(@@ -6325,11 +6321,7 @@ impl crate::TermWindow {// Off macOS the panel has no toggle of its own and the tab bar keeps// the window buttons at its right end; a hover-revealed panel stays// below the tab bar so both remain reachable.- if !cfg!(target_os = "macos")- && self.right_sidebar_collapsed- && self.show_tab_bar- && !self.config.tab_bar_at_bottom- {+ if !cfg!(target_os = "macos") && self.right_sidebar_collapsed {let tab_bar = self.tab_bar_pixel_height().unwrap_or(0.0).ceil() as usize;let top = tab_bar.max(rect.y);rect.height = rect.height.saturating_sub(top - rect.y);@@ -6343,11 +6335,6 @@ impl crate::TermWindow {fn right_sidebar_rect_for_width(&self, width: usize) -> Option<RightSidebarRect> {let border = self.get_os_border();- let bottom_tab_bar_height = if self.config.tab_bar_at_bottom && self.show_tab_bar {- self.tab_bar_pixel_height().unwrap_or(0.0).ceil() as usize- } else {- 0- };let width = width.min(self.dimensions.pixel_width@@ -6357,7 +6344,7 @@ impl crate::TermWindow {let height = self.dimensions.pixel_height- .saturating_sub(y + border.bottom.get() as usize + bottom_tab_bar_height);+ .saturating_sub(y + border.bottom.get() as usize);if width == 0 || height == 0 {return None;}@@ -15298,21 +15285,16 @@ impl crate::TermWindow {};let viewport_bottom = strip_top.saturating_sub(bottom_reserve);// How far a row may hang below the list: into the mask band while a- // transfer strip is showing; otherwise as far as it likes -- unless- // a bottom tab bar sits under the panel, whose layer-0 background- // cannot cover these layer-2 glyphs, so the panel bottom must bound- // them instead.+ // transfer strip is showing; otherwise as far as it likes.let row_overflow_bottom = if strip_rows > 0 {strip_top- } else if self.show_tab_bar && self.config.tab_bar_at_bottom {- content_bottom} else {usize::MAX};// Whether anything below the list needs protecting from overflow.// Decides both the bottom mask and how far row chrome may extend:// unprotected, rows run to the window edge and are cut there.- let masked_below = strip_rows > 0 || (self.show_tab_bar && self.config.tab_bar_at_bottom);+ let masked_below = strip_rows > 0;let row_clip_bottom = if masked_below {viewport_bottom} else {@@ -17212,22 +17194,11 @@ impl crate::TermWindow {let list_top_f = list_top as f32;let viewport_bottom = content_bottom.saturating_sub(bottom_reserve);let viewport_bottom_f = viewport_bottom as f32;- // Downward overflow past the panel is cut by the window edge --- // except with a bottom tab bar, whose background lives on layer 0- // under these layer-2 glyphs; then the panel bottom must bound it.- let masked_below = self.show_tab_bar && self.config.tab_bar_at_bottom;- let overflow_bottom = if masked_below {- content_bottom- } else {- usize::MAX- };- // Unmasked, cards run to the window edge and are cut there; their- // chrome must be allowed as far, or text outruns its card.- let card_clip_bottom = if masked_below {- viewport_bottom- } else {- content_bottom- };+ // Downward overflow past the panel is cut by the window edge, so+ // cards run to it; their chrome must be allowed as far, or text+ // outruns its card.+ let overflow_bottom = usize::MAX;+ let card_clip_bottom = content_bottom;for (idx, snippet) in snippets.into_iter().enumerate() {let row_top = list_top_f + (idx * row_height) as f32 - scroll_offset;let row_bottom = row_top + self.ui_px(SNIPPET_CARD_HEIGHT) as f32;@@ -17256,18 +17227,6 @@ impl crate::TermWindow {)?;}- // Only a bottom tab bar needs protecting from card overflow; with- // the window edge below, cards run to it and are cut there.- if max_scroll > 0.0 && masked_below {- self.paint_right_sidebar_file_mask(- layers,- chrome,- content_x,- viewport_bottom,- content_width,- bottom_reserve,- )?;- }// Erase the overflow the cards were allowed to paint above the list,// then put the toolbar back on top of that mask.if max_scroll > 0.0 && scroll_offset > 0.0 {diff --git a/wezterm-gui/src/termwindow/ui/sidebar.rs b/wezterm-gui/src/termwindow/ui/sidebar.rsindex 2f71720e..8b848527 100644--- a/wezterm-gui/src/termwindow/ui/sidebar.rs+++ b/wezterm-gui/src/termwindow/ui/sidebar.rs@@ -300,12 +300,6 @@ impl crate::TermWindow {fn workspace_sidebar_rect_for_width(&self, width: usize) -> Option<WorkspaceSidebarRect> {let border = self.get_os_border();- let bottom_tab_bar_height = if self.config.tab_bar_at_bottom && self.show_tab_bar {- self.tab_bar_pixel_height().unwrap_or(0.0).ceil() as usize- } else {- 0- };-let x = border.left.get() as usize;let y = border.top.get() as usize;let width = width.min(@@ -316,7 +310,7 @@ impl crate::TermWindow {let height = self.dimensions.pixel_height- .saturating_sub(y + border.bottom.get() as usize + bottom_tab_bar_height);+ .saturating_sub(y + border.bottom.get() as usize);if width == 0 || height == 0 {return None;@@ -335,11 +329,7 @@ impl crate::TermWindow {/// the panel does not.pub(crate) fn workspace_sidebar_hover_hot_zone(&self) -> Option<(usize, usize, usize, usize)> {let rect = self.workspace_sidebar_rect_for_width(self.workspace_sidebar_docked_width())?;- let top_tab_bar_height = if self.show_tab_bar && !self.config.tab_bar_at_bottom {- self.tab_bar_pixel_height().unwrap_or(0.0).ceil() as usize- } else {- 0- };+ let top_tab_bar_height = self.tab_bar_pixel_height().unwrap_or(0.0).ceil() as usize;crate::termwindow::sidebar_hover::hot_zone(rect.x,rect.y,@@ -1214,13 +1204,7 @@ impl crate::TermWindow {self.window_state,)};- let top_fancy_row =- if self.show_tab_bar && self.config.use_fancy_tab_bar && !self.config.tab_bar_at_bottom- {- self.tab_bar_pixel_height().ok().map(|h| h.ceil() as usize)- } else {- None- };+ let top_fancy_row = self.tab_bar_pixel_height().ok().map(|h| h.ceil() as usize);let sidebar_toggle_y = if sidebar_toolbar_uses_fullscreen_style {header_y + self.ui_px(WINDOW_TAB_FULLSCREEN_SIDEBAR_BUTTON_Y_OFFSET)} else if let Some(row_h) = top_fancy_row {