Skip to content

feat(terminal): name the tabs, and let the user rename them - #3231

Merged
abose merged 1 commit into
mainfrom
ai
Sep 28, 2026
Merged

abose merged 1 commit into
mainfrom
ai

Conversation

@abose

@abose abose commented Sep 28, 2026

Copy link
Copy Markdown
Member

Every tab carried the same terminal icon, which told them apart not at all: open three shells and the strip showed three identical glyphs. The name each tab already knew was hidden in the narrow strip, and shown only when the panel was wide enough. So the icon gives up its slot — the strip widens a little and always shows the name.

The name is the running process, which says nothing while several shells sit idle at a prompt, all reading "zsh". A pencil on hover lets the user name a tab themselves; the name shows in italics so it reads as theirs, and emptying the field hands the tab back to the process label.

Names are kept in global state, so one means the same thing wherever the user is working, with no project switching to reason about. They are keyed by terminal id, which counts from term_1 in creation order and starts over each run: a name belongs to a tab's place in the strip rather than to one shell, which is as close to remembering terminals as this can get while the panel still recreates none of them on boot.

Two details the implementation turns on. The pencil's click is bound to the pencil rather than delegated, so it runs before the row's own handler and can stop it there: let it through and the row activates the terminal, which takes focus straight back off the field — the same reason a double click could never work. And a refresh will not rebuild the rows while a field is open, because emptying the list tears the field out, the removal fires blur, and blur commits, landing a half-typed name nobody confirmed.

Hovering trades the cwd for the controls rather than reserving room for them, which leaves the name more space, not less, and spares every future control the margin arithmetic that went stale the moment a second one appeared.

Every tab carried the same terminal icon, which told them apart not at
all: open three shells and the strip showed three identical glyphs. The
name each tab already knew was hidden in the narrow strip, and shown only
when the panel was wide enough. So the icon gives up its slot — the strip
widens a little and always shows the name.

The name is the running process, which says nothing while several shells
sit idle at a prompt, all reading "zsh". A pencil on hover lets the user
name a tab themselves; the name shows in italics so it reads as theirs,
and emptying the field hands the tab back to the process label.

Names are kept in global state, so one means the same thing wherever the
user is working, with no project switching to reason about. They are
keyed by terminal id, which counts from term_1 in creation order and
starts over each run: a name belongs to a tab's place in the strip rather
than to one shell, which is as close to remembering terminals as this can
get while the panel still recreates none of them on boot.

Two details the implementation turns on. The pencil's click is bound to
the pencil rather than delegated, so it runs before the row's own handler
and can stop it there: let it through and the row activates the terminal,
which takes focus straight back off the field — the same reason a double
click could never work. And a refresh will not rebuild the rows while a
field is open, because emptying the list tears the field out, the removal
fires blur, and blur commits, landing a half-typed name nobody confirmed.

Hovering trades the cwd for the controls rather than reserving room for
them, which leaves the name more space, not less, and spares every future
control the margin arithmetic that went stale the moment a second one
appeared.
@sonarqubecloud

Copy link
Copy Markdown

@abose
abose merged commit beb3bf3 into main Sep 28, 2026
14 of 21 checks passed
@abose
abose deleted the ai branch September 28, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant