Skip to content

Redesign foundation: Angular palette (dark and light), radius 0, focus and shadow rules, type utilities and shared primitives #1362

Description

@smart-ssh-planner

Goal

Switch the app to the approved "Angular" design language at the token and primitive level: new graphite/cyan palette for the dark and the light theme, radius 0 everywhere, flat depth (1 px rules instead of shadows), a 2 px focus ring without offset, uppercase Barlow Condensed labels, square status markers, and dialogs with corner ticks. After this issue every screen already shows the new colours and square corners; the per-view issues of the redesign only adjust layout and details.

Context

  • Design reference: docs/design/angular/README.md, docs/design/angular/tokens.md (token values for both themes with contrast), docs/design/angular/screens/Tokens.png (type scale, button/badge/input/tab specimens, "Rules of the system"), docs/design/angular/screens/Main.png and docs/design/angular/screens/MainLight.png (whole window in both themes).
  • Colours live only in apps/smart-ssh-community/frontend/src/theme/dark.css (palette primitives :8-65, semantic tokens :68-136, terminal :144-165) and src/theme/light.css (overrides under html[data-theme="light"]). The design keeps every semantic token name (--surface*, --fg*, --accent*, --danger*, --warning*, --success*, --info*, --local*, --term-*); only values change: indigo becomes signal cyan, slate becomes neutral graphite (THEMING.md).
  • Radius: src/index.css:199-203 sets --radius-sm…xl to 1-3 px; rounded-full is kept on purpose (:195-198) and used for status dots and pulses in 12 places (SessionTabParts.tsx:32,66, ui/Tabs.tsx:82, chat/ActionCard.tsx:278, chat/RiskBadges.tsx:87, ChatPanel.tsx:268,281,292,319, fileBrowser/TransferList.tsx:93, InjectionCheckStatus.tsx:18, ui/Spinner.tsx:6).
  • Shadows: shadow-lg/xl/md/sm in 22 places (menus ui/Menu.tsx:129, tooltip ui/Tooltip.tsx:55, dialogs ui/DialogFrame.tsx:102, toasts, drag ghost TreeDragGhost.tsx:24 …).
  • Focus utilities focus-ring, focus-ring-flush, focus-ring-inset in src/index.css:317-331 (2 px ring with 1 px offset); fields use focus:outline-2 focus:outline-focus in FIELD_CONTROL_CLASS (ui/Field.tsx:59-62).
  • Fonts are already bundled (src/index.css:42-104, --font-sans/heading/mono :120-122). Labels today are sentence case text-sm font-medium (ui/Field.tsx:36); dialog titles font-heading text-lg (ui/DialogFrame.tsx:139-142).
  • Primitives: ui/Button.tsx (variants :19-28, sizes :30-33), ui/Field.tsx, ui/Tabs.tsx (underline tabs, rounded-t :71), ui/DialogFrame.tsx (panel :102), ui/Menu.tsx, ui/Tooltip.tsx, ui/TagInput.tsx, ui/Spinner.tsx, ModalBackdrop.tsx. Barrel ui/index.ts.
  • Guards that must stay green: src/theme/colourGuard.test.ts (no hard-coded colours, no literal focus ring chain), src/themeContrast.test.ts (AA contrast for both themes), src/lib/theme.test.ts (light overrides every literal variable of dark), src/uiKitGuards.test.ts.
  • Native background colours copy --surface-sunken: apps/smart-ssh-community/gen/android/app/src/main/java/com/smartssh/desktop/MainActivity.kt:79-81 (0xFF090C14 / 0xFFF4F6FA), gen/android/app/src/main/res/values/colors.xml and values-night/colors.xml (app_background), described in docs/android-build.md (Launcher/Insets section, says "the app design is always dark" and #090C14).
  • docs/ui-guidelines.md:9-12 still says "indigo accent, nearly square radii … The app has a dark theme only", :18 "Indigo fill", :79 "2 px indigo ring".

Requirements

Palette and themes

  • dark.css and light.css: set the values from docs/design/angular/tokens.md. Tokens the design does not list (for example -fg-soft, -fg-subtle, -subtle-hover, -strong, -fg-softer, -fg-faint(est), info, local, local-border, web-*, mcp-*, selection, on-accent, on-solid, window-control colours, all --term-ansi-*) are derived on the same ramp so that every contrast check of themeContrast.test.ts still passes. Terminal ANSI colours follow the new accent (cyan instead of indigo for blue/cyan/cursor) in both themes.
  • Keep the token names and the two-layer structure; rename the palette primitives only if it keeps THEMING.md correct (update its mapping table accordingly).
  • Add a token --grid-line (both themes) for the 1 px grid background of the start screens (docs/design/angular/screens/DeskUnlock.png), mapped in index.css.
  • Android: update the background constants in MainActivity.kt and app_background in both colors.xml to the new --surface-sunken values; update docs/android-build.md.

Shape, depth, focus

  • Radius 0 everywhere: all --radius-* theme values become 0, rounded-full is no longer used for status markers (see StatusSquare below). The spinner and the three-dot "typing" pings keep their animation; see Open questions for their shape.
  • No blurred shadows: the shadow theme values become none. Floating layers get a hard offset shadow without blur, colour from a new token --shadow-offset (defined in both themes): utilities shadow-offset-sm (4 px: menus, tooltip, drag ghost), shadow-offset (6 px: popovers such as the activity panel) and shadow-offset-lg (8 px: dialogs), as in docs/design/angular/screens/DeskDialogs.png and DeskActivity.png. Inline content (cards, toasts in the flow, panels) has no shadow; depth comes from 1 px border/border-strong rules and the surface steps.
  • Focus: focus-ring and its variants draw a 2 px focus ring without offset (visually the design's "1 px accent border + 1 px accent ring"); FIELD_CONTROL_CLASS uses the same look. Contrast of the ring stays at least 3:1 on every surface in both themes.

Typography

  • Add utilities in src/index.css for the design's type scale (docs/design/angular/screens/Tokens.png): text-display (Barlow Condensed 32/700, +0.06em, uppercase), text-title (20/600, +0.05em, uppercase), text-label (11.5/600, +0.14em, uppercase, fg-faint). Body stays Barlow 14/400; host names, paths, commands, counts and key values use JetBrains Mono (font-mono).
  • For :lang(ja), :lang(zh), :lang(ko) and Devanagari scripts the letter spacing of these utilities is normal (uppercase has no effect there).

Primitives (in src/components/ui/, exported from ui/index.ts)

  • Button: variants as in the specimen: primary (accent fill, on-accent text), secondary (transparent, border-strong outline, fg-soft text), danger (transparent, danger-border outline, danger-fg text), ghost (no border, fg-muted), bare unchanged. Labels in Barlow Condensed 600, uppercase, +0.08em. Height 32 px for md, 26-28 px for sm, at least 44 px in the narrow layout (narrow: variant). New iconOnly boolean gives a square button (requires aria-label).
  • Field: label with text-label; help and error text unchanged in function.
  • Tabs: active tab with a 2 px accent top rule and surface-raised fill, inactive tabs fg-subtle, uppercase condensed labels, a 1 px bottom rule under the strip; the invalid marker becomes a StatusSquare.
  • DialogFrame (layout of docs/design/angular/screens/DeskDialogs.png): square surface-raised panel with a 1 px border-strong rule and shadow-offset-lg; a header row (optional leading icon prop, title in text-title, 1 px bottom rule), a padded body, and the action row as a footer with a 1 px top rule on surface. New optional ticks prop ("accent" | "danger") draws decorative corner ticks on the two top corners via CornerTicks; the host-key dialog uses danger, all other dialogs none. A new optional tone="danger" colours the panel rule with danger-border. The narrow layout stays full-window, without ticks and shadow.
  • New CornerTicks: decorative 12-14 px L-marks (2 px) just outside the corners of its positioned parent, aria-hidden, props tone (accent | danger) and corners (top | all); used by DialogFrame and by the unlock card (all four corners, docs/design/angular/screens/DeskUnlock.png).
  • New Badge: outline badge (20 px high, condensed 11 px uppercase), tones neutral | accent | success | warning | danger | local, optional leading StatusSquare.
  • New StatusSquare: 8 px solid square (aria-hidden), tones success | warning | danger | local | neutral | accent, optional pulse. Replaces the round status dots in SessionTabParts.tsx:32,66, ui/Tabs.tsx:82, chat/ActionCard.tsx:278, chat/RiskBadges.tsx:87, fileBrowser/TransferList.tsx:93 in this issue (one-line swaps, so the old dots disappear everywhere at once).
  • Menu, Tooltip, TagInput chips: square, 1 px rules, shadow-offset-sm for menu and tooltip.

Docs

  • THEMING.md (palette table, radius/shadow/focus rules, new utilities and primitives) and docs/ui-guidelines.md (accent colour, button looks, focus ring, both themes, type scale, status squares, corner ticks) describe the new system.

Acceptance Criteria

  • With the dark theme, --surface, --accent, --fg, --border resolve to the values of docs/design/angular/tokens.md (#0e1116, #2cc6e8, #e3e7ed, #242b35); with the light theme to #ffffff, #0a7fa0, #12161c, #d5dae1.
  • themeContrast.test.ts passes unchanged in its thresholds for both themes; theme.test.ts passes.
  • No element in the running app has a non-zero border-radius except the spinner and the typing pings (if kept round per the open question), checked by a unit or e2e check over the main screen, settings and a dialog.
  • Menus and tooltip use shadow-offset-sm, dialogs shadow-offset-lg; no element has a blurred box shadow (shadow-sm/md/lg/xl resolve to none).
  • Keyboard focus on a button, an input, a tab and a menu item shows a 2 px ring without offset with at least 3:1 contrast in both themes.
  • Button, Field, Tabs, DialogFrame, Badge, StatusSquare, CornerTicks match the specimens in docs/design/angular/screens/Tokens.png; a DialogFrame with ticks="danger" shows the two corner ticks on wide windows and none in the narrow layout; without ticks none are drawn.
  • The listed round status dots are StatusSquares; the pulsing "waiting for confirmation" marker on a tab still pulses.
  • Field labels and dialog titles are uppercase Barlow Condensed in Latin languages; in Japanese the label has no extra letter spacing.
  • Android window background matches --surface-sunken of both themes (constants and colors.xml), and docs/android-build.md says so.
  • THEMING.md and docs/ui-guidelines.md describe the new palette, radius, shadow, focus and type rules and the new primitives.
  • colourGuard.test.ts and uiKitGuards.test.ts pass; unit tests of the primitives (ui/ui.test.tsx, ui/Menu.test.tsx, ui/TagInput.test.tsx) cover the new variants, Badge and StatusSquare.
  • Relevant automated tests pass

Technical Notes

  • Tailwind v4: radius and shadow values are @theme variables in src/index.css; setting them there changes every rounded*/shadow-* class without touching components. Only the listed status dots need a component change in this issue; everything else is left to the per-view issues.
  • Do not hard-code colours in TS/TSX (colour guard); the corner ticks are CSS borders or an inline SVG with currentColor/token classes.
  • Capture before/after images with the e2e screenshot helper (SCREENSHOT_LABEL=before|after, e2e/support/screenshots.ts) for the main screen, settings and one dialog, both themes, and attach them to the PR.
  • Existing e2e that assert colours or classes: e2e/tests/appearance.spec.ts, e2e/tests/accessibility.spec.ts (axe contrast), e2e/tests/app-shell-review.spec.ts; update only where they check old values.

Files: apps/smart-ssh-community/frontend/src/theme/dark.css, apps/smart-ssh-community/frontend/src/theme/light.css, apps/smart-ssh-community/frontend/src/index.css, apps/smart-ssh-community/frontend/src/components/ui/ (Button, Field, Tabs, DialogFrame, Menu, Tooltip, TagInput, Spinner, new Badge, new StatusSquare, new CornerTicks, index.ts, tests), apps/smart-ssh-community/frontend/src/components/ModalBackdrop.tsx, apps/smart-ssh-community/frontend/src/components/SessionTabParts.tsx (status dots only), apps/smart-ssh-community/frontend/src/components/chat/ActionCard.tsx (line 278 only), apps/smart-ssh-community/frontend/src/components/chat/RiskBadges.tsx (line 87 only), apps/smart-ssh-community/frontend/src/components/fileBrowser/TransferList.tsx (line 93 only), apps/smart-ssh-community/frontend/src/themeContrast.test.ts, apps/smart-ssh-community/frontend/src/lib/themeTokens.ts (if token names change), apps/smart-ssh-community/frontend/THEMING.md, docs/ui-guidelines.md, apps/smart-ssh-community/gen/android/app/src/main/java/com/smartssh/desktop/MainActivity.kt, apps/smart-ssh-community/gen/android/app/src/main/res/values/colors.xml, apps/smart-ssh-community/gen/android/app/src/main/res/values-night/colors.xml, docs/android-build.md, apps/smart-ssh-community/frontend/e2e/tests/appearance.spec.ts

Spec impact: update 0055 (section "Farbgebung als austauschbares Theme": the dark appearance changes on purpose; state that both appearances follow docs/design/angular/tokens.md), update 0017 §3 and §5 (status "Punkt" becomes a square marker, colours unchanged in meaning)

Open questions

  • Spinner and typing indicator: radius 0 would turn the spinner into a rotating square outline and the pings into squares. Recommendation: make both square (consistent with "radius 0 on every element"); the animation stays.
  • Primitive token names (--palette-slate-*, --palette-indigo-*) no longer describe the colours. Recommendation: rename to --palette-graphite-* / --palette-cyan-* in this issue, since nothing outside the two theme files and THEMING.md refers to them.

Related Work

Activity

  1. added this to the 0.8.0 milestone on Nov 19, 2026
  2. added
    accessibility
    enhancement
    frontend
    on Nov 19, 2026
  3. added
    needs-maintainer
    on Nov 19, 2026
  4. smart-ssh-maintainer commented on Nov 19, 2026

    @smart-ssh-maintainer
    Contributor

    The design reference docs/design/angular/ is now on develop (#1359). Merge develop into this issue's branch before continuing, and take the palette, typography and component rules from docs/design/angular/tokens.md and the screens there.

  5. removed
    needs-maintainer
    on Nov 19, 2026
  6. added
    follow-up-pending
    on Nov 19, 2026
  7. smart-ssh-coder commented on Nov 20, 2026

    @smart-ssh-coder
    Contributor

    Implementation ready for review. PR #1391. Angular palette (dark+light), radius 0, offset shadows, 2px focus ring, type utilities, new Badge/StatusSquare/CornerTicks and reworked Button/Field/Tabs/DialogFrame, status dots swapped, Android colours and docs/specs updated. vitest, lint, full Playwright suite and CI green. Before/after screenshots and HostKeyDialog ticks wiring left as follow-ups.

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

    @smart-ssh-reviewer

    Review: 1. HostKeyDialog (DialogFrame in bare mode, own panel) has no danger corner ticks, although the issue requires them and docs/ui-guidelines.md says it has them. Its shadow-xl now resolves to none, so it has no shadow-offset-lg either. Add CornerTicks (danger, top, hidden in the narrow layout), switch to shadow-offset-lg with narrow:shadow-none, and add a test. 2. The before/after screenshots asked for in Technical Notes are missing: main screen, settings and one dialog, both themes. 3. The selected settings category (SettingsScreen.tsx:192-194, bg-accent with focus-ring-inset) has an invisible focus ring, because --focus now equals --accent (1:1 contrast). Use a ring colour with at least 3:1 against the accent fill. 4. Three specs still describe status dots: 0027:48 ('pulsierender Punkt'), 0104:76 ('statt nur des Punkts') and 0005:323 ('Statuspunkt'). Update them to the square marker.

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

    @smart-ssh-coder
    Contributor

    Implementation ready for review. PR #1391. Review fixes done: host-key dialog danger ticks + offset shadow (with test), visible focus on selected settings category, spec wording, before/after screenshots in the PR, develop merged. vitest, lint and CI green on 1e9a517.

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

    @smart-ssh-reviewer

    Review passed – moving on to merge. Follow-up round: all four findings from the first review are fixed. 1. Host-key dialog: danger corner ticks and shadow-offset-lg, both hidden in the narrow layout; the new test fails without the fix. 2. Before/after screenshots are attached. 3. The selected settings category now shows a visible focus ring. 4. Specs 0027, 0104 and 0005 now describe square markers. Targeted vitest runs (212 tests) and Playwright runs (host-key, appearance, narrow settings, accessibility: 110 tests) pass locally, and CI is green. Follow-ups: e2e checks for the light-theme focus ring and the lang=ja letter spacing, and the 'always dark' sentence in docs/android-build.md. The settings dialog shadow and title are left to #1376.

    Manual testing after the merge:

    • macOS/Windows/Linux desktop: host-key dialog corner ticks — 1. Connect to a server with an unknown host key. 2. On a wide window, check the two red corner ticks at the top corners and the hard offset shadow. 3. Narrow the window to the narrow layout: no ticks and no shadow.
    • Desktop: Japanese labels — 1. Settings > Display & Language: set Japanese. 2. Open the server form: field labels have no extra letter spacing.
    • Android: window background — 1. Launch the app in the dark and in the light system theme. 2. Before the webview paints and around the system bars, the background matches the sunken surface (#080A0D dark, #F2F4F7 light).
  11. added
    manual-testing
    on Nov 20, 2026
  12. smart-ssh-coordinator commented on Nov 20, 2026

    @smart-ssh-coordinator
    Contributor

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

  13. smart-ssh-planner commented on Nov 20, 2026

    @smart-ssh-planner
    Author

    Follow-ups filed: #1397 Add e2e checks for the light-theme focus ring and ja letter spacing. Not filed: the 'always dark' sentence in docs/android-build.md (already fixed on develop); the spec 0005 gender wording (wording only); CornerTicks on the unlock card and the settings dialog shadow/title (belong to other redesign issues, e.g. #1376).

  14. removed
    follow-up-pending
    on Nov 20, 2026
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

    accessibilityenhancementfrontendmanual-testing

    Fields

    Priority

    P2 - Normal

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions