fix: prevent dashboard crash when vault repo is deleted - #2
Conversation
Catch per-vault GitHub API errors in getVaultsForUser so a deleted repo no longer kills the entire vault listing via Promise.all. Inaccessible vaults are returned with warning: "repo_inaccessible" and permission: null, and the dashboard renders them dimmed with a dismissable banner and an always-visible delete button. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughBackend now marks vaults with a Changes
Sequence DiagramsequenceDiagram
participant User as User
participant Dashboard as Dashboard Page
participant API as VaultsApiClient
participant Service as Backend Service
participant Repo as Repository
User->>Dashboard: Load dashboard
Dashboard->>API: getVaults()
API->>Service: request vaults for user
Service->>Repo: check user permission
Repo-->>Service: permission check fails / inaccessible
Service->>Service: catch error, log warning
Service->>Service: set warning = "repo_inaccessible"
Service-->>API: return vaults with warning
API-->>Dashboard: vault list (permission nullable, warning included)
Dashboard->>Dashboard: count vaults with warning
alt inaccessibleVaultCount > 0
Dashboard->>User: render dismissible "Inaccessible repo" banner
end
Dashboard->>Dashboard: render VaultCards
alt vault.warning == 'repo_inaccessible'
Dashboard->>User: render non-navigable card, enable delete action
else
Dashboard->>User: render normal navigable card
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- BulkImportModal: pass Set<string> instead of string[] for existingSecretNames - SecretRow: add missing next/image mock - ActivityPage: wrap render in QueryClientProvider Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
getUserRoleWithApp()in try-catch insidegetVaultsForUser()so a deleted/inaccessible repo no longer crashes the entire vault listing viaPromise.all(). Failed vaults getpermission: nullandwarning: "repo_inaccessible".opacity-60), non-clickable, and show an always-visible delete button so users can clean up.permissionwitheffectivePermissionfallback to'read'.Test plan
pnpm --filter keyway-api type-checkpassespnpm --filter keyway-dashboard buildpasses🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes