From 2c4ba78ae53d27c9e0a4ddfa8d3c0443cd0b59d5 Mon Sep 17 00:00:00 2001 From: bot-hermes Date: Thu, 13 Aug 2026 16:55:46 +0000 Subject: [PATCH] feat(ui): GitLab merge request view in the context panel --- .../ui/src/components/layout/ContextPanel.tsx | 3 +- .../ui/src/components/views/GitLabMrView.tsx | 489 ++++++++++++++++++ packages/ui/src/lib/i18n/messages/de.ts | 19 + packages/ui/src/lib/i18n/messages/en.ts | 19 + packages/ui/src/lib/i18n/messages/es.ts | 19 + packages/ui/src/lib/i18n/messages/fr.ts | 19 + packages/ui/src/lib/i18n/messages/ja.ts | 19 + packages/ui/src/lib/i18n/messages/ko.ts | 19 + packages/ui/src/lib/i18n/messages/pl.ts | 19 + packages/ui/src/lib/i18n/messages/pt-BR.ts | 19 + packages/ui/src/lib/i18n/messages/uk.ts | 19 + packages/ui/src/lib/i18n/messages/zh-CN.ts | 19 + packages/ui/src/lib/i18n/messages/zh-TW.ts | 19 + 13 files changed, 700 insertions(+), 1 deletion(-) create mode 100644 packages/ui/src/components/views/GitLabMrView.tsx diff --git a/packages/ui/src/components/layout/ContextPanel.tsx b/packages/ui/src/components/layout/ContextPanel.tsx index dcd9240a..f5d2676f 100644 --- a/packages/ui/src/components/layout/ContextPanel.tsx +++ b/packages/ui/src/components/layout/ContextPanel.tsx @@ -5,6 +5,7 @@ import { DiffViewIcon } from '@/components/icons/DiffIcon'; import { Button } from '@/components/ui/button'; import { SortableTabsStrip } from '@/components/ui/sortable-tabs-strip'; import { PullRequestView } from '@/components/views/PullRequestView'; +import { GitLabMrView } from '@/components/views/GitLabMrView'; import { TerminalView } from '@/components/views/TerminalView'; import { lazyWithChunkRecovery } from '@/lib/chunkLoadRecovery'; @@ -938,7 +939,7 @@ export const ContextPanel: React.FC = () => { : activeTab?.mode === 'git' ? : activeTab?.mode === 'pr' - ? (gitProvider === 'github' ? : null) + ? (gitProvider === 'github' ? : gitProvider === 'gitlab' ? : null) : activeTab?.mode === 'notes' ? : activeTab?.mode === 'plan' diff --git a/packages/ui/src/components/views/GitLabMrView.tsx b/packages/ui/src/components/views/GitLabMrView.tsx new file mode 100644 index 00000000..c81d74fb --- /dev/null +++ b/packages/ui/src/components/views/GitLabMrView.tsx @@ -0,0 +1,489 @@ +import React from 'react'; +import { useShallow } from 'zustand/react/shallow'; +import { Icon } from '@/components/icon/Icon'; +import { Button } from '@/components/ui/button'; +import { ScrollShadow } from '@/components/ui/ScrollShadow'; +import { ScrollableOverlay } from '@/components/ui/ScrollableOverlay'; +import { SimpleMarkdownRenderer } from '@/components/chat/MarkdownRenderer'; +import { useRuntimeAPIs } from '@/hooks/useRuntimeAPIs'; +import { useEffectiveDirectory } from '@/hooks/useEffectiveDirectory'; +import { useGitStatus, useGitStore } from '@/stores/useGitStore'; +import { useGitLabAuthStore } from '@/stores/useGitLabAuthStore'; +import { useUIStore } from '@/stores/useUIStore'; +import { openExternalUrl } from '@/lib/url'; +import { formatDateTimeForPreference } from '@/lib/timeFormat'; +import type { GitLabMergeRequestContextResult, GitLabMergeRequestSummary } from '@/lib/api/types'; +import { useI18n } from '@/lib/i18n'; + +const mrStateColor = (state: string): string => { + switch (state) { + case 'merged': + return 'var(--pr-merged)'; + case 'closed': + return 'var(--pr-closed)'; + default: + return 'var(--pr-open)'; + } +}; + +const mrAuthorLabel = (mr: GitLabMergeRequestSummary): string => + mr.author?.name?.trim() || mr.author?.username || ''; + +const draftBadgeClass = + 'inline-flex items-center rounded border border-border/60 bg-surface-elevated px-1.5 py-px typography-micro text-foreground'; + +/** + * Read-only GitLab merge request surface for the context panel. Resolves the + * same repository context GitView uses (effective directory + current branch + * from the shared git stores) and renders the branch's merge request plus the + * repository's open merge requests. v1 is intentionally read-only: no create, + * update, or merge actions. + */ +export const GitLabMrView: React.FC = () => { + const { t } = useI18n(); + const { git, gitlab } = useRuntimeAPIs(); + const currentDirectory = useEffectiveDirectory(); + const status = useGitStatus(currentDirectory ?? null); + const { ensureAll } = useGitStore(useShallow((state) => ({ ensureAll: state.ensureAll }))); + + const gitlabAuthStatus = useGitLabAuthStore((state) => state.status); + const gitlabAuthChecked = useGitLabAuthStore((state) => state.hasChecked); + const refreshGitLabStatus = useGitLabAuthStore((state) => state.refreshStatus); + + const setSettingsDialogOpen = useUIStore((state) => state.setSettingsDialogOpen); + const setSettingsPage = useUIStore((state) => state.setSettingsPage); + const timeFormatPreference = useUIStore((state) => state.timeFormatPreference); + + React.useEffect(() => { + if (!currentDirectory || !git) { + return; + } + void ensureAll(currentDirectory, git); + }, [currentDirectory, ensureAll, git]); + + // Settle the connection state exactly once; the store dedupes in-flight + // refreshes so remounts never pile up status requests. + React.useEffect(() => { + if (gitlabAuthChecked) { + return; + } + void refreshGitLabStatus(gitlab); + }, [gitlab, gitlabAuthChecked, refreshGitLabStatus]); + + const currentBranch = status?.current ?? null; + const connected = gitlabAuthChecked ? gitlabAuthStatus?.connected === true : null; + + const openGitLabSettings = React.useCallback(() => { + setSettingsPage('git'); + setSettingsDialogOpen(true); + }, [setSettingsDialogOpen, setSettingsPage]); + + // ---- Current-branch merge request -------------------------------------- + + const [branchMr, setBranchMr] = React.useState(null); + const [branchMrLoading, setBranchMrLoading] = React.useState(false); + const [branchMrError, setBranchMrError] = React.useState(null); + const [retryToken, setRetryToken] = React.useState(0); + + const retry = React.useCallback(() => setRetryToken((value) => value + 1), []); + + React.useEffect(() => { + if (!currentDirectory || !currentBranch || !connected || !gitlab?.mrsList) { + return; + } + let cancelled = false; + setBranchMrLoading(true); + setBranchMrError(null); + void gitlab + .mrsList(currentDirectory, { sourceBranch: currentBranch }) + .then((result) => { + if (cancelled) { + return; + } + const candidates = result.mrs ?? []; + // Prefer the open MR for the branch; fall back to a merged one so a + // just-merged branch still shows its request instead of nothing. + const matching = + candidates.find((mr) => mr.state === 'opened') + ?? candidates.find((mr) => mr.state === 'merged') + ?? null; + setBranchMr(matching); + }) + .catch((error) => { + if (!cancelled) { + setBranchMrError(error instanceof Error ? error.message : String(error)); + } + }) + .finally(() => { + if (!cancelled) { + setBranchMrLoading(false); + } + }); + return () => { + cancelled = true; + }; + }, [connected, currentBranch, currentDirectory, gitlab, retryToken]); + + // ---- Open merge requests in this repository ---------------------------- + + const [openMrs, setOpenMrs] = React.useState([]); + const [listPage, setListPage] = React.useState(1); + const [listHasMore, setListHasMore] = React.useState(false); + const [listLoading, setListLoading] = React.useState(false); + const [listLoadingMore, setListLoadingMore] = React.useState(false); + const [listError, setListError] = React.useState(null); + + React.useEffect(() => { + if (!currentDirectory || !connected || !gitlab?.mrsList) { + return; + } + let cancelled = false; + setListLoading(true); + setListError(null); + void gitlab + .mrsList(currentDirectory, { page: 1 }) + .then((result) => { + if (cancelled) { + return; + } + setOpenMrs(result.mrs ?? []); + setListPage(result.page ?? 1); + setListHasMore(Boolean(result.hasMore)); + }) + .catch((error) => { + if (!cancelled) { + setListError(error instanceof Error ? error.message : String(error)); + } + }) + .finally(() => { + if (!cancelled) { + setListLoading(false); + } + }); + return () => { + cancelled = true; + }; + }, [connected, currentDirectory, gitlab, retryToken]); + + const loadMore = React.useCallback(async () => { + if (!currentDirectory || !connected || !gitlab?.mrsList) { + return; + } + if (listLoadingMore || listLoading || !listHasMore) { + return; + } + setListLoadingMore(true); + try { + const next = await gitlab.mrsList(currentDirectory, { page: listPage + 1 }); + setOpenMrs((previous) => [...previous, ...(next.mrs ?? [])]); + setListPage(next.page ?? listPage + 1); + setListHasMore(Boolean(next.hasMore)); + } catch (error) { + setListError(error instanceof Error ? error.message : String(error)); + } finally { + setListLoadingMore(false); + } + }, [connected, currentDirectory, gitlab, listHasMore, listLoading, listLoadingMore, listPage]); + + // ---- Inline MR context (current-branch MR only) ------------------------ + + const [contextOpen, setContextOpen] = React.useState(false); + const [contextResult, setContextResult] = React.useState(null); + const [contextLoading, setContextLoading] = React.useState(false); + const [contextError, setContextError] = React.useState(null); + + // A different branch MR invalidates any previously loaded context. + React.useEffect(() => { + setContextOpen(false); + setContextResult(null); + setContextError(null); + }, [branchMr?.number]); + + const toggleContext = React.useCallback(async (mr: GitLabMergeRequestSummary) => { + if (!currentDirectory || !gitlab?.mrContext) { + return; + } + if (contextOpen) { + setContextOpen(false); + setContextResult(null); + setContextError(null); + return; + } + setContextOpen(true); + setContextLoading(true); + setContextError(null); + try { + const result = await gitlab.mrContext(currentDirectory, mr.number, { includeDiff: false }); + if (result.connected === false) { + setContextError(t('contextPanel.gitlabMr.error.notConnected')); + } else { + setContextResult(result); + } + } catch (error) { + setContextError(error instanceof Error ? error.message : String(error)); + } finally { + setContextLoading(false); + } + }, [contextOpen, currentDirectory, gitlab, t]); + + const formatTimestamp = React.useCallback((value?: string) => { + if (!value) { + return ''; + } + const timestamp = Date.parse(value); + if (!Number.isFinite(timestamp)) { + return value; + } + return formatDateTimeForPreference(timestamp, timeFormatPreference, { + year: 'numeric', + month: 'short', + day: 'numeric', + hour: 'numeric', + minute: '2-digit', + }); + }, [timeFormatPreference]); + + // ---- Render ------------------------------------------------------------ + + if (!currentDirectory) { + return ( +
+ +
{t('contextPanel.gitlabMr.title')}
+
{t('contextPanel.gitlabMr.empty.noActiveProject')}
+
+ ); + } + + if (connected === null) { + return ( +
+ +
{t('contextPanel.gitlabMr.loading')}
+
+ ); + } + + if (connected === false) { + return ( +
+ +
{t('contextPanel.gitlabMr.error.notConnected')}
+ +
+ ); + } + + const branchMrStateLabel = branchMr + ? branchMr.state === 'merged' + ? t('contextPanel.gitlabMr.state.merged') + : branchMr.state === 'closed' + ? t('contextPanel.gitlabMr.state.closed') + : t('contextPanel.gitlabMr.state.opened') + : ''; + const branchMrAuthor = branchMr ? mrAuthorLabel(branchMr) : ''; + const mrComments = contextResult?.comments ?? []; + + return ( + +
+
+
{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) => ( +
void openExternalUrl(mr.url)} + > +
+

+ !{mr.number} + {mr.title} +

+

{mr.sourceBranch} → {mr.targetBranch}

+
+ {mr.draft ? ( + {t('contextPanel.gitlabMr.draft')} + ) : null} + event.stopPropagation()} + aria-label={t('contextPanel.gitlabMr.openInGitLab')} + className="hidden size-5 flex-shrink-0 items-center justify-center text-muted-foreground transition-colors hover:text-foreground group-hover:flex" + > + + +
+ ))} + + {listHasMore ? ( +
+ +
+ ) : null} +
+ )} +
+
+
+ ); +}; diff --git a/packages/ui/src/lib/i18n/messages/de.ts b/packages/ui/src/lib/i18n/messages/de.ts index 5fdae5eb..401031a3 100644 --- a/packages/ui/src/lib/i18n/messages/de.ts +++ b/packages/ui/src/lib/i18n/messages/de.ts @@ -2980,6 +2980,25 @@ export const dict = { 'contextRail.aria.rail': 'Kontextleiste', 'contextPanel.editorEmpty.title': 'Kein Kontext ausgewählt', 'contextPanel.editorEmpty.description': 'Wählen Sie etwas aus der Seitenleiste aus, um Kontext anzuzeigen.', + 'contextPanel.gitlabMr.title': 'Merge-Requests', + 'contextPanel.gitlabMr.branchSectionTitle': 'Aktueller Zweig', + 'contextPanel.gitlabMr.openMrTitle': 'Offene Merge-Requests', + 'contextPanel.gitlabMr.listSectionTitle': 'In diesem Repository', + 'contextPanel.gitlabMr.openMrEmpty': 'Keine offenen Merge-Requests', + 'contextPanel.gitlabMr.noMrForBranch': 'Keine Merge-Request für diesen Zweig', + 'contextPanel.gitlabMr.loadContext': 'Kontext laden', + 'contextPanel.gitlabMr.hideContext': 'Kontext ausblenden', + 'contextPanel.gitlabMr.openInGitLab': 'In GitLab öffnen', + 'contextPanel.gitlabMr.draft': 'Entwurf', + 'contextPanel.gitlabMr.state.opened': 'Offen', + 'contextPanel.gitlabMr.state.merged': 'Zusammengeführt', + 'contextPanel.gitlabMr.state.closed': 'Geschlossen', + 'contextPanel.gitlabMr.loadMore': 'Mehr laden', + 'contextPanel.gitlabMr.loading': 'Laden...', + 'contextPanel.gitlabMr.error.loadFailed': 'Merge-Requests konnten nicht geladen werden', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab ist nicht verbunden', + 'contextPanel.gitlabMr.empty.noActiveProject': 'Kein aktives Projekt', + 'contextPanel.gitlabMr.actions.openSettings': 'Einstellungen öffnen', 'contextRail.surface.editor.description': 'Bearbeitungskontext', 'contextRail.surface.git.description': 'Git-Kontext', 'contextRail.surface.git.changesCountAriaSingle': '{label}, {count} geänderte Datei', diff --git a/packages/ui/src/lib/i18n/messages/en.ts b/packages/ui/src/lib/i18n/messages/en.ts index 666113b2..a7c4d82a 100644 --- a/packages/ui/src/lib/i18n/messages/en.ts +++ b/packages/ui/src/lib/i18n/messages/en.ts @@ -1118,6 +1118,25 @@ export const dict = { 'contextRail.aria.rail': 'Panel surfaces', 'contextPanel.editorEmpty.title': 'No file open', 'contextPanel.editorEmpty.description': 'Pick a file from the tree to start editing.', + 'contextPanel.gitlabMr.title': 'Merge requests', + 'contextPanel.gitlabMr.branchSectionTitle': 'Current branch', + 'contextPanel.gitlabMr.openMrTitle': 'Open merge requests', + 'contextPanel.gitlabMr.listSectionTitle': 'In this repository', + 'contextPanel.gitlabMr.openMrEmpty': 'No open merge requests', + 'contextPanel.gitlabMr.noMrForBranch': 'No merge request for this branch', + 'contextPanel.gitlabMr.loadContext': 'Load context', + 'contextPanel.gitlabMr.hideContext': 'Hide context', + 'contextPanel.gitlabMr.openInGitLab': 'Open in GitLab', + 'contextPanel.gitlabMr.draft': 'Draft', + 'contextPanel.gitlabMr.state.opened': 'Open', + 'contextPanel.gitlabMr.state.merged': 'Merged', + 'contextPanel.gitlabMr.state.closed': 'Closed', + 'contextPanel.gitlabMr.loadMore': 'Load more', + 'contextPanel.gitlabMr.loading': 'Loading...', + 'contextPanel.gitlabMr.error.loadFailed': 'Failed to load merge requests', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab is not connected', + 'contextPanel.gitlabMr.empty.noActiveProject': 'No active project', + 'contextPanel.gitlabMr.actions.openSettings': 'Open settings', 'contextRail.surface.editor.description': 'Edit project files', 'contextRail.surface.git.description': 'Commits, branches, and pull requests', 'contextRail.surface.git.changesCountAriaSingle': '{label}, {count} changed file', diff --git a/packages/ui/src/lib/i18n/messages/es.ts b/packages/ui/src/lib/i18n/messages/es.ts index 51424df8..414469bf 100644 --- a/packages/ui/src/lib/i18n/messages/es.ts +++ b/packages/ui/src/lib/i18n/messages/es.ts @@ -1119,6 +1119,25 @@ export const dict: Record = { "contextRail.aria.rail": "Superficies del panel", "contextPanel.editorEmpty.title": "Ningún archivo abierto", "contextPanel.editorEmpty.description": "Elige un archivo del árbol para empezar a editar.", + "contextPanel.gitlabMr.title": "Solicitudes de fusión", + "contextPanel.gitlabMr.branchSectionTitle": "Rama actual", + "contextPanel.gitlabMr.openMrTitle": "Solicitudes de fusión abiertas", + "contextPanel.gitlabMr.listSectionTitle": "En este repositorio", + "contextPanel.gitlabMr.openMrEmpty": "No hay solicitudes de fusión abiertas", + "contextPanel.gitlabMr.noMrForBranch": "No hay solicitud de fusión para esta rama", + "contextPanel.gitlabMr.loadContext": "Cargar contexto", + "contextPanel.gitlabMr.hideContext": "Ocultar contexto", + "contextPanel.gitlabMr.openInGitLab": "Abrir en GitLab", + "contextPanel.gitlabMr.draft": "Borrador", + "contextPanel.gitlabMr.state.opened": "Abierta", + "contextPanel.gitlabMr.state.merged": "Fusionada", + "contextPanel.gitlabMr.state.closed": "Cerrada", + "contextPanel.gitlabMr.loadMore": "Cargar más", + "contextPanel.gitlabMr.loading": "Cargando...", + "contextPanel.gitlabMr.error.loadFailed": "No se pudieron cargar las solicitudes de fusión", + "contextPanel.gitlabMr.error.notConnected": "GitLab no está conectado", + "contextPanel.gitlabMr.empty.noActiveProject": "Sin proyecto activo", + "contextPanel.gitlabMr.actions.openSettings": "Abrir ajustes", "contextRail.surface.editor.description": "Editar archivos del proyecto", "contextRail.surface.git.description": "Commits, ramas y pull requests", "contextRail.surface.git.changesCountAriaSingle": "{label}, {count} archivo modificado", diff --git a/packages/ui/src/lib/i18n/messages/fr.ts b/packages/ui/src/lib/i18n/messages/fr.ts index 4bc24344..10964f38 100644 --- a/packages/ui/src/lib/i18n/messages/fr.ts +++ b/packages/ui/src/lib/i18n/messages/fr.ts @@ -938,6 +938,25 @@ export const dict = { 'contextRail.aria.rail': 'Surfaces du panneau', 'contextPanel.editorEmpty.title': 'Aucun fichier ouvert', 'contextPanel.editorEmpty.description': 'Choisissez un fichier dans l’arborescence pour commencer.', + 'contextPanel.gitlabMr.title': 'Demandes de fusion', + 'contextPanel.gitlabMr.branchSectionTitle': 'Branche actuelle', + 'contextPanel.gitlabMr.openMrTitle': 'Demandes de fusion ouvertes', + 'contextPanel.gitlabMr.listSectionTitle': 'Dans ce dépôt', + 'contextPanel.gitlabMr.openMrEmpty': 'Aucune demande de fusion ouverte', + 'contextPanel.gitlabMr.noMrForBranch': 'Aucune demande de fusion pour cette branche', + 'contextPanel.gitlabMr.loadContext': 'Charger le contexte', + 'contextPanel.gitlabMr.hideContext': 'Masquer le contexte', + 'contextPanel.gitlabMr.openInGitLab': 'Ouvrir dans GitLab', + 'contextPanel.gitlabMr.draft': 'Brouillon', + 'contextPanel.gitlabMr.state.opened': 'Ouverte', + 'contextPanel.gitlabMr.state.merged': 'Fusionnée', + 'contextPanel.gitlabMr.state.closed': 'Fermée', + 'contextPanel.gitlabMr.loadMore': 'Charger plus', + 'contextPanel.gitlabMr.loading': 'Chargement...', + 'contextPanel.gitlabMr.error.loadFailed': 'Échec du chargement des demandes de fusion', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab n\'est pas connecté', + 'contextPanel.gitlabMr.empty.noActiveProject': 'Aucun projet actif', + 'contextPanel.gitlabMr.actions.openSettings': 'Ouvrir les paramètres', 'contextRail.surface.editor.description': 'Modifier les fichiers du projet', 'contextRail.surface.git.description': 'Commits, branches et pull requests', 'contextRail.surface.git.changesCountAriaSingle': '{label}, {count} fichier modifié', diff --git a/packages/ui/src/lib/i18n/messages/ja.ts b/packages/ui/src/lib/i18n/messages/ja.ts index bae492c6..cf857617 100644 --- a/packages/ui/src/lib/i18n/messages/ja.ts +++ b/packages/ui/src/lib/i18n/messages/ja.ts @@ -1115,6 +1115,25 @@ export const dict: Record = { 'contextRail.aria.rail': 'パネルサーフェス', 'contextPanel.editorEmpty.title': 'ファイルが開かれていません', 'contextPanel.editorEmpty.description': 'ツリーからファイルを選んで編集を始めましょう。', + 'contextPanel.gitlabMr.title': 'マージリクエスト', + 'contextPanel.gitlabMr.branchSectionTitle': '現在のブランチ', + 'contextPanel.gitlabMr.openMrTitle': '開いているマージリクエスト', + 'contextPanel.gitlabMr.listSectionTitle': 'このリポジトリ内', + 'contextPanel.gitlabMr.openMrEmpty': '開いているマージリクエストはありません', + 'contextPanel.gitlabMr.noMrForBranch': 'このブランチのマージリクエストはありません', + 'contextPanel.gitlabMr.loadContext': 'コンテキストを読み込む', + 'contextPanel.gitlabMr.hideContext': 'コンテキストを隠す', + 'contextPanel.gitlabMr.openInGitLab': 'GitLab で開く', + 'contextPanel.gitlabMr.draft': 'ドラフト', + 'contextPanel.gitlabMr.state.opened': 'オープン', + 'contextPanel.gitlabMr.state.merged': 'マージ済み', + 'contextPanel.gitlabMr.state.closed': 'クローズ', + 'contextPanel.gitlabMr.loadMore': 'さらに読み込む', + 'contextPanel.gitlabMr.loading': '読み込み中...', + 'contextPanel.gitlabMr.error.loadFailed': 'マージリクエストを読み込めませんでした', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab に接続されていません', + 'contextPanel.gitlabMr.empty.noActiveProject': 'アクティブなプロジェクトがありません', + 'contextPanel.gitlabMr.actions.openSettings': '設定を開く', 'contextRail.surface.editor.description': 'プロジェクトのファイルを編集', 'contextRail.surface.git.description': 'コミット・ブランチ・プルリクエスト', 'contextRail.surface.git.changesCountAriaSingle': '{label}、変更ファイル{count}件', diff --git a/packages/ui/src/lib/i18n/messages/ko.ts b/packages/ui/src/lib/i18n/messages/ko.ts index dbf204b8..ca1aef58 100644 --- a/packages/ui/src/lib/i18n/messages/ko.ts +++ b/packages/ui/src/lib/i18n/messages/ko.ts @@ -1119,6 +1119,25 @@ export const dict: Record = { 'contextRail.aria.rail': '패널 서피스', 'contextPanel.editorEmpty.title': '열린 파일 없음', 'contextPanel.editorEmpty.description': '트리에서 파일을 선택해 편집을 시작하세요.', + 'contextPanel.gitlabMr.title': '병합 요청', + 'contextPanel.gitlabMr.branchSectionTitle': '현재 브랜치', + 'contextPanel.gitlabMr.openMrTitle': '열린 병합 요청', + 'contextPanel.gitlabMr.listSectionTitle': '이 저장소', + 'contextPanel.gitlabMr.openMrEmpty': '열린 병합 요청이 없습니다', + 'contextPanel.gitlabMr.noMrForBranch': '이 브랜치에 대한 병합 요청이 없습니다', + 'contextPanel.gitlabMr.loadContext': '컨텍스트 불러오기', + 'contextPanel.gitlabMr.hideContext': '컨텍스트 숨기기', + 'contextPanel.gitlabMr.openInGitLab': 'GitLab에서 열기', + 'contextPanel.gitlabMr.draft': '초안', + 'contextPanel.gitlabMr.state.opened': '열림', + 'contextPanel.gitlabMr.state.merged': '병합됨', + 'contextPanel.gitlabMr.state.closed': '닫힘', + 'contextPanel.gitlabMr.loadMore': '더 불러오기', + 'contextPanel.gitlabMr.loading': '불러오는 중...', + 'contextPanel.gitlabMr.error.loadFailed': '병합 요청을 불러오지 못했습니다', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab에 연결되지 않았습니다', + 'contextPanel.gitlabMr.empty.noActiveProject': '활성 프로젝트가 없습니다', + 'contextPanel.gitlabMr.actions.openSettings': '설정 열기', 'contextRail.surface.editor.description': '프로젝트 파일 편집', 'contextRail.surface.git.description': '커밋, 브랜치, 풀 리퀘스트', 'contextRail.surface.git.changesCountAriaSingle': '{label}, 변경된 파일 {count}개', diff --git a/packages/ui/src/lib/i18n/messages/pl.ts b/packages/ui/src/lib/i18n/messages/pl.ts index 24c1b104..8d887778 100644 --- a/packages/ui/src/lib/i18n/messages/pl.ts +++ b/packages/ui/src/lib/i18n/messages/pl.ts @@ -1456,6 +1456,25 @@ export const dict: Record = { 'contextRail.aria.rail': 'Powierzchnie panelu', 'contextPanel.editorEmpty.title': 'Brak otwartego pliku', 'contextPanel.editorEmpty.description': 'Wybierz plik z drzewa, aby rozpocząć edycję.', + 'contextPanel.gitlabMr.title': 'Żądania scalenia', + 'contextPanel.gitlabMr.branchSectionTitle': 'Bieżąca gałąź', + 'contextPanel.gitlabMr.openMrTitle': 'Otwarte żądania scalenia', + 'contextPanel.gitlabMr.listSectionTitle': 'W tym repozytorium', + 'contextPanel.gitlabMr.openMrEmpty': 'Brak otwartych żądań scalenia', + 'contextPanel.gitlabMr.noMrForBranch': 'Brak żądania scalenia dla tej gałęzi', + 'contextPanel.gitlabMr.loadContext': 'Wczytaj kontekst', + 'contextPanel.gitlabMr.hideContext': 'Ukryj kontekst', + 'contextPanel.gitlabMr.openInGitLab': 'Otwórz w GitLab', + 'contextPanel.gitlabMr.draft': 'Wersja robocza', + 'contextPanel.gitlabMr.state.opened': 'Otwarte', + 'contextPanel.gitlabMr.state.merged': 'Scalone', + 'contextPanel.gitlabMr.state.closed': 'Zamknięte', + 'contextPanel.gitlabMr.loadMore': 'Wczytaj więcej', + 'contextPanel.gitlabMr.loading': 'Wczytywanie...', + 'contextPanel.gitlabMr.error.loadFailed': 'Nie udało się wczytać żądań scalenia', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab nie jest połączony', + 'contextPanel.gitlabMr.empty.noActiveProject': 'Brak aktywnego projektu', + 'contextPanel.gitlabMr.actions.openSettings': 'Otwórz ustawienia', 'contextRail.surface.editor.description': 'Edytuj pliki projektu', 'contextRail.surface.git.description': 'Commity, gałęzie i pull requesty', 'contextRail.surface.git.changesCountAriaSingle': '{label}, {count} zmieniony plik', diff --git a/packages/ui/src/lib/i18n/messages/pt-BR.ts b/packages/ui/src/lib/i18n/messages/pt-BR.ts index fc6092f4..03569a30 100644 --- a/packages/ui/src/lib/i18n/messages/pt-BR.ts +++ b/packages/ui/src/lib/i18n/messages/pt-BR.ts @@ -1119,6 +1119,25 @@ export const dict: Record = { "contextRail.aria.rail": "Superfícies do painel", "contextPanel.editorEmpty.title": "Nenhum arquivo aberto", "contextPanel.editorEmpty.description": "Escolha um arquivo na árvore para começar a editar.", + "contextPanel.gitlabMr.title": "Solicitações de merge", + "contextPanel.gitlabMr.branchSectionTitle": "Branch atual", + "contextPanel.gitlabMr.openMrTitle": "Solicitações de merge abertas", + "contextPanel.gitlabMr.listSectionTitle": "Neste repositório", + "contextPanel.gitlabMr.openMrEmpty": "Nenhuma solicitação de merge aberta", + "contextPanel.gitlabMr.noMrForBranch": "Nenhuma solicitação de merge para esta branch", + "contextPanel.gitlabMr.loadContext": "Carregar contexto", + "contextPanel.gitlabMr.hideContext": "Ocultar contexto", + "contextPanel.gitlabMr.openInGitLab": "Abrir no GitLab", + "contextPanel.gitlabMr.draft": "Rascunho", + "contextPanel.gitlabMr.state.opened": "Aberta", + "contextPanel.gitlabMr.state.merged": "Mesclada", + "contextPanel.gitlabMr.state.closed": "Fechada", + "contextPanel.gitlabMr.loadMore": "Carregar mais", + "contextPanel.gitlabMr.loading": "Carregando...", + "contextPanel.gitlabMr.error.loadFailed": "Falha ao carregar solicitações de merge", + "contextPanel.gitlabMr.error.notConnected": "GitLab não está conectado", + "contextPanel.gitlabMr.empty.noActiveProject": "Nenhum projeto ativo", + "contextPanel.gitlabMr.actions.openSettings": "Abrir configurações", "contextRail.surface.editor.description": "Editar arquivos do projeto", "contextRail.surface.git.description": "Commits, branches e pull requests", "contextRail.surface.git.changesCountAriaSingle": "{label}, {count} arquivo modificado", diff --git a/packages/ui/src/lib/i18n/messages/uk.ts b/packages/ui/src/lib/i18n/messages/uk.ts index b2d77d6b..ae396daf 100644 --- a/packages/ui/src/lib/i18n/messages/uk.ts +++ b/packages/ui/src/lib/i18n/messages/uk.ts @@ -1119,6 +1119,25 @@ export const dict: Record = { "contextRail.aria.rail": "Поверхні панелі", "contextPanel.editorEmpty.title": "Файл не відкрито", "contextPanel.editorEmpty.description": "Виберіть файл у дереві, щоб почати редагування.", + "contextPanel.gitlabMr.title": "Запити на злиття", + "contextPanel.gitlabMr.branchSectionTitle": "Поточна гілка", + "contextPanel.gitlabMr.openMrTitle": "Відкриті запити на злиття", + "contextPanel.gitlabMr.listSectionTitle": "У цьому репозиторії", + "contextPanel.gitlabMr.openMrEmpty": "Немає відкритих запитів на злиття", + "contextPanel.gitlabMr.noMrForBranch": "Немає запиту на злиття для цієї гілки", + "contextPanel.gitlabMr.loadContext": "Завантажити контекст", + "contextPanel.gitlabMr.hideContext": "Приховати контекст", + "contextPanel.gitlabMr.openInGitLab": "Відкрити в GitLab", + "contextPanel.gitlabMr.draft": "Чернетка", + "contextPanel.gitlabMr.state.opened": "Відкритий", + "contextPanel.gitlabMr.state.merged": "Злитий", + "contextPanel.gitlabMr.state.closed": "Закритий", + "contextPanel.gitlabMr.loadMore": "Завантажити ще", + "contextPanel.gitlabMr.loading": "Завантаження...", + "contextPanel.gitlabMr.error.loadFailed": "Не вдалося завантажити запити на злиття", + "contextPanel.gitlabMr.error.notConnected": "GitLab не підключено", + "contextPanel.gitlabMr.empty.noActiveProject": "Немає активного проєкту", + "contextPanel.gitlabMr.actions.openSettings": "Відкрити налаштування", "contextRail.surface.editor.description": "Редагування файлів проєкту", "contextRail.surface.git.description": "Коміти, гілки та pull request-и", "contextRail.surface.git.changesCountAriaSingle": "{label}, {count} змінений файл", diff --git a/packages/ui/src/lib/i18n/messages/zh-CN.ts b/packages/ui/src/lib/i18n/messages/zh-CN.ts index 892f2f60..c96e3db0 100644 --- a/packages/ui/src/lib/i18n/messages/zh-CN.ts +++ b/packages/ui/src/lib/i18n/messages/zh-CN.ts @@ -1119,6 +1119,25 @@ export const dict: Record = { 'contextRail.aria.rail': '面板界面', 'contextPanel.editorEmpty.title': '未打开文件', 'contextPanel.editorEmpty.description': '从文件树中选择一个文件开始编辑。', + 'contextPanel.gitlabMr.title': '合并请求', + 'contextPanel.gitlabMr.branchSectionTitle': '当前分支', + 'contextPanel.gitlabMr.openMrTitle': '打开的合并请求', + 'contextPanel.gitlabMr.listSectionTitle': '在此仓库中', + 'contextPanel.gitlabMr.openMrEmpty': '没有打开的合并请求', + 'contextPanel.gitlabMr.noMrForBranch': '此分支没有合并请求', + 'contextPanel.gitlabMr.loadContext': '加载上下文', + 'contextPanel.gitlabMr.hideContext': '隐藏上下文', + 'contextPanel.gitlabMr.openInGitLab': '在 GitLab 中打开', + 'contextPanel.gitlabMr.draft': '草稿', + 'contextPanel.gitlabMr.state.opened': '已打开', + 'contextPanel.gitlabMr.state.merged': '已合并', + 'contextPanel.gitlabMr.state.closed': '已关闭', + 'contextPanel.gitlabMr.loadMore': '加载更多', + 'contextPanel.gitlabMr.loading': '加载中...', + 'contextPanel.gitlabMr.error.loadFailed': '加载合并请求失败', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab 未连接', + 'contextPanel.gitlabMr.empty.noActiveProject': '没有活动的项目', + 'contextPanel.gitlabMr.actions.openSettings': '打开设置', 'contextRail.surface.editor.description': '编辑项目文件', 'contextRail.surface.git.description': '提交、分支和拉取请求', 'contextRail.surface.git.changesCountAriaSingle': '{label},{count} 个更改的文件', diff --git a/packages/ui/src/lib/i18n/messages/zh-TW.ts b/packages/ui/src/lib/i18n/messages/zh-TW.ts index 43ad93fa..7860b7c1 100644 --- a/packages/ui/src/lib/i18n/messages/zh-TW.ts +++ b/packages/ui/src/lib/i18n/messages/zh-TW.ts @@ -1131,6 +1131,25 @@ export const dict: Record = { 'contextRail.aria.rail': '面板介面', 'contextPanel.editorEmpty.title': '未開啟檔案', 'contextPanel.editorEmpty.description': '從檔案樹選擇檔案開始編輯。', + 'contextPanel.gitlabMr.title': '合併請求', + 'contextPanel.gitlabMr.branchSectionTitle': '目前分支', + 'contextPanel.gitlabMr.openMrTitle': '已開啟的合併請求', + 'contextPanel.gitlabMr.listSectionTitle': '在此存放庫中', + 'contextPanel.gitlabMr.openMrEmpty': '沒有已開啟的合併請求', + 'contextPanel.gitlabMr.noMrForBranch': '此分支沒有合併請求', + 'contextPanel.gitlabMr.loadContext': '載入內容', + 'contextPanel.gitlabMr.hideContext': '隱藏內容', + 'contextPanel.gitlabMr.openInGitLab': '在 GitLab 中開啟', + 'contextPanel.gitlabMr.draft': '草稿', + 'contextPanel.gitlabMr.state.opened': '已開啟', + 'contextPanel.gitlabMr.state.merged': '已合併', + 'contextPanel.gitlabMr.state.closed': '已關閉', + 'contextPanel.gitlabMr.loadMore': '載入更多', + 'contextPanel.gitlabMr.loading': '載入中...', + 'contextPanel.gitlabMr.error.loadFailed': '載入合併請求失敗', + 'contextPanel.gitlabMr.error.notConnected': 'GitLab 未連線', + 'contextPanel.gitlabMr.empty.noActiveProject': '沒有使用中的專案', + 'contextPanel.gitlabMr.actions.openSettings': '開啟設定', 'contextRail.surface.editor.description': '編輯專案檔案', 'contextRail.surface.git.description': '提交、分支與拉取請求', 'contextRail.surface.git.changesCountAriaSingle': '{label},{count} 個變更的檔案',