Commit db2dc3d
feat(ui): multi-installation aware settings UI (#283 PR 4/7)
integration page (settings/integration):
- loader returns githubAppLinks[] array with installation status
- action refactored to discriminated union + parseWithZod + match (CLAUDE.md 規約)
- new INTENTS: disconnectGithubAppLink, confirmDisconnectGithubAppLink
- per-installation disconnect with assertInstallationBelongsToOrg validation
GitHub App section UI:
- InstallationCard renders one card per active installation
- per-installation fetcher + ConfirmDialog (preserves installationId)
- "Add another GitHub account" button when at least one link exists
- buildInstallationSettingsUrl branches by github_account_type (User → /settings/installations/<id>, Organization → /organizations/<login>/settings/installations)
repositories.add page:
- installation selector via shared <InstallationSelect> when 2+ active links
- per-installation fetchAllInstallationRepos cache key
- loader/action share resolveInstallationIdForApp helper for installation resolution
- assertInstallationBelongsToOrg server-side validation
- addRepository mutation accepts githubInstallationId + upsertRepositoryMembership
github-users page:
- loader returns installationOptions via shared getActiveInstallationOptions
- searchGithubUsers accepts installationId, validates via assertInstallationBelongsToOrg
- toolbar uses shared <InstallationSelect>; selection persisted in URL searchParams
- Add button disabled when 2+ installations and none selected (UX feedback)
shared helpers added:
- app/libs/github-account.ts: formatGithubAccountLabel, isPersonalAccount, buildInstallationSettingsUrl
- app/components/installation-select.tsx: <InstallationSelect> reusable component
- app/services/github-integration-queries.server.ts: getActiveInstallationOptions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e573408 commit db2dc3d
File tree
13 files changed
+754
-407
lines changed- app
- libs
- routes/$orgSlug/settings
- _index
- +forms
- github-users._index/+functions
- integration
- repositories.add
- +components
- +functions
- services
- docs/rdd
13 files changed
+754
-407
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
0 commit comments