docs(env): document HERMES_TUI Termux/inline/mouse env vars from #28910 - #29087
docs(env): document HERMES_TUI Termux/inline/mouse env vars from #28910#29087r266-tech wants to merge 1 commit into
Conversation
|
Thanks for tightening up the TUI env-var reference. I don't see blocking issues in this PR. The premise still holds on current main: The row text also matches the current runtime behavior: Termux detection comes from Salvage should be mostly mechanical; GitHub currently reports this PR as conflicting, likely because the environment-variable table has moved since the PR was opened. Automated hermes-sweeper review. |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for documenting these existing TUI controls. The reference gap remains on current main: website/docs/reference/environment-variables.md:767-771 lists HERMES_TUI_THEME and then HERMES_INFERENCE_MODEL, while runtime reads all three proposed variables in ui-tui/src/lib/termux.ts:22 and ui-tui/src/config/env.ts:45,63.
Problems
- The proposed
HERMES_TUI_TERMUX_MODEtext says it can force Termux defaults on or off.ui-tui/src/lib/termux.ts:17-20returnsfalseoutside detected Termux before reading the override;ui-tui/src/__tests__/termux.test.ts:28-30coversHERMES_TUI_TERMUX_MODE=1outside Termux and expectsfalse.
Suggested changes
- Describe this as an override of detected-Termux defaults, with
=0as the Termux opt-out, and state that it has no effect outside detected Termux. Relocate the corrected rows into the current Interface table atwebsite/docs/reference/environment-variables.md:770during salvage.
Automated hermes-sweeper review.
| | `HERMES_TUI_DIR` | Path to a prebuilt `ui-tui/` directory (must contain `dist/entry.js` and populated `node_modules`). Used by distros and Nix to skip the first-launch `npm install`. | | ||
| | `HERMES_TUI_RESUME` | Resume a specific TUI session by ID on launch. When set, `hermes --tui` skips forging a fresh session and picks up the named session instead — useful for re-attaching after a disconnect or terminal crash. | | ||
| | `HERMES_TUI_THEME` | Force the TUI color theme: `light`, `dark`, or a raw 6-character background hex (e.g. `ffffff` or `1a1a2e`). When unset, Hermes auto-detects using `COLORFGBG` and terminal background queries; this variable overrides detection on terminals (Ghostty, Warp, iTerm2, etc.) that don't set `COLORFGBG`. | | ||
| | `HERMES_TUI_TERMUX_MODE` | Force Termux-focused TUI defaults on or off when set to `1`/`0` (also accepts `true`/`false`, `yes`/`no`, `on`/`off`). When unset, Hermes auto-detects Termux via `TERMUX_VERSION` or the Termux `PREFIX` path. Use `HERMES_TUI_TERMUX_MODE=0` on Termux to opt back into the desktop defaults for debugging. | |
There was a problem hiding this comment.
HERMES_TUI_TERMUX_MODE=1 does not force Termux defaults on outside detected Termux: isTermuxTuiMode() returns false before reading the override (ui-tui/src/lib/termux.ts:17-20), with coverage in ui-tui/src/__tests__/termux.test.ts:28-30. Please describe this as an override of detected-Termux defaults instead.
What does this PR do?
#28910 (fix(tui): termux-gate scrollback preservation, touch-friendly defaults — salvage of #28779, merged 2026-05-19) added three new public TUI env vars that aren't yet listed in the reference docs.
Adds three rows to the
Interfacetable inwebsite/docs/reference/environment-variables.md:HERMES_TUI_TERMUX_MODE— explicit on/off for Termux-focused TUI defaultsHERMES_TUI_INLINE— explicit on/off for primary-buffer (scrollback-preserving) renderingHERMES_TUI_MOUSE_TRACKING— explicit on/off mouse-tracking overrideWhy
All three are user-facing opt-outs (the source PR body explicitly documents
HERMES_TUI_TERMUX_MODE=0as the opt-out, and the inline + mouse rows are the override knobs for the new Termux defaults). Today users on Termux can be confused by why mouse tracking is off, why scrollback is preserved, or how to opt back into desktop defaults — none of these are searchable in the docs.Source-of-truth
Descriptions grounded in:
ui-tui/src/lib/termux.ts—isTermuxEnv()detects viaTERMUX_VERSIONor the/data/data/com.termux/files/usrPREFIX path;isTermuxTuiMode()readsHERMES_TUI_TERMUX_MODE(truthy/falsy via theparseTogglematcher) with default `true` under Termux.ui-tui/src/config/env.ts:The legacy `HERMES_TUI_DISABLE_MOUSE` is referenced inside the `HERMES_TUI_MOUSE_TRACKING` description to make the precedence chain explicit; documenting that legacy variable on its own line is intentionally left out of this PR's scope.
Type of Change
Changes Made
website/docs/reference/environment-variables.md— adds three rows to the Interface section, immediately afterHERMES_TUI_THEME.How to Test
`npm run docs:typecheck` and the existing site build; no other tests touched. Visual smoke: render
website/docs/reference/environment-variables.mdlocally and confirm the three new rows render in the Interface table.Checklist
Code
fix(scope):,feat(scope):, etc.)