+
+
{t('contextPanel.gitlabMr.title')}
+
{t('contextPanel.gitlabMr.listSectionTitle')}
+
+
+ {/* Current-branch merge request */}
+
+ {t('contextPanel.gitlabMr.branchSectionTitle')}
+
+ {branchMrLoading ? (
+
+
+ {t('contextPanel.gitlabMr.loading')}
+
+ ) : branchMrError ? (
+
+
{t('contextPanel.gitlabMr.error.loadFailed')}
+
{branchMrError}
+
+
+ ) : branchMr ? (
+
+
+
+ !{branchMr.number} {branchMr.title}
+
+
+ {branchMr.draft ? (
+ {t('contextPanel.gitlabMr.draft')}
+ ) : null}
+
+
+ {branchMrStateLabel}
+
+ {branchMr.sourceBranch} → {branchMr.targetBranch}
+
+ {branchMrAuthor ? (
+
{branchMrAuthor}
+ ) : null}
+
+
+
+
+
+
+
+ {contextOpen ? (
+
+ {contextLoading ? (
+
+
+ {t('contextPanel.gitlabMr.loading')}
+
+ ) : contextError ? (
+
{contextError}
+ ) : (
+ <>
+
+
{t('gitView.pr.field.description')}
+ {contextResult?.mr?.body?.trim() ? (
+
+ ) : (
+
{t('gitView.pr.noDescription')}
+ )}
+
+
+
{t('gitView.pr.segment.comments')}
+ {mrComments.length > 0 ? (
+ mrComments.map((comment) => (
+
+
+
+ {comment.author?.name?.trim() || comment.author?.username || ''}
+
+ {comment.createdAt ? (
+ {formatTimestamp(comment.createdAt)}
+ ) : null}
+
+
+
+ ))
+ ) : (
+
{t('gitView.pr.comments.empty')}
+ )}
+
+ >
+ )}
+
+ ) : null}
+
+ ) : (
+ {t('contextPanel.gitlabMr.noMrForBranch')}
+ )}
+
+
+ {/* Open merge requests in this repository */}
+
+ {t('contextPanel.gitlabMr.openMrTitle')}
+
+ {listLoading ? (
+
+
+ {t('contextPanel.gitlabMr.loading')}
+
+ ) : listError ? (
+
+
{t('contextPanel.gitlabMr.error.loadFailed')}
+
{listError}
+
+
+ ) : openMrs.length === 0 ? (
+ {t('contextPanel.gitlabMr.openMrEmpty')}
+ ) : (
+
+ {openMrs.map((mr) => (
+
+ ))}
+
+ {listHasMore ? (
+
+
+
+ ) : null}
+
+ )}
+
+
+