Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

fix(tabbar): let the tabs reach the bar's own height, and match the two tab actions

Bas Miliusad81db18e023
diff --git a/src/renderer/components/TabBar.tsx b/src/renderer/components/TabBar.tsx
index 81a85e38a..c112c8b25 100644
--- a/src/renderer/components/TabBar.tsx
+++ b/src/renderer/components/TabBar.tsx
@@ -368,54 +368,58 @@ export function TabBar({
</span>
)}
- {active && editingId !== p.id && (
- // On the ACTIVE tab only: the toggle says which view you are looking at, and
- // on an inactive tab it would flip a project's view without taking you there.
- // The title was a hardcoded `(⌘⇧B)` — mac glyphs shown to Linux/Windows users
- // (a pre-existing bug: it was never even hintLabel-wrapped), and stale after a
- // remap. `commandTooltip` fixes both and drops the chord entirely when the
- // command is unbound.
- <button
- className="tab__board-toggle"
- title={commandTooltip(
- kanbanActive ? 'Canvas view' : 'Kanban view',
- 'view.kanbanToggle'
- )}
- aria-label={kanbanActive ? 'Canvas view' : 'Kanban view'}
- onClick={(e) => {
- e.stopPropagation() // a tab click switches projects, this only flips the view
- const vm = useViewMode.getState()
- const settings = useSettings.getState().settings
- const omni = isOmniKanbanEnabled(settings)
- const asDefault = settings.omniKanbanAsDefault === true
- // Closing: global overlay is exclusive — any board toggle while it's open closes it.
- if (vm.globalKanban) {
- vm.toggleGlobalKanban()
- return
- }
- if (omni && asDefault) {
- vm.toggleGlobalKanban()
- } else {
- vm.toggle(p.id)
- }
- }}
- >
- {kanbanActive ? <IconCanvasView /> : <IconKanban />}
- </button>
- )}
{editingId !== p.id && (
- <button
- className="tab__caret"
- title="Project options"
- aria-label="Project options"
- onClick={(e) => {
- e.stopPropagation()
- if (menuId === p.id) closeMenu()
- else openMenu(p.id, e.currentTarget)
- }}
- >
- <IconMoreVertical />
- </button>
+ // The actions are one cluster with its own rhythm, not two more items in the
+ // tab's label row: they sit a hair apart from each other and further from the
+ // name than the name's own parts sit from one another.
+ <span className="tab__actions">
+ {active && (
+ // On the ACTIVE tab only: the toggle says which view you are looking at, and
+ // on an inactive tab it would flip a project's view without taking you
+ // there. The chord comes from `commandTooltip`, so a remap or an unbound
+ // command is not advertised as a chord that no longer works.
+ <button
+ className="tab__board-toggle"
+ title={commandTooltip(
+ kanbanActive ? 'Canvas view' : 'Kanban view',
+ 'view.kanbanToggle'
+ )}
+ aria-label={kanbanActive ? 'Canvas view' : 'Kanban view'}
+ onClick={(e) => {
+ e.stopPropagation() // a tab click switches projects, this flips the view
+ const vm = useViewMode.getState()
+ const settings = useSettings.getState().settings
+ const omni = isOmniKanbanEnabled(settings)
+ const asDefault = settings.omniKanbanAsDefault === true
+ // Closing: the global overlay is exclusive, so any board toggle while
+ // it is open closes it.
+ if (vm.globalKanban) {
+ vm.toggleGlobalKanban()
+ return
+ }
+ if (omni && asDefault) {
+ vm.toggleGlobalKanban()
+ } else {
+ vm.toggle(p.id)
+ }
+ }}
+ >
+ {kanbanActive ? <IconCanvasView /> : <IconKanban />}
+ </button>
+ )}
+ <button
+ className="tab__caret"
+ title="Project options"
+ aria-label="Project options"
+ onClick={(e) => {
+ e.stopPropagation()
+ if (menuId === p.id) closeMenu()
+ else openMenu(p.id, e.currentTarget)
+ }}
+ >
+ <IconMoreVertical />
+ </button>
+ </span>
)}
</div>
)
diff --git a/src/renderer/styles.css b/src/renderer/styles.css
index f2ae7b1c6..aa9510660 100644
--- a/src/renderer/styles.css
+++ b/src/renderer/styles.css
@@ -276,6 +276,9 @@ body,
.tabbar__projects {
display: flex;
align-items: stretch;
+ /* The bar centers its items, so without this the wrapper is only as tall as its content and the
+ tabs stretch to THAT — they have to reach the bar's own top and bottom to read as tabs. */
+ align-self: stretch;
gap: 4px;
flex: 1;
/* Load-bearing (issue #375): a flex item's min-width defaults to `auto`, which resolves against
@@ -446,6 +449,15 @@ body,
outline: none;
}
+/* The two tab actions read as one cluster: a hair between them, and a wider step from the name
+ than the 7px the tab's own parts (dot, name, badge) sit apart. */
+.tab__actions {
+ display: inline-flex;
+ align-items: center;
+ gap: 1px;
+ margin-left: 3px;
+}
+
.tab__board-toggle,
.tab__caret {
display: inline-flex;
@@ -456,7 +468,13 @@ body,
color: currentColor;
cursor: pointer;
line-height: 1;
- padding: 2px;
+ /* A fixed box, not padding around the glyph: these two sit side by side and their glyphs fill
+ very different amounts of a 14px square — the board's bars run edge to edge, the three dots
+ stand alone in the middle — so a padded box would give them hover plates of two widths and
+ read as two kinds of control. */
+ width: 22px;
+ height: 22px;
+ padding: 0;
border-radius: 5px;
/* Reachable on every tab, not only the active one, so it is never hidden: an affordance that
appears on hover cannot be found by someone who does not already know it is there. */
@@ -486,8 +504,8 @@ body,
/* Load-bearing: without this a squeezed bar shrinks the 28px + instead of scrolling the tabs. */
flex-shrink: 0;
/* Its own breathing room now the strip runs at `gap: 0` — "+" is a separate action, not the
- next tab in the row. */
- margin-left: 8px;
+ next tab in the row. Small: it belongs to the strip it ends, not to the empty bar beside it. */
+ margin-left: 2px;
width: 28px;
height: 28px;
background: transparent;