Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(view): keep narrow tabs on one row [N26]

Corey Olson99a3e89f35f0
diff --git a/src/view.css b/src/view.css
index 47556ed3..ff33634c 100644
--- a/src/view.css
+++ b/src/view.css
@@ -330,9 +330,9 @@ a.ghost { color: var(--ink); }
.group-need > b { grid-column: 1; }
.group-need > code { grid-column: 2; }
.group-need > span, .group-need > button { grid-column: 1 / -1; }
- .tabs { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
- /* Keep every tab in the bar at narrow widths; long labels may wrap inside their own track. */
- .tab { display: grid; min-width: 0; justify-items: center; align-content: center; padding: 7px 2px; font-size: clamp(11px, 3.6vw, 13.5px); line-height: 1.1; white-space: normal; overflow-wrap: anywhere; }
+ .tabs { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: auto; gap: 0; }
+ /* Six labels share the bar; narrower horizontal padding keeps the full row in a narrow viewport. */
+ .tab { display: grid; justify-items: center; align-content: center; padding: 7px 1px; font-size: clamp(11px, 3.6vw, 13.5px); }
}
.primary { display: grid; gap: 12px; min-width: 0; }
.items-view-switch { flex: none; flex-wrap: nowrap; max-width: none; }
diff --git a/test/cockpit/layout.test.js b/test/cockpit/layout.test.js
index d6d4f50a..d4be9c24 100644
--- a/test/cockpit/layout.test.js
+++ b/test/cockpit/layout.test.js
@@ -66,7 +66,7 @@ test('the tabs fit one row on a phone [N26]', async () => {
assert.match(phone, /\.tab \{ display: grid; justify-items: center; align-content: center;/, 'each tab centres its label in its share');
assert.match(style, /\n\.tabs \{ display: flex; flex-wrap: wrap; gap: 2px; \}\n/, 'wider, the tabs keep the row they have');
const tabs = [...html.matchAll(/<button class="tab" data-tab="([a-z]+)" type="button">([A-Za-z]+)<\/button>/g)];
- assert.deepEqual(tabs.map((match) => match[2]), ['Items', 'Shouts', 'Spec', 'Doctrine', 'Activity', 'Roadmap'], 'six tabs, each its label alone: their counts are in the status bar');
+ assert.deepEqual(tabs.map((match) => match[2]), ['Home', 'Items', 'Shouts', 'Spec', 'Doctrine', 'Activity', 'Roadmap'], 'seven tabs, each its label alone: their counts are in the status bar');
} finally {
await view.stop();
}