Skip to content

Fix welcome dialogue delay (AST-152887)#326

Open
cx-aniket-shinde wants to merge 2 commits into
feature/AST-109633-ui-manager-changesfrom
fix/AST-152887
Open

Fix welcome dialogue delay (AST-152887)#326
cx-aniket-shinde wants to merge 2 commits into
feature/AST-109633-ui-manager-changesfrom
fix/AST-152887

Conversation

@cx-aniket-shinde
Copy link
Copy Markdown

By submitting a PR to this repository, you agree to the terms within the Checkmarx Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change.

References

Include supporting link to GitHub Issue/PR number

Testing

Describe how this change was tested. Be specific about anything not tested and reasons why. If this solution has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Checklist

  • I have added documentation for new/changed functionality in this PR (if applicable).
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used

cx-aniket-shinde and others added 2 commits May 7, 2026 14:48
- Add _isFreshLoginInProgress flag to track if login initiated in current session
- Add _welcomeDialogVisible flag to track Welcome dialog visibility
- Update Logout button logic: Enable only when (!fresh OR dialog shown)
- Set fresh login flag in OnValidateConnection with immediate UI update
- Reset both flags in error handlers and ResetAuthState
- Defer UI update in ValidateApiKeyAsync finally block for success cases
- Let CompleteAuthenticationSetupAsync handle UI updates after setting flags
- Set dialog visible before showing it in ShowOneAssistWelcomeDialog

This ensures:
✓ Fresh logins: Logout disabled until Welcome dialog appears
✓ Restored sessions: Logout enabled immediately without dialog
✓ Proper state cleanup on auth failure or logout

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…o background

Performance Improvement:
- Show Welcome dialog immediately after license check
- Move MCP installation to background task (fire-and-forget)
- Dialog now appears quickly without waiting for file/network operations
- MCP installation completes while user reads Welcome dialog

Benefits:
✓ Faster Welcome dialog appearance (removes ~1-3 second delay)
✓ MCP installation happens in background, non-blocking
✓ Better user experience - instant visual feedback after auth
✓ No blocking network/file operations before showing UI

Technical Details:
- License check still runs upfront (necessary for dialog content)
- MCP installation moved to Task.Run for both dialog and restore paths
- Error handling for background tasks prevents UI blocking on failure
- Welcome dialog can complete normally while installation happens

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@cx-aniket-shinde cx-aniket-shinde changed the base branch from integration/merge-all-pr to feature/AST-109633-ui-manager-changes May 11, 2026 09:19
@cx-atish-jadhav cx-atish-jadhav self-requested a review May 13, 2026 10:09
Copy link
Copy Markdown

@cx-atish-jadhav cx-atish-jadhav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on behalf of @cx-rahul-pidde

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants