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 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.
|
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 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.