This repository was archived by the owner on Jun 26, 2026. It is now read-only.
Repository navigation
fix: handle GitHub user switching via PAT change - #24
Merged
Merged
Conversation
twoGiants
reviewed
May 12, 2026
twoGiants
left a comment
Collaborator
There was a problem hiding this comment.
Alright, thanks for the fix! We need this. See my comments below.
matejvasek
added a commit
that referenced
this pull request
May 13, 2026
Replace the wasOpen render-time tracking with explicit cleanup
at the two exit points: setPat('') after successful connect,
and a handleClose callback that clears pat and error on cancel
or dismiss.
Addresses review feedback from PR #24.
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
twoGiants
approved these changes
May 13, 2026
twoGiants
left a comment
Collaborator
There was a problem hiding this comment.
Looks good! Just a few unit tests missing.
I'll approve but please add them before merging. Thank you 👍
Switching GitHub users via the Avatar button left the function list stale. Two root causes: 1. useFunctionListPage had no dependency that changed on PAT switch (isConnectedToForge stayed true), so the useEffect never re-ran. 2. GithubService kept a cached repo list from the previous user, which bled into the new user's results through the "unfetched" union logic. Add a connectionId counter to ForgeConnectionContext that increments on every connectToForge call. The list page uses it to trigger a re-fetch and clear stale function items. Clear the repo and commit SHA caches in GithubService when the token changes. Also fix the PAT modal retaining the previous token on reopen: clear input on successful connect, and reset both input and error on cancel/dismiss via a handleClose callback. Signed-off-by: Matej Vašek <matejvasek@gmail.com> Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
🤖 Generated with Claude Code