Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions apps/staged/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@
prPollingService.setSelectedProject(navigation.selectedProjectId);
});

// Refresh git state (TTL-gated) for the selected project's branches when the
// window regains focus, so the user sees a fresh-enough view on return.
$effect(() => {
if (!isTauri) return;
const handler = async () => {
const projectId = navigation.selectedProjectId;
if (!projectId) return;
try {
const branches = await commands.listBranchesForProject(projectId);
await Promise.allSettled(branches.map((b) => commands.refreshBranchGitState(b.id)));
} catch {
// best-effort refresh; ignore failures
}
};
window.addEventListener('focus', handler);
return () => window.removeEventListener('focus', handler);
});

// Konami code: ↑↑↓↓←→←→BA
const konamiSequence = [
'ArrowUp',
Expand Down