Files
sethmux/DECISIONS.md
T
Mortdecai 8e70875631 feat: Workspace dark refresh + mobile compose bar
Re-skin the mobile toolbar to Google Workspace dark vocabulary
(#202124 bar, #303134 surface, #3c4043 hairlines, Roboto 12/500)
keeping #D35400 as the sethmux accent. Adds .mono / .hi / .grn
button variants with hover/active wash transitions.

Adds a compose bar (toggled by 'Type' button) — a real <input>
with autocorrect=on and enterkeyhint=send. Enter/Send/↵ flushes the
assembled string to stdin in one shot, plus \\r. Other toolbar taps
while composing flush typed text first to preserve order, but keep
the compose bar open. Sidesteps xterm.js's per-keystroke input
model that drops Gboard/iOS bulk-replacement events.

relayout() now measures bar.offsetHeight instead of hard-coding
calc(100vh - 88px) so the third row reflows the terminal correctly.

Records the design rationale and what was rejected in DECISIONS.md.
2026-04-24 19:50:17 -04:00

22 lines
2.5 KiB
Markdown

# sethmux — Decision Log
Project-local decisions specific to sethmux. Cross-cutting infra decisions live in `~/bin/DECISIONS.md`.
Format: `YYYY-MM-DD: <decision> — <why>`
---
## 2026-04-24
- **Mobile compose bar instead of patching xterm.js IME handling.** Added a third toolbar row (toggled by `Type` button) holding a real `<input>` with `autocorrect=on`/`enterkeyhint=send`. Enter/Send flushes the assembled string to stdin in one shot. **Why:** xterm.js reads from a hidden textarea via per-keystroke events, but Gboard/iOS autocorrect, swipe, and predictions mutate `.value` in bulk via `inputType="insertReplacementText"` events that xterm.js discards. Bridging that into xterm would mean forking; the compose bar sidesteps it entirely with a one-shot string send. The existing `disableMobileAutocomplete()` on `.xterm-helper-textarea` is preserved as belt-and-suspenders for chord/arrow keys typed outside the compose bar.
- **Visual system: Google Workspace dark vocabulary, sethmux orange accent.** Tokens: bar `#202124`, button surface `#303134`, hairline `#3c4043`, primary text `#e8eaed`, accent `#D35400` (replaces Google blue), Roboto 12/500 + Roboto Mono 12/400 for chord keys. **Why:** the previous palette (`#111`/`#222`/2px orange top border) read as a generic terminal toolbar; the Workspace vocabulary makes the bar feel like a deliberate productivity surface while keeping `#D35400` as sethmux brand identity.
- **Manual deploy: `cp static/* /opt/sethmux/`.** No rsync, no auto-reload. **Why:** static assets only, served directly by Caddy from `/opt/sethmux/`. No daemon restart needed — ttyd doesn't serve `toolbar.js` (only `--index /opt/sethmux/index.html`); the rest is Caddy's `file_server` handler. Keep deploy explicit so we never ship in-progress edits.
## Deferred / Rejected
- **Forking xterm.js to handle `inputType: insertReplacementText` events.** Considered as the "real" fix for mobile autocorrect. Rejected because compose-bar approach is smaller, preserves upstream xterm.js, and is more obviously correct (one-shot string send vs. interleaved IME state machine).
- **`inputmode="none"` on the helper textarea ("nuclear option" from `AUTOCOMPLETE_FIX.md`).** Considered if mobile keyboard autocorrect still corrupts xterm input despite hardening. Rejected for now because it would fully disable the soft keyboard, requiring a separate toggle UX. The compose bar gives users the autocorrect surface they actually want without removing per-keystroke typing.