Skip to content

The agent that grows with you

fix(tui,cli): reconnect is offered only as a repair, sign-in failures keep their reason

Siddharth Balyancb9f6ac73694
diff --git a/hermes_cli/connectors_cmd.py b/hermes_cli/connectors_cmd.py
index 670ca8378e9..581c86bda22 100644
--- a/hermes_cli/connectors_cmd.py
+++ b/hermes_cli/connectors_cmd.py
@@ -140,6 +140,10 @@ def _connect(args) -> int:
# A repair is addressed by the account's id, which also reaches an unnamed account.
row = _pick_account(app, args.alias)
alias, name = None, _account_name(row)
+ if row.get("status") == "active" and not args.force:
+ # A repair of a working account would only replace its sign-in.
+ print(f"{app} account {name} is connected. Nothing to repair; pass --force to sign in again.")
+ return 0
start = account.find_or_start_operation([app], action="reconnect", profile_home=None,
repair_id=row["connectionId"])
else:
diff --git a/hermes_cli/subcommands/connectors.py b/hermes_cli/subcommands/connectors.py
index ce7a5d50fae..b3b6b1fc776 100644
--- a/hermes_cli/subcommands/connectors.py
+++ b/hermes_cli/subcommands/connectors.py
@@ -23,6 +23,8 @@ def build_connectors_parser(subparsers) -> None:
connect.add_argument(
"--alias", help="Name for a new account (for example work); with --reconnect, the name or label to repair")
connect.add_argument("--reconnect", action="store_true", help="Repair an account that stopped working")
+ connect.add_argument(
+ "--force", action="store_true", help="With --reconnect, sign in again even if the account is connected")
rename = actions.add_parser("rename", help="Rename an account")
rename.add_argument("app", help="App the account belongs to")
diff --git a/locales/_keys.tui.json b/locales/_keys.tui.json
index 547bc55ad5e..11be8994819 100644
--- a/locales/_keys.tui.json
+++ b/locales/_keys.tui.json
@@ -201,6 +201,7 @@
"connectors.empty",
"connectors.errorLine",
"connectors.hint",
+ "connectors.hintHealthy",
"connectors.link.hint",
"connectors.link.reconnectTitle",
"connectors.link.starting",
diff --git a/locales/af.tui.yaml b/locales/af.tui.yaml
index bdeab1b61e7..2b2a97c6491 100644
--- a/locales/af.tui.yaml
+++ b/locales/af.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ kies · Enter bevestig · Esc kanselleer"
connectors.empty: "Nog geen koppelaarrekeninge nie. Druk a om een by te voeg."
connectors.errorLine: "fout: {0}"
connectors.hint: "r hernoem · a voeg by · c herverbind · x verwyder · Tab afgetree · Esc/q sluit"
+connectors.hintHealthy: "r hernoem · a voeg by · x verwyder · Tab afgetree · Esc/q sluit"
connectors.link.hint: "Enter open in blaaier · Esc hou op wag"
connectors.link.reconnectTitle: "Herverbind {0}-rekening {1}"
connectors.link.starting: "Begin tans…"
diff --git a/locales/ar.tui.yaml b/locales/ar.tui.yaml
index 296a8125a79..1a5aa41e256 100644
--- a/locales/ar.tui.yaml
+++ b/locales/ar.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ اختيار · Enter تحديد · Esc إلغ
connectors.empty: "لا توجد حسابات موصلات بعد. اضغط a لإضافة حساب."
connectors.errorLine: "خطأ: {0}"
connectors.hint: "r إعادة تسمية · a إضافة · c إعادة الاتصال · x إزالة · Tab المؤرشفة · Esc/q إغلاق"
+connectors.hintHealthy: "r إعادة تسمية · a إضافة · x إزالة · Tab المؤرشفة · Esc/q إغلاق"
connectors.link.hint: "Enter فتح في المتصفح · Esc إيقاف الانتظار"
connectors.link.reconnectTitle: "إعادة توصيل حساب {0} {1}"
connectors.link.starting: "جارٍ البدء…"
diff --git a/locales/de.tui.yaml b/locales/de.tui.yaml
index c206959a412..3a118469333 100644
--- a/locales/de.tui.yaml
+++ b/locales/de.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ auswählen · Enter wählen · Esc abbrechen"
connectors.empty: "Noch keine Connector-Konten. Drücken Sie a, um eines hinzuzufügen."
connectors.errorLine: "Fehler: {0}"
connectors.hint: "r umbenennen · a hinzufügen · c neu verbinden · x entfernen · Tab stillgelegte · Esc/q schließen"
+connectors.hintHealthy: "r umbenennen · a hinzufügen · x entfernen · Tab stillgelegte · Esc/q schließen"
connectors.link.hint: "Enter im Browser öffnen · Esc Warten beenden"
connectors.link.reconnectTitle: "{0}-Konto {1} neu verbinden"
connectors.link.starting: "Wird gestartet…"
diff --git a/locales/es.tui.yaml b/locales/es.tui.yaml
index 396e8921fd5..017f35b7dce 100644
--- a/locales/es.tui.yaml
+++ b/locales/es.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ seleccionar · Enter elegir · Esc cancelar"
connectors.empty: "Aún no hay cuentas de conectores. Pulsa a para añadir una."
connectors.errorLine: "error: {0}"
connectors.hint: "r renombrar · a añadir · c reconectar · x quitar · Tab retiradas · Esc/q cerrar"
+connectors.hintHealthy: "r renombrar · a añadir · x quitar · Tab retiradas · Esc/q cerrar"
connectors.link.hint: "Enter abrir en el navegador · Esc dejar de esperar"
connectors.link.reconnectTitle: "Reconectar la cuenta de {0} {1}"
connectors.link.starting: "Iniciando…"
diff --git a/locales/fr.tui.yaml b/locales/fr.tui.yaml
index 33c243343e3..dfc17c9333e 100644
--- a/locales/fr.tui.yaml
+++ b/locales/fr.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ choisir · Entrée valider · Échap annuler"
connectors.empty: "Aucun compte de connecteur pour l'instant. Appuyez sur a pour en ajouter un."
connectors.errorLine: "erreur : {0}"
connectors.hint: "r renommer · a ajouter · c reconnecter · x supprimer · Tab retirés · Échap/q fermer"
+connectors.hintHealthy: "r renommer · a ajouter · x supprimer · Tab retirés · Échap/q fermer"
connectors.link.hint: "Entrée ouvrir dans le navigateur · Échap arrêter d'attendre"
connectors.link.reconnectTitle: "Reconnecter le compte {0} {1}"
connectors.link.starting: "Démarrage…"
diff --git a/locales/ga.tui.yaml b/locales/ga.tui.yaml
index a157b180e54..1687d263c31 100644
--- a/locales/ga.tui.yaml
+++ b/locales/ga.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ roghnaigh · Enter deimhnigh · Esc cealaigh"
connectors.empty: "Níl aon chuntais nascóirí fós. Brúigh a chun ceann a chur leis."
connectors.errorLine: "earráid: {0}"
connectors.hint: "r athainmnigh · a cuir leis · c athcheangail · x bain · Tab scortha · Esc/q dún"
+connectors.hintHealthy: "r athainmnigh · a cuir leis · x bain · Tab scortha · Esc/q dún"
connectors.link.hint: "Enter oscail sa bhrabhsálaí · Esc stop ag fanacht"
connectors.link.reconnectTitle: "Athcheangail cuntas {0} {1}"
connectors.link.starting: "Ag tosú…"
diff --git a/locales/hu.tui.yaml b/locales/hu.tui.yaml
index cbab832059c..585b4655eb6 100644
--- a/locales/hu.tui.yaml
+++ b/locales/hu.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ választás · Enter kiválasztás · Esc még
connectors.empty: "Még nincsenek összekötő-fiókok. Nyomd meg az a gombot egy hozzáadásához."
connectors.errorLine: "hiba: {0}"
connectors.hint: "r átnevezés · a hozzáadás · c újracsatlakozás · x eltávolítás · Tab kivezetett · Esc/q bezárás"
+connectors.hintHealthy: "r átnevezés · a hozzáadás · x eltávolítás · Tab kivezetett · Esc/q bezárás"
connectors.link.hint: "Enter megnyitás böngészőben · Esc várakozás leállítása"
connectors.link.reconnectTitle: "{0}-fiók újracsatlakoztatása: {1}"
connectors.link.starting: "Indítás…"
diff --git a/locales/it.tui.yaml b/locales/it.tui.yaml
index d5c362fa15b..71a3c989773 100644
--- a/locales/it.tui.yaml
+++ b/locales/it.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ seleziona · Invio scegli · Esc annulla"
connectors.empty: "Ancora nessun account dei connettori. Premi a per aggiungerne uno."
connectors.errorLine: "errore: {0}"
connectors.hint: "r rinomina · a aggiungi · c riconnetti · x rimuovi · Tab ritirati · Esc/q chiudi"
+connectors.hintHealthy: "r rinomina · a aggiungi · x rimuovi · Tab ritirati · Esc/q chiudi"
connectors.link.hint: "Invio apri nel browser · Esc smetti di attendere"
connectors.link.reconnectTitle: "Riconnetti l'account {0} {1}"
connectors.link.starting: "Avvio…"
diff --git a/locales/ja.tui.yaml b/locales/ja.tui.yaml
index b7273dceaba..b73a289d601 100644
--- a/locales/ja.tui.yaml
+++ b/locales/ja.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ 選択 · Enter 決定 · Esc キャンセル"
connectors.empty: "コネクタのアカウントはまだありません。a を押して追加してください。"
connectors.errorLine: "エラー: {0}"
connectors.hint: "r 名前変更 · a 追加 · c 再接続 · x 削除 · Tab 廃止済み · Esc/q 閉じる"
+connectors.hintHealthy: "r 名前変更 · a 追加 · x 削除 · Tab 廃止済み · Esc/q 閉じる"
connectors.link.hint: "Enter ブラウザで開く · Esc 待機を中止"
connectors.link.reconnectTitle: "{0} アカウント {1} を再接続"
connectors.link.starting: "開始中…"
diff --git a/locales/ko.tui.yaml b/locales/ko.tui.yaml
index b16b3c0d31a..08d5845b1bb 100644
--- a/locales/ko.tui.yaml
+++ b/locales/ko.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ 선택 · Enter 고르기 · Esc 취소"
connectors.empty: "아직 커넥터 계정이 없어요. a를 눌러 추가하세요."
connectors.errorLine: "오류: {0}"
connectors.hint: "r 이름 바꾸기 · a 추가 · c 다시 연결 · x 제거 · Tab 보관됨 · Esc/q 닫기"
+connectors.hintHealthy: "r 이름 바꾸기 · a 추가 · x 제거 · Tab 보관됨 · Esc/q 닫기"
connectors.link.hint: "Enter 브라우저에서 열기 · Esc 기다리기 중지"
connectors.link.reconnectTitle: "{0} 계정 {1} 다시 연결"
connectors.link.starting: "시작하는 중…"
diff --git a/locales/pt.tui.yaml b/locales/pt.tui.yaml
index 50ee536c5fd..9cddf956792 100644
--- a/locales/pt.tui.yaml
+++ b/locales/pt.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ selecionar · Enter escolher · Esc cancelar"
connectors.empty: "Ainda não há contas de conectores. Pressione a para adicionar uma."
connectors.errorLine: "erro: {0}"
connectors.hint: "r renomear · a adicionar · c reconectar · x remover · Tab arquivadas · Esc/q fechar"
+connectors.hintHealthy: "r renomear · a adicionar · x remover · Tab arquivadas · Esc/q fechar"
connectors.link.hint: "Enter abrir no navegador · Esc parar de aguardar"
connectors.link.reconnectTitle: "Reconectar a conta de {0} {1}"
connectors.link.starting: "Iniciando…"
diff --git a/locales/ru.tui.yaml b/locales/ru.tui.yaml
index 513bf0078e7..efb050a4a36 100644
--- a/locales/ru.tui.yaml
+++ b/locales/ru.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ выбор · Enter выбрать · Esc от
connectors.empty: "Аккаунтов коннекторов пока нет. Нажмите a, чтобы добавить."
connectors.errorLine: "ошибка: {0}"
connectors.hint: "r переименовать · a добавить · c переподключить · x удалить · Tab архивные · Esc/q закрыть"
+connectors.hintHealthy: "r переименовать · a добавить · x удалить · Tab архивные · Esc/q закрыть"
connectors.link.hint: "Enter открыть в браузере · Esc перестать ждать"
connectors.link.reconnectTitle: "Переподключить аккаунт {0} «{1}»"
connectors.link.starting: "Запуск…"
diff --git a/locales/tr.tui.yaml b/locales/tr.tui.yaml
index eaf76d378e7..61e3e8fd98e 100644
--- a/locales/tr.tui.yaml
+++ b/locales/tr.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ seç · Enter onayla · Esc iptal"
connectors.empty: "Henüz bağlayıcı hesabı yok. Eklemek için a tuşuna basın."
connectors.errorLine: "hata: {0}"
connectors.hint: "r yeniden adlandır · a ekle · c yeniden bağlan · x kaldır · Tab arşivlenmiş · Esc/q kapat"
+connectors.hintHealthy: "r yeniden adlandır · a ekle · x kaldır · Tab arşivlenmiş · Esc/q kapat"
connectors.link.hint: "Enter tarayıcıda aç · Esc beklemeyi bırak"
connectors.link.reconnectTitle: "{0} hesabını yeniden bağla: {1}"
connectors.link.starting: "Başlatılıyor…"
diff --git a/locales/uk.tui.yaml b/locales/uk.tui.yaml
index 6dffe462c75..11e104af2cb 100644
--- a/locales/uk.tui.yaml
+++ b/locales/uk.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ вибір · Enter обрати · Esc ска
connectors.empty: "Облікових записів конекторів ще немає. Натисніть a, щоб додати."
connectors.errorLine: "помилка: {0}"
connectors.hint: "r перейменувати · a додати · c перепідключити · x видалити · Tab архівні · Esc/q закрити"
+connectors.hintHealthy: "r перейменувати · a додати · x видалити · Tab архівні · Esc/q закрити"
connectors.link.hint: "Enter відкрити в браузері · Esc припинити очікування"
connectors.link.reconnectTitle: "Перепідключити обліковий запис {0} «{1}»"
connectors.link.starting: "Запуск…"
diff --git a/locales/zh-hant.tui.yaml b/locales/zh-hant.tui.yaml
index 828ccbf4ee9..d0e972783a9 100644
--- a/locales/zh-hant.tui.yaml
+++ b/locales/zh-hant.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ 選擇 · Enter 確定 · Esc 取消"
connectors.empty: "還沒有連接器帳號。按 a 新增一個。"
connectors.errorLine: "錯誤:{0}"
connectors.hint: "r 重新命名 · a 新增 · c 重新連線 · x 移除 · Tab 已棄用 · Esc/q 關閉"
+connectors.hintHealthy: "r 重新命名 · a 新增 · x 移除 · Tab 已棄用 · Esc/q 關閉"
connectors.link.hint: "Enter 在瀏覽器開啟 · Esc 停止等待"
connectors.link.reconnectTitle: "重新連線 {0} 帳號 {1}"
connectors.link.starting: "正在啟動…"
diff --git a/locales/zh.tui.yaml b/locales/zh.tui.yaml
index c527116f5f1..d213d1bf4e9 100644
--- a/locales/zh.tui.yaml
+++ b/locales/zh.tui.yaml
@@ -208,6 +208,7 @@ connectors.add.pickHint: "↑/↓ 选择 · Enter 确定 · Esc 取消"
connectors.empty: "还没有连接器账号。按 a 添加一个。"
connectors.errorLine: "错误:{0}"
connectors.hint: "r 重命名 · a 添加 · c 重新连接 · x 移除 · Tab 已弃用 · Esc/q 关闭"
+connectors.hintHealthy: "r 重命名 · a 添加 · x 移除 · Tab 已弃用 · Esc/q 关闭"
connectors.link.hint: "Enter 在浏览器中打开 · Esc 停止等待"
connectors.link.reconnectTitle: "重新连接 {0} 账号 {1}"
connectors.link.starting: "正在启动…"
diff --git a/tests/hermes_cli/test_connectors_cmd.py b/tests/hermes_cli/test_connectors_cmd.py
index c4412da6b87..11257155220 100644
--- a/tests/hermes_cli/test_connectors_cmd.py
+++ b/tests/hermes_cli/test_connectors_cmd.py
@@ -85,6 +85,35 @@ def test_reconnect_repairs_an_unnamed_account_by_its_id(portal, monkeypatch):
assert started == [{"names": ["gmail"], "action": "reconnect", "profile_home": None, "repair_id": "conn-old"}]
+def test_reconnect_on_a_connected_account_starts_nothing(portal, monkeypatch, capsys):
+ from tools.connectors import account
+
+ started: list[dict] = []
+ monkeypatch.setattr(account, "find_or_start_operation", lambda names, **kw: started.append(kw))
+
+ rc = cmd_connectors(_parse("connectors", "connect", "gmail", "--reconnect", "--alias", "work"))
+
+ assert rc == 0
+ assert started == []
+ assert "is connected" in capsys.readouterr().out
+
+
+def test_forced_reconnect_on_a_connected_account_repairs_it_by_id(portal, monkeypatch):
+ from tools.connectors import account
+
+ started: list[dict] = []
+
+ def stop_after_start(names, **kwargs):
+ started.append(kwargs)
+ raise KeyboardInterrupt
+
+ monkeypatch.setattr(account, "find_or_start_operation", stop_after_start)
+ with pytest.raises(KeyboardInterrupt):
+ cmd_connectors(_parse("connectors", "connect", "gmail", "--reconnect", "--force", "--alias", "work"))
+
+ assert started[0]["repair_id"] == "conn-work"
+
+
def test_disconnect_can_remove_a_retired_account_by_its_label(portal):
rc = cmd_connectors(_parse("connectors", "disconnect", "gmail", "--alias", "[email protected]", "--yes"))
diff --git a/ui-tui/src/__tests__/connectorAccounts.test.ts b/ui-tui/src/__tests__/connectorAccounts.test.ts
index 632735a10e3..d9569baf7eb 100644
--- a/ui-tui/src/__tests__/connectorAccounts.test.ts
+++ b/ui-tui/src/__tests__/connectorAccounts.test.ts
@@ -7,7 +7,7 @@ import {
resetConnectionOperationsForTests
} from '../app/connectionOperationStore.js'
import { getOverlayState, hasPromptOpen, patchOverlayState, resetOverlayState } from '../app/overlayStore.js'
-import { accountRowText, accountView, nameProblem, panelShortcut } from '../domain/connectorAccounts.js'
+import { accountRowText, accountView, nameProblem, needsRepair, panelShortcut } from '../domain/connectorAccounts.js'
const row = (over: Partial<ConnectorAccountRow> & { disabled?: boolean }): ConnectorAccountRow =>
({
@@ -48,6 +48,17 @@ describe('connector account rows', () => {
})
})
+describe('reconnect is offered only as a repair', () => {
+ it('skips a healthy account and a retired one, and offers every other status', () => {
+ expect(needsRepair(row({ status: 'active' }))).toBe(false)
+ expect(needsRepair(row({ disabled: true, status: 'inactive' }))).toBe(false)
+
+ for (const status of ['failed', 'expired', 'revoked', 'inactive'] as const) {
+ expect(needsRepair(row({ active: false, status }))).toBe(true)
+ }
+ })
+})
+
describe('panel letter shortcuts', () => {
it('maps a bare letter to its action and never a Ctrl or Meta chord, so Ctrl+C cancels without reconnecting', () => {
expect(panelShortcut('c', { ctrl: false, meta: false })).toBe('reconnect')
diff --git a/ui-tui/src/components/connectorsOverlay.tsx b/ui-tui/src/components/connectorsOverlay.tsx
index a590bbec851..15811dda186 100644
--- a/ui-tui/src/components/connectorsOverlay.tsx
+++ b/ui-tui/src/components/connectorsOverlay.tsx
@@ -19,6 +19,7 @@ import {
isRetired,
nameProblem,
type NameProblem,
+ needsRepair,
panelShortcut
} from '../domain/connectorAccounts.js'
import type { GatewayClient } from '../gatewayClient.js'
@@ -163,7 +164,7 @@ export function ConnectorsOverlay({ gw, maxWidth, onClose, t }: ConnectorsOverla
setNotice(
target.state === 'connected'
? T.connectors.notice.connected(target.name, name)
- : T.connectors.notice.notConnected(target.name)
+ : target.detail || T.connectors.notice.notConnected(target.name)
)
void load()
}
@@ -292,10 +293,18 @@ export function ConnectorsOverlay({ gw, maxWidth, onClose, t }: ConnectorsOverla
}
)
- const reconnect = (row: ConnectorAccountRow) =>
- isRetired(row)
- ? setNotice(T.connectors.notice.retiredNoReconnect)
- : startConnect(row.connector, { connection_id: row.connection_id }, accountName(row))
+ const reconnect = (row: ConnectorAccountRow) => {
+ if (isRetired(row)) {
+ return setNotice(T.connectors.notice.retiredNoReconnect)
+ }
+
+ // A healthy account has nothing to repair; signing it in again would only replace a working link.
+ if (!needsRepair(row)) {
+ return setNotice(T.connectors.notice.connected(row.connector, accountName(row)))
+ }
+
+ startConnect(row.connector, { connection_id: row.connection_id }, accountName(row))
+ }
const listKey = (ch: string, key: KeyLike) => {
const shortcut = panelShortcut(ch, key)
@@ -501,7 +510,9 @@ export function ConnectorsOverlay({ gw, maxWidth, onClose, t }: ConnectorsOverla
</Text>
) : null}
{footer}
- <OverlayHint t={t}>{T.connectors.hint}</OverlayHint>
+ <OverlayHint t={t}>
+ {selected && !needsRepair(selected) ? T.connectors.hintHealthy : T.connectors.hint}
+ </OverlayHint>
</Box>
)
}
diff --git a/ui-tui/src/domain/connectorAccounts.ts b/ui-tui/src/domain/connectorAccounts.ts
index 042d5153e82..2480ea7468a 100644
--- a/ui-tui/src/domain/connectorAccounts.ts
+++ b/ui-tui/src/domain/connectorAccounts.ts
@@ -8,6 +8,10 @@ export const isValidAccountName = (name: string): boolean => ACCOUNT_NAME_RE.tes
/** An account a reconnect replaced: kept and listed, never selectable. Older backends omit the key. */
export const isRetired = (row: ConnectorAccountRow): boolean => Boolean(row.disabled)
+/** A reconnect is a repair: only an account that stopped working offers it. A healthy account
+ * would only be signed in again, so the panel answers that it is connected instead. */
+export const needsRepair = (row: ConnectorAccountRow): boolean => !isRetired(row) && row.status !== 'active'
+
/** The name a row is addressed by: its alias, else the app's own account label. */
export const accountName = (row: ConnectorAccountRow): string => row.alias || row.label
diff --git a/ui-tui/src/i18n/en/connectors.ts b/ui-tui/src/i18n/en/connectors.ts
index d5cc6139676..d1ae62d0808 100644
--- a/ui-tui/src/i18n/en/connectors.ts
+++ b/ui-tui/src/i18n/en/connectors.ts
@@ -60,6 +60,8 @@ export const connectorsEn = {
browserDidNotOpen: 'The browser did not open. Copy the link above.'
},
hint: 'r rename · a add · c reconnect · x remove · Tab retired · Esc/q close',
+ // The selected account works, so the repair key is not offered.
+ hintHealthy: 'r rename · a add · x remove · Tab retired · Esc/q close',
errorLine: (message: string) => `error: ${message}`
}
}
diff --git a/website/docs/reference/cli-commands.md b/website/docs/reference/cli-commands.md
index 542187a16dc..c01bf9e3fb8 100644
--- a/website/docs/reference/cli-commands.md
+++ b/website/docs/reference/cli-commands.md
@@ -1642,7 +1642,7 @@ Manage hosted connector accounts (apps such as Gmail reached through the Nous to
|------------|-------------|
| `list` | List connectors and whether each is connected. |
| `accounts [app] [--all]` | List accounts, for one app or all of them. `--all` includes retired accounts. |
-| `connect <app> [--alias NAME] [--reconnect]` | Print the link to connect an account, then wait until it is connected or the deadline passes. Ctrl-C stops waiting. `--alias` names the account; a new name adds another account. `--reconnect` repairs the named account and deletes nothing. |
+| `connect <app> [--alias NAME] [--reconnect [--force]]` | Print the link to connect an account, then wait until it is connected or the deadline passes. Ctrl-C stops waiting. `--alias` names the account; a new name adds another account. `--reconnect` repairs the named account and deletes nothing; on an account that is already connected it says so and does nothing unless `--force` is given. |
| `rename <app> <name-or-label> --to <new>` | Rename an account. An unnamed account is matched by its app label. |
| `disconnect <app> [--alias NAME] [--yes]` | Remove an account. Asks to confirm unless you pass `--yes`. |
diff --git a/website/docs/reference/slash-commands.md b/website/docs/reference/slash-commands.md
index ec248b75ea7..2095e7f5f89 100644
--- a/website/docs/reference/slash-commands.md
+++ b/website/docs/reference/slash-commands.md
@@ -118,7 +118,7 @@ Type `/` in the CLI to open the autocomplete menu. Built-in commands are case-in
| `/curator` | Background skill maintenance — `status`, `run`, `pin`, `archive`. See [Curator](../user-guide/features/curator.md). |
| `/kanban <action>` | Drive the multi-profile, multi-project collaboration board without leaving chat. Full `hermes kanban` surface is available: `/kanban list`, `/kanban show t_abc`, `/kanban create "title" --assignee X`, `/kanban comment t_abc "text"`, `/kanban unblock t_abc`, `/kanban dispatch`, etc. Multi-board support included: `/kanban boards list`, `/kanban boards create <slug>`, `/kanban boards switch <slug>`, `/kanban --board <slug> <action>`. See [Kanban slash command](../user-guide/features/kanban.md#kanban-slash-command). |
| `/reload-mcp` (alias: `/reload_mcp`) | Reload MCP servers from config.yaml and re-probe tool availability (credentials/daemons that appeared mid-session) |
-| `/connectors` | TUI-only. Open the connector accounts list: one row per account, `app · name · status`. Keys: ↑/↓ select, `r` rename (inline input; Enter saves, Esc cancels), `a` add another account (pick the app, enter a name, then open the link), `c` reconnect the selected account, `x` remove (asks to confirm), Tab show or hide retired accounts, Esc or `q` close. See [Multiple connector accounts](../user-guide/features/tool-gateway.md#multiple-connector-accounts). |
+| `/connectors` | TUI-only. Open the connector accounts list: one row per account, `app · name · status`. Keys: ↑/↓ select, `r` rename (inline input; Enter saves, Esc cancels), `a` add another account (pick the app, enter a name, then open the link), `c` reconnect the selected account (offered only when it needs repair: failed, expired, revoked or inactive), `x` remove (asks to confirm), Tab show or hide retired accounts, Esc or `q` close. See [Multiple connector accounts](../user-guide/features/tool-gateway.md#multiple-connector-accounts). |
| `/reload-skills` (alias: `/reload_skills`) | Re-scan `~/.hermes/skills/` for newly installed or removed skills |
| `/reload` | Reload `.env` variables into the running session (picks up new API keys without restarting) |
| `/plugins` | List installed plugins and their status |
diff --git a/website/docs/user-guide/features/tool-gateway.md b/website/docs/user-guide/features/tool-gateway.md
index 41f87ba55c5..6ccee78fd2c 100644
--- a/website/docs/user-guide/features/tool-gateway.md
+++ b/website/docs/user-guide/features/tool-gateway.md
@@ -132,7 +132,7 @@ Connectors are hosted apps such as Gmail that the agent reaches through the Nous
Once a connector has two or more active accounts, every tool of that connector takes a `connector_alias` field whose allowed values are your account names. The field is required when every active account is named and optional when some are unnamed.
-If the agent leaves it out when several accounts are named, or names one that does not exist, the call fails and the error lists the valid names. Every result reports the `account` it ran under.
+If the agent leaves it out when several accounts are named, or names one that does not exist, the call fails and the error lists the valid names. A result reports the `account` it ran under when that account is named; for an unnamed account the field is absent.
Manage accounts in any of these places:
diff --git a/website/docs/user-guide/features/tool-search.md b/website/docs/user-guide/features/tool-search.md
index 9149c81d0c9..8e54ef335d5 100644
--- a/website/docs/user-guide/features/tool-search.md
+++ b/website/docs/user-guide/features/tool-search.md
@@ -201,8 +201,9 @@ You can link more than one account of the same app, each with its own name
Once a connector has two or more active accounts, each of its tools takes a
`connector_alias` argument whose allowed values are your account names, and the
tool description lists them (`Accounts: home, work.`), so `tool_search` and
-`tool_describe` show them. Every connector result entry carries `account`: the
-name the call ran under, or `null`.
+`tool_describe` show them. A connector result entry carries `account`, the
+name the call ran under, when that account is named; the field is absent for
+an unnamed account.
The desktop backend's account-list and disconnect APIs use the Portal's
account-management service, including its organization membership checks and