agent: logout dialog now reflects #585's narrowed wipe (OAuth-only, session preserved)
After PR #585 (closes #584) narrowed the backend wipe to just
.credentials.json + mcp-needs-auth-cache.json (preserving
projects/<hash>/*.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.
This commit is contained in:
parent
72c7c73f28
commit
5f8bc5315a
1 changed files with 17 additions and 14 deletions
|
|
@ -222,25 +222,28 @@ window.marked = marked;
|
||||||
// flips the harness LoginState to NeedsLogin. The turn loop's
|
// flips the harness LoginState to NeedsLogin. The turn loop's
|
||||||
// next iteration parks in wait_for_login; a fresh `claude auth
|
// next iteration parks in wait_for_login; a fresh `claude auth
|
||||||
// login` from the dashboard re-arms it (#542 mtime resumption).
|
// login` from the dashboard re-arms it (#542 mtime resumption).
|
||||||
// Destructive — the operator has to re-paste OAuth creds on the
|
// Operator has to re-paste OAuth creds on the login screen after,
|
||||||
// login screen after — so we confirm with a clear-eyed prompt.
|
// 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', {
|
const logoutBtn = el('button', {
|
||||||
type: 'button',
|
type: 'button',
|
||||||
class: 'overflow-item overflow-item-logout',
|
class: 'overflow-item overflow-item-logout',
|
||||||
role: 'menuitem',
|
role: 'menuitem',
|
||||||
id: 'logout-btn',
|
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' }, '🔓'),
|
el('span', { class: 'overflow-item-icon', 'aria-hidden': 'true' }, '🔓'),
|
||||||
'logout',
|
'logout',
|
||||||
);
|
);
|
||||||
logoutBtn.addEventListener('click', () => {
|
logoutBtn.addEventListener('click', () => {
|
||||||
if (!window.confirm(
|
if (!window.confirm(
|
||||||
`log ${label} out? this SIGINTs any running claude turn, then WIPES the entire ` +
|
`log ${label} out? this SIGINTs any running claude turn, deletes only the OAuth ` +
|
||||||
`~/.claude/ directory — that includes OAuth credentials AND the projects/*.jsonl ` +
|
`credential files (.credentials.json + mcp-needs-auth-cache.json) in ~/.claude/, ` +
|
||||||
`session history (--continue context). the agent then parks in 'needs login' until ` +
|
`and parks the agent in 'needs login' until you paste a fresh OAuth code from the ` +
|
||||||
`you paste a fresh OAuth code from the login screen. all prior conversation state ` +
|
`login screen. prior --continue session history is preserved — the agent picks up ` +
|
||||||
`for this agent is lost. no undo.`
|
`where it left off on the next turn after re-login.`
|
||||||
)) return;
|
)) return;
|
||||||
logoutBtn.disabled = true;
|
logoutBtn.disabled = true;
|
||||||
closeOverflowMenu();
|
closeOverflowMenu();
|
||||||
|
|
@ -393,7 +396,7 @@ window.marked = marked;
|
||||||
{ name: '/compact', desc: 'compact the persistent claude session' },
|
{ name: '/compact', desc: 'compact the persistent claude session' },
|
||||||
{ name: '/model', desc: '/model <name> — switch claude model for future turns' },
|
{ name: '/model', desc: '/model <name> — switch claude model for future turns' },
|
||||||
{ name: '/new-session', desc: 'next turn runs without --continue (fresh claude session)' },
|
{ 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) {
|
async function postModel(name) {
|
||||||
|
|
@ -464,11 +467,11 @@ window.marked = marked;
|
||||||
return true;
|
return true;
|
||||||
case '/logout':
|
case '/logout':
|
||||||
if (window.confirm(
|
if (window.confirm(
|
||||||
`log out? this SIGINTs any running claude turn, then WIPES the entire ` +
|
`log out? this SIGINTs any running claude turn, deletes only the OAuth ` +
|
||||||
`~/.claude/ directory — that includes OAuth credentials AND the projects/*.jsonl ` +
|
`credential files (.credentials.json + mcp-needs-auth-cache.json) in ~/.claude/, ` +
|
||||||
`session history (--continue context). the agent then parks in 'needs login' until ` +
|
`and parks the agent in 'needs login' until you paste a fresh OAuth code from the ` +
|
||||||
`you paste a fresh OAuth code from the login screen. all prior conversation state ` +
|
`login screen. prior --continue session history is preserved — the agent picks up ` +
|
||||||
`for this agent is lost. no undo.`
|
`where it left off on the next turn after re-login.`
|
||||||
)) {
|
)) {
|
||||||
postLogout();
|
postLogout();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue