Conversation
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.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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.