Skip to content

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

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 globally, so one means the same thing wherever the user is working, with no project switching to reason about. They are stored as a list in tab order: terminal ids are handed out afresh on every run and again on every restart, so nothing identifies a tab across them, while a list is exactly what says how many tabs to bring back and what to call them. Opening an empty panel restores the lot at once — the panel is usually shut when a window starts, and bringing tabs back one press of + at a time would not be bringing them back at all. Restarting the terminals for a new project carries the names onto the replacements, and closing a named tab drops it from the list, which is how the user says not to bring it back. Nothing but the tabs and their names returns: the shells are new, and with nothing named the panel opens the single terminal it always did.

Three 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. 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. And the tick that finishes an edit commits on mousedown, because a click would let the field blur and finish first, taking the button away between the press and the release.

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. The field leaves its background and text colour to the theme so it reads like every other input, and sets all four margins, the theme's own bottom margin for form inputs having pushed it off the row's centre.

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 globally, so one means the same thing wherever the user is
working, with no project switching to reason about. They are stored as a
list in tab order: terminal ids are handed out afresh on every run and
again on every restart, so nothing identifies a tab across them, while a
list is exactly what says how many tabs to bring back and what to call
them. Opening an empty panel restores the lot at once — the panel is
usually shut when a window starts, and bringing tabs back one press of +
at a time would not be bringing them back at all. Restarting the
terminals for a new project carries the names onto the replacements, and
closing a named tab drops it from the list, which is how the user says
not to bring it back. Nothing but the tabs and their names returns: the
shells are new, and with nothing named the panel opens the single
terminal it always did.

Three 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. 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. And
the tick that finishes an edit commits on mousedown, because a click
would let the field blur and finish first, taking the button away between
the press and the release.

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. The field leaves its background and text colour to the theme so
it reads like every other input, and sets all four margins, the theme's
own bottom margin for form inputs having pushed it off the row's centre.
@sonarqubecloud

Copy link
Copy Markdown

@abose
abose merged commit 931a96c into main Sep 28, 2026
13 of 21 checks passed
@abose
abose deleted the ai branch September 28, 2026 11:33
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