Skip to content

terminal_view: Add ability to rename terminal tabs#45800

Merged
Veykril merged 3 commits intozed-industries:mainfrom
tacshi:feat/rename_terminal
Jan 27, 2026
Merged

terminal_view: Add ability to rename terminal tabs#45800
Veykril merged 3 commits intozed-industries:mainfrom
tacshi:feat/rename_terminal

Conversation

@tacshi
Copy link
Contributor

@tacshi tacshi commented Dec 29, 2025

Closes #ISSUE

Release Notes:

  • Added ability to rename terminal tabs by right-click context menu and double-click

Recording:

zed_rename_terminal.mp4

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 29, 2025
@SomeoneToIgnore
Copy link
Contributor

Original: #44527

@davidbonan
Copy link

Nice work !
Mine can be closed (#44527) I think, I couldn’t implement double-clicking, every time I had a focus loss problem.

# Conflicts:
#	crates/workspace/src/pane.rs
@tacshi tacshi force-pushed the feat/rename_terminal branch from cd91ae0 to 58d6204 Compare January 5, 2026 05:55
@nguyenngothuong
Copy link

I've tested both this PR and #44527 locally.

Vote for this PR (#45800).

The UX here is significantly better:

  1. Inline Renaming: The input field appearing directly on the tab feels much more native and polished.
  2. Double-click to Rename: This is a standard behavior in many IDEs and is very convenient.
  3. Persistence: It works perfectly across restarts.

Great work @tacshi! Hope the core team can review and merge this soon.

@joa23

This comment has been minimized.

// instead of just activating the item.
pane.unpreview_item_if_preview(item_id);
let extra_actions = item_handle.tab_extra_context_menu_actions(window, cx);
if let Some((_, action)) = extra_actions.into_iter().next() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets do a find for the rename action instead of implicitly picking the first for whatever for now

Comment on lines +137 to +138
cwd_serialized: bool,
custom_title_serialized: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets fold this into one bool, we only need to track if we need to serialize or not, no need to go too fine grained here

Comment on lines +150 to +151
rename_editor: Entity<Editor>,
is_renaming: bool,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rename_editor: Entity<Editor>,
is_renaming: bool,
rename_editor: Option<Entity<Editor>>,

makes more sense as encoding the bool

scroll_top: Pixels,
scroll_handle: TerminalScrollHandle,
ime_state: Option<ImeState>,
last_tab_bounds: Option<Bounds<Pixels>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unused?

#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Action)]
pub struct RenameTerminal {
#[serde(skip)]
pub position: Option<Point<Pixels>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be unused?

@tacshi tacshi requested a review from Veykril January 24, 2026 06:52
Copy link
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril changed the title Add ability to rename terminal tabs terminal_view: Add ability to rename terminal tabs Jan 26, 2026
@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Jan 26, 2026

Messages
📖

This PR includes links to the following GitHub Issues: #11023
If this PR aims to close an issue, please include a Closes #ISSUE line at the top of the PR body.

Generated by 🚫 dangerJS against b2d5594

@Veykril Veykril enabled auto-merge (squash) January 26, 2026 13:56
auto-merge was automatically disabled January 27, 2026 04:09

Head branch was pushed to by a user without write access

@tacshi tacshi requested a review from Veykril January 27, 2026 04:11
@Veykril Veykril enabled auto-merge (squash) January 27, 2026 07:09
@Veykril Veykril merged commit 58a4a84 into zed-industries:main Jan 27, 2026
27 checks passed
@tacshi tacshi deleted the feat/rename_terminal branch January 27, 2026 08:01
@rekvizitt
Copy link

finally :)

naaiyy added a commit to Glass-HQ/Glass that referenced this pull request Feb 16, 2026
Key changes:
- Reopen with encoding (zed-industries#46553) - new encoding selector with reopen support
- Relative line jumps in go-to-line (zed-industries#46932)
- Terminal tab renaming (zed-industries#45800)
- Project search spinner while search underway (zed-industries#47620)
- Git: retain "since" diffs, avoid unwrap in panel, don't rebuild diff on repo change
- Extensions: fix duplicate button IDs preventing uninstall (zed-industries#47745)
- SendKeystrokes: don't use layout key equivalents (zed-industries#47061)
- Collab tests extracted to integration crate (deleted in our fork)
- Various CI, docs, and agent improvements

Conflict resolutions:
- Kept native_button style, adopted extension_button_id() for unique IDs
- Added encoding_selector::init alongside browser::init
- Fixed _cx → cx rename for new encoding selector render code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom terminal labels

8 participants