fix(sidebar): force architectureAutoAttach to true on explicit re-activation
Fixed a bug where architectureAutoAttach would stay false even after an explicit attach action due to incorrect nullish coalescing logic.
This commit is contained in:
@@ -1082,7 +1082,12 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn
|
||||
const updated: ProjectProfile = {
|
||||
...profile,
|
||||
architectureDocPath: result.docPath,
|
||||
architectureAutoAttach: profile.architectureAutoAttach ?? true,
|
||||
// [BUGFIX] Previously used `?? true`, but `??` only fallbacks on null/undefined.
|
||||
// After a user Detach, `architectureAutoAttach === false`, so `false ?? true`
|
||||
// stays `false` and the chip stays "detached — click Attach to re-enable"
|
||||
// forever no matter how many times the user clicks Attach. The activation
|
||||
// path is an explicit user intent to re-enable, so force `true` here.
|
||||
architectureAutoAttach: true,
|
||||
architectureAutoUpdate: profile.architectureAutoUpdate ?? true,
|
||||
architectureLastUpdated: now,
|
||||
architectureLastScanSignature: result.scan.signature,
|
||||
|
||||
Reference in New Issue
Block a user