## Context The tab switcher was truncating file names at the same 24-character limit (`MAX_TAB_TITLE_LEN`) used by the narrow tab bar. This made files that share a long common prefix, like `test_cpp_file_long_name.h` and `test_cpp_file_long_name.cpp`, render identically, with both becoming `test_cpp_file_long_name.…`. The fix adds a `max_title_len: Option<usize>` field to `TabContentParams`. When `None` (the default, used by the tab bar), `Editor::tab_content` falls back to `MAX_TAB_TITLE_LEN` as before. The tab switcher passes `Some(usize::MAX)`, which skips truncation entirely and lets the UI container constrain the displayed text naturally. Closes #58461 ## How to Review - **`crates/workspace/src/item.rs`** : Adds `max_title_len: Option<usize>` to `TabContentParams`. Derives `Default` so `None` is the zero-cost default; two existing struct literals in `pane.rs` that couldn't use `..Default::default()` were updated to be explicit. - **`crates/editor/src/items.rs`** : In `Editor::tab_content`, both the title label and the description path now use `params.max_title_len.unwrap_or(MAX_TAB_TITLE_LEN)` instead of the hardcoded constant. - **`crates/workspace/src/pane.rs`** : Two `TabContentParams` struct literals updated to include `max_title_len: None`, preserving the existing 24-char tab bar behaviour. - **`crates/tab_switcher/src/tab_switcher.rs`** : Sets `max_title_len: Some(usize::MAX)` in `render_match`, opting the tab switcher out of truncation. Video of the manual test below : Used the same names of the files in the issue but also longer ones to showcase the behavior in different file lengths : [Screencast from 2026-06-04 00-08-02.webm](https://github.com/user-attachments/assets/5f388257-2f3d-494c-ab50-bf46496dbd38) I'm obviously open to discussing this further specially the new truncation behavior of the file with the longest name in the manual test. ## Self-Review Checklist - [x] I've reviewed my own diff for quality, security, and reliability - [ ] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the UI/UX checklist - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - Fixed tab switcher truncating long file names, making files with a shared prefix indistinguishable
4 files changedLine totals unavailable