Skip to content

Commit e3d7463

Browse files
author
PR Batch Tester
committed
fix(mobile): reset Claude account config folder when cleared
1 parent b5dd5b5 commit e3d7463

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎apps/mobile/src/features/settings/claude-accounts.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,16 @@ describe("planClaudeAccountSave", () => {
8888
},
8989
},
9090
});
91+
expect(
92+
planClaudeAccountSave({
93+
providerInstances: { [work]: { driver: claude, config: { homePath: "~/.claude-work" } } },
94+
policy: undefined,
95+
instanceId: work,
96+
draft: { name: "", configDir: "" },
97+
}),
98+
).toEqual({
99+
mutation: { operation: "upsert", instanceId: work, instance: { driver: claude } },
100+
});
91101
});
92102

93103
it("refuses instances the managed policy pins", () => {

‎apps/mobile/src/features/settings/claude-accounts.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function planClaudeAccountSave(input: {
6060
const current: ProviderInstanceConfig = Object.hasOwn(input.providerInstances, instanceId)
6161
? input.providerInstances[instanceId]!
6262
: { driver: CLAUDE_DRIVER };
63-
const { displayName: _displayName, ...rest } = current;
63+
const { displayName: _displayName, config: _config, ...rest } = current;
6464
const { homePath: _homePath, ...config } = configRecord(current);
6565
const nextConfig = configDir ? { ...config, homePath: configDir } : config;
6666
const instance: ProviderInstanceConfig = {

0 commit comments

Comments
 (0)