Skip to content

Add refresh button to functions list page#26

Merged
matejvasek merged 1 commit into
masterfrom
list-ux-imp-rebased
May 29, 2026
Merged

Add refresh button to functions list page#26
matejvasek merged 1 commit into
masterfrom
list-ux-imp-rebased

Conversation

@matejvasek
Copy link
Copy Markdown
Collaborator

Summary

  • Add a manual refresh button (SyncAltIcon) to ListPageHeader that re-fetches function repos from GitHub on click
  • The icon spins while the fetch is in flight (only on manual refresh, not on page load)
  • Fix a caching bug in GithubService where deleted repos persisted in the list after refresh. Replaced the stale merge logic with a pendingRepos buffer that only keeps locally-created repos until GitHub's search index catches up.

Test plan

  • Unit test: clicking refresh calls listFunctionRepos again
  • Unit test: icon does not spin on initial page load
  • Unit test: icon spins only during button-triggered refresh
  • Unit test: deleted repo disappears from list after refresh (view level)
  • MSW integration test: deleted repo removed from GithubService on next fetch
  • Visual verification via Playwright screenshots

@matejvasek matejvasek requested a review from twoGiants May 18, 2026 13:45
@matejvasek
Copy link
Copy Markdown
Collaborator Author

matejvasek commented May 18, 2026

There is potential bug if the user disconnects while a refresh is in flight. But I am not sure. As of now we cannot really disconnect.

@matejvasek
Copy link
Copy Markdown
Collaborator Author

Screenshot From 2026-05-18 19-28-55

Copy link
Copy Markdown
Collaborator

@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

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

Will finish review tomorrow.

Comment thread src/views/FunctionsListPage.css Outdated
Comment thread src/views/FunctionsListPage.tsx Outdated
@matejvasek matejvasek requested a review from twoGiants May 20, 2026 15:57
@matejvasek matejvasek force-pushed the list-ux-imp-rebased branch from 22145e8 to ac2a97c Compare May 20, 2026 16:40
Copy link
Copy Markdown
Collaborator

@twoGiants twoGiants left a comment

Choose a reason for hiding this comment

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

Thank for the re-work! 👍

I found a few more things. See my comments below.

Comment thread src/views/FunctionsListPage.tsx Outdated
Comment thread src/views/FunctionsListPage.tsx Outdated
Comment thread src/views/FunctionsListPage.tsx Outdated
Comment thread src/views/FunctionsListPage.tsx Outdated
matejvasek added a commit that referenced this pull request May 21, 2026
Remove tooltip from refresh button. Drop useCallback from
onRefresh. Extract loadFunctions as a standalone async
function called directly from onRefresh and from useEffect
for initial load, eliminating the refreshKey state.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@matejvasek matejvasek requested a review from twoGiants May 21, 2026 12:51
Comment thread src/views/FunctionsListPage.tsx Outdated
@matejvasek matejvasek requested a review from twoGiants May 21, 2026 16:10
@matejvasek matejvasek force-pushed the list-ux-imp-rebased branch from 170d5bb to e80fcbe Compare May 29, 2026 10:52
Add a manual refresh button to the functions list that
re-fetches repos from GitHub on click. The button uses the
PF Button isLoading prop for a native spinner and is
disabled while a fetch is in flight.

Place create and refresh buttons in a PF Toolbar above the
table, separated by a vertical divider.

Fix a caching bug in GithubService where deleted repos
persisted after refresh. Replace the stale merge logic with
a pendingRepos buffer that only keeps locally created repos
until GitHub's search index catches up.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
@matejvasek matejvasek force-pushed the list-ux-imp-rebased branch from e80fcbe to af32117 Compare May 29, 2026 11:12
@matejvasek matejvasek requested a review from gauron99 May 29, 2026 11:42
@gauron99 gauron99 dismissed twoGiants’s stale review May 29, 2026 12:08

gauron99 reviewed. Enjoy PTO Stas! I hope I dont break anything major!

@matejvasek matejvasek merged commit 3f8c8c4 into master May 29, 2026
4 checks passed
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.

3 participants