fix(github): reset branch state when refreshing repositories

Clear `branches` and `total_branches_count` in `loadRepositories` to avoid stale branch data after repo refreshes. Update the Livewire view to use the shared loading button pattern for refresh/load actions, and expand feature coverage for repository refresh behavior and refresh button visibility.
This commit is contained in:
Andras Bacsai
2026-03-31 12:50:19 +02:00
parent 25c0c88eb2
commit 7638912fdc
3 changed files with 65 additions and 31 deletions
@@ -99,6 +99,8 @@ class GithubPrivateRepository extends Component
public function loadRepositories($github_app_id)
{
$this->repositories = collect();
$this->branches = collect();
$this->total_branches_count = 0;
$this->page = 1;
$this->selected_github_app_id = $github_app_id;
$this->github_app = GithubApp::where('id', $github_app_id)->first();