Skip to content

fix(gitlab): label hosted reviews per provider in the space-manager panel - #7655

Merged
nwparker merged 4 commits into
stablyai:mainfrom
xianjianlf2:fix/gitlab-mr-label-space-manager
Oct 24, 2026
Merged

nwparker merged 4 commits into
stablyai:mainfrom
xianjianlf2:fix/gitlab-mr-label-space-manager

Conversation

@xianjianlf2

@xianjianlf2 xianjianlf2 commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

The Resource Manager workspace review details labeled GitLab merge requests as PR #N. They now use the existing provider copy resolver to display MR !N; GitHub and other PR providers retain PR #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 2570d8fa5cf2df8a869ee7ba88d68822e03e4e6a reproduced 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 as PR #4194 Draft, neutral. The candidate renders MR !4194 Draft, neutral through the same flow. A real GitHub PR control renders PR #14781 Draft, neutral, and an ordinary local repository without a remote renders No linked PR. No provider responses or caches were injected.

Validated after independent review at a7c2c4d1197b2fe9be19f25af290de76fec5a01d (tree 752fcad4022fe12291d6785cbda0a713b391f4d3): 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 (tree a2ed7418d9d9a7c6793567bd7a6f442edba80530, current main 88b47bc7d8785e615b2e79a5dc75ab1991cc2265 plus the reviewed head). The actual CI source contains exactly the four reviewed fix blobs and matches trusted current main for all .github files. 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 59f765ddcea5a95f95d260d2a6c1b56497af4c87 as 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.

7655-label-comparison.png

Actual untouched-main live GitLab reproduction:

Untouched-main Resource Manager labels real GitLab MR4194 as PR4194

Fresh post-review actual live GitLab result:

Fresh candidate Resource Manager labels real GitLab MR4194 as MR4194

@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 2e321ab5-d029-4ce9-a3fe-0531dc4f4db8

📥 Commits

Reviewing files that changed from the base of the PR and between f737f34 and 3f56d89.

📒 Files selected for processing (4)
  • src/renderer/src/components/status-bar/hosted-review-label.test.ts
  • src/renderer/src/components/status-bar/hosted-review-label.ts
  • src/renderer/src/components/status-bar/workspace-space-decision-details.ts
  • src/renderer/src/components/status-bar/workspace-space-presentation.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/renderer/src/components/status-bar/workspace-space-presentation.test.ts
  • src/renderer/src/components/status-bar/hosted-review-label.ts
  • src/renderer/src/components/status-bar/hosted-review-label.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review.

📝 Walkthrough

Adds shared utilities for hosted review label formatting. The utilities capitalize review states, use provider-specific prefixes and symbols, and append status when applicable. Workspace decision details now use the shared formatter. Tests cover state formatting, provider-specific labels, status handling, and GitLab presentation output.

Merge Risk: ⚪ Minimal · up to 3f56d

The panel now displays provider-correct hosted review labels such as “MR !5”; no actionable merge-blocking risk remains beyond normal checks and review.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description gives a detailed explanation of the change, rationale, visual proof, testing, compatibility scope, and review results. However, it does not include the required Linked Issue reference,… Add an actual linked issue under ## Linked Issue using Fixes #<issue-number> or the applicable issue reference. Reorganize the description under the required template headings, complete the Testing and Checklist items, and state the AI …
Passed Passed checks: 3 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly identifies the main change: provider-specific hosted review labels in the space-manager panel, with GitLab as the affected provider.
Full details: Description check

Explanation

The description gives a detailed explanation of the change, rationale, visual proof, testing, compatibility scope, and review results. However, it does not include the required Linked Issue reference, and it does not follow the repository template headings or explicitly complete the checklist and AI Disclosure sections.

Resolution

Add an actual linked issue under ## Linked Issue using Fixes #&lt;issue-number&gt; or the applicable issue reference. Reorganize the description under the required template headings, complete the Testing and Checklist items, and state the AI Disclosure or omit it only if the author is an internal maintainer covered by the template exception.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker nwparker added the bug Something isn't working label Jul 27, 2026
…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]>
@xianjianlf2
xianjianlf2 force-pushed the fix/gitlab-mr-label-space-manager branch from cb14742 to 1ba7bbe Compare August 31, 2026 06:18
@xianjianlf2

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest main and adapted the fix to the current Space Manager implementation. Cached reviews without a provider remain backward-compatible as GitHub-style labels, while GitLab reviews now render as MR !N; the existing workspace decision integration test now covers that behavior.

Validation:

  • git diff --check
  • Oxlint passes on all changed files
  • focused Vitest collection was blocked by the local partial dependency tree (i18next/react root links missing), before tests executed

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown

Greptile Summary

The 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.

  • Threads the cached hosted-review provider into label formatting.
  • Uses localized provider terminology and provider-specific number symbols.
  • Adds direct formatter tests and updates the panel presentation expectation.

Confidence Score: 5/5

The 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.

Important Files Changed

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
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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.

nwparker and others added 2 commits September 7, 2026 16:28
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]>
@nwparker
nwparker requested a review from Jinwoo-H as a code owner October 23, 2026 16:16
@nwparker
nwparker merged commit 831c394 into stablyai:main Oct 24, 2026
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants