Skip to content

[REL-7521] Rel 7521 fix bug in ld vs code integration setup process - #131

Merged
charlottemorgan merged 19 commits into
mainfrom
REL-7521-fix-bug-in-ld-vs-code-integration-setup-process
Sep 1, 2025
Merged

[REL-7521] Rel 7521 fix bug in ld vs code integration setup process#131
charlottemorgan merged 19 commits into
mainfrom
REL-7521-fix-bug-in-ld-vs-code-integration-setup-process

Conversation

@charlottemorgan

@charlottemorgan charlottemorgan commented Aug 28, 2025

Copy link
Copy Markdown
Contributor

Problems to solve:

  • If token was entered incorrectly or as an empty string, auth would fail with no way to try again
  • Unable to end session or log out - secret store was never being cleared
  • Code wouldn't run due to out of date dependencies

Changes:

  • Added custom error handling to avoid vscode defaults
  • Session validation: Added checks to handle empty or invalid sessions
  • Session cleanup: Proper deletion of invalid sessions from secrets store
  • Added sign out command to facilitate session clean up
  • Added Sign out option in Feature Flags tree view header
  • Updated readme with instructions on how to run extension for development & user instructions for authentication
  • Updated Axios

Related Jira issue: REL-7521: Fix bug in LD VS Code Integration setup process

@launchdarkly-upra launchdarkly-upra Bot changed the title Rel 7521 fix bug in ld vs code integration setup process [REL-7521] Rel 7521 fix bug in ld vs code integration setup process Aug 28, 2025
@monsagri
monsagri requested a review from Copilot August 29, 2025 11:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes authentication and session management issues in the LaunchDarkly VS Code extension, improving the setup process and adding proper session cleanup functionality.

  • Fixes auth failure scenarios with no retry mechanism and improves error handling
  • Adds sign out functionality with proper session cleanup
  • Updates dependencies (Axios to v1.6.0) and build process

Reviewed Changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/utils/commands.ts Updates command constants for sign-in and adds sign-out command
src/providers/authProvider.ts Improves session validation, error handling, and adds proper session cleanup
src/extension.ts Adds sign-in/sign-out command handlers with better error handling
src/generalUtils.ts Adds session cleanup function and improves component management
src/api.ts Updates to use modern Axios import and improves error handling
package.json Updates Axios dependency and adds sign-out command configuration
README.md Adds authentication instructions and development setup guide
Comments suppressed due to low confidence (1)

package.json:1

  • The dependency "tree-sitter-stack-graphs" is being removed but the line shows it's still present. This appears to be an incomplete removal.
{

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread package.json Outdated
Comment thread src/providers/authProvider.ts

@monsagri monsagri left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this looks really good!
Ran it locally and it definitely works for me

One recommendation I would have is to also update the release workflow for GHA - I think it'll attempt to run once we merge this and fail since we haven't upgraded the actions it uses to v4 yet

Comment thread .gitignore
Comment thread .github/workflows/main.yml Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread package.json Outdated
Comment thread src/generalUtils.ts Outdated
Comment thread src/generalUtils.ts
Comment thread src/providers.ts

@ldhenry ldhenry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. Thanks for your help on this!

@charlottemorgan
charlottemorgan merged commit 0034dec into main Sep 1, 2025
2 checks passed
@charlottemorgan
charlottemorgan deleted the REL-7521-fix-bug-in-ld-vs-code-integration-setup-process branch September 1, 2025 11:06
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.

4 participants