Skip to content

Commit b965ccb

Browse files
Ripwordsclaude
andcommitted
feat(dashboard): redirect GitHub install to integrations page with toast
After the GitHub App install/update callback, land users on the project's integrations page (where the repo picker lives) instead of the settings tab. A success toast nudges them to pick a repo to start syncing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0e54097 commit b965ccb

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

apps/dashboard/app/pages/projects/[id]/integrations.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,25 @@
22
import GithubPanel from "~/components/integrations/github/github-panel.vue"
33
44
const route = useRoute()
5+
const router = useRouter()
56
const projectId = computed(() => String(route.params.id))
7+
const toast = useToast()
68
79
useHead({ title: "Integrations" })
10+
11+
onMounted(() => {
12+
const installed = route.query.installed === "1"
13+
const updated = route.query.updated === "1"
14+
if (!installed && !updated) return
15+
toast.add({
16+
title: installed ? "GitHub App installed" : "GitHub installation updated",
17+
description: "Pick a repository below to start syncing reports.",
18+
color: "success",
19+
icon: "i-heroicons-check-circle",
20+
})
21+
const { installed: _i, updated: _u, ...rest } = route.query
22+
router.replace({ query: rest })
23+
})
824
</script>
925

1026
<template>

apps/dashboard/server/api/integrations/github/install-callback.get.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default defineEventHandler(async (event) => {
6464
}
6565
return sendRedirect(
6666
event,
67-
`${env.BETTER_AUTH_URL}/projects/${existing.projectId}/settings?tab=github&updated=1`,
67+
`${env.BETTER_AUTH_URL}/projects/${existing.projectId}/integrations?updated=1`,
6868
302,
6969
)
7070
}
@@ -111,7 +111,7 @@ export default defineEventHandler(async (event) => {
111111

112112
return sendRedirect(
113113
event,
114-
`${env.BETTER_AUTH_URL}/projects/${claims.projectId}/settings?tab=github&installed=1`,
114+
`${env.BETTER_AUTH_URL}/projects/${claims.projectId}/integrations?installed=1`,
115115
302,
116116
)
117117
})

0 commit comments

Comments
 (0)