Split GitHub team panel into subtabs - #125
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6907a3bcf6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| queryClient.setQueryData(teamSpaceQueryKeys.githubStatus(projectGroupId), { | ||
| connected: true, | ||
| organizationLogin: "team-po-labs", | ||
| repositoryCount: githubSubtabPreviewConnectedRepositories.length, |
There was a problem hiding this comment.
Isolate preview data from the shared query cache
Opening /team/github-preview writes fixture data into the app-wide QueryClient under the normal teamSpaceQueryKeys for projectGroupId 10. If a user then navigates to /team for that same project group before these queries become stale, the real team view will reuse the preview organization/repository/contribution data as fresh and can temporarily show the wrong GitHub state. Keep the preview in an isolated cache or remove these seeded keys on unmount.
Useful? React with 👍 / 👎.
| <RealGithubInstallationPanel | ||
| canManageGithubInstallation={true} | ||
| completionFeedback={null} | ||
| isCompletingInstallation={false} | ||
| projectGroup={githubSubtabPreviewProjectGroup} |
There was a problem hiding this comment.
Keep the preview route from calling live APIs
This preview mounts the normal RealGithubInstallationPanel, but only a subset of its queries are pre-seeded. In real API mode, selecting the weekly summary subtab immediately runs the unseeded weekly-summary queries, and after the 15s stale time the seeded GitHub queries can refetch too, so a supposedly login-free preview starts hitting authenticated /team-space/... endpoints and shows backend/auth errors instead of stable fixture data. Use a static/preview-specific panel or disable/seed all of the panel's queries and mutations for this route.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87fc62cea0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const createInstallUrlMutation = useCreateGithubAppInstallationUrlMutation(); | ||
| const setGithubRepositoriesMutation = useSetGithubRepositoriesMutation(); | ||
| const [selectedGithubSubtab, setSelectedGithubSubtab] = | ||
| useState<GithubSubtabId>("contributions"); |
There was a problem hiding this comment.
Default first-time installs to setup
For a newly completed GitHub App install with no repositories selected, the existing completion flow can leave the status as connected with repositoryCount === 0 until the host saves repository settings (the MSW completion handler does this before PUT /github/repositories). Because this new state always opens on contributions, that connected-but-empty case only shows the passive empty repository message and hides the repository picker/policy notice behind the integration tab, so first-time setup has no visible next step. Initialize/select integration when repositoryCount === 0, or add a CTA from the empty state.
Useful? React with 👍 / 👎.
Summary
Validation
Closes #124