Skip to content

Commit a038d43

Browse files
nullvariantclaude
andauthored
fix: only set ignoreFocusOut on form-style QuickPick dialogs (#257)
Profile selector and delete picker are simple one-shot pickers with no unsaved state. They should follow standard VS Code behavior and dismiss on focus loss. Form dialogs (new profile, edit, manage) keep ignoreFocusOut=true to prevent data loss. 🖥️ IDE: [Cursor](https://cursor.sh) 🔌 Extension: [Claude Code](https://claude.ai/download) Model-Raw: claude-opus-4-5-20251101 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 80674d1 commit a038d43

6 files changed

Lines changed: 16 additions & 10 deletions

File tree

extensions/git-id-switcher/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.16.10] - 2026-02-02
11+
12+
### Fixed
13+
14+
- **Profile selector and delete picker now dismiss normally on focus loss**:
15+
- v0.16.9 applied `ignoreFocusOut` to all QuickPick dialogs, which prevented simple pickers from being dismissed by clicking outside
16+
- Now only form-style dialogs (new profile, edit, manage) retain focus; simple pickers follow standard VS Code behavior
17+
1018
## [0.16.9] - 2026-02-01
1119

1220
### Fixed

extensions/git-id-switcher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "git-id-switcher",
33
"displayName": "%extension.displayName%",
44
"description": "%extension.description%",
5-
"version": "0.16.9",
5+
"version": "0.16.10",
66
"publisher": "nullvariant",
77
"icon": "images/icon.png",
88
"engines": {

extensions/git-id-switcher/src/test/e2e/deleteIdentityPicker.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ describe('showDeleteIdentityQuickPick E2E Test Suite', function () {
184184
});
185185
});
186186

187-
describe('Focus Retention', () => {
188-
it('should set ignoreFocusOut to prevent dismissal on focus change', async () => {
187+
describe('Focus Behavior', () => {
188+
it('should not set ignoreFocusOut (simple picker dismisses on focus loss)', async () => {
189189
const mockVSCode = createMockVSCode({
190190
identities: [TEST_IDENTITIES.work],
191191
selectedIdentity: TEST_IDENTITIES.work,
@@ -194,7 +194,7 @@ describe('showDeleteIdentityQuickPick E2E Test Suite', function () {
194194

195195
await showDeleteIdentityQuickPick();
196196

197-
assert.strictEqual(mockVSCode._getCapturedIgnoreFocusOut(), true, 'Delete identity QuickPick should have ignoreFocusOut=true');
197+
assert.strictEqual(mockVSCode._getCapturedIgnoreFocusOut(), false, 'Delete identity QuickPick should not set ignoreFocusOut');
198198
});
199199
});
200200

extensions/git-id-switcher/src/test/e2e/identityPicker.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ describe('showIdentityQuickPick E2E Test Suite', function () {
237237
});
238238
});
239239

240-
describe('Focus Retention', () => {
241-
it('should set ignoreFocusOut to prevent dismissal on focus change', async () => {
240+
describe('Focus Behavior', () => {
241+
it('should not set ignoreFocusOut (simple picker dismisses on focus loss)', async () => {
242242
const mockVSCode = createMockVSCode({
243243
identities: [TEST_IDENTITIES.work],
244244
selectedIdentity: TEST_IDENTITIES.work,
@@ -247,7 +247,7 @@ describe('showIdentityQuickPick E2E Test Suite', function () {
247247

248248
await showIdentityQuickPick();
249249

250-
assert.strictEqual(mockVSCode._getCapturedIgnoreFocusOut(), true, 'Select profile QuickPick should have ignoreFocusOut=true');
250+
assert.strictEqual(mockVSCode._getCapturedIgnoreFocusOut(), false, 'Select profile QuickPick should not set ignoreFocusOut');
251251
});
252252
});
253253

extensions/git-id-switcher/src/ui/documentationInternal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const DOCUMENT_HASHES: Record<string, string> = {
2525
'AGENTS.md': '54f16b767e57686b3eb46a2b4aa02b378554cc492c32c49ed96588f6d184b6b8',
2626
'CODE_OF_CONDUCT.md': 'a5eb286c902437bbe0f6d409894f20e51c172fa869fe2f151bfa388f9d911b54',
2727
'CONTRIBUTING.md': '4150f8810aec7b2e8eff9f3c69ee1bae1374843f50a812efa6778cba27a833cd',
28-
'extensions/git-id-switcher/CHANGELOG.md': '3b18be1ee2c5d09c0b9c8c4ebdef1380bcad712d627e3d698fe14548080e0cad',
28+
'extensions/git-id-switcher/CHANGELOG.md': 'b5bf6fb072263ef4a2c512cf583c31c9fbf3ab19ceb637304548bc4ff5cae6e1',
2929
'extensions/git-id-switcher/docs/ARCHITECTURE.md': 'a12dd717f83b28b648972a826701a29fcfd575e351c487f8c421402f80ac3d25',
3030
'extensions/git-id-switcher/docs/CONTRIBUTING.md': '7d6ad2bc4d8c838790754cb9df848cb65f9fdce7e1a13e5c965b83a3d5b6378c',
3131
'extensions/git-id-switcher/docs/DESIGN_PHILOSOPHY.md': 'f9718b61ac161cb466dbc76845688e7acacf4e5fdc4b8b9553269dba4a094f6b',

extensions/git-id-switcher/src/ui/identityPicker.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ export async function showIdentityQuickPick(
122122
quickPick.items = allItems;
123123
quickPick.title = vs.l10n.t('Select Profile');
124124
quickPick.placeholder = vs.l10n.t('Search profiles...');
125-
quickPick.ignoreFocusOut = true;
126125
quickPick.buttons = [manageButton];
127126
quickPick.matchOnDescription = true;
128127
quickPick.matchOnDetail = true;
@@ -244,7 +243,6 @@ export async function showDeleteIdentityQuickPick(
244243
quickPick.items = items;
245244
quickPick.title = vs.l10n.t('Delete Identity');
246245
quickPick.placeholder = vs.l10n.t('Select identity to delete');
247-
quickPick.ignoreFocusOut = true;
248246
quickPick.matchOnDescription = true;
249247
quickPick.matchOnDetail = true;
250248

0 commit comments

Comments
 (0)