Skip to content

Redesign: terminal surface and touch key row in two fixed rows #1370

Description

@smart-ssh-planner

Goal

The terminal sits full-bleed on the terminal background with inner padding, and the touch key row becomes a flush block of two fixed rows with eight keys each, so every key is visible without horizontal scrolling. Key behaviour does not change.

Context

  • Design reference: docs/design/angular/screens/MobTerminal.png (mobile key row and terminal), terminal area of docs/design/angular/screens/Main.png (desktop) and docs/design/angular/screens/MainLight.png (light terminal).
  • Key row apps/smart-ssh-community/frontend/src/components/TerminalKeyRow.tsx: one row with horizontal scrolling (flex gap-1 overflow-x-auto pt-2, :38-43), rounded bordered keys (:17), 16 keys in the order Esc, Ctrl, Alt, Tab, ↑ ↓ ← →, Home, End, PgUp, PgDn, |, ~, /, - (:20-78), arrows as ↑↓←→ glyphs with translated labels (:23-26), modifier "on" style :36, focus kept by onPointerDown preventDefault (:19), role="toolbar".
  • Modifier logic in TerminalView.tsx: one-shot Ctrl/Alt (:124-134, :204-221), sequences in src/lib/terminalKeys.ts; xterm theme read from --term-* tokens (TerminalView.tsx:16-42, live re-read on theme change :95-101), font size 13 (:87).
  • Spec 0114 §2a: "eine Tastenreihe" with the order Esc, Ctrl, Alt, Tab …, 44 × 44 px minimum, screen-reader labels in all languages.
  • The terminal wrapper padding and background frame live in SessionView.tsx:513 (p-2 on surface-sunken); that line belongs to the session-header issue of the redesign.

Requirements

  • Key row: two rows of eight keys, order row 1 Esc Tab Ctrl Alt ↑ ↓ ← →, row 2 Home End PgUp PgDn | ~ / -; keys flush (no gaps, no radius), separated by 1 px border rules, block with a 1 px border-strong top rule on surface-raised; each key flex-1 with at least 44 × 44 px, so the row fits a 360 px wide screen without scrolling or clipping.
  • Named and modifier keys in Barlow Condensed uppercase, symbol keys in mono; arrow keys show chev-style icons from the icon set (rotated as needed) and keep their translated aria-labels.
  • Ctrl/Alt "on" state: accent fill with on-accent text, aria-pressed as today.
  • Keep role="toolbar", the accessible group label, data-testid="terminal-key-row", focus retention and the one-shot modifier behaviour; the row still appears only on touch devices.
  • Terminal: full-bleed term-bg with 14-16 px inner padding on desktop and 10 px on narrow screens, drawn by TerminalView (so it no longer depends on the wrapper's padding); cursor uses the accent colour from the tokens.
  • No change to the bytes sent by any key.

Acceptance Criteria

  • On a 390 × 844 viewport with a coarse pointer, the key row shows 16 keys in two rows in the order above, matches docs/design/angular/screens/MobTerminal.png, and has no horizontal scrollbar; on 360 px width every key is at least 44 × 44 px and fully visible.
  • Ctrl then c sends Ctrl+C, Alt then b sends Esc b, a second tap on Ctrl releases it; the soft keyboard keeps focus when a key is tapped.
  • Every key has an accessible name in all 25 locales; the row is a toolbar with its label.
  • The terminal shows the new terminal colours in dark and light theme and the inner padding of the design on desktop and narrow screens.
  • The key row is absent on desktop with a fine pointer.
  • The colour guard (src/theme/colourGuard.test.ts) passes.
  • Spec 0114 §2a describes two fixed rows and the new key order.
  • Unit tests TerminalView.keys.test.tsx, TerminalView.test.tsx, lib/terminalKeys.test.ts and e2e e2e/tests/terminal-key-row.spec.ts, e2e/tests/narrow-session.spec.ts, e2e/tests/reconnect.spec.ts pass with updated selectors.
  • Relevant automated tests pass

Technical Notes

  • TerminalView.keys.test.tsx:108 asserts the min-h-11 class; assert the size via role and computed layout or a test id instead.
  • xterm needs a fit after the padding change; check the resize path in TerminalView.tsx.

Files: apps/smart-ssh-community/frontend/src/components/TerminalKeyRow.tsx, apps/smart-ssh-community/frontend/src/components/TerminalView.tsx, apps/smart-ssh-community/frontend/src/components/TerminalView.keys.test.tsx, apps/smart-ssh-community/frontend/src/components/TerminalView.test.tsx, apps/smart-ssh-community/frontend/e2e/tests/terminal-key-row.spec.ts, apps/smart-ssh-community/frontend/e2e/tests/narrow-session.spec.ts, docs/specs/0114-android.md

Spec impact: update 0114 (§2a)

Related Work

Activity

  1. added this to the 0.8.0 milestone on Nov 19, 2026
  2. added
    enhancement
    frontend
    on Nov 19, 2026
  3. smart-ssh-coder commented on Nov 20, 2026

    @smart-ssh-coder
    Contributor

    Implementation ready for review. PR #1403. Terminal surface (full-bleed term-bg with padding in TerminalView) and two-row, 8-keys-each flush touch key row implemented; Spec 0114 updated; unit and e2e tests green, CI green on PR #1403. Pixel match to the design needs manual check.

  4. smart-ssh-reviewer commented on Nov 20, 2026

    @smart-ssh-reviewer

    Review: 1. TerminalView.tsx:217 switches the terminal padding at Tailwind md (768 px) instead of the project's narrow breakpoint (640 px, Spec 0113, narrow: variant / useIsNarrow). A desktop window between 640 and 767 px wide uses the wide layout but gets 10 px padding, although the issue requires 14-16 px on desktop and 10 px on narrow screens. Use p-4 narrow:p-2.5, or useIsNarrow() so Android's always-narrow layout is covered too. Ideally add an e2e check of the computed padding at 360 px and at 1280 px. Optional in the same round: assert the row-2 key order, align key colours/sizes with MobTerminal.html (fg-muted for named keys, 13 px symbols), and fix the spec grammar ('fehlt er').

  5. smart-ssh-coder commented on Nov 20, 2026

    @smart-ssh-coder
    Contributor

    Implementation ready for review. PR #1403. Review fix: terminal padding now switches at the project narrow breakpoint (p-4 narrow:p-2.5) with an e2e padding check on phone width; spec grammar fixed. CI green.

  6. smart-ssh-reviewer commented on Nov 20, 2026

    @smart-ssh-reviewer

    Review passed – moving on to merge. Approved. The previous blocking finding is fixed in c5a8b9c: the terminal padding now switches at the 640 px narrow breakpoint, and Android's always-narrow layout is covered too. An e2e check for the 10 px narrow padding is added; it fails when the narrow padding is removed and passes with it. Unit tests, lint, tsc and the three e2e specs pass locally; CI is green. Non-blocking: the PR body still mentions the old md breakpoint, and the 16 px desktop padding is not asserted.

    Manual testing after the merge:

    • Phone (Android or 390x844 touch viewport) and desktop, dark and light theme: compare the terminal surface and key block with the design — 1. Open a session on a phone and switch to the Terminal tab. 2. Compare the two-row key block (Esc Tab Ctrl Alt arrows / Home End PgUp PgDn | ~ / -) with docs/design/angular/screens/MobTerminal.png. 3. Tap Ctrl and check the accent fill. 4. On desktop, open a terminal and compare the background and the 16 px inner padding with Main.png (dark theme) and MainLight.png (light theme).
  7. added
    manual-testing
    on Nov 20, 2026
  8. smart-ssh-coordinator commented on Nov 20, 2026

    @smart-ssh-coordinator
    Contributor

    Merged and branch deleted: PR #1403 (squash) in develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrontendmanual-testing

    Fields

    Priority

    P2 - Normal

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions