From 5f8bc5315a37ae5cab001826a49958e175c99436 Mon Sep 17 00:00:00 2001 From: iris Date: Fri, 29 May 2026 17:35:38 +0200 Subject: [PATCH] agent: logout dialog now reflects #585's narrowed wipe (OAuth-only, session preserved) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After PR #585 (closes #584) narrowed the backend wipe to just .credentials.json + mcp-needs-auth-cache.json (preserving projects//*.jsonl session history + everything else under ~/.claude/), the dialog wording I shipped in 9d58ec3 (which described a full-dir wipe to satisfy argus's review against the PRE-#585 backend) is now stale. Updated to match what the backend actually does: - title + slash desc + both confirm dialogs now say 'rotate OAuth credentials, --continue session history preserved' - confirms explicitly name the two files deleted (.credentials.json, mcp-needs-auth-cache.json) so the operator knows exactly what's going + reassures that the conversation context survives - 'agent picks up where it left off on the next turn after re-login' tail makes the recoverability concrete No code-path changes — just the wording. Backend behavior + endpoint shape unchanged. --- frontend/packages/agent/src/app.js | 31 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/frontend/packages/agent/src/app.js b/frontend/packages/agent/src/app.js index a795fb01..87b12306 100644 --- a/frontend/packages/agent/src/app.js +++ b/frontend/packages/agent/src/app.js @@ -222,25 +222,28 @@ window.marked = marked; // flips the harness LoginState to NeedsLogin. The turn loop's // next iteration parks in wait_for_login; a fresh `claude auth // login` from the dashboard re-arms it (#542 mtime resumption). - // Destructive — the operator has to re-paste OAuth creds on the - // login screen after — so we confirm with a clear-eyed prompt. + // Operator has to re-paste OAuth creds on the login screen after, + // but the --continue session history is preserved (#584 narrowed + // the backend wipe to just .credentials.json + mcp-needs-auth- + // cache.json) — so the agent picks up where it left off on the + // next turn after re-login. const logoutBtn = el('button', { type: 'button', class: 'overflow-item overflow-item-logout', role: 'menuitem', id: 'logout-btn', - title: 'wipe ~/.claude/ entirely (OAuth creds + projects/*.jsonl --continue history) + park in needs-login until a fresh `claude auth login` runs', + title: 'rotate OAuth credentials in ~/.claude/ + park in needs-login until a fresh `claude auth login` runs (--continue session history preserved)', }, el('span', { class: 'overflow-item-icon', 'aria-hidden': 'true' }, '🔓'), 'logout', ); logoutBtn.addEventListener('click', () => { if (!window.confirm( - `log ${label} out? this SIGINTs any running claude turn, then WIPES the entire ` + - `~/.claude/ directory — that includes OAuth credentials AND the projects/*.jsonl ` + - `session history (--continue context). the agent then parks in 'needs login' until ` + - `you paste a fresh OAuth code from the login screen. all prior conversation state ` + - `for this agent is lost. no undo.` + `log ${label} out? this SIGINTs any running claude turn, deletes only the OAuth ` + + `credential files (.credentials.json + mcp-needs-auth-cache.json) in ~/.claude/, ` + + `and parks the agent in 'needs login' until you paste a fresh OAuth code from the ` + + `login screen. prior --continue session history is preserved — the agent picks up ` + + `where it left off on the next turn after re-login.` )) return; logoutBtn.disabled = true; closeOverflowMenu(); @@ -393,7 +396,7 @@ window.marked = marked; { name: '/compact', desc: 'compact the persistent claude session' }, { name: '/model', desc: '/model — switch claude model for future turns' }, { name: '/new-session', desc: 'next turn runs without --continue (fresh claude session)' }, - { name: '/logout', desc: 'wipe ~/.claude/ (creds + --continue history) + park in needs-login' }, + { name: '/logout', desc: 'rotate OAuth credentials + park in needs-login (--continue session preserved)' }, ]; async function postModel(name) { @@ -464,11 +467,11 @@ window.marked = marked; return true; case '/logout': if (window.confirm( - `log out? this SIGINTs any running claude turn, then WIPES the entire ` + - `~/.claude/ directory — that includes OAuth credentials AND the projects/*.jsonl ` + - `session history (--continue context). the agent then parks in 'needs login' until ` + - `you paste a fresh OAuth code from the login screen. all prior conversation state ` + - `for this agent is lost. no undo.` + `log out? this SIGINTs any running claude turn, deletes only the OAuth ` + + `credential files (.credentials.json + mcp-needs-auth-cache.json) in ~/.claude/, ` + + `and parks the agent in 'needs login' until you paste a fresh OAuth code from the ` + + `login screen. prior --continue session history is preserved — the agent picks up ` + + `where it left off on the next turn after re-login.` )) { postLogout(); }