From 8410ac05a9cccee981aebf649233064df528e752 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Wed, 22 Apr 2026 16:27:44 -0500 Subject: [PATCH] fix(tui): tab title shows cwd + waiting-for-input marker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the terminal tab title was `{⏳/✓} {model} — Hermes` which only distinguished busy vs idle. Users juggling multiple Hermes tabs had no way to tell which one was waiting on them for approval/clarify/sudo/ secret, and no cue for which workspace the tab was attached to. - 3-state marker: `⚠` when an overlay prompt is open, `⏳` busy, `✓` idle. - Append `· {shortCwd}` (28-char budget, $HOME → ~) so the tab surfaces the workspace directly. - Drop the `— Hermes` suffix — the marker already signals what this is, and tab titles are tight. --- ui-tui/src/app/useMainApp.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ui-tui/src/app/useMainApp.ts b/ui-tui/src/app/useMainApp.ts index a415d3437..2a25aacf7 100644 --- a/ui-tui/src/app/useMainApp.ts +++ b/ui-tui/src/app/useMainApp.ts @@ -5,7 +5,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { STARTUP_RESUME_ID } from '../config/env.js' import { MAX_HISTORY, WHEEL_SCROLL_STEP } from '../config/limits.js' import { attachedImageNotice, imageTokenMeta } from '../domain/messages.js' -import { fmtCwdBranch } from '../domain/paths.js' +import { fmtCwdBranch, shortCwd } from '../domain/paths.js' import { type GatewayClient } from '../gatewayClient.js' import type { ClarifyRespondResponse, @@ -315,10 +315,14 @@ export function useMainApp(gw: GatewayClient) { useConfigSync({ gw, setBellOnComplete, setVoiceEnabled, sid: ui.sid }) // ── Terminal tab title ───────────────────────────────────────────── - // Show model name + status so users can identify the Hermes tab. + // model + cwd + 3-state marker so multi-instance users can spot which tab + // is working, which is idle, and which is waiting on them. + // `⚠` blocked on approval/sudo/secret/clarify, `⏳` busy, `✓` idle. const shortModel = ui.info?.model?.replace(/^.*\//, '') ?? '' - const titleStatus = ui.busy ? '⏳' : '✓' - const terminalTitle = shortModel ? `${titleStatus} ${shortModel} — Hermes` : 'Hermes' + const blockedOnInput = !!(overlay.approval || overlay.sudo || overlay.secret || overlay.clarify) + const titleStatus = blockedOnInput ? '⚠' : ui.busy ? '⏳' : '✓' + const cwdTag = ui.info?.cwd ? ` · ${shortCwd(ui.info.cwd, 24)}` : '' + const terminalTitle = shortModel ? `${titleStatus} ${shortModel}${cwdTag}` : 'Hermes' useTerminalTitle(terminalTitle) useEffect(() => {