From 8d5f7d2d8365bc8b02d3c0b72c4945673580b090 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Wed, 4 Feb 2026 18:03:41 -0500 Subject: [PATCH 1/2] fix(dashboard): delete accounts from unified config mode Dashboard API DELETE /api/accounts/:name now checks both unified config (config.yaml) and legacy profiles (profiles.json) before deletion, matching CLI behavior in remove-command.ts. Fixes #455 --- src/web-server/routes/account-routes.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/web-server/routes/account-routes.ts b/src/web-server/routes/account-routes.ts index cfc3ef34..2e8b4e84 100644 --- a/src/web-server/routes/account-routes.ts +++ b/src/web-server/routes/account-routes.ts @@ -205,8 +205,21 @@ router.delete('/:name', (req: Request, res: Response): void => { return; } - // Delete the profile (legacy/unified) - registry.deleteProfile(name); + // Delete from appropriate config (unified and/or legacy) + let deleted = false; + if (isUnifiedMode() && registry.hasAccountUnified(name)) { + registry.removeAccountUnified(name); + deleted = true; + } + if (registry.hasProfile(name)) { + registry.deleteProfile(name); + deleted = true; + } + + if (!deleted) { + res.status(404).json({ error: `Account not found: ${name}` }); + return; + } res.json({ success: true, deleted: name }); } catch (error) { From 0e140f83e40e1f21b3c52504e85639c90435e61e Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Wed, 4 Feb 2026 18:08:39 -0500 Subject: [PATCH 2/2] fix(auth): show command checks unified config for accounts Use getAllProfilesMerged() and getDefaultResolved() to check both unified config and legacy profiles when showing account details. Fixes #458 --- src/auth/commands/show-command.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/auth/commands/show-command.ts b/src/auth/commands/show-command.ts index 7f0c5f1a..12a2a0e7 100644 --- a/src/auth/commands/show-command.ts +++ b/src/auth/commands/show-command.ts @@ -26,8 +26,13 @@ export async function handleShow(ctx: CommandContext, args: string[]): Promise