Skip to content

Commit 15ecfca

Browse files
anandgupta42claude
andcommitted
fix(workspace): pin offline Attach to the account the dialog was shown under
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent c67ec52 commit 15ecfca

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/opencode/src/plugin/tui/altimate/workspace.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,8 @@ async function runFlow(api: TuiPluginApi, directory: string): Promise<void> {
12631263
cachedMatchedBy === "remote" ? identifier.repoRemote : identifier.projectPath
12641264
const hasDrift = cachedIdent !== "" && currentIdent != null && cachedIdent !== currentIdent
12651265
const manageUrl = await resolveManageUrl(local.datamateId)
1266+
// The cache row is scoped to the account that was current here; Attach must still be it.
1267+
const shownAs = await attachAccount()
12661268
api.ui.dialog.replace(() => (
12671269
<AlreadyLinkedDialog
12681270
api={api}
@@ -1282,7 +1284,7 @@ async function runFlow(api: TuiPluginApi, directory: string): Promise<void> {
12821284
// one user and upload under another.
12831285
const who = await attachAccount()
12841286
const live = await WorkspaceApi.getBindingForProject(identifier).catch(() => undefined)
1285-
if (who === null || (await attachAccount()) !== who) {
1287+
if (who === null || who !== shownAs || (await attachAccount()) !== who) {
12861288
api.ui.toast({
12871289
variant: "warning",
12881290
message: "Your Altimate account changed while attaching, so saved memory was not sent. Try Attach again.",

0 commit comments

Comments
 (0)