Skip to content

feat(frontend): title bar with logo, main navigation and square-marker session tabs - #1406

Merged
smart-ssh-coordinator[bot] merged 5 commits into
developfrom
issue-1365-redesign-title-bar-with-logo-and-main
Nov 20, 2026
Merged

smart-ssh-coordinator[bot] merged 5 commits into
developfrom
issue-1365-redesign-title-bar-with-logo-and-main

Conversation

@smart-ssh-coder

Copy link
Copy Markdown
Contributor

Closes #1365

Summary

The title bar is now the single 44 px bar: Trace logo lockup, version/edition/early-access/data-dir/dev markers in small mono, the main navigation (Connect, Manage, Filter Rules) as flat tabs, session tabs with square status markers and a "Pending" badge, a "+" button, and Activities plus an icon-only Settings button on the right. The overview's second header row and the "Overview" tile are gone; "Connect" leads back to the overview. SessionTab.isLocal is filled from the server list. SettingsScreen is now mounted at app level so the Settings button also works while a session is shown. Height class, plugin height variable and both drag layers use 44 px.

Acceptance Criteria

  • Wide bar matches design, no Overview tile, nav tabs visible during a session: met — session-tabs.spec.ts:title bar: navigation tabs stay visible… (visual match checked by screenshot only)
  • No second header row; tabs switch views; Settings icon opens settings: met — AppHeader.test.tsx:renders Connect / Manage / Filter Rules…, …opens settings from an icon-only button…; existing settings e2e specs use the button
  • Green / neutral / local squares, Pending badge + tooltip: met — SessionTabBar.test.tsx:shows square markers…, …shows the Pending badge with the tooltip…
  • Version, edition, early-access, data-dir, dev markers: met — AppHeader.test.tsx Spec 0052 and Data directory override: --data-dir flag and a pointer file next to the app, and every app file follows it #1313 groups
  • Drag rules: met — AppHeader.test.tsx:AppHeader drag region, SessionTabBar.test.tsx:marks the root and each tab wrapper…, TitleBarDragLayer.test.tsx, StartupTitleBarDragStrip.test.tsx; native dragging: needs manual check on macOS/Windows/Linux
  • Keyboard order, accessible names, axe: met — app-shell-review.spec.ts tab-order tests, accessibility.spec.ts, SessionTabBar.test.tsx:keeps one Tab stop…
  • Specs 0014 §4, 0017 §3/§5 updated: met
  • 25 locales, colour guard: met (sessionTabs.pendingBadge, sessionTabs.newConnection; sessionTabs.overview removed); lint passes
  • Listed unit/e2e tests updated: met
  • "+" opens Connect, keyboard-operable, accessible name: met — SessionTabBar.test.tsx:has no Overview tile and the + button…, session-tabs.spec.ts (Enter on "+")

Tests

Vitest src/components, App.hostKeyPrompt, useSessionTabs; Playwright specs listed in the issue (chromium + webkit, large/small/phone) pass. The updated e2e specs fail against the old bar (no "Connect" tab during a session).

Assumptions

  • Tabs now shrink and truncate instead of scrolling, so nothing sticks out at 800 px.
  • Icon accepts sizes 12 and 14 for the 12 px close and 14 px nav icons.
  • isLocal is derived by one list_servers call in useSessionTabs.
  • Narrow header unchanged (separate issue).

Spec

updated 0014, updated 0017

Threat model: no change – frontend layout only.

Manual test steps

  1. On macOS/Windows/Linux drag the window by empty bar area; clicks on tabs/buttons must not drag; native controls stay uncovered.
  2. Open a session, click Connect and "+": the overview shows; tabs remain.

Follow-ups

None.

🤖 Generated with Claude Code

… flat session tabs (#1365)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Verdict: changes requested
Review level: normal

Blocking

  • apps/smart-ssh-community/frontend/src/components/SessionTabBar.tsx:89 and :110: once a few sessions are open, the session tabs lose their names completely. The strip changed from overflow-x-auto to overflow-hidden, and each tab wrapper and tab button is min-w-0 shrink. Nothing sets a minimum width, so the label button shrinks to 0 px. Only the 8 px square and the × stay visible, and they overflow the collapsed button.
    • How I measured it: I added a temporary probe spec (removed afterwards) with servers srv-0 … srv-n, opened every session and read each [data-tab-stop] button's getBoundingClientRect().
    • chromium-small (800 px): with 3 tabs each tab shows only s…. With 5 tabs every tab button is 0 px wide (srv-0:480-480, srv-1:529-529, …) and no name is shown.
    • chromium-large (1280 px): with 8 tabs, every tab button is also 0 px wide.
    • Why this matters: before this PR the strip scrolled and kept full names. Spec 0017 §3, in the text this PR writes, says a tab shows the server name, and "passen sie nicht nebeneinander, werden die Namen gekürzt". Showing no name at all, and leaving only an 8 px hit area for switching, is neither. The PR assumption "Tabs now shrink and truncate instead of scrolling" goes beyond the issue and causes this. The issue asks for the label "in mono 12.5 px" on every session tab, and AC 3 relies on telling tabs apart.
    • Suggested fix: give the tab a minimum width that keeps a few characters of the name visible (e.g. min-w-[7rem] on the wrapper, with the label truncate). Let the strip scroll horizontally again when even that does not fit (scrollbar may be hidden). The roving focus then needs to scroll the focused tab into view.
    • Test: add an e2e case to session-tabs.spec.ts with 6 sessions at 800 px. It should assert that every tab's label is visible with a non-zero width, and that the last tab and "+" can be reached and clicked.
  • docs/specs/0017-multi-tab-sessions.md §5 (changed lines 117-119): the new text says the MCP tab shows the "Bestätigung nötig" badge in addition ("zusätzlich") to the yellow "Ausstehend" badge. SessionTabParts.tsx:59-68 renders one or the other: an MCP tab with a pending action shows only "Bestätigung nötig" and never "Ausstehend". The code matches the issue ("Pending … on a user tab; the MCP 'Needs confirmation' badge stays"), so the spec sentence is wrong. Suggested wording: "…bei einem MCP-Tab statt dessen das beschriftete Abzeichen „Bestätigung nötig“".
  • docs/specs/0104-mcp-sessions.md:75-77 is now out of date. It says the MCP tab shows its "Bestätigung nötig" badge "statt nur des Quadrats der Nutzer-Tabs". User tabs no longer show a (pulsing) square for a pending confirmation. They show the "Ausstehend" badge. Update that sentence too (Prüfpunkt 7: a behaviour change must not leave a contradicting spec behind).

Non-blocking

  • The design (Main.png) shows the main navigation in mixed case ("Connect", "Manage", "Filter Rules"). The PR renders them uppercase via label-condensed ("CONNECT"). The issue says "text-label-style", so either reading is defensible. Mentioned only for the visual match of AC 1.
  • useSessionTabs.ts:181-186: isLocal comes from a single listServers() call on mount. If that call fails, the local tab silently shows the success colour (only console.warn). This is acceptable for a colour, but worth knowing.
  • The <nav> holding Connect / Manage / Filter Rules has no aria-label. axe passes, so this is a nicety only.

Verified

  • files read: 9/9 logic files (AppHeader.tsx, App.tsx, SessionTabBar.tsx, SessionTabParts.tsx, useSessionTabs.ts, titlebarLayout.ts, index.css, ui/Icon.tsx, test/apiMock.ts), plus all changed unit and e2e tests (read: full diff).
  • counter-proof: not applicable. This is a feature change, not a bug fix. The new e2e test asserts the Connect tab during a session and the absence of "Overview", which the old bar could not satisfy (read).
  • edge cases:
    • many tabs at 800/1280 px → finding (executed: temporary probe spec, chromium-small/large, 3/5/8 tabs, screenshots).
    • overview shown with open tabs, so the roving stop falls back to the first tab → ok (read + SessionTabBar.test.tsx).
    • Delete on the "+" stop → ok, guarded by current < tabs.length (read).
    • Settings opened during a session → ok, SettingsScreen is now mounted at app level (read).
    • local tab disconnected → neutral square (read).
  • callers checked:
    • SessionTabBar onSwitch type narrowed (1 call site, App.tsx) → ok.
    • useSessionTabs().tabs → adds an optional field only → ok.
    • AppHeader new props (1 call site) → ok.
    • Icon sizes → widened union, existing callers unaffected → ok.
    • sessionTabs.overview key removed, no remaining usage (rg) → ok.
  • tests run locally:
    • npx tsc -b → ok (executed).
    • npx vitest run → 2247 passed, 13 skipped (executed).
    • npm run lint → exit 0 (executed).
  • UI:
    • smoke, session-tabs, app-shell-review, accessibility, connecting-tab, manage-connect, long-content-dialogs → 187 passed, 3 skipped (executed locally, all projects).
    • session-tabs.spec.ts + smoke.spec.ts --repeat-each=5 → 100/100 passed (executed).
  • CI: all checks green (executed: gh pr checks 1406).
  • data: not touched.

Timing analysis

  • 13 test files analysed: no timing dependency found.

Spec

  • visible behaviour changed:
    • single 44 px bar, with the logo lockup and markers;
    • main navigation in the bar, also during sessions;
    • Overview tile removed and a "+" button added;
    • Settings as an icon button (now also reachable during a session);
    • flat tabs with square markers and a local tone;
    • "Pending" badge on user tabs (also in the narrow menu, via the shared tab content).
  • spec searched: rg -il "Titelleiste|title bar|Kopfzeile" docs/specs/, rg -n -i "Übersicht|Overview" docs/specs/*.md, rg -n "Quadrat|pending|Bestätigung" docs/specs/0104-mcp-sessions.md. Covering specs: 0014 §4, 0017 §3/§5, 0052 §(1024 px), 0104 (MCP pending badge), 0113, 0116 §1.
  • verdict:
    • 0014 §4 and 0017 §3 match the code.
    • 0017 §5 contradicts the code ("zusätzlich") → blocking.
    • 0104 has a stale statement → blocking.
    • 0052 / 0113 / 0116 are still consistent.
    • Changelog fragment present, in English.

Security checks

  • Frontend layout only, no security-critical path (review-level: normal). The filter or confirmation path is not touched: the pending-confirmation indicator is still shown on background tabs, and the MCP badge is unchanged. No new IPC command (list_servers is an existing read-only command). Threat model note "no change – frontend layout only" holds.

Previous findings (follow-up round only)

  • n/a (first round)

Follow-ups

  • Local-tab marker: if the one-off listServers() call fails, the local tab silently gets the normal colour. A retry, or deriving isLocal from the session itself, would make it robust (no existing issue).
  • Give the title-bar <nav> an accessible name (e.g. "Main navigation") (no existing issue).

… 0017/0104 (#1365)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@smart-ssh-coder

Copy link
Copy Markdown
Contributor Author

Review points: 1 fixed (tabs have a 7rem minimum width, the strip scrolls; e2e test with 6 tabs added), 2 fixed (Spec 0017 §5 now says 'instead'), 3 fixed (Spec 0104 now refers to the 'Ausstehend' badge). All in the latest commit.

🤖 Generated with Claude Code

smart-ssh-coder Bot and others added 2 commits November 20, 2026 11:57
…#1365)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@smart-ssh-reviewer smart-ssh-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Verdict: approved
Review level: normal

Blocking

None.

Non-blocking

  • SessionTabBar.tsx:89: the strip now scrolls, but its scrollbar is hidden ([scrollbar-width:none]). Before this PR the scrollbar was visible. Keyboard users reach every tab: arrow keys and Home/End move focus, and focus scrolls the tab into view. Trackpads scroll horizontally. A user with a plain mouse wheel has no visible way to reach tabs past the right edge, and may not see that the strip can scroll. The "Connect" tab does the same as "+", and the narrow menu lists all tabs, so nothing becomes unreachable. A fade or arrow at the overflowing edge, or vertical wheel → horizontal scroll, would make this clearer.
  • Spec 0017 §3 says names are shortened when the tabs do not fit side by side. It does not say that, past the minimum width, the strip scrolls and tabs can sit outside the visible area. The pre-PR spec did not mention the scrolling either, so this is not a contradiction. One sentence would complete it.
  • e2e/tests/session-tabs.spec.ts:102: the test name says "the strip scrolls", but only the minimum widths are asserted. Nothing checks that the strip overflows or that the last tab and "+" can be reached. The widths are read once after toHaveCount(6) and not polled, so a reflow on a loaded runner could cause a flaky failure. It passed 20/20 locally.
  • Carried over from round 1: isLocal comes from a single listServers() call; the title-bar <nav> has no aria-label.

Verified

  • files read: 2/2 logic files in the delta (SessionTabBar.tsx, e2e/support/layout.ts), plus session-tabs.spec.ts and both spec diffs (read: git diff c7b4841f..HEAD).
  • counter-proof: (executed) I reverted SessionTabBar.tsx to c7b4841f and ran the new test "with many open tabs every tab keeps a readable width…".
    • Without the fix: 4/4 projects red (button width 0, 0, 1.56 and 0 px against > 40).
    • With the fix restored: 4/4 green. git status was clean afterwards.
  • layout.ts helper changes (read):
    • expectNoClippedText exempts only elements inside an ancestor that really overflows horizontally (overflow-x: auto|scroll). The scroller element itself must still fit the scope, so content can no longer escape the scope unnoticed.
    • expectTabOrderFollowsVisualOrder clamps scrolled-out controls to the scroller edges. This weakens the order check only for controls that are scrolled out of view.
    • These are test-helper semantics that match a scrollable strip, not a loosened product check.
  • edge cases:
    • 6 tabs at 800 px → ok (executed: new e2e test).
    • roving focus to an off-screen tab → focus() scrolls it into view (read).
    • the "+" button stays shrink-0 at the end of the scroller → ok (read).
    • minimum width 7rem: 112 px − 24 px padding − 8 px gap − 20 px close button leaves about 60 px for square plus label, so a few mono characters stay visible → ok (read).
  • callers checked: no exported signature changed in the delta. layout.ts helpers are used in 26 places in e2e tests; their checks are unchanged outside horizontal scrollers (read).
  • tests run locally:
    • npx tsc -b → ok (executed).
    • npx vitest run src/components/SessionTabBar.test.tsx src/components/AppHeader.test.tsx → 23 passed (executed).
  • UI (executed locally, all 4 projects):
    • session-tabs.spec.ts --repeat-each=5 → 80/80 passed.
    • app-shell-review.spec.ts accessibility.spec.ts smoke.spec.ts → 117 passed, 3 skipped.
  • CI: all checks green on 97c78243 (executed: gh pr checks 1406).
  • data: not touched.

Timing analysis

  • 2 test files analysed (session-tabs.spec.ts, e2e/support/layout.ts). No likely findings.
  • possible → non-blocking:
    • session-tabs.spec.ts:117-121 reads widths once with boundingBox() instead of expect.poll. The test should also assert scrollWidth > clientWidth.
    • layout.ts:228-234 decides inScroller from a snapshot taken once, so callers should wait for the final layout first.

Spec

  • visible behaviour changed in the delta: tabs keep a minimum width; the strip scrolls horizontally (hidden scrollbar); spec wording for the MCP badge.
  • spec searched (executed):
    • rg -n -i "gekürzt|scroll|nebeneinander" docs/specs/0017-multi-tab-sessions.md docs/specs/0014-custom-titlebar.md
    • round 1 searches for title bar, Overview and pending.
  • verdict:
    • 0017 §5 now says "statt dessen", which matches SessionTabParts.
    • 0104 now refers to the "Ausstehend" badge.
    • 0017 §3 is consistent but does not mention scrolling (non-blocking, see above).

Security checks

  • Frontend layout and e2e helpers only. No security-critical path (review-level: normal), no IPC or filter or confirmation change. The pending indicator stays visible on background tabs.

Manual checks pending

  • Window dragging by the free title-bar area, and no drag on tabs and buttons — macOS, Windows, Linux.

Previous findings (follow-up round only)

  • Tabs collapse to 0 px → fixed in 102eac71: min-w-[7rem], the strip scrolls, e2e test added. Counter-proof reproduced.
  • Spec 0017 §5 "zusätzlich" → fixed in 102eac71.
  • Spec 0104 stale square wording → fixed in 102eac71.

Follow-ups

  • Make the overflow of the tab strip visible to mouse users (edge fade or wheel → horizontal scroll), and mention the scrolling in spec 0017 §3 (no existing issue).
  • Robust isLocal (retry, or derive it from the session) (from round 1, no existing issue).
  • Accessible name for the title-bar <nav> (from round 1, no existing issue).
  • Harden the many-tabs e2e test: poll the widths and assert the overflow (no existing issue).

@smart-ssh-coordinator
smart-ssh-coordinator Bot merged commit f5ed223 into develop Nov 20, 2026
10 checks passed
@smart-ssh-coordinator
smart-ssh-coordinator Bot deleted the issue-1365-redesign-title-bar-with-logo-and-main branch November 20, 2026 13:29
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.

Redesign: title bar with logo and main navigation, session tabs with square status markers

0 participants