feat(mobile): bring GitLab and Bitbucket pull request review to GitHub parity (stack 5/30) - #6007
Conversation
… (inbox, detail, files, diffs, discussions, checks) (kwf bring-mobile-gitlab-and-bitb-3792/s5)
…and-bitb-3792/s6f)
…osts), recents identity, session-linked badge, deep links, connect gate (kwf bring-mobile-gitlab-and-bitb-3792/s7)
…itlab-and-bitb-3792/s9)
…bile-gitlab-and-bitb-3792/s-i18n)
| */ | ||
| const GITLAB_ACTIVE_PIPELINE_STATUSES = new Set([ | ||
| 'created', | ||
| 'waiting_for_resources', |
There was a problem hiding this comment.
WARNING: GitLab pipeline status typo will refuse auto-merge while waiting for a runner
GitLab's API uses waiting_for_resource (singular). This set has waiting_for_resources, plus non-existent waiting and completing. An MR whose latest pipeline is waiting_for_resource fails hasActivePipeline and is rejected with GITLAB_AUTO_MERGE_NO_PIPELINE_REASON instead of arming merge-when-pipeline-succeeds.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| const gitlabStatus = useGitLabStatus(scope); | ||
| const bitbucketReadiness = useBitbucketReadiness(scope); | ||
|
|
||
| const github = usePrInbox(enabled); |
There was a problem hiding this comment.
WARNING: GitHub inbox is always queried, unlike GitLab/Bitbucket
usePrInbox(enabled) runs whenever the merged inbox is on, while GitLab/Bitbucket are gated on connected === true. githubPrReview.listInbox goes through withGitHubUserTokenRetry and fails when GitHub is not connected. A GitLab-only user then either gets a GitHub reconnect empty state (inbox has no provider scope, so PrReviewReconnectNotice falls back to GitHub) or a working GitLab list plus an unrecoverable "couldn't load more" retry.
Gate GitHub the same way as the other providers (useGitHubStatus).
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| }; | ||
| } | ||
| return { | ||
| threadsPath: trpc.providerReview.listDiscussions.pathFilter(), |
There was a problem hiding this comment.
WARNING: Provider resolve optimistic updates apply across every cached discussion list
listDiscussions.pathFilter() matches every provider discussion query, and applyProviderResolveToggle matches only threadId. GitLab discussion ids are unique hashes; Bitbucket uses String(root.id), a per-PR integer. Resolving thread "1" on PR A flips every cached Bitbucket PR that also has thread "1". The shared generationKey and chainSave key pr-thread:${platform}:${threadId} (no PR identity) also let a later resolve on PR B suppress PR A's rollback.
Scope the path filter (or the toggle) to the current PR identity.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| @@ -149,6 +175,8 @@ export function DiscussionThread({ | |||
| <CommentRow | |||
There was a problem hiding this comment.
WARNING: GitHub moderation overflow still mounts on GitLab and Bitbucket comments
Reactions are gated (readOnly={!isGithub}, reactionsSupported), but CommentRow always shows the overflow menu and calls moderation.blockUser / muteUser with { githubLogin: author.login } and reportContent with the provider comment id. GitLab/Bitbucket logins are not GitHub identities; a colliding login blocks or mutes the wrong GitHub user.
Hide the overflow (or the GitHub-only actions) when !isGithub.
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
| const isProviderArm = scope.ref.platform !== 'github'; | ||
| const mergeStateSettled = | ||
| !isProviderArm || (!mergeStateQuery.isLoading && !mergeStateQuery.isPending); | ||
| const capabilitiesSettled = !needsAutoMergeCapability || !capabilitiesQuery.isPending; |
There was a problem hiding this comment.
WARNING: Capabilities errors are treated as settled, so the sheet mounts without auto-merge capability
!capabilitiesQuery.isPending is true on error. The sheet then gets autoMergeCapability={undefined}, so autoMergeUnsupported stays false and Bitbucket's Enable Auto-merge form is shown. Confirm calls enableAutoMerge, which returns {supported:false, done:false} without throwing, and the sheet still celebrates, haptics, and dismisses as success. Retry also refetches only pr, not capabilities.
Treat isError as not settled (same as PrReviewReviewSubmitScreen requiring capabilitiesData !== undefined).
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 5 Issues Found | Recommendation: Address before merge Overview
Fix these issues in Kilo Cloud Issue Details (click to expand)WARNING
Files Reviewed (116 files)
Reviewed by grok-4.6 · Input: 301.1K · Output: 28.8K · Cached: 1.4M Review guidance: REVIEW.md from base branch |
Level 5 of the
bring-mobile-gitlab-and-bitb-3792stack.PR stack (merge bottom to top)
kwf/bring-mobile-gitlab-and-bitb-3792-l1)kwf/bring-mobile-gitlab-and-bitb-3792-l2kwf/bring-mobile-gitlab-and-bitb-3792-l3kwf/bring-mobile-gitlab-and-bitb-3792-l4kwf/bring-mobile-gitlab-and-bitb-3792-l5) ← this PRkwf/bring-mobile-gitlab-and-bitb-3792-l6)kwf/bring-mobile-gitlab-and-bitb-3792-l7kwf/bring-mobile-gitlab-and-bitb-3792-l8kwf/bring-mobile-gitlab-and-bitb-3792-l9kwf/bring-mobile-gitlab-and-bitb-3792-l10)kwf/bring-mobile-gitlab-and-bitb-3792-l11)kwf/bring-mobile-gitlab-and-bitb-3792-l12kwf/bring-mobile-gitlab-and-bitb-3792-l13)kwf/bring-mobile-gitlab-and-bitb-3792-l14kwf/bring-mobile-gitlab-and-bitb-3792-l15)kwf/bring-mobile-gitlab-and-bitb-3792-l16)kwf/bring-mobile-gitlab-and-bitb-3792-l17kwf/bring-mobile-gitlab-and-bitb-3792-l18kwf/bring-mobile-gitlab-and-bitb-3792-l19)kwf/bring-mobile-gitlab-and-bitb-3792-l20kwf/bring-mobile-gitlab-and-bitb-3792-l21kwf/bring-mobile-gitlab-and-bitb-3792-l23)kwf/bring-mobile-gitlab-and-bitb-3792-l24)kwf/bring-mobile-gitlab-and-bitb-3792-l25)kwf/bring-mobile-gitlab-and-bitb-3792-l26)kwf/bring-mobile-gitlab-and-bitb-3792-l27)kwf/bring-mobile-gitlab-and-bitb-3792-l28)kwf/bring-mobile-gitlab-and-bitb-3792-l29kwf/bring-mobile-gitlab-and-bitb-3792-l30)