Skip to content

Commit c27ae56

Browse files
nullvariantclaude
andauthored
fix(ui): return to management screen after new profile creation (#258)
Instead of opening the edit screen for the newly created profile, handleAddIdentity() now returns immediately, allowing the management loop to redisplay the profile list. πŸ–₯️ 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 4604aa7 commit c27ae56

5 files changed

Lines changed: 10 additions & 15 deletions

File tree

β€Žextensions/git-id-switcher/CHANGELOG.mdβ€Ž

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

88
## [Unreleased]
99

10+
## [0.16.11] - 2026-02-02
11+
12+
### Changed
13+
14+
- **New profile creation now returns to the management screen (profile list)** instead of opening the edit screen for the newly created profile
15+
1016
## [0.16.10] - 2026-02-02
1117

1218
### 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.10",
5+
"version": "0.16.11",
66
"publisher": "nullvariant",
77
"icon": "images/icon.png",
88
"engines": {

β€Žextensions/git-id-switcher/src/commands/handlers.tsβ€Ž

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ export async function showWelcomeNotification(): Promise<void> {
271271
*
272272
* Uses vscodeLoader for testability (allows mocking in E2E tests).
273273
* The form handles validation, saving, and showing notifications.
274-
* After saving, opens the edit screen for the new identity to allow
275-
* adding optional fields.
276274
*
277275
* @returns true if identity was created, false if cancelled or failed
278276
*/
@@ -289,15 +287,6 @@ export async function handleAddIdentity(): Promise<boolean> {
289287
return false;
290288
}
291289

292-
// Re-fetch the identity from config to ensure we have the saved version
293-
// This provides defense-in-depth against any discrepancies
294-
const savedIdentity = getIdentitiesWithValidation().find(i => i.id === newIdentity.id);
295-
296-
// After saving, open the edit screen for the new identity
297-
// This allows users to add optional fields immediately
298-
if (savedIdentity) {
299-
await showEditProfileFlow(savedIdentity);
300-
}
301290
return true;
302291
}
303292

β€Žextensions/git-id-switcher/src/test/e2e/handlers.test.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ describe('handleAddIdentity E2E Test Suite', function () {
703703
const mockVSCode = createAddMockVSCode({
704704
identities: [],
705705
// Flow: select id field β†’ enter id β†’ select name field β†’ enter name β†’ select email field β†’ enter email β†’ save
706-
quickPickSelections: ['id', 'name', 'email', 'save', undefined], // Last undefined for edit wizard skip
706+
quickPickSelections: ['id', 'name', 'email', 'save'],
707707
inputBoxValues: ['new-id', 'New User', 'new@example.com'],
708708
});
709709
_setMockVSCode(mockVSCode as never);
@@ -777,7 +777,7 @@ describe('Security Logger Integration E2E Test Suite', function () {
777777
const mockVSCode = createAddMockVSCode({
778778
identities: [],
779779
// Flow: select id field β†’ enter id β†’ select name field β†’ enter name β†’ select email field β†’ enter email β†’ save
780-
quickPickSelections: ['id', 'name', 'email', 'save', undefined], // Last undefined for edit wizard skip
780+
quickPickSelections: ['id', 'name', 'email', 'save'],
781781
inputBoxValues: ['log-test-id', 'Log Test User', 'logtest@example.com'],
782782
});
783783

β€Ž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': 'b5bf6fb072263ef4a2c512cf583c31c9fbf3ab19ceb637304548bc4ff5cae6e1',
28+
'extensions/git-id-switcher/CHANGELOG.md': '1c8f19034d3141fef9ffccb0b5d7b654ef15af51d45b9079b15e5e8a91e4b7ec',
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',

0 commit comments

Comments
Β (0)