mobux 0.40.2

A touch-friendly tmux web UI for unhinged people who run terminal sessions from their phone while walking the dog
/* SPA shell chrome. Copies the old Rust-rendered home header: the .app-header /
   .app-header h1 / .header-icon rules come from web/static/style.css (loaded in
   index.html via the proxy), so the header already matches the old UI's colors,
   spacing, and typography. This file only adds what's SPA-specific: making the
   wordmark behave as a home link, placing the native host <select>, and giving
   the gear a <button> the same look as the old <a class="header-icon">. */
.spa-shell {
  min-height: 100dvh;
}

/* ── Terminal route layout ───────────────────────────────────────────
   The terminal route is a full-bleed island with no SPA chrome. The old
   Rust page keyed its full-screen terminal layout off `body.term-body`
   (web/static/style.css: position:fixed; 100dvh; flex column). In the SPA
   the engine's children live one level deeper — inside `#app` →
   `.term-body-spa` — so we have to extend that full-height flex column the
   whole way down, or `#terminal` (flex:1; min-height:0) collapses to ~0
   and the backend computes far too few rows on mount (the stranded
   status-bar / dead-black-bottom bug). These rules only apply on the
   terminal route, gated by `body.term-body`. */
body.term-body #app {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.term-body-spa {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Control-key ribbon ──────────────────────────────────────────────
   The ribbon (^C, arrows, Tab, Esc, …) is a horizontal strip that must
   scroll sideways by touch and never wrap. The base rules already come
   from web/static/style.css `.input-ribbon`; these reassert them in the
   SPA context so a stray parent `touch-action`/flex rule can't clip or
   wrap the strip (the "ribbon won't scroll by touch" regression). Mirrors
   the old `.input-ribbon`: overflow-x:auto + touch momentum + nowrap, with
   touch-action:pan-x so the browser hands horizontal pans to the strip. */
.term-body-spa .input-ribbon {
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
.term-body-spa .input-ribbon button {
  flex: 0 0 auto;
}

/* Wordmark = home link. `.app-header h1` already has `flex: 1` (style.css),
   which shoves the lone gear to the far edge — just add the pointer cursor. */
.app-header .app-wordmark {
  cursor: pointer;
}

.spa-main {
  padding: 1rem;
  max-width: 640px;
  margin: 0 auto;
}

/* Gear — a <button> that wears the old `.header-icon` look (color/font-size/
   padding/radius come from style.css). These rules only reset the native button
   chrome and keep it from ever being squeezed off-screen. */
.header-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  font-family: inherit;
}

/* ── Node picker (Home) ──────────────────────────────────────────────
   Compact local/node switch above the session list. Rendered only when
   nodes are configured; palette stays on the muted theme vars. */
.node-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 12px;
}
.node-chip {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  padding: 4px 12px;
}
.node-chip.active {
  border-color: var(--accent);
  color: var(--text);
}
/* Unreachable nodes stay selectable — the failure surfaces loudly at
   connect — but are clearly marked. */
.node-chip .node-dead {
  color: var(--danger);
  font-size: 11px;
  margin-left: 6px;
}

/* ── Fail-hard error page (#190) ─────────────────────────────────────
   Full-screen, unmissable takeover for any server API error that nobody
   caught (lib/fatalError.js). Deliberately loud — solid red, above
   everything else in the page (mic overlay included) — so a broken app can
   never look like a dead widget or a blank screen. */
.fatal-error-page {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: #7f1414;
  color: #fff;
  overflow-y: auto;
  padding: 24px;
  font-family: -apple-system, system-ui, sans-serif;
}
.fatal-error-inner {
  max-width: 720px;
  margin: 0 auto;
}
.fatal-error-page h1 {
  font-size: 1.6rem;
  margin: 0 0 12px;
}
.fatal-error-summary {
  font-family: var(--mono, monospace);
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 10px 12px;
  word-break: break-word;
}
.fatal-error-block {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--mono, monospace);
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 40vh;
  overflow: auto;
}
.fatal-error-page details {
  margin: 14px 0;
}
.fatal-error-page summary {
  cursor: pointer;
  font-weight: 600;
}
.fatal-error-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.fatal-error-report-btn,
.fatal-error-reload-btn {
  display: inline-block;
  background: #fff;
  color: #7f1414;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}
.fatal-error-report-btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Nodes settings card ─────────────────────────────────────────────
   Row layout for the inventory + the add form; inputs wear the same
   muted look as the new-session dialog's input (style.css). */
.node-row .node-name {
  font-family: var(--mono);
}
.node-row .node-target {
  color: var(--muted);
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  margin-left: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-row .node-remove {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--danger);
  cursor: pointer;
  flex-shrink: 0;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
}
.node-add {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.node-add input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: var(--mono);
}
.node-add input:focus {
  border-color: var(--accent);
  outline: none;
}
.node-add button {
  flex-shrink: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px 14px;
}
/* The target field is read-only — tapping it opens the picker sheet
   instead of the on-screen keyboard; a pointer cursor signals "tap", not
   "type here". */
#nodeTarget[readonly] {
  cursor: pointer;
}

/* ── Host suggestion picker (#193) ────────────────────────────────────
   A native-mobile bottom sheet, same visual vocabulary as the old
   #cmdPickList tmux tool menu (web/static/style.css): dark panel, hairline
   top border, capped height, safe-area bottom padding. Its own text input
   IS the target field while the sheet is open (autofocus + two-way bound
   to Nodes.jsx's `target` signal), so manual entry always works even when
   detection finds nothing. */
.picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
}
.picker-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 201;
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-radius: 14px 14px 0 0;
  max-height: 75dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.picker-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.picker-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: var(--mono);
}
.picker-input:focus {
  border-color: var(--accent);
  outline: none;
}
.picker-done {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}
.picker-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.picker-hint {
  color: var(--muted);
  font-size: 13px;
  padding: 14px 16px;
  margin: 0;
}
.picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  font: inherit;
  font-family: var(--mono);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.picker-row:active {
  background: rgba(255, 255, 255, 0.05);
}
.picker-row-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-row-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.picker-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.picker-online-dot.online {
  background: #7ec87e;
}
.picker-online-dot.offline {
  background: var(--danger);
}
.picker-badge {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}