agent: logout confirm dialog accurate about --continue session loss (#576 argus nit)

argus #583 review caught: the prior dialog wording said 'prior
--continue context is not affected (only the OAuth creds)', but
that's false — paths::claude_dir() is /root/.claude and
remove_dir_all wipes the projects/<hash>/*.jsonl session history
along with the OAuth creds.

Updated both the overflow-menu confirm and the /logout slash
command confirm to explicitly say the projects/*.jsonl session
history (--continue context) goes too, plus a 'no undo' tail so
the operator can't read past the consequence list. SLASH_COMMANDS
desc + overflow-item title also corrected so /help + tooltips
match.
This commit is contained in:
iris 2026-05-29 16:54:25 +02:00 committed by Mara
commit 9d58ec391b

View file

@ -229,16 +229,18 @@ window.marked = marked;
class: 'overflow-item overflow-item-logout',
role: 'menuitem',
id: 'logout-btn',
title: 'wipe ~/.claude/ credentials + park in needs-login until a fresh `claude auth login` runs',
title: 'wipe ~/.claude/ entirely (OAuth creds + projects/*.jsonl --continue history) + park in needs-login until a fresh `claude auth login` runs',
},
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, wipes the credentials directory, ` +
`and parks the agent in 'needs login' until you paste a fresh OAuth code from the login screen. ` +
`prior --continue context is not affected (only the OAuth creds).`
`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.`
)) return;
logoutBtn.disabled = true;
closeOverflowMenu();
@ -391,7 +393,7 @@ window.marked = marked;
{ name: '/compact', desc: 'compact the persistent claude session' },
{ name: '/model', desc: '/model <name> — switch claude model for future turns' },
{ name: '/new-session', desc: 'next turn runs without --continue (fresh claude session)' },
{ name: '/logout', desc: 'wipe ~/.claude/ credentials + park in needs-login' },
{ name: '/logout', desc: 'wipe ~/.claude/ (creds + --continue history) + park in needs-login' },
];
async function postModel(name) {
@ -462,9 +464,11 @@ window.marked = marked;
return true;
case '/logout':
if (window.confirm(
`log out? this SIGINTs any running claude turn, wipes the credentials directory, ` +
`and parks the agent in 'needs login' until you paste a fresh OAuth code from the login screen. ` +
`prior --continue context is not affected (only the OAuth creds).`
`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.`
)) {
postLogout();
}