Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(wizard): preserve platform credential drafts

cyh8fe0eb33ce0c
diff --git a/tests/test_api_save_config_merge.py b/tests/test_api_save_config_merge.py
index 058e0774b..b30897faa 100644
--- a/tests/test_api_save_config_merge.py
+++ b/tests/test_api_save_config_merge.py
@@ -654,3 +654,13 @@ def test_platform_runnable_config_keeps_wechat_token_optional():
assert "if (platform === 'wechat')" in source
assert "return Boolean(data?.wechat);" in source
+
+
+def test_wizard_platform_selection_preserves_credential_drafts_on_continue():
+ source = Path("ui/src/components/steps/PlatformSelection.tsx").read_text(encoding="utf-8")
+
+ assert "const nextData = {" in source
+ assert "...credentialDraft," in source
+ assert "await onSave(nextData);" in source
+ assert "onNext(nextData);" in source
+ assert "onNext(selectionData);" not in source
diff --git a/ui/src/components/steps/PlatformSelection.tsx b/ui/src/components/steps/PlatformSelection.tsx
index 0abba3693..97f5daf51 100644
--- a/ui/src/components/steps/PlatformSelection.tsx
+++ b/ui/src/components/steps/PlatformSelection.tsx
@@ -131,18 +131,18 @@ export const PlatformSelection: React.FC<PlatformSelectionProps> = ({ data, onNe
primary: resolvedPrimary,
},
};
+ const nextData = {
+ ...credentialDraft,
+ discord_client_id: credentialDraft.discord?.client_id || '',
+ ...selectionData,
+ };
if (isPage && onSave) {
- const nextData = {
- ...credentialDraft,
- discord_client_id: credentialDraft.discord?.client_id || '',
- ...selectionData,
- };
await onSave(nextData);
return;
}
- onNext(selectionData);
+ onNext(nextData);
};
const activeDescriptor = platformCatalog.find((item) => item.id === activeCredentialPlatform) || platformCatalog[0];