feat(dashboard): show PR badges and deep-link to Review Center

Add pull request badges to the repository dashboard and enable deep-
linking to the Review Center with a repository and source pre-filter.
Badges are populated by resolving remotes, matching them to configured
integration sources, and querying providers for open PRs while handling
loading, error, and unavailable states. The dashboard badge opens the
Review Center pre-filled and the app stores initial query/source values
to support the deep-link.

- Resolve and normalize remotes to match integration sources reliably.
- Query provider APIs using stored credentials with sensible timeouts.
- Expose a badge action that navigates to the Review Center pre-filtered.
This commit is contained in:
2026-09-07 16:19:26 +02:00
parent a55a3ca300
commit c6553218a2
3 changed files with 178 additions and 7 deletions
+5 -2
View File
@@ -14,11 +14,13 @@
interface Props {
language: AppLanguage;
integrations: GitIntegrationSettings;
initialQuery?: string;
initialSourceId?: string;
loadCredential: (key: string) => Promise<StoredCredential | null>;
onOpenSettings: () => void;
}
let { language = "en", integrations, loadCredential, onOpenSettings = () => {} }: Props = $props();
let { language = "en", integrations, initialQuery = "", initialSourceId = "", loadCredential, onOpenSettings = () => {} }: Props = $props();
let requests = $state<IntegrationReviewRequest[]>([]);
let loading = $state(false);
let errors = $state<Array<{ source: string; message: string }>>([]);
@@ -60,7 +62,8 @@
onMount(() => {
const closeActionMenu = () => { actionMenuId = ""; };
window.addEventListener("click", closeActionMenu);
const source = sources[0];
query = initialQuery;
const source = sources.find((candidate) => candidate.id === initialSourceId) ?? sources[0];
if (source) {
selectedSourceId = source.id;
void loadRequests("open", source.id);