Repository navigation
fix(gitlab): label hosted reviews per provider in the space-manager panel - #7655
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
…anel The workspace space-manager rendered every hosted review as "PR #N", so a GitLab merge request showed as "PR stablyai#5" instead of "MR !5". The cached review already carries its provider (HostedReviewInfo.provider) — the panel's local input type just narrowed it away. Thread provider through and format via the same localizedHostedReviewCopy / '!' vs '#' helpers the rest of the app uses. Extract the label formatting into hosted-review-label.ts (a pure module, away from the panel's heavy React/store imports) so it can be unit-tested directly, and add hosted-review-label.test.ts covering github / gitlab / azure-devops / gitea and the status suffix. linkedPR stays "PR #N" — it is the GitHub-specific workspace field, distinct from linkedGitLabMR. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
cb14742 to
1ba7bbe
Compare
|
Rebased onto the latest Validation:
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Greptile SummaryThe PR makes hosted-review labels in the workspace space-manager provider-aware, displaying GitLab reviews as “MR !N” while retaining “PR #N” for other supported providers. It extracts the formatter into a small module and adds focused provider and status-suffix coverage.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness or security issues identified. The formatter receives canonical provider values from the hosted-review model, produces consistent terminology and symbols for every supported provider, and preserves the prior fallback for unsupported or absent providers.
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/status-bar/WorkspaceSpaceManagerPanel.tsx | Replaces the hard-coded GitHub review label with the extracted provider-aware formatter. |
| src/renderer/src/components/status-bar/hosted-review-label.ts | Adds consistent hosted-review label formatting for canonical supported providers and preserves the existing fallback behavior. |
| src/renderer/src/components/status-bar/hosted-review-label.test.ts | Covers GitHub, GitLab, Azure DevOps, Gitea, state capitalization, and optional status suffixes. |
| src/renderer/src/components/status-bar/workspace-space-presentation.test.ts | Updates the integration-level presentation expectation to require the GitLab-specific “MR !N” label. |
Reviews (1): Last reviewed commit: "fix(gitlab): label hosted reviews per pr..." | Re-trigger Greptile
…-space-manager # Conflicts: # src/renderer/src/components/status-bar/WorkspaceSpaceManagerPanel.tsx
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Adapt stablyai#7655 to current main using the existing hosted review copy resolver. Keep GitHub-compatible cached reviews and status formatting intact. Co-authored-by: MarkXian <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
The Resource Manager workspace review details labeled GitLab merge requests as
PR #N. They now use the existing provider copy resolver to displayMR !N; GitHub and other PR providers retainPR #N. Reviews cached by older clients without a provider retain the GitHub label, and existing state/status text and the linked-PR fallback are preserved.Before adopting contributor source, untouched current main
2570d8fa5cf2df8a869ee7ba88d68822e03e4e6areproduced this through a real public GitLab clone on its actual MR branch, production provider lookup/cache, and Resource Manager → Review → Scan workspaces → decision-badge hover: MR !4194 appeared asPR #4194 Draft, neutral. The candidate rendersMR !4194 Draft, neutralthrough the same flow. A real GitHub PR control rendersPR #14781 Draft, neutral, and an ordinary local repository without a remote rendersNo linked PR. No provider responses or caches were injected.Validated after independent review at
a7c2c4d1197b2fe9be19f25af290de76fec5a01d(tree752fcad4022fe12291d6785cbda0a713b391f4d3): all 54 tests across five suites, full renderer typecheck, seven changed-code quality gates, scoped anti-slop, formatting, whitespace, fresh direct JavaScript build, renderer boot graph and CLI emit passed. A fresh isolated hidden app repeated all three actual provider/local controls above; screenshots were personally inspected, both native windows stayed hidden/unfocused, existing provider config bytes and metadata were unchanged, and owned apps were stopped.Independent adversarial review: LOW source risk, no blockers. The reviewer independently passed the same 54 tests and five external probes, including 7,203 provider/locale/state/status/number combinations, old caches, local/SSH/paired owner collisions, GitHub suppression versus same-number GitLab preservation, and linkedPR/null/folder fallbacks. The reviewer also inspected the actual before/after screenshots. These deterministic compatibility probes do not claim additional live platform or provider UI runs.
Published nonforce to the original fork branch. All four fresh exact-head workflows passed. Fully paginated audit reconciles 33 checks to 33 job check-run IDs: 14 success, 19 intentional skips, zero pending or failures, with all heads matching the published commit. Both package builds, all five Node 24 shards, static analysis/typecheck, aggregate gate and selection evidence passed. The LoC script download initially hit GitHub’s installation API quota (HTTP 403); the inspected failed-only retry passed, preserving successful jobs. Three fork workflows were approved only after auditing the head, fork, ref, actors, event and actual CI source
cb0bab1e1d413609bccb934548ced3cac2687b8b(treea2ed7418d9d9a7c6793567bd7a6f442edba80530, current main88b47bc7d8785e615b2e79a5dc75ab1991cc2265plus the reviewed head). The actual CI source contains exactly the four reviewed fix blobs and matches trusted current main for all.githubfiles. No merge has been performed.The change reuses existing localized copy and introduces no style tokens, layout, IPC, schemas, provider fetches or workspace discovery behavior. Native macOS hidden UI was exercised; native Windows/Linux, SSH, mobile and a separate folder-workspace UI were not exercised. Live Azure/Gitea/Bitbucket were not exercised; formatter tests cover those providers.
Original implementation by @xianjianlf2 is retained with exact original head
59f765ddcea5a95f95d260d2a6c1b56497af4c87as an actual parent of the normal merge onto current main. MarkXian and the original Claude coauthor credit are preserved. Final diff: four files, +65/−8.Earlier contributor visual proof below is retained. It is a synthetic component comparison from September, separate from the real-provider October validation described above.
Actual untouched-main live GitLab reproduction:
Fresh post-review actual live GitLab result: