You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: docs/claude-progress.txt
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,21 @@
1
1
# Claude Progress Log
2
2
# Newest entries first. Agents: append your entry at the top after the header.
3
3
4
+
---
5
+
## 2026-05-13 | Session: Fix function list not updating on GitHub user switch
6
+
Worked on: Bug fix for PAT switching via Avatar button not refreshing the function list
7
+
Completed:
8
+
- Root cause: useEffect in useFunctionListPage had no dependency that changed on PAT switch (isConnectedToForge stayed true), and GithubService kept stale repo cache from previous user
9
+
- Added connectionId counter to ForgeConnectionContext, incremented on every connectToForge call
10
+
- useFunctionListPage uses connectionId as useEffect dependency and render-time state reset trigger
11
+
- GithubService clears #cachedFunctionRepos and #lastCommitSha when token changes in the #octokit getter
12
+
- Reworked usePatModal per PR review: replaced wasOpen render-time tracking with explicit cleanup at two exit points (setPat('') after successful connect, handleClose callback on cancel/dismiss)
13
+
- Clear stale functionItems on user switch so previous user's data doesn't linger during re-fetch
14
+
- Added tests for PAT modal cleanup (cleared on connect, cleared on cancel)
15
+
- 13 suites, 112 tests, all passing, zero lint errors
16
+
Left off: Branch chng-gh-user, PR #24 open. Reviewer requested dropping connectionId in favor of user.name, but keeping connectionId because it handles same-user different-PAT scenario.
17
+
Blockers: None
18
+
4
19
---
5
20
## 2026-04-30 | Session: Set KUBECONFIG GitHub secret for CI/CD deployment
6
21
Worked on: Encrypt and set KUBECONFIG secret on GitHub repos so GH Actions can deploy to the cluster
0 commit comments