@devries-cameron20 / t3code-1 / commits / b6a0fd6d62
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

feat(issues): an issue shows every thread it is linked to (#38771)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>

Julius Marminge committed Nov 18, 2026 at 15:23 UTC b6a0fd6d62ad52b6c3a4496eab042c85e3804cba
40 files changed +757 -314
apps/mobile/src/features/issues/IssueRouteScreen.tsx
+73
@@ -3,6 +3,7 @@ import { StackActions, useNavigation, type StaticScreenProps } from "@react-navi
3 import { issueEventSentence } from "@t3tools/client-runtime/issue-presentation";
4 import { sourceControlClients } from "@t3tools/client-runtime/source-control-clients";
5 import { createIssueCommentPager } from "@t3tools/client-runtime/state/issues";
6 +import { visibleLinkedThreads } from "@t3tools/client-runtime/state/threads";
7 import type {
8 IssueComment,
9 IssueEvent,
@@ -37,8 +38,10 @@ import { NativeLayoutObserver } from "../../native/NativeLayoutObserver";
38 import { useNativeWorkspaceColumnsSupported } from "../../native/NativeWorkspaceColumns";
39 import { useDeviceType, useNativeColumnLayoutMetrics } from "../../native/native-layout-metrics";
40 import { NativeScrollView } from "../../native/NativeScrollViewMarker";
41 +import { useEnvironmentServerConfig } from "../../state/entities";
42 import { issueEnvironment, refreshIssueLists } from "../../state/issues";
43 import { useEnvironmentQuery } from "../../state/query";
44 +import { environmentThreadShells } from "../../state/threads";
45 import { useAtomCommand } from "../../state/use-atom-command";
46 import { usePullToRefresh } from "../../state/use-pull-to-refresh";
47 import { useAdaptiveWorkspaceLayout } from "../layout/AdaptiveWorkspaceLayout";
@@ -299,6 +302,75 @@ function LinkedPullRequests(props: {
302 );
303 }
304
305 +/** The threads this issue is linked to, most recently active first; hidden while there are none. */
306 +function LinkedThreads(props: { readonly params: IssueParams; readonly host: string }) {
307 + const gt = useGT();
308 + const navigation = useNavigation();
309 + const { environmentId, input } = issueTarget(props.params);
310 + const listsThreads =
311 + useEnvironmentServerConfig(environmentId)?.environment.capabilities.issueLinkedThreads === true;
312 + const relations = useEnvironmentQuery(
313 + listsThreads
314 + ? issueEnvironment.linkedThreads({
315 + environmentId,
316 + input: { tracker: input.tracker, host: props.host, scope: input.scope, key: input.key },
317 + })
318 + : null,
319 + );
320 + const hiddenKeys = useAtomValue(environmentThreadShells.hiddenThreadKeysAtom);
321 + const hidingAnywhere = useAtomValue(environmentThreadShells.anyEnvironmentHidingAtom);
322 + const loadedThreadRefs = useAtomValue(
323 + environmentThreadShells.environmentThreadRefsAtom(environmentId),
324 + );
325 + const threads = visibleLinkedThreads(
326 + relations.data?.threads ?? [],
327 + environmentId,
328 + loadedThreadRefs,
329 + hiddenKeys,
330 + hidingAnywhere,
331 + );
332 + if (threads.length === 0) return null;
333 + return (
334 + <View className="gap-2">
335 + <PullRequestSectionHeading>
336 + <T>Linked threads</T>
337 + </PullRequestSectionHeading>
338 + {threads.map((thread) => {
339 + const title = thread.title || gt("Untitled thread");
340 + return (
341 + <Pressable
342 + key={thread.id}
343 + accessibilityRole="button"
344 + accessibilityLabel={gt("Open thread {title}", { title })}
345 + onPress={() =>
346 + navigation.dispatch(
347 + StackActions.push("Thread", {
348 + environmentId: props.params.environmentId,
349 + threadId: thread.id,
350 + }),
351 + )
352 + }
353 + className="flex-row items-center gap-2 rounded-2xl bg-grouped-card p-3 active:opacity-70"
354 + >
355 + <SymbolView name="bubble.left" size={15} tintColorClassName="accent-icon-muted" />
356 + <View className="min-w-0 flex-1">
357 + <Text className="text-sm" numberOfLines={2}>
358 + {title}
359 + </Text>
360 + {thread.archivedAt !== null ? (
361 + <Text className="text-2xs text-foreground-muted" numberOfLines={1}>
362 + <T>Archived thread</T>
363 + </Text>
364 + ) : null}
365 + </View>
366 + <SymbolView name="chevron.right" size={12} tintColorClassName="accent-icon-muted" />
367 + </Pressable>
368 + );
369 + })}
370 + </View>
371 + );
372 +}
373 +
374 function IssueCommentCard(props: {
375 readonly params: IssueParams;
376 readonly comment: IssueComment;
@@ -617,6 +689,7 @@ function IssueRoute({ params }: { readonly params: IssueParams }) {
689 {detail.linkedPullRequests.length > 0 ? (
690 <LinkedPullRequests params={params} links={detail.linkedPullRequests} />
691 ) : null}
692 + <LinkedThreads params={params} host={detail.host} />
693 <View className="gap-3">
694 <PullRequestSectionHeading>
695 {detail.commentCount > 0
apps/mobile/src/i18n/translations/de.json
+4 -1
@@ -2279,6 +2279,8 @@
2279 "6fb238486abb5267": "Zugewiesene Personen bearbeiten",
2280 "a90c583cbd5151e5": "{status} Pull Request {number}, {title}",
2281 "e74de8decd998061": "schließt",
2282 + "2d7d0917e9d23b98": "Unbenannter Thread",
2283 + "2025fc2a5f89a7fb": "Thread {title} öffnen",
2284 "b7b88aa36ad9512b": "Jemand",
2285 "02de63c7a0ebd94c": "Issue wird geladen",
2286 "f776ce04009278c5": "Ältere Kommentare konnten nicht gelesen werden.",
@@ -2316,6 +2318,8 @@
2318 "115e0df4e8da2704": "Zugewiesene Personen",
2319 "7dd58ad67a6de5ba": "niemand",
2320 "325276a3fe4e9d12": "Verknüpfte Pull Requests",
2321 + "f7068768fdf3e96b": "Verknüpfte Threads",
2322 + "0cfebee8b40cdf6e": "Archivierter Thread",
2323 "ab8222ce9132da09": "Beschreibung",
2324 "051acc34eaf9d1df": "Aktivität",
2325 "9d82ebf35bfb4043": "Hier ist noch nichts passiert.",
@@ -2372,7 +2376,6 @@
2376 "e880959d9520231a": "Änderungen prüfen",
2377 "9e25940062052a95": "PR-Link oder Thread kopieren",
2378 "6a433e2e6d1cfd88": "Neuer Thread · {environment}",
2375 - "2d7d0917e9d23b98": "Unbenannter Thread",
2379 "fb49961cfffa5467": "Befehlspalette schließen",
2380 "6fdd3baa7bafa38b": "Befehle, Projekte und Threads durchsuchen",
2381 "fd47ac08956ffcbc": "Befehle, Projekte und Threads durchsuchen…",
apps/mobile/src/i18n/translations/en.json
+4 -1
@@ -2279,6 +2279,8 @@
2279 "6fb238486abb5267": "Edit assignees",
2280 "a90c583cbd5151e5": "{status} pull request {number}, {title}",
2281 "e74de8decd998061": "closes",
2282 + "2d7d0917e9d23b98": "Untitled thread",
2283 + "2025fc2a5f89a7fb": "Open thread {title}",
2284 "b7b88aa36ad9512b": "Someone",
2285 "02de63c7a0ebd94c": "Loading issue",
2286 "f776ce04009278c5": "Older comments could not be read.",
@@ -2316,6 +2318,8 @@
2318 "115e0df4e8da2704": "Assignees",
2319 "7dd58ad67a6de5ba": "none",
2320 "325276a3fe4e9d12": "Linked pull requests",
2321 + "f7068768fdf3e96b": "Linked threads",
2322 + "0cfebee8b40cdf6e": "Archived thread",
2323 "ab8222ce9132da09": "Description",
2324 "051acc34eaf9d1df": "Activity",
2325 "9d82ebf35bfb4043": "Nothing has happened here yet.",
@@ -2372,7 +2376,6 @@
2376 "e880959d9520231a": "Review changes",
2377 "9e25940062052a95": "Copy PR link or thread",
2378 "6a433e2e6d1cfd88": "New thread · {environment}",
2375 - "2d7d0917e9d23b98": "Untitled thread",
2379 "fb49961cfffa5467": "Close command palette",
2380 "6fdd3baa7bafa38b": "Search commands, projects, and threads",
2381 "fd47ac08956ffcbc": "Search commands, projects, and threads…",
apps/mobile/src/i18n/translations/es.json
+4 -1
@@ -2279,6 +2279,8 @@
2279 "6fb238486abb5267": "Editar asignados",
2280 "a90c583cbd5151e5": "Pull request {number} {status}, {title}",
2281 "e74de8decd998061": "cierra",
2282 + "2d7d0917e9d23b98": "Hilo sin título",
2283 + "2025fc2a5f89a7fb": "Abrir el hilo {title}",
2284 "b7b88aa36ad9512b": "Alguien",
2285 "02de63c7a0ebd94c": "Cargando issue",
2286 "f776ce04009278c5": "No se pudieron leer los comentarios anteriores.",
@@ -2312,6 +2314,8 @@
2314 "115e0df4e8da2704": "Asignados",
2315 "7dd58ad67a6de5ba": "nadie",
2316 "325276a3fe4e9d12": "Pull requests vinculadas",
2317 + "f7068768fdf3e96b": "Hilos vinculados",
2318 + "0cfebee8b40cdf6e": "Hilo archivado",
2319 "ab8222ce9132da09": "Descripción",
2320 "051acc34eaf9d1df": "Actividad",
2321 "9d82ebf35bfb4043": "Aquí no ha pasado nada todavía.",
@@ -2368,7 +2372,6 @@
2372 "e880959d9520231a": "Revisar cambios",
2373 "9e25940062052a95": "Copiar enlace de la PR o hilo",
2374 "6a433e2e6d1cfd88": "Nuevo hilo · {environment}",
2371 - "2d7d0917e9d23b98": "Hilo sin título",
2375 "fb49961cfffa5467": "Cerrar paleta de comandos",
2376 "6fdd3baa7bafa38b": "Buscar comandos, proyectos e hilos",
2377 "fd47ac08956ffcbc": "Buscar comandos, proyectos e hilos…",
apps/mobile/src/i18n/translations/fr.json
+4 -1
@@ -2279,6 +2279,8 @@
2279 "6fb238486abb5267": "Modifier les assignés",
2280 "a90c583cbd5151e5": "Pull request {number} {status}, {title}",
2281 "e74de8decd998061": "ferme",
2282 + "2d7d0917e9d23b98": "Fil sans titre",
2283 + "2025fc2a5f89a7fb": "Ouvrir le fil {title}",
2284 "b7b88aa36ad9512b": "Quelqu’un",
2285 "02de63c7a0ebd94c": "Chargement du ticket",
2286 "f776ce04009278c5": "Les commentaires plus anciens n’ont pas pu être lus.",
@@ -2312,6 +2314,8 @@
2314 "115e0df4e8da2704": "Assignés",
2315 "7dd58ad67a6de5ba": "personne",
2316 "325276a3fe4e9d12": "Pull requests associées",
2317 + "f7068768fdf3e96b": "Fils associés",
2318 + "0cfebee8b40cdf6e": "Fil archivé",
2319 "ab8222ce9132da09": "Description",
2320 "051acc34eaf9d1df": "Activité",
2321 "9d82ebf35bfb4043": "Rien ne s’est encore passé ici.",
@@ -2368,7 +2372,6 @@
2372 "e880959d9520231a": "Vérifier les modifications",
2373 "9e25940062052a95": "Copier le lien de la PR ou le fil",
2374 "6a433e2e6d1cfd88": "Nouveau fil · {environment}",
2371 - "2d7d0917e9d23b98": "Fil sans titre",
2375 "fb49961cfffa5467": "Fermer la palette de commandes",
2376 "6fdd3baa7bafa38b": "Rechercher des commandes, des projets et des fils",
2377 "fd47ac08956ffcbc": "Rechercher des commandes, des projets et des fils…",
apps/mobile/src/i18n/translations/ja.json
+4 -1
@@ -2278,6 +2278,8 @@
2278 "6fb238486abb5267": "担当者を編集",
2279 "a90c583cbd5151e5": "{status}のプルリクエスト {number}、{title}",
2280 "e74de8decd998061": "クローズ予定",
2281 + "2d7d0917e9d23b98": "無題のスレッド",
2282 + "2025fc2a5f89a7fb": "スレッド {title} を開く",
2283 "b7b88aa36ad9512b": "誰か",
2284 "02de63c7a0ebd94c": "Issue を読み込んでいます",
2285 "f776ce04009278c5": "以前のコメントを読み取れませんでした。",
@@ -2309,6 +2311,8 @@
2311 "115e0df4e8da2704": "担当者",
2312 "7dd58ad67a6de5ba": "なし",
2313 "325276a3fe4e9d12": "リンクされたプルリクエスト",
2314 + "f7068768fdf3e96b": "リンクされたスレッド",
2315 + "0cfebee8b40cdf6e": "アーカイブ済みのスレッド",
2316 "ab8222ce9132da09": "説明",
2317 "051acc34eaf9d1df": "アクティビティ",
2318 "9d82ebf35bfb4043": "まだアクティビティはありません。",
@@ -2365,7 +2369,6 @@
2369 "e880959d9520231a": "変更を確認",
2370 "9e25940062052a95": "PR のリンクまたはスレッドをコピー",
2371 "6a433e2e6d1cfd88": "新しいスレッド · {environment}",
2368 - "2d7d0917e9d23b98": "無題のスレッド",
2372 "fb49961cfffa5467": "コマンドパレットを閉じる",
2373 "6fdd3baa7bafa38b": "コマンド、プロジェクト、スレッドを検索",
2374 "fd47ac08956ffcbc": "コマンド、プロジェクト、スレッドを検索…",
apps/mobile/src/i18n/translations/ko.json
+4 -1
@@ -2280,6 +2280,8 @@
2280 "6fb238486abb5267": "담당자 편집",
2281 "a90c583cbd5151e5": "{status} 풀 리퀘스트 {number}, {title}",
2282 "e74de8decd998061": "닫을 예정",
2283 + "2d7d0917e9d23b98": "제목 없는 스레드",
2284 + "2025fc2a5f89a7fb": "스레드 {title} 열기",
2285 "b7b88aa36ad9512b": "알 수 없는 사용자",
2286 "02de63c7a0ebd94c": "이슈 불러오는 중",
2287 "f776ce04009278c5": "이전 댓글을 읽을 수 없습니다.",
@@ -2313,6 +2315,8 @@
2315 "115e0df4e8da2704": "담당자",
2316 "7dd58ad67a6de5ba": "없음",
2317 "325276a3fe4e9d12": "연결된 풀 리퀘스트",
2318 + "f7068768fdf3e96b": "연결된 스레드",
2319 + "0cfebee8b40cdf6e": "보관된 스레드",
2320 "ab8222ce9132da09": "설명",
2321 "051acc34eaf9d1df": "활동",
2322 "9d82ebf35bfb4043": "아직 활동이 없습니다.",
@@ -2369,7 +2373,6 @@
2373 "e880959d9520231a": "변경 사항 검토",
2374 "9e25940062052a95": "PR 링크 또는 스레드 복사",
2375 "6a433e2e6d1cfd88": "새 스레드 · {environment}",
2372 - "2d7d0917e9d23b98": "제목 없는 스레드",
2376 "fb49961cfffa5467": "명령 팔레트 닫기",
2377 "6fdd3baa7bafa38b": "명령, 프로젝트, 스레드 검색",
2378 "fd47ac08956ffcbc": "명령, 프로젝트, 스레드 검색…",
apps/mobile/src/i18n/translations/pt-BR.json
+4 -1
@@ -2279,6 +2279,8 @@
2279 "6fb238486abb5267": "Editar responsáveis",
2280 "a90c583cbd5151e5": "Pull request {number} {status}, {title}",
2281 "e74de8decd998061": "fecha",
2282 + "2d7d0917e9d23b98": "Thread sem título",
2283 + "2025fc2a5f89a7fb": "Abrir a thread {title}",
2284 "b7b88aa36ad9512b": "Alguém",
2285 "02de63c7a0ebd94c": "Carregando issue",
2286 "f776ce04009278c5": "Não foi possível ler os comentários mais antigos.",
@@ -2312,6 +2314,8 @@
2314 "115e0df4e8da2704": "Responsáveis",
2315 "7dd58ad67a6de5ba": "ninguém",
2316 "325276a3fe4e9d12": "Pull requests vinculados",
2317 + "f7068768fdf3e96b": "Threads vinculadas",
2318 + "0cfebee8b40cdf6e": "Thread arquivada",
2319 "ab8222ce9132da09": "Descrição",
2320 "051acc34eaf9d1df": "Atividade",
2321 "9d82ebf35bfb4043": "Nada aconteceu aqui ainda.",
@@ -2368,7 +2372,6 @@
2372 "e880959d9520231a": "Revisar alterações",
2373 "9e25940062052a95": "Copiar link do PR ou thread",
2374 "6a433e2e6d1cfd88": "Nova thread · {environment}",
2371 - "2d7d0917e9d23b98": "Thread sem título",
2375 "fb49961cfffa5467": "Fechar paleta de comandos",
2376 "6fdd3baa7bafa38b": "Pesquisar comandos, projetos e threads",
2377 "fd47ac08956ffcbc": "Pesquisar comandos, projetos e threads…",
apps/mobile/src/i18n/translations/ru.json
+4 -1
@@ -2327,6 +2327,8 @@
2327 "6fb238486abb5267": "Изменить исполнителей",
2328 "a90c583cbd5151e5": "Пул-реквест {number} ({status}), {title}",
2329 "e74de8decd998061": "закроет",
2330 + "2d7d0917e9d23b98": "Тред без названия",
2331 + "2025fc2a5f89a7fb": "Открыть тред {title}",
2332 "b7b88aa36ad9512b": "Кто-то",
2333 "02de63c7a0ebd94c": "Загрузка issue",
2334 "f776ce04009278c5": "Не удалось прочитать старые комментарии.",
@@ -2364,6 +2366,8 @@
2366 "115e0df4e8da2704": "Исполнители",
2367 "7dd58ad67a6de5ba": "нет",
2368 "325276a3fe4e9d12": "Привязанные пул-реквесты",
2369 + "f7068768fdf3e96b": "Привязанные треды",
2370 + "0cfebee8b40cdf6e": "Архивный тред",
2371 "ab8222ce9132da09": "Описание",
2372 "051acc34eaf9d1df": "Активность",
2373 "9d82ebf35bfb4043": "Здесь пока ничего не происходило.",
@@ -2420,7 +2424,6 @@
2424 "e880959d9520231a": "Проверить изменения",
2425 "9e25940062052a95": "Копировать ссылку на PR или тред",
2426 "6a433e2e6d1cfd88": "Новый тред · {environment}",
2423 - "2d7d0917e9d23b98": "Тред без названия",
2427 "fb49961cfffa5467": "Закрыть палитру команд",
2428 "6fdd3baa7bafa38b": "Поиск команд, проектов и тредов",
2429 "fd47ac08956ffcbc": "Поиск команд, проектов и тредов…",
apps/mobile/src/i18n/translations/sv.json
+4 -1
@@ -2279,6 +2279,8 @@
2279 "6fb238486abb5267": "Redigera tilldelade",
2280 "a90c583cbd5151e5": "{status} pull request {number}, {title}",
2281 "e74de8decd998061": "stänger",
2282 + "2d7d0917e9d23b98": "Namnlös tråd",
2283 + "2025fc2a5f89a7fb": "Öppna tråden {title}",
2284 "b7b88aa36ad9512b": "Någon",
2285 "02de63c7a0ebd94c": "Läser in ärende",
2286 "f776ce04009278c5": "Äldre kommentarer kunde inte läsas.",
@@ -2316,6 +2318,8 @@
2318 "115e0df4e8da2704": "Tilldelade",
2319 "7dd58ad67a6de5ba": "ingen",
2320 "325276a3fe4e9d12": "Länkade pull requests",
2321 + "f7068768fdf3e96b": "Länkade trådar",
2322 + "0cfebee8b40cdf6e": "Arkiverad tråd",
2323 "ab8222ce9132da09": "Beskrivning",
2324 "051acc34eaf9d1df": "Aktivitet",
2325 "9d82ebf35bfb4043": "Inget har hänt här än.",
@@ -2372,7 +2376,6 @@
2376 "e880959d9520231a": "Granska ändringar",
2377 "9e25940062052a95": "Kopiera PR-länk eller tråd",
2378 "6a433e2e6d1cfd88": "Ny tråd · {environment}",
2375 - "2d7d0917e9d23b98": "Namnlös tråd",
2379 "fb49961cfffa5467": "Stäng kommandopaletten",
2380 "6fdd3baa7bafa38b": "Sök kommandon, projekt och trådar",
2381 "fd47ac08956ffcbc": "Sök kommandon, projekt och trådar…",
apps/mobile/src/i18n/translations/zh.json
+4 -1
@@ -2282,6 +2282,8 @@
2282 "6fb238486abb5267": "编辑受理人",
2283 "a90c583cbd5151e5": "{status} 的 PR {number},{title}",
2284 "e74de8decd998061": "将关闭",
2285 + "2d7d0917e9d23b98": "未命名会话",
2286 + "2025fc2a5f89a7fb": "打开会话 {title}",
2287 "b7b88aa36ad9512b": "某人",
2288 "02de63c7a0ebd94c": "正在加载 issue",
2289 "f776ce04009278c5": "无法读取较早的评论。",
@@ -2313,6 +2315,8 @@
2315 "115e0df4e8da2704": "受理人",
2316 "7dd58ad67a6de5ba": "无",
2317 "325276a3fe4e9d12": "已关联 PR",
2318 + "f7068768fdf3e96b": "已关联的会话",
2319 + "0cfebee8b40cdf6e": "已归档的会话",
2320 "ab8222ce9132da09": "描述",
2321 "051acc34eaf9d1df": "活动",
2322 "9d82ebf35bfb4043": "这里还没有任何动态。",
@@ -2369,7 +2373,6 @@
2373 "e880959d9520231a": "查看更改",
2374 "9e25940062052a95": "复制 PR 链接或会话",
2375 "6a433e2e6d1cfd88": "新建会话 · {environment}",
2372 - "2d7d0917e9d23b98": "未命名会话",
2376 "fb49961cfffa5467": "关闭命令面板",
2377 "6fdd3baa7bafa38b": "搜索命令、项目和会话",
2378 "fd47ac08956ffcbc": "搜索命令、项目和会话…",
apps/server/src/auth/RpcAuthorization.ts
+1
@@ -138,6 +138,7 @@ export const RPC_REQUIRED_SCOPES = {
138 [WS_METHODS.issuesComments]: AuthOrchestrationReadScope,
139 [WS_METHODS.issuesTemplates]: AuthOrchestrationReadScope,
140 [WS_METHODS.issuesCandidates]: AuthOrchestrationReadScope,
141 + [WS_METHODS.issuesLinkedThreads]: AuthOrchestrationReadScope,
142 [WS_METHODS.issueTrackersList]: AuthOrchestrationReadScope,
143 [WS_METHODS.issueTrackersConnect]: AuthSettingsWriteScope,
144 [WS_METHODS.issueTrackersBindProject]: AuthSettingsWriteScope,
apps/server/src/environment/ServerEnvironment.ts
+1
@@ -230,6 +230,7 @@ export const make = Effect.gen(function* () {
230 pullRequestChecks: true,
231 issues: true,
232 linkedThreadRefreshes: true,
233 + issueLinkedThreads: true,
234 sideChats: true,
235 vcsBranchStatus: true,
236 inlineMessageContext: true,
apps/server/src/issue/linkedThreads.test.ts new
+56
@@ -0,0 +1,56 @@
1 +import { IssueTrackerKind } from "@t3tools/contracts";
2 +import { expect, it } from "@effect/vitest";
3 +import * as Effect from "effect/Effect";
4 +import * as Schema from "effect/Schema";
5 +import * as SqlClient from "effect/sql/SqlClient";
6 +
7 +import * as SqlitePersistence from "../persistence/Sqlite.ts";
8 +import { listLinkedIssueThreads } from "./linkedThreads.ts";
9 +
10 +const encodePayload = Schema.encodeEffect(Schema.fromJsonString(Schema.Unknown));
11 +
12 +it.effect("finds every thread linked to exactly one issue, newest activity first", () =>
13 + Effect.gen(function* () {
14 + const sql = yield* SqlClient.SqlClient;
15 + const at = (day: number) => `2026-11-0${day}T00:00:00.000Z`;
16 + const issue = { tracker: "linear", host: "linear.app", scope: "eng", key: "ENG-7" };
17 + const fixtures = [
18 + { id: "older", day: 1, issues: [issue] },
19 + { id: "newer", day: 2, issues: [{ ...issue, key: "ENG-8" }, issue] },
20 + { id: "settled", day: 3, issues: [issue], payload: { settledOverride: "settled" } },
21 + { id: "archived", day: 4, issues: [issue], archived: true },
22 + { id: "deleted", day: 5, issues: [issue], deleted: true },
23 + { id: "side-chat", day: 5, issues: [issue], payload: { lineage: { sideChat: true } } },
24 + { id: "other-key", day: 5, issues: [{ ...issue, key: "ENG-70" }] },
25 + { id: "other-scope", day: 5, issues: [{ ...issue, scope: "design" }] },
26 + { id: "other-tracker", day: 5, issues: [{ ...issue, tracker: "github" }] },
27 + { id: "unlinked", day: 5, issues: [] },
28 + ];
29 + for (const fixture of fixtures) {
30 + const payload = yield* encodePayload({ ...fixture.payload, issues: fixture.issues });
31 + yield* sql`
32 + INSERT INTO orchestration_v2_projection_threads (
33 + thread_id, project_id, title, default_provider, runtime_mode, interaction_mode,
34 + created_at, updated_at, archived_at, deleted_at, payload_json
35 + ) VALUES (
36 + ${fixture.id}, 'project-1', ${fixture.id}, 'codex', 'full-access', 'default',
37 + ${at(1)}, ${at(fixture.day)}, ${fixture.archived ? at(fixture.day) : null},
38 + ${fixture.deleted ? at(fixture.day) : null}, ${payload}
39 + )
40 + `;
41 + }
42 +
43 + const result = yield* listLinkedIssueThreads({
44 + tracker: IssueTrackerKind.make("linear"),
45 + host: "Linear.app",
46 + scope: "ENG",
47 + key: "ENG-7",
48 + });
49 + expect(result.threads.map((thread) => [thread.id, thread.settled, thread.archivedAt])).toEqual([
50 + ["archived", false, at(4)],
51 + ["settled", true, null],
52 + ["newer", false, null],
53 + ["older", false, null],
54 + ]);
55 + }).pipe(Effect.provide(SqlitePersistence.layerMemory)),
56 +);
apps/server/src/issue/linkedThreads.ts new
+64
@@ -0,0 +1,64 @@
1 +import {
2 + IssueLinkedThreadsResult,
3 + IssueOperationError,
4 + threadIssueKeysEqual,
5 + type ThreadIssueKey,
6 +} from "@t3tools/contracts";
7 +import * as NodeSqliteClient from "@t3tools/shared/nodeSqliteClient";
8 +import * as Effect from "effect/Effect";
9 +import * as Schema from "effect/Schema";
10 +import * as SqlClient from "effect/sql/SqlClient";
11 +
12 +const decodeLinkedThreads = Schema.decodeUnknownEffect(IssueLinkedThreadsResult);
13 +
14 +/** The threads an issue is linked to; the rows and filters `linkedThreads` uses for pull requests. */
15 +export const listLinkedIssueThreads = Effect.fn("listLinkedIssueThreads")(
16 + function* (key: ThreadIssueKey) {
17 + const sql = yield* SqlClient.SqlClient;
18 + const rows = yield* sql<{
19 + id: string;
20 + projectId: string;
21 + title: string;
22 + archivedAt: string | null;
23 + settled: number;
24 + tracker: ThreadIssueKey["tracker"];
25 + host: string;
26 + scope: string;
27 + key: string;
28 + }>`
29 + SELECT t.thread_id AS id, t.project_id AS "projectId", t.title,
30 + t.archived_at AS "archivedAt",
31 + (json_extract(t.payload_json, '$.settledAt') IS NOT NULL
32 + OR json_extract(t.payload_json, '$.settledOverride') IS 'settled') AS settled,
33 + json_extract(link.value, '$.tracker') AS tracker,
34 + json_extract(link.value, '$.host') AS host,
35 + json_extract(link.value, '$.scope') AS scope,
36 + json_extract(link.value, '$.key') AS key,
37 + t.updated_at AS "updatedAt"
38 + FROM orchestration_v2_projection_threads AS t
39 + JOIN json_each(t.payload_json, '$.issues') AS link
40 + WHERE json_extract(link.value, '$.key') = ${key.key.trim()}
41 + AND t.deleted_at IS NULL
42 + AND json_extract(t.payload_json, '$.lineage.sideChat') IS NOT 1
43 + ORDER BY "updatedAt" DESC, id ASC
44 + `.pipe(NodeSqliteClient.readOnly);
45 + const threads = rows
46 + .filter((row) => threadIssueKeysEqual(row, key))
47 + .map(({ id, projectId, title, archivedAt, settled }) => ({
48 + id,
49 + projectId,
50 + title,
51 + archivedAt,
52 + settled: settled === 1,
53 + }));
54 + return yield* decodeLinkedThreads({ threads });
55 + },
56 + Effect.mapError(
57 + (cause) =>
58 + new IssueOperationError({
59 + operation: "linkedThreads",
60 + detail: "Could not load linked threads.",
61 + cause,
62 + }),
63 + ),
64 +);
apps/server/src/observability/RpcInstrumentation.ts
+1
@@ -149,6 +149,7 @@ const RPC_AGGREGATES = {
149 [WS_METHODS.issuesComments]: "issues",
150 [WS_METHODS.issuesTemplates]: "issues",
151 [WS_METHODS.issuesCandidates]: "issues",
152 + [WS_METHODS.issuesLinkedThreads]: "issues",
153 [WS_METHODS.issuesCreate]: "issues",
154 [WS_METHODS.issuesComment]: "issues",
155 [WS_METHODS.issuesUpdate]: "issues",
apps/server/src/orchestration-v2/ThreadIssueService.test.ts
+2
@@ -4,6 +4,7 @@ import * as SecureRandom from "effect/crypto/SecureRandom";
4 import * as Effect from "effect/Effect";
5 import * as Layer from "effect/Layer";
6
7 +import * as SqlitePersistence from "../persistence/Sqlite.ts";
8 import * as Orchestrator from "./Orchestrator.ts";
9 import * as ThreadIssueService from "./ThreadIssueService.ts";
10
@@ -30,6 +31,7 @@ describe("ThreadIssueService", () => {
31 ThreadIssueService.layer.pipe(
32 Layer.provide(
33 Layer.mergeAll(
34 + SqlitePersistence.layerMemory,
35 Layer.mock(Orchestrator.OrchestratorV2)({
36 getThreadShell: (threadId) =>
37 Effect.fail(new Orchestrator.OrchestratorProjectionError({ threadId })),
apps/server/src/orchestration-v2/ThreadIssueService.ts
+13 -1
@@ -8,6 +8,8 @@
8 import {
9 CommandId,
10 threadIssueKeysEqual,
11 + type IssueLinkedThreadsResult,
12 + type IssueOperationError,
13 type IssueRef,
14 type ThreadId,
15 type ThreadIssueKey,
@@ -17,7 +19,9 @@ import * as Context from "effect/Context";
19 import * as SecureRandom from "effect/crypto/SecureRandom";
20 import * as Effect from "effect/Effect";
21 import * as Layer from "effect/Layer";
22 +import * as SqlClient from "effect/sql/SqlClient";
23
24 +import { listLinkedIssueThreads } from "../issue/linkedThreads.ts";
25 import * as Orchestrator from "./Orchestrator.ts";
26
27 export interface LinkThreadIssueInput {
@@ -44,12 +48,17 @@ export class ThreadIssueService extends Context.Service<
48 readonly unlink: (
49 input: UnlinkThreadIssueInput,
50 ) => Effect.Effect<{ readonly wasLinked: boolean }, Orchestrator.OrchestratorV2Error>;
51 + /** Every thread the issue is linked to, most recently active first. */
52 + readonly linkedThreads: (
53 + key: ThreadIssueKey,
54 + ) => Effect.Effect<IssueLinkedThreadsResult, IssueOperationError>;
55 }
56 >()("t3/orchestration-v2/ThreadIssueService") {}
57
58 const make = Effect.gen(function* () {
59 const orchestrator = yield* Orchestrator.OrchestratorV2;
60 const random = yield* SecureRandom.SecureRandom;
61 + const sql = yield* SqlClient.SqlClient;
62
63 const commandId = (tag: string, threadId: ThreadId) =>
64 random.uuidV4().pipe(
@@ -103,7 +112,10 @@ const make = Effect.gen(function* () {
112 },
113 );
114
106 - return ThreadIssueService.of({ link, unlink });
115 + const linkedThreads: ThreadIssueService["Service"]["linkedThreads"] = (key) =>
116 + listLinkedIssueThreads(key).pipe(Effect.provideService(SqlClient.SqlClient, sql));
117 +
118 + return ThreadIssueService.of({ link, unlink, linkedThreads });
119 });
120
121 export const layer = Layer.effect(ThreadIssueService, make);
apps/server/src/pullRequest/linkedThreads.test.ts
+11
@@ -280,6 +280,17 @@ it("signals linked-thread changes only when a linked answer could change", () =>
280 null,
281 ]);
282
283 + const issue = { tracker: "linear", host: "linear.app", scope: "eng", key: "ENG-7" };
284 + const issueLinks = makeLinkedThreadsChangeDetector();
285 + expect(
286 + [
287 + event("thread.created", {}),
288 + event("thread.issue-synced", { issues: [issue as never] }),
289 + event("thread.issue-synced", { issues: [issue as never] }),
290 + event("thread.issue-synced", { issues: [] }),
291 + ].map(issueLinks),
292 + ).toEqual([null, "changed", null, "changed"]);
293 +
294 const afterRestart = makeLinkedThreadsChangeDetector();
295 expect(afterRestart(event("thread.created", { title: "New" }))).toBe(null);
296 expect(
apps/server/src/pullRequest/linkedThreads.ts
+8 -6
@@ -7,6 +7,7 @@ import {
7 import {
8 PullRequestLinkedThreadsResult,
9 PullRequestOperationError,
10 + threadIssueKeyOf,
11 type OrchestrationV2AppThread,
12 type OrchestrationV2DomainEvent,
13 type ThreadId,
@@ -73,12 +74,13 @@ export const listLinkedPullRequestThreads = Effect.fn("listLinkedPullRequestThre
74 ),
75 );
76
76 -// Mirrors the rows and filters of `listLinkedPullRequestThreads`.
77 +// Mirrors the rows and filters of `listLinkedPullRequestThreads` and `listLinkedIssueThreads`.
78 function linkedKeys(thread: OrchestrationV2AppThread): ReadonlyArray<string> {
79 if (thread.deletedAt !== null || thread.lineage.sideChat === true) return [];
79 - return visibleThreadPullRequests(thread.pullRequests ?? [])
80 - .map(threadPullRequestKeyOf)
81 - .toSorted();
80 + return [
81 + ...visibleThreadPullRequests(thread.pullRequests ?? []).map(threadPullRequestKeyOf),
82 + ...(thread.issues ?? []).map(threadIssueKeyOf),
83 + ].toSorted();
84 }
85
86 function linkedThreadsView(
@@ -97,8 +99,8 @@ function linkedThreadsView(
99 }
100
101 /**
100 - * Tells how a domain event changed `pullRequests.linkedThreads` answers, so readers can refresh on
101 - * change instead of polling. `reordered` means activity on a linked thread, or on one whose links
102 + * Tells how a domain event changed `pullRequests.linkedThreads` and `issues.linkedThreads`
103 + * answers, so readers can refresh on change instead of polling. `reordered` means activity on a linked thread, or on one whose links
104 * are unknown since a restart, which can reorder answers. A thread's first full event after a
105 * restart counts as a change, since its earlier links are unknown.
106 */
apps/server/src/ws.test.ts
+2
@@ -115,6 +115,7 @@ import * as ProviderRegistry from "./provider/ProviderRegistry.ts";
115 import * as ProviderSessionManager from "./orchestration-v2/ProviderSessionManager.ts";
116 import * as PullRequestReviewGuideService from "./pullRequest/PullRequestReviewGuideService.ts";
117 import * as IssueService from "./issue/IssueService.ts";
118 +import * as ThreadIssueService from "./orchestration-v2/ThreadIssueService.ts";
119 import * as IssueTrackerConnections from "./issue/IssueTrackerConnections.ts";
120 import * as PullRequestService from "./pullRequest/PullRequestService.ts";
121 import * as PullRequestSyncReactor from "./orchestration-v2/PullRequestSyncReactor.ts";
@@ -861,6 +862,7 @@ const layerUnusedConfigRpcServices = Layer.mergeAll(
862 Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}),
863 Layer.mock(PullRequestService.PullRequestService)({}),
864 Layer.mock(IssueService.IssueService)({}),
865 + Layer.mock(ThreadIssueService.ThreadIssueService)({}),
866 Layer.mock(IssueTrackerConnections.IssueTrackerConnections)({}),
867 Layer.mock(PullRequestSyncReactor.PullRequestSyncReactor)({}),
868 Layer.mock(RelayClient.RelayClient)({}),
apps/server/src/ws.ts
+5
@@ -250,6 +250,7 @@ import * as TraceDiagnostics from "./diagnostics/TraceDiagnostics.ts";
250 import * as TriageService from "./triage/TriageService.ts";
251 import * as PullRequestService from "./pullRequest/PullRequestService.ts";
252 import * as IssueService from "./issue/IssueService.ts";
253 +import * as ThreadIssueService from "./orchestration-v2/ThreadIssueService.ts";
254 import * as IssueTrackerConnections from "./issue/IssueTrackerConnections.ts";
255 import * as PullRequestReviewGuideService from "./pullRequest/PullRequestReviewGuideService.ts";
256 import { listLinkedPullRequestThreads } from "./pullRequest/linkedThreads.ts";
@@ -1484,6 +1485,7 @@ export const layerWsRpc = (
1485 const guestShares = yield* GuestShareService.GuestShareService;
1486 const pullRequests = yield* PullRequestService.PullRequestService;
1487 const issues = yield* IssueService.IssueService;
1488 + const threadIssues = yield* ThreadIssueService.ThreadIssueService;
1489 const issueTrackers = yield* IssueTrackerConnections.IssueTrackerConnections;
1490 const reviewGuides = yield* PullRequestReviewGuideService.PullRequestReviewGuideService;
1491 const pullRequestSync = yield* PullRequestSyncReactor.PullRequestSyncReactor;
@@ -1978,6 +1980,7 @@ export const layerWsRpc = (
1980 [WS_METHODS.issuesComments]: (input) => issues.comments(input),
1981 [WS_METHODS.issuesTemplates]: (input) => issues.templates(input),
1982 [WS_METHODS.issuesCandidates]: (input) => issues.candidates(input),
1983 + [WS_METHODS.issuesLinkedThreads]: (input) => threadIssues.linkedThreads(input),
1984 [WS_METHODS.issuesCreate]: (input) => issues.create(input),
1985 [WS_METHODS.issuesComment]: (input) => issues.comment(input),
1986 [WS_METHODS.issuesUpdate]: (input) => issues.update(input),
@@ -3601,6 +3604,7 @@ export const layer = Layer.unwrap(
3604 const npmRelease = yield* NpmRelease.NpmRelease;
3605 const pullRequests = yield* PullRequestService.PullRequestService;
3606 const issues = yield* IssueService.IssueService;
3607 + const threadIssues = yield* ThreadIssueService.ThreadIssueService;
3608 const issueTrackers = yield* IssueTrackerConnections.IssueTrackerConnections;
3609 const reviewGuides = yield* PullRequestReviewGuideService.PullRequestReviewGuideService;
3610 const peerLinks = yield* PeerLinks.PeerLinks;
@@ -3692,6 +3696,7 @@ export const layer = Layer.unwrap(
3696 // Share server-lifetime PR caches so WS mutations invalidate every client's HTTP diffs.
3697 Layer.provide(Layer.succeed(PullRequestService.PullRequestService, pullRequests)),
3698 Layer.provide(Layer.succeed(IssueService.IssueService, issues)),
3699 + Layer.provide(Layer.succeed(ThreadIssueService.ThreadIssueService, threadIssues)),
3700 Layer.provide(
3701 Layer.succeed(IssueTrackerConnections.IssueTrackerConnections, issueTrackers),
3702 ),
apps/web/src/components/ThreadLinkPicker.tsx new
+87
@@ -0,0 +1,87 @@
1 +import type { EnvironmentId, ThreadId } from "@t3tools/contracts";
2 +import { CheckIcon, MessageSquareIcon } from "lucide-react";
3 +import { T, useGT } from "gt-react";
4 +import { useState } from "react";
5 +
6 +import { useProjects, useVisibleThreadShells } from "~/state/entities";
7 +import { useThreadSearch } from "~/state/queries";
8 +
9 +import { Command, CommandInput, CommandItem, CommandList } from "./ui/command";
10 +
11 +type ThreadShell = ReturnType<typeof useVisibleThreadShells>[number];
12 +
13 +/** Search over an environment's unarchived threads, to link one to a pull request or an issue. */
14 +export function ThreadLinkPicker({
15 + environmentId,
16 + pending,
17 + isLinked,
18 + onSelect,
19 +}: {
20 + environmentId: EnvironmentId;
21 + pending: boolean;
22 + isLinked: (thread: ThreadShell) => boolean;
23 + onSelect: (threadId: ThreadId) => void;
24 +}) {
25 + const gt = useGT();
26 + const threads = useVisibleThreadShells();
27 + const projects = useProjects();
28 + const [query, setQuery] = useState("");
29 + // Mounts older settled threads matching the query, which shells may leave out.
30 + useThreadSearch([environmentId], query, { titlesOnly: true });
31 + const projectNames = new Map(
32 + projects
33 + .filter((project) => project.environmentId === environmentId)
34 + .map((project) => [project.id, project.title]),
35 + );
36 + const search = query.trim().toLocaleLowerCase();
37 + const candidates = threads
38 + .filter(
39 + (thread) =>
40 + thread.environmentId === environmentId &&
41 + thread.archivedAt === null &&
42 + `${thread.title} ${projectNames.get(thread.projectId) ?? ""}`
43 + .toLocaleLowerCase()
44 + .includes(search),
45 + )
46 + .toSorted((a, b) => b.updatedAt.localeCompare(a.updatedAt));
47 + return (
48 + <Command mode="none" value={query} onValueChange={setQuery} aria-label={gt("Choose a thread")}>
49 + <CommandInput placeholder={gt("Search threads or projects...")} disabled={pending} />
50 + <CommandList className="max-h-80 overflow-y-auto">
51 + {candidates.length === 0 ? (
52 + <div className="px-3 py-6 text-center text-sm text-muted-foreground">
53 + <T>No active threads found.</T>
54 + </div>
55 + ) : (
56 + candidates.map((thread) => {
57 + const linked = isLinked(thread);
58 + return (
59 + <CommandItem
60 + key={thread.id}
61 + value={thread.id}
62 + disabled={pending || linked}
63 + onClick={() => onSelect(thread.id)}
64 + >
65 + <MessageSquareIcon aria-hidden className="size-4 shrink-0" />
66 + <span className="flex min-w-0 flex-1 flex-col">
67 + <span className="truncate">{thread.title || gt("Untitled thread")}</span>
68 + <span className="truncate text-xs text-muted-foreground">
69 + {projectNames.get(thread.projectId)}
70 + </span>
71 + </span>
72 + {linked ? (
73 + <>
74 + <CheckIcon aria-hidden className="size-3.5" />
75 + <span className="text-xs text-muted-foreground">
76 + <T context="thread is linked">Linked</T>
77 + </span>
78 + </>
79 + ) : null}
80 + </CommandItem>
81 + );
82 + })
83 + )}
84 + </CommandList>
85 + </Command>
86 + );
87 +}
apps/web/src/components/issue/IssueDetailPanel.tsx
+9 -94
@@ -12,7 +12,6 @@ import {
12 } from "@t3tools/client-runtime/issue-selection";
13 import { isSelected, toggleSelection } from "@t3tools/client-runtime/pull-request-selection";
14 import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
15 -import { AuthOrchestrationOperateScope, threadIssueKeysEqual } from "@t3tools/contracts";
15 import type {
16 EnvironmentId,
17 IssueAssigneeCandidate,
@@ -31,8 +30,6 @@ import {
30 CheckIcon,
31 ChevronDownIcon,
32 ExternalLinkIcon,
34 - Link2Icon,
35 - Link2OffIcon,
33 TagIcon,
34 UserPlusIcon,
35 UsersIcon,
@@ -43,10 +40,8 @@ import { useContext, useState, type ReactNode } from "react";
40 import { RefreshIcon } from "~/components/ui/refresh-icon";
41 import { m } from "~/i18n/messages";
42 import { issueEnvironment, refreshIssueLists } from "~/state/issues";
46 -import { useProjects, useThreadShell } from "~/state/entities";
43 +import { useProjects } from "~/state/entities";
44 import { useEnvironmentQuery } from "~/state/query";
48 -import { useEnvironmentScope } from "~/state/session";
49 -import { threadEnvironment } from "~/state/threads";
45 import { useAtomCommand } from "~/state/use-atom-command";
46 import { formatRelativeTimeLabel } from "~/timestampFormat";
47
@@ -57,7 +52,6 @@ import { Menu, MenuItem, MenuPopup, MenuTrigger } from "../ui/menu";
52 import { cn } from "~/lib/utils";
53 import { PullRequestMetaRow, PullRequestSection } from "../pullRequest/PullRequestSummaryTab";
54 import { toastManager } from "../ui/toast";
60 -import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
55 import { PullRequestCandidatePicker } from "../pullRequest/PullRequestCandidatePicker";
56 import { PullRequestCommentBody } from "../pullRequest/PullRequestCommentBody";
57 import { PullRequestDetailTitleRow } from "../pullRequest/PullRequestDetailLayout";
@@ -74,89 +68,11 @@ import {
68 } from "../pullRequest/pullRequestPresentation";
69 import { IssueCommentComposer } from "./IssueCommentComposer";
70 import { IssueDetailGhost } from "./IssueDetailGhost";
71 +import { IssueThreadLinks } from "./IssueThreadLinks";
72 import { ReactionBar } from "../pullRequest/PullRequestReactions";
73 import { PullRequestsUnavailableState } from "../pullRequest/PullRequestsUnavailableState";
74 import { issueTrackerPresentation, issueStatePresentation } from "./issuePresentation";
75
81 -/**
82 - * Links or unlinks the issue to the thread it is shown beside. Dispatches the orchestration
83 - * command directly, as pull request linking does.
84 - */
85 -function IssueThreadLinkButton({
86 - environmentId,
87 - reference,
88 - issue,
89 - threadRef,
90 -}: {
91 - environmentId: EnvironmentId;
92 - reference: IssueRef;
93 - issue: Pick<IssueDetail, "url" | "displayKey" | "title">;
94 - threadRef: ScopedThreadRef;
95 -}) {
96 - const gt = useGT();
97 - const thread = useThreadShell(threadRef.environmentId === environmentId ? threadRef : null);
98 - const canOperate = useEnvironmentScope(environmentId, AuthOrchestrationOperateScope);
99 - const link = useAtomCommand(threadEnvironment.linkIssue, { reportFailure: false });
100 - const unlink = useAtomCommand(threadEnvironment.unlinkIssue, { reportFailure: false });
101 - const [pending, setPending] = useState(false);
102 - if (thread === null || !canOperate) return null;
103 - const key = { ...reference, host: reference.host ?? "" };
104 - const linked = (thread.issues ?? []).some((existing) => threadIssueKeysEqual(existing, key));
105 - const toggle = async () => {
106 - if (pending || reference.host === undefined) return;
107 - setPending(true);
108 - const result = await (linked
109 - ? unlink({ environmentId, input: { threadId: threadRef.threadId, ...key } })
110 - : link({
111 - environmentId,
112 - input: {
113 - threadId: threadRef.threadId,
114 - ...key,
115 - url: issue.url,
116 - displayKey: issue.displayKey,
117 - title: issue.title,
118 - source: "manual",
119 - },
120 - }));
121 - setPending(false);
122 - if (result._tag === "Failure") {
123 - toastManager.add({
124 - type: "error",
125 - title: linked ? m(msg("Could not unlink the issue")) : m(msg("Could not link the issue")),
126 - description: readableFailure(
127 - squashAtomCommandFailure(result),
128 - m(msg("The server refused it.")),
129 - ),
130 - });
131 - }
132 - };
133 - return (
134 - <Tooltip>
135 - <TooltipTrigger
136 - render={
137 - <Button
138 - size="icon-xs"
139 - variant="ghost"
140 - aria-label={linked ? gt("Unlink from thread") : gt("Link to thread")}
141 - aria-pressed={linked}
142 - disabled={pending || reference.host === undefined}
143 - onClick={() => void toggle()}
144 - />
145 - }
146 - >
147 - {linked ? (
148 - <Link2OffIcon aria-hidden className="size-3.5" />
149 - ) : (
150 - <Link2Icon aria-hidden className="size-3.5" />
151 - )}
152 - </TooltipTrigger>
153 - <TooltipPopup>
154 - {linked ? <T>Unlink from this thread</T> : <T>Link to this thread</T>}
155 - </TooltipPopup>
156 - </Tooltip>
157 - );
158 -}
159 -
76 function IssueReactionBar({
77 reactions,
78 canReact,
@@ -649,14 +565,13 @@ export function IssueDetailPanel({
565 </InlineButton>
566 <span className="flex-1" />
567 {stateControl}
652 - {threadRef ? (
653 - <IssueThreadLinkButton
654 - environmentId={environmentId}
655 - reference={{ ...reference, host: reference.host ?? detail.host }}
656 - issue={detail}
657 - threadRef={threadRef}
658 - />
659 - ) : null}
568 + <IssueThreadLinks
569 + key={`${environmentId}:${detail.url}`}
570 + environmentId={environmentId}
571 + reference={{ ...reference, host: reference.host ?? detail.host }}
572 + issue={detail}
573 + threadRef={threadRef}
574 + />
575 <Button
576 size="icon-xs"
577 variant="ghost"
apps/web/src/components/issue/IssueThreadLinks.tsx new
+211
@@ -0,0 +1,211 @@
1 +import { useAtomValue } from "@effect/atom-react";
2 +import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
3 +import { visibleLinkedThreads } from "@t3tools/client-runtime/state/threads";
4 +import { AuthOrchestrationOperateScope, threadIssueKeysEqual } from "@t3tools/contracts";
5 +import type {
6 + EnvironmentId,
7 + IssueDetail,
8 + IssueRef,
9 + ScopedThreadRef,
10 + ThreadId,
11 +} from "@t3tools/contracts";
12 +import { Link2Icon, Link2OffIcon, MessageSquareIcon } from "lucide-react";
13 +import { msg, T, useGT } from "gt-react";
14 +import { useState } from "react";
15 +
16 +import { openCommandPalette } from "~/commandPaletteBus";
17 +import { m } from "~/i18n/messages";
18 +import { appAtomRegistry } from "~/rpc/atomRegistry";
19 +import {
20 + useAnyEnvironmentHiding,
21 + useEnvironmentThreadRefs,
22 + useServerConfigs,
23 + useThreadShell,
24 +} from "~/state/entities";
25 +import { issueEnvironment } from "~/state/issues";
26 +import { useEnvironmentQuery } from "~/state/query";
27 +import { useEnvironmentScope } from "~/state/session";
28 +import { environmentThreadShells, threadEnvironment } from "~/state/threads";
29 +import { useAtomCommand } from "~/state/use-atom-command";
30 +
31 +import { readableFailure } from "../pullRequest/pullRequestDetail.logic";
32 +import { ThreadLinkPicker } from "../ThreadLinkPicker";
33 +import { Button } from "../ui/button";
34 +import { Dialog, DialogPopup, DialogTitle } from "../ui/dialog";
35 +import { toastManager } from "../ui/toast";
36 +import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
37 +
38 +/**
39 + * The threads an issue is linked to, and the control that links it to one more: the thread it is
40 + * shown beside, or one picked from the environment when it is shown on its own.
41 + */
42 +export function IssueThreadLinks({
43 + environmentId,
44 + reference,
45 + issue,
46 + threadRef,
47 +}: {
48 + environmentId: EnvironmentId;
49 + reference: IssueRef & { readonly host: string };
50 + issue: Pick<IssueDetail, "url" | "displayKey" | "title">;
51 + threadRef: ScopedThreadRef | null;
52 +}) {
53 + const gt = useGT();
54 + const thread = useThreadShell(threadRef?.environmentId === environmentId ? threadRef : null);
55 + const canOperate = useEnvironmentScope(environmentId, AuthOrchestrationOperateScope);
56 + const listsThreads =
57 + useServerConfigs().get(environmentId)?.environment.capabilities.issueLinkedThreads === true;
58 + const link = useAtomCommand(threadEnvironment.linkIssue, { reportFailure: false });
59 + const unlink = useAtomCommand(threadEnvironment.unlinkIssue, { reportFailure: false });
60 + const hiddenKeys = useAtomValue(environmentThreadShells.hiddenThreadKeysAtom);
61 + const hidingAnywhere = useAnyEnvironmentHiding();
62 + const loadedThreadRefs = useEnvironmentThreadRefs(environmentId);
63 + const key = {
64 + tracker: reference.tracker,
65 + host: reference.host,
66 + scope: reference.scope,
67 + key: reference.key,
68 + };
69 + const relationsAtom = issueEnvironment.linkedThreads({ environmentId, input: key });
70 + const relations = useEnvironmentQuery(listsThreads ? relationsAtom : null);
71 + // Retain the last count while refresh temporarily clears query data.
72 + const [lastRelations, setLastRelations] = useState(relations.data);
73 + if (relations.data !== null && relations.data !== lastRelations) {
74 + setLastRelations(relations.data);
75 + }
76 + const [pending, setPending] = useState(false);
77 + const [pickerOpen, setPickerOpen] = useState(false);
78 +
79 + const linkedHere = (thread?.issues ?? []).some((existing) => threadIssueKeysEqual(existing, key));
80 + const changeLink = async (threadId: ThreadId, remove: boolean) => {
81 + if (pending) return;
82 + setPending(true);
83 + const result = await (remove
84 + ? unlink({ environmentId, input: { threadId, ...key } })
85 + : link({
86 + environmentId,
87 + input: {
88 + threadId,
89 + ...key,
90 + projectId: reference.projectId,
91 + url: issue.url,
92 + displayKey: issue.displayKey,
93 + title: issue.title,
94 + source: "manual",
95 + },
96 + }));
97 + setPending(false);
98 + if (result._tag === "Failure") {
99 + toastManager.add({
100 + type: "error",
101 + title: remove ? m(msg("Could not unlink the issue")) : m(msg("Could not link the issue")),
102 + description: readableFailure(
103 + squashAtomCommandFailure(result),
104 + m(msg("The server refused it.")),
105 + ),
106 + });
107 + return;
108 + }
109 + if (listsThreads) appAtomRegistry.refresh(relationsAtom);
110 + setPickerOpen(false);
111 + };
112 +
113 + const linkedThreads = visibleLinkedThreads(
114 + (relations.data ?? lastRelations)?.threads ?? [],
115 + environmentId,
116 + loadedThreadRefs,
117 + hiddenKeys,
118 + hidingAnywhere,
119 + );
120 + const linkedThreadsLabel =
121 + linkedThreads.length > 0
122 + ? gt(
123 + "{count, plural, one {Linked from {count} thread} other {Linked from {count} threads}}",
124 + { count: linkedThreads.length },
125 + )
126 + : gt("Linked threads");
127 + // A failed read shows "?" and falls back to searching threads for the issue's link.
128 + const relationsKnown = (relations.data ?? lastRelations) !== null;
129 + return (
130 + <>
131 + {linkedThreads.length > 0 || (!relationsKnown && relations.error !== null) ? (
132 + <Tooltip>
133 + <TooltipTrigger
134 + render={
135 + <Button
136 + size="xs"
137 + variant="ghost"
138 + aria-label={linkedThreadsLabel}
139 + onClick={() =>
140 + openCommandPalette({
141 + query: issue.url,
142 + ...(relationsKnown
143 + ? { linkedThreads: { environmentId, threads: linkedThreads } }
144 + : {}),
145 + })
146 + }
147 + >
148 + <MessageSquareIcon aria-hidden className="size-3.5" />
149 + <span aria-hidden>{linkedThreads.length || "?"}</span>
150 + </Button>
151 + }
152 + />
153 + <TooltipPopup>
154 + {gt("{label}. Search in the command palette.", { label: linkedThreadsLabel })}
155 + </TooltipPopup>
156 + </Tooltip>
157 + ) : null}
158 + {canOperate ? (
159 + <Tooltip>
160 + <TooltipTrigger
161 + render={
162 + <Button
163 + size="icon-xs"
164 + variant="ghost"
165 + aria-label={linkedHere ? gt("Unlink from thread") : gt("Link to thread")}
166 + aria-pressed={thread === null ? undefined : linkedHere}
167 + disabled={pending}
168 + onClick={() => {
169 + if (thread === null) setPickerOpen(true);
170 + else void changeLink(thread.id, linkedHere);
171 + }}
172 + />
173 + }
174 + >
175 + {linkedHere ? (
176 + <Link2OffIcon aria-hidden className="size-3.5" />
177 + ) : (
178 + <Link2Icon aria-hidden className="size-3.5" />
179 + )}
180 + </TooltipTrigger>
181 + <TooltipPopup>
182 + {linkedHere ? (
183 + <T>Unlink from this thread</T>
184 + ) : thread === null ? (
185 + gt("Link to thread")
186 + ) : (
187 + <T>Link to this thread</T>
188 + )}
189 + </TooltipPopup>
190 + </Tooltip>
191 + ) : null}
192 + {pickerOpen ? (
193 + <Dialog open onOpenChange={setPickerOpen}>
194 + <DialogPopup className="max-w-md" showCloseButton={false}>
195 + <DialogTitle className="sr-only">
196 + <T>Link issue to a thread</T>
197 + </DialogTitle>
198 + <ThreadLinkPicker
199 + environmentId={environmentId}
200 + pending={pending}
201 + isLinked={(candidate) =>
202 + (candidate.issues ?? []).some((existing) => threadIssueKeysEqual(existing, key))
203 + }
204 + onSelect={(threadId) => void changeLink(threadId, false)}
205 + />
206 + </DialogPopup>
207 + </Dialog>
208 + ) : null}
209 + </>
210 + );
211 +}
apps/web/src/components/pullRequest/PullRequestThreadLinks.tsx
+4 -83
@@ -5,7 +5,7 @@ import { scopeThreadRef } from "@t3tools/client-runtime/environment";
5 import { visibleLinkedThreads } from "@t3tools/client-runtime/state/threads";
6 import { settlePromise, squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
7 import type { EnvironmentId, PullRequestRef, ScopedThreadRef, ThreadId } from "@t3tools/contracts";
8 -import { CheckIcon, MessageSquareIcon } from "lucide-react";
8 +import { MessageSquareIcon } from "lucide-react";
9 import { Branch, msg, T, useGT } from "gt-react";
10 import { useState } from "react";
11
@@ -18,19 +18,16 @@ import { normalizeThreadPullRequestKey } from "@t3tools/client-runtime/thread-pu
18 import {
19 useAnyEnvironmentHiding,
20 useEnvironmentThreadRefs,
21 - useProjects,
21 useServerConfigs,
22 useThreadShell,
24 - useVisibleThreadShells,
23 } from "~/state/entities";
24 import { pullRequestEnvironment } from "~/state/pullRequests";
25 import { environmentThreadShells } from "~/state/threads";
26 import { useEnvironmentQuery } from "~/state/query";
29 -import { useThreadSearch } from "~/state/queries";
27 import { appAtomRegistry } from "~/rpc/atomRegistry";
28 import { openCommandPalette } from "~/commandPaletteBus";
29 import { Button } from "../ui/button";
33 -import { Command, CommandInput, CommandItem, CommandList } from "../ui/command";
30 +import { ThreadLinkPicker } from "../ThreadLinkPicker";
31 import { Dialog, DialogPopup, DialogTitle } from "../ui/dialog";
32 import { MenuItem } from "../ui/menu";
33 import { toastManager } from "../ui/toast";
@@ -217,10 +214,10 @@ function EnabledPullRequestThreadLinks({
214 to a thread
215 </T>
216 </DialogTitle>
220 - <ThreadPicker
217 + <ThreadLinkPicker
218 environmentId={environmentId}
222 - url={url}
219 pending={pending}
220 + isLinked={(candidate) => linking.isLinked(candidate, url)}
221 onSelect={(threadId) => void changeLink(threadId, false)}
222 />
223 </DialogPopup>
@@ -229,79 +226,3 @@ function EnabledPullRequestThreadLinks({
226 </>
227 );
228 }
232 -
233 -function ThreadPicker({
234 - environmentId,
235 - url,
236 - pending,
237 - onSelect,
238 -}: {
239 - environmentId: EnvironmentId;
240 - url: string;
241 - pending: boolean;
242 - onSelect: (threadId: ThreadId) => void;
243 -}) {
244 - const gt = useGT();
245 - const threads = useVisibleThreadShells();
246 - const linking = usePullRequestLinking(environmentId);
247 - const projects = useProjects();
248 - const [query, setQuery] = useState("");
249 - // Mounts older settled threads matching the query, which shells may leave out.
250 - useThreadSearch([environmentId], query, { titlesOnly: true });
251 - const projectNames = new Map(
252 - projects
253 - .filter((project) => project.environmentId === environmentId)
254 - .map((project) => [project.id, project.title]),
255 - );
256 - const search = query.trim().toLocaleLowerCase();
257 - const candidates = threads
258 - .filter(
259 - (thread) =>
260 - thread.environmentId === environmentId &&
261 - thread.archivedAt === null &&
262 - `${thread.title} ${projectNames.get(thread.projectId) ?? ""}`
263 - .toLocaleLowerCase()
264 - .includes(search),
265 - )
266 - .toSorted((a, b) => b.updatedAt.localeCompare(a.updatedAt));
267 - return (
268 - <Command mode="none" value={query} onValueChange={setQuery} aria-label={gt("Choose a thread")}>
269 - <CommandInput placeholder={gt("Search threads or projects...")} disabled={pending} />
270 - <CommandList className="max-h-80 overflow-y-auto">
271 - {candidates.length === 0 ? (
272 - <div className="px-3 py-6 text-center text-sm text-muted-foreground">
273 - <T>No active threads found.</T>
274 - </div>
275 - ) : (
276 - candidates.map((thread) => {
277 - const linked = linking.isLinked(thread, url);
278 - return (
279 - <CommandItem
280 - key={thread.id}
281 - value={thread.id}
282 - disabled={pending || linked}
283 - onClick={() => onSelect(thread.id)}
284 - >
285 - <MessageSquareIcon aria-hidden className="size-4 shrink-0" />
286 - <span className="flex min-w-0 flex-1 flex-col">
287 - <span className="truncate">{thread.title || gt("Untitled thread")}</span>
288 - <span className="truncate text-xs text-muted-foreground">
289 - {projectNames.get(thread.projectId)}
290 - </span>
291 - </span>
292 - {linked ? (
293 - <>
294 - <CheckIcon aria-hidden className="size-3.5" />
295 - <span className="text-xs text-muted-foreground">
296 - <T context="thread is linked">Linked</T>
297 - </span>
298 - </>
299 - ) : null}
300 - </CommandItem>
301 - );
302 - })
303 - )}
304 - </CommandList>
305 - </Command>
306 - );
307 -}
apps/web/src/i18n/translations/de.json
+13 -12
@@ -2458,6 +2458,10 @@
2458 "33c7e68fca089036": "Thread, {title}",
2459 "b4b98a0287c282e2": "Auf einem anderen Rechner, daher kann der Agent dieses Rechners es nicht lesen. Entferne es oder wechsle zum Senden zurück.",
2460 "c6196d99000642b4": "Thread öffnen",
2461 + "34cc63390ad793cc": "Thread wählen",
2462 + "8f12309ead62e38a": "Threads oder Projekte durchsuchen...",
2463 + "2f664754d005d9a7": "Keine aktiven Threads gefunden.",
2464 + "6095e59daf8ac2d6": "Verknüpft",
2465 "dd52ffa80d5eff97": "Thread abgeschlossen",
2466 "fd1316b1f627872b": "Genehmigung erforderlich",
2467 "a3178769f8308cbc": "Thread fehlgeschlagen",
@@ -5654,9 +5658,6 @@
5658 "cdac45c7efe1cfcc": "keine",
5659 "115e0df4e8da2704": "Zugewiesene Personen",
5660 "7dd58ad67a6de5ba": "niemand",
5657 - "4a9e547eda5a1d3b": "Die Verknüpfung des Issues konnte nicht aufgehoben werden",
5658 - "6672a18b56815053": "Das Issue konnte nicht verknüpft werden",
5659 - "a0295b5f63009ecf": "Der Server hat es abgelehnt.",
5661 "ae9a4e2921967de9": "Labels konnten nicht geändert werden",
5662 "6ec1aa91fbfa75d2": "Zugewiesene Personen konnten nicht geändert werden",
5663 "4f2e859dcaa7569c": "Ältere Kommentare konnten nicht gelesen werden",
@@ -5692,8 +5693,6 @@
5693 "52f00fe91208ef71": "_Keine Beschreibung angegeben._",
5694 "56ca98b79cc9ce49": "Aktivität ({count})",
5695 "ddc5e5413923c471": "Du kannst hier nicht kommentieren.",
5695 - "1d1268c1a332a292": "Verknüpfung mit diesem Thread aufheben",
5696 - "882a7614e3caa566": "Mit diesem Thread verknüpfen",
5696 "516def6f5a881e00": "Schließt dieses Issue",
5697 "0014ce0aaf1bd68a": "Schreibgeschützt",
5698 "fd93f4720ff70aaf": "Keine",
@@ -5713,6 +5712,15 @@
5712 "309a68dc21af399d": "Beliebig",
5713 "4dc86e84bb5ece63": "Die Personen konnten nicht gelesen werden",
5714 "4103b6b8e0ff3f46": "Es gibt mehr Personen, als hier aufgeführt sind.",
5715 + "4a9e547eda5a1d3b": "Die Verknüpfung des Issues konnte nicht aufgehoben werden",
5716 + "6672a18b56815053": "Das Issue konnte nicht verknüpft werden",
5717 + "a0295b5f63009ecf": "Der Server hat es abgelehnt.",
5718 + "5fb273ac66588155": "{count, plural, one {Verknüpft von {count} Thread} other {Verknüpft von {count} Threads}}",
5719 + "938b14127a3c907d": "Verknüpfte Threads",
5720 + "5bde91110c65afca": "{label}. In der Befehlspalette suchen.",
5721 + "1d1268c1a332a292": "Verknüpfung mit diesem Thread aufheben",
5722 + "882a7614e3caa566": "Mit diesem Thread verknüpfen",
5723 + "bdb2f1444e74c895": "Issue mit einem Thread verknüpfen",
5724 "6a717189b43e9f0e": "Offen",
5725 "f8700aef3eb2cf71": "Geschlossen",
5726 "c9735ce17719123b": "Alle",
@@ -6868,13 +6876,8 @@
6876 ],
6877 "94154d8491776868": "{term, select, mr {Die Verknüpfung des Merge Requests konnte nicht aufgehoben werden} cr {Die Verknüpfung der Änderungsanfrage konnte nicht aufgehoben werden} other {Die Verknüpfung des Pull Requests konnte nicht aufgehoben werden}}",
6878 "29bb9b5b565a6df6": "{term, select, mr {Der Merge Request konnte nicht verknüpft werden} cr {Die Änderungsanfrage konnte nicht verknüpft werden} other {Der Pull Request konnte nicht verknüpft werden}}",
6871 - "5fb273ac66588155": "{count, plural, one {Verknüpft von {count} Thread} other {Verknüpft von {count} Threads}}",
6872 - "938b14127a3c907d": "Verknüpfte Threads",
6873 - "5bde91110c65afca": "{label}. In der Befehlspalette suchen.",
6879 "d37dbc4847107d90": "Verknüpfung mit diesem Thread lösen",
6880 "141d12d6b7f3c002": "Mit diesem Thread verknüpfen",
6876 - "34cc63390ad793cc": "Thread wählen",
6877 - "8f12309ead62e38a": "Threads oder Projekte durchsuchen...",
6881 "beb920ffd1cac72b": [
6882 {
6883 "t": "Branch",
@@ -6891,8 +6894,6 @@
6894 " ",
6895 "mit einem Thread verknüpfen"
6896 ],
6894 - "2f664754d005d9a7": "Keine aktiven Threads gefunden.",
6895 - "6095e59daf8ac2d6": "Verknüpft",
6897 "5d7ee2409e2c527c": "Aktivität auf dem Host öffnen",
6898 "fcc3e653e0fff1d9": "{count, plural, one {{formatted} Autor} other {{formatted} Autoren}}",
6899 "b105bbd107c5f3ea": "{count, plural, one {{formatted} Antwort} other {{formatted} Antworten}}",
apps/web/src/i18n/translations/en.json
+13 -12
@@ -2457,6 +2457,10 @@
2457 "33c7e68fca089036": "Thread, {title}",
2458 "b4b98a0287c282e2": "On another machine, so this machine's agent can't read it. Remove it or switch back to send.",
2459 "c6196d99000642b4": "Open thread",
2460 + "34cc63390ad793cc": "Choose a thread",
2461 + "8f12309ead62e38a": "Search threads or projects...",
2462 + "2f664754d005d9a7": "No active threads found.",
2463 + "6095e59daf8ac2d6": "Linked",
2464 "dd52ffa80d5eff97": "Thread completed",
2465 "fd1316b1f627872b": "Approval needed",
2466 "a3178769f8308cbc": "Thread failed",
@@ -5655,9 +5659,6 @@
5659 "cdac45c7efe1cfcc": "none",
5660 "115e0df4e8da2704": "Assignees",
5661 "7dd58ad67a6de5ba": "none",
5658 - "4a9e547eda5a1d3b": "Could not unlink the issue",
5659 - "6672a18b56815053": "Could not link the issue",
5660 - "a0295b5f63009ecf": "The server refused it.",
5662 "ae9a4e2921967de9": "Could not change labels",
5663 "6ec1aa91fbfa75d2": "Could not change assignees",
5664 "4f2e859dcaa7569c": "Older comments could not be read",
@@ -5693,8 +5694,6 @@
5694 "52f00fe91208ef71": "_No description provided._",
5695 "56ca98b79cc9ce49": "Activity ({count})",
5696 "ddc5e5413923c471": "You cannot comment here.",
5696 - "1d1268c1a332a292": "Unlink from this thread",
5697 - "882a7614e3caa566": "Link to this thread",
5697 "516def6f5a881e00": "Closes this issue",
5698 "0014ce0aaf1bd68a": "Read-only",
5699 "fd93f4720ff70aaf": "None",
@@ -5714,6 +5713,15 @@
5713 "309a68dc21af399d": "Anyone",
5714 "4dc86e84bb5ece63": "The people could not be read",
5715 "4103b6b8e0ff3f46": "More people exist than are listed here.",
5716 + "4a9e547eda5a1d3b": "Could not unlink the issue",
5717 + "6672a18b56815053": "Could not link the issue",
5718 + "a0295b5f63009ecf": "The server refused it.",
5719 + "5fb273ac66588155": "{count, plural, one {Linked from {count} thread} other {Linked from {count} threads}}",
5720 + "938b14127a3c907d": "Linked threads",
5721 + "5bde91110c65afca": "{label}. Search in the command palette.",
5722 + "1d1268c1a332a292": "Unlink from this thread",
5723 + "882a7614e3caa566": "Link to this thread",
5724 + "bdb2f1444e74c895": "Link issue to a thread",
5725 "6a717189b43e9f0e": "Open",
5726 "f8700aef3eb2cf71": "Closed",
5727 "c9735ce17719123b": "All",
@@ -6874,13 +6882,8 @@
6882 ],
6883 "94154d8491776868": "Could not unlink the {term, select, mr {merge request} cr {change request} other {pull request}}",
6884 "29bb9b5b565a6df6": "Could not link the {term, select, mr {merge request} cr {change request} other {pull request}}",
6877 - "5fb273ac66588155": "{count, plural, one {Linked from {count} thread} other {Linked from {count} threads}}",
6878 - "938b14127a3c907d": "Linked threads",
6879 - "5bde91110c65afca": "{label}. Search in the command palette.",
6885 "d37dbc4847107d90": "Unlink from this thread",
6886 "141d12d6b7f3c002": "Link to this thread",
6882 - "34cc63390ad793cc": "Choose a thread",
6883 - "8f12309ead62e38a": "Search threads or projects...",
6887 "beb920ffd1cac72b": [
6888 "Link",
6889 " ",
@@ -6899,8 +6902,6 @@
6902 " ",
6903 "to a thread"
6904 ],
6902 - "2f664754d005d9a7": "No active threads found.",
6903 - "6095e59daf8ac2d6": "Linked",
6905 "5d7ee2409e2c527c": "Open activity on host",
6906 "fcc3e653e0fff1d9": "{count, plural, one {{formatted} author} other {{formatted} authors}}",
6907 "b105bbd107c5f3ea": "{count, plural, one {{formatted} reply} other {{formatted} replies}}",
apps/web/src/i18n/translations/es.json
+13 -12
@@ -2457,6 +2457,10 @@
2457 "33c7e68fca089036": "Hilo, {title}",
2458 "b4b98a0287c282e2": "Está en otra máquina, así que el agente de esta máquina no puede leerlo. Quítalo o vuelve a cambiar para enviar.",
2459 "c6196d99000642b4": "Abrir hilo",
2460 + "34cc63390ad793cc": "Elige un hilo",
2461 + "8f12309ead62e38a": "Buscar hilos o proyectos...",
2462 + "2f664754d005d9a7": "No se encontraron hilos activos.",
2463 + "6095e59daf8ac2d6": "Vinculado",
2464 "dd52ffa80d5eff97": "Hilo completado",
2465 "fd1316b1f627872b": "Se necesita aprobación",
2466 "a3178769f8308cbc": "El hilo falló",
@@ -5653,9 +5657,6 @@
5657 "cdac45c7efe1cfcc": "ninguna",
5658 "115e0df4e8da2704": "Asignados",
5659 "7dd58ad67a6de5ba": "nadie",
5656 - "4a9e547eda5a1d3b": "No se pudo desvincular la issue",
5657 - "6672a18b56815053": "No se pudo vincular la issue",
5658 - "a0295b5f63009ecf": "El servidor lo rechazó.",
5660 "ae9a4e2921967de9": "No se pudieron cambiar las etiquetas",
5661 "6ec1aa91fbfa75d2": "No se pudieron cambiar los asignados",
5662 "4f2e859dcaa7569c": "No se pudieron leer los comentarios anteriores",
@@ -5691,8 +5692,6 @@
5692 "52f00fe91208ef71": "_No se proporcionó ninguna descripción._",
5693 "56ca98b79cc9ce49": "Actividad ({count})",
5694 "ddc5e5413923c471": "No puedes comentar aquí.",
5694 - "1d1268c1a332a292": "Desvincular de este hilo",
5695 - "882a7614e3caa566": "Vincular a este hilo",
5695 "516def6f5a881e00": "Cierra esta issue",
5696 "0014ce0aaf1bd68a": "Solo lectura",
5697 "fd93f4720ff70aaf": "Ninguna",
@@ -5712,6 +5711,15 @@
5711 "309a68dc21af399d": "Cualquiera",
5712 "4dc86e84bb5ece63": "No se pudieron leer las personas",
5713 "4103b6b8e0ff3f46": "Hay más personas de las que se muestran aquí.",
5714 + "4a9e547eda5a1d3b": "No se pudo desvincular la issue",
5715 + "6672a18b56815053": "No se pudo vincular la issue",
5716 + "a0295b5f63009ecf": "El servidor lo rechazó.",
5717 + "5fb273ac66588155": "{count, plural, one {Vinculada desde {count} hilo} other {Vinculada desde {count} hilos}}",
5718 + "938b14127a3c907d": "Hilos vinculados",
5719 + "5bde91110c65afca": "{label}. Busca en la paleta de comandos.",
5720 + "1d1268c1a332a292": "Desvincular de este hilo",
5721 + "882a7614e3caa566": "Vincular a este hilo",
5722 + "bdb2f1444e74c895": "Vincular la issue a un hilo",
5723 "6a717189b43e9f0e": "Abierta",
5724 "f8700aef3eb2cf71": "Cerrada",
5725 "c9735ce17719123b": "Todas",
@@ -6867,13 +6875,8 @@
6875 ],
6876 "94154d8491776868": "No se pudo desvincular la {term, select, mr {merge request} cr {solicitud de cambios} other {pull request}}",
6877 "29bb9b5b565a6df6": "No se pudo vincular la {term, select, mr {merge request} cr {solicitud de cambios} other {pull request}}",
6870 - "5fb273ac66588155": "{count, plural, one {Vinculada desde {count} hilo} other {Vinculada desde {count} hilos}}",
6871 - "938b14127a3c907d": "Hilos vinculados",
6872 - "5bde91110c65afca": "{label}. Busca en la paleta de comandos.",
6878 "d37dbc4847107d90": "Desvincular de este hilo",
6879 "141d12d6b7f3c002": "Vincular a este hilo",
6875 - "34cc63390ad793cc": "Elige un hilo",
6876 - "8f12309ead62e38a": "Buscar hilos o proyectos...",
6880 "beb920ffd1cac72b": [
6881 "Vincular la",
6882 " ",
@@ -6892,8 +6895,6 @@
6895 " ",
6896 "a un hilo"
6897 ],
6895 - "2f664754d005d9a7": "No se encontraron hilos activos.",
6896 - "6095e59daf8ac2d6": "Vinculado",
6898 "5d7ee2409e2c527c": "Abrir la actividad en el host",
6899 "fcc3e653e0fff1d9": "{count, plural, one {{formatted} autor} other {{formatted} autores}}",
6900 "b105bbd107c5f3ea": "{count, plural, one {{formatted} respuesta} other {{formatted} respuestas}}",
apps/web/src/i18n/translations/fr.json
+13 -12
@@ -2457,6 +2457,10 @@
2457 "33c7e68fca089036": "Fil, {title}",
2458 "b4b98a0287c282e2": "Sur une autre machine, l’agent de cette machine ne peut donc pas le lire. Retirez-le ou revenez en arrière pour envoyer.",
2459 "c6196d99000642b4": "Ouvrir le fil",
2460 + "34cc63390ad793cc": "Choisir un fil",
2461 + "8f12309ead62e38a": "Rechercher des fils ou des projets...",
2462 + "2f664754d005d9a7": "Aucun fil actif trouvé.",
2463 + "6095e59daf8ac2d6": "Associé",
2464 "dd52ffa80d5eff97": "Fil terminé",
2465 "fd1316b1f627872b": "Approbation requise",
2466 "a3178769f8308cbc": "Échec du fil",
@@ -5654,9 +5658,6 @@
5658 "cdac45c7efe1cfcc": "aucun",
5659 "115e0df4e8da2704": "Assignés",
5660 "7dd58ad67a6de5ba": "personne",
5657 - "4a9e547eda5a1d3b": "Impossible de dissocier le ticket",
5658 - "6672a18b56815053": "Impossible d’associer le ticket",
5659 - "a0295b5f63009ecf": "Le serveur l’a refusé.",
5661 "ae9a4e2921967de9": "Impossible de modifier les libellés",
5662 "6ec1aa91fbfa75d2": "Impossible de modifier les assignés",
5663 "4f2e859dcaa7569c": "Les commentaires plus anciens n’ont pas pu être lus",
@@ -5692,8 +5693,6 @@
5693 "52f00fe91208ef71": "_Aucune description fournie._",
5694 "56ca98b79cc9ce49": "Activité ({count})",
5695 "ddc5e5413923c471": "Vous ne pouvez pas commenter ici.",
5695 - "1d1268c1a332a292": "Dissocier de ce fil",
5696 - "882a7614e3caa566": "Associer à ce fil",
5696 "516def6f5a881e00": "Ferme ce ticket",
5697 "0014ce0aaf1bd68a": "Lecture seule",
5698 "fd93f4720ff70aaf": "Aucun",
@@ -5713,6 +5712,15 @@
5712 "309a68dc21af399d": "N’importe qui",
5713 "4dc86e84bb5ece63": "Les personnes n’ont pas pu être lues",
5714 "4103b6b8e0ff3f46": "Il existe plus de personnes que celles listées ici.",
5715 + "4a9e547eda5a1d3b": "Impossible de dissocier le ticket",
5716 + "6672a18b56815053": "Impossible d’associer le ticket",
5717 + "a0295b5f63009ecf": "Le serveur l’a refusé.",
5718 + "5fb273ac66588155": "{count, plural, one {Associée depuis {count} fil} other {Associée depuis {count} fils}}",
5719 + "938b14127a3c907d": "Fils associés",
5720 + "5bde91110c65afca": "{label}. Recherchez dans la palette de commandes.",
5721 + "1d1268c1a332a292": "Dissocier de ce fil",
5722 + "882a7614e3caa566": "Associer à ce fil",
5723 + "bdb2f1444e74c895": "Associer le ticket à un fil",
5724 "6a717189b43e9f0e": "Ouvert",
5725 "f8700aef3eb2cf71": "Fermé",
5726 "c9735ce17719123b": "Tous",
@@ -6868,13 +6876,8 @@
6876 ],
6877 "94154d8491776868": "Impossible de dissocier la {term, select, mr {merge request} cr {demande de modification} other {pull request}}",
6878 "29bb9b5b565a6df6": "Impossible d’associer la {term, select, mr {merge request} cr {demande de modification} other {pull request}}",
6871 - "5fb273ac66588155": "{count, plural, one {Associée depuis {count} fil} other {Associée depuis {count} fils}}",
6872 - "938b14127a3c907d": "Fils associés",
6873 - "5bde91110c65afca": "{label}. Recherchez dans la palette de commandes.",
6879 "d37dbc4847107d90": "Dissocier de ce fil",
6880 "141d12d6b7f3c002": "Associer à ce fil",
6876 - "34cc63390ad793cc": "Choisir un fil",
6877 - "8f12309ead62e38a": "Rechercher des fils ou des projets...",
6881 "beb920ffd1cac72b": [
6882 "Associer la",
6883 " ",
@@ -6893,8 +6896,6 @@
6896 " ",
6897 "à un fil"
6898 ],
6896 - "2f664754d005d9a7": "Aucun fil actif trouvé.",
6897 - "6095e59daf8ac2d6": "Associé",
6899 "5d7ee2409e2c527c": "Ouvrir l’activité sur l’hôte",
6900 "fcc3e653e0fff1d9": "{count, plural, one {{formatted} auteur} other {{formatted} auteurs}}",
6901 "b105bbd107c5f3ea": "{count, plural, one {{formatted} réponse} other {{formatted} réponses}}",
apps/web/src/i18n/translations/ja.json
+13 -12
@@ -2455,6 +2455,10 @@
2455 "33c7e68fca089036": "スレッド、{title}",
2456 "b4b98a0287c282e2": "別のマシン上にあるため、このマシンのエージェントは読み取れません。削除するか、元に戻してから送信してください。",
2457 "c6196d99000642b4": "スレッドを開く",
2458 + "34cc63390ad793cc": "スレッドを選択",
2459 + "8f12309ead62e38a": "スレッドまたはプロジェクトを検索...",
2460 + "2f664754d005d9a7": "アクティブなスレッドが見つかりません。",
2461 + "6095e59daf8ac2d6": "リンク済み",
2462 "dd52ffa80d5eff97": "スレッドが完了しました",
2463 "fd1316b1f627872b": "承認が必要です",
2464 "a3178769f8308cbc": "スレッドが失敗しました",
@@ -5636,9 +5640,6 @@
5640 "cdac45c7efe1cfcc": "なし",
5641 "115e0df4e8da2704": "担当者",
5642 "7dd58ad67a6de5ba": "なし",
5639 - "4a9e547eda5a1d3b": "Issue のリンクを解除できませんでした",
5640 - "6672a18b56815053": "Issue をリンクできませんでした",
5641 - "a0295b5f63009ecf": "サーバーが拒否しました。",
5643 "ae9a4e2921967de9": "ラベルを変更できませんでした",
5644 "6ec1aa91fbfa75d2": "担当者を変更できませんでした",
5645 "4f2e859dcaa7569c": "以前のコメントを読み取れませんでした",
@@ -5674,8 +5675,6 @@
5675 "52f00fe91208ef71": "_説明はありません。_",
5676 "56ca98b79cc9ce49": "アクティビティ ({count})",
5677 "ddc5e5413923c471": "ここではコメントできません。",
5677 - "1d1268c1a332a292": "このスレッドとのリンクを解除",
5678 - "882a7614e3caa566": "このスレッドにリンク",
5678 "516def6f5a881e00": "この Issue をクローズします",
5679 "0014ce0aaf1bd68a": "読み取り専用",
5680 "fd93f4720ff70aaf": "なし",
@@ -5695,6 +5694,15 @@
5694 "309a68dc21af399d": "すべてのユーザー",
5695 "4dc86e84bb5ece63": "ユーザーを読み取れませんでした",
5696 "4103b6b8e0ff3f46": "ここに表示されている以外にもユーザーがいます。",
5697 + "4a9e547eda5a1d3b": "Issue のリンクを解除できませんでした",
5698 + "6672a18b56815053": "Issue をリンクできませんでした",
5699 + "a0295b5f63009ecf": "サーバーが拒否しました。",
5700 + "5fb273ac66588155": "{count, plural, other {{count} 件のスレッドからリンク}}",
5701 + "938b14127a3c907d": "リンクされたスレッド",
5702 + "5bde91110c65afca": "{label}。コマンドパレットで検索します。",
5703 + "1d1268c1a332a292": "このスレッドとのリンクを解除",
5704 + "882a7614e3caa566": "このスレッドにリンク",
5705 + "bdb2f1444e74c895": "Issue をスレッドにリンク",
5706 "6a717189b43e9f0e": "オープン",
5707 "f8700aef3eb2cf71": "クローズ",
5708 "c9735ce17719123b": "すべて",
@@ -6837,13 +6845,8 @@
6845 ],
6846 "94154d8491776868": "{term, select, mr {マージリクエストのリンクを解除できませんでした} cr {変更リクエストのリンクを解除できませんでした} other {プルリクエストのリンクを解除できませんでした}}",
6847 "29bb9b5b565a6df6": "{term, select, mr {マージリクエストをリンクできませんでした} cr {変更リクエストをリンクできませんでした} other {プルリクエストをリンクできませんでした}}",
6840 - "5fb273ac66588155": "{count, plural, other {{count} 件のスレッドからリンク}}",
6841 - "938b14127a3c907d": "リンクされたスレッド",
6842 - "5bde91110c65afca": "{label}。コマンドパレットで検索します。",
6848 "d37dbc4847107d90": "このスレッドからリンクを解除",
6849 "141d12d6b7f3c002": "このスレッドにリンク",
6845 - "34cc63390ad793cc": "スレッドを選択",
6846 - "8f12309ead62e38a": "スレッドまたはプロジェクトを検索...",
6850 "beb920ffd1cac72b": [
6851 {
6852 "t": "Branch",
@@ -6859,8 +6862,6 @@
6862 },
6863 "をスレッドにリンク"
6864 ],
6862 - "2f664754d005d9a7": "アクティブなスレッドが見つかりません。",
6863 - "6095e59daf8ac2d6": "リンク済み",
6865 "5d7ee2409e2c527c": "ホストでアクティビティを開く",
6866 "fcc3e653e0fff1d9": "{count, plural, other {{formatted} 人の作成者}}",
6867 "b105bbd107c5f3ea": "{count, plural, other {{formatted} 件の返信}}",
apps/web/src/i18n/translations/ko.json
+13 -12
@@ -2456,6 +2456,10 @@
2456 "33c7e68fca089036": "스레드, {title}",
2457 "b4b98a0287c282e2": "다른 머신에 있어 이 머신의 에이전트가 읽을 수 없습니다. 제거하거나 원래대로 전환한 후 보내세요.",
2458 "c6196d99000642b4": "스레드 열기",
2459 + "34cc63390ad793cc": "스레드 선택",
2460 + "8f12309ead62e38a": "스레드 또는 프로젝트 검색...",
2461 + "2f664754d005d9a7": "활성 스레드를 찾을 수 없습니다.",
2462 + "6095e59daf8ac2d6": "연결됨",
2463 "dd52ffa80d5eff97": "스레드 완료됨",
2464 "fd1316b1f627872b": "승인 필요",
2465 "a3178769f8308cbc": "스레드 실패",
@@ -5634,9 +5638,6 @@
5638 "cdac45c7efe1cfcc": "없음",
5639 "115e0df4e8da2704": "담당자",
5640 "7dd58ad67a6de5ba": "없음",
5637 - "4a9e547eda5a1d3b": "이슈 연결을 해제할 수 없습니다",
5638 - "6672a18b56815053": "이슈를 연결할 수 없습니다",
5639 - "a0295b5f63009ecf": "서버가 거부했습니다.",
5641 "ae9a4e2921967de9": "레이블을 변경할 수 없습니다",
5642 "6ec1aa91fbfa75d2": "담당자를 변경할 수 없습니다",
5643 "4f2e859dcaa7569c": "이전 댓글을 읽을 수 없습니다",
@@ -5672,8 +5673,6 @@
5673 "52f00fe91208ef71": "_설명이 없습니다._",
5674 "56ca98b79cc9ce49": "활동({count})",
5675 "ddc5e5413923c471": "여기에는 댓글을 달 수 없습니다.",
5675 - "1d1268c1a332a292": "이 스레드와 연결 해제",
5676 - "882a7614e3caa566": "이 스레드에 연결",
5676 "516def6f5a881e00": "이 이슈를 닫음",
5677 "0014ce0aaf1bd68a": "읽기 전용",
5678 "fd93f4720ff70aaf": "없음",
@@ -5693,6 +5692,15 @@
5692 "309a68dc21af399d": "모든 사람",
5693 "4dc86e84bb5ece63": "사용자 목록을 읽을 수 없습니다",
5694 "4103b6b8e0ff3f46": "여기에 표시된 것보다 사용자가 더 있습니다.",
5695 + "4a9e547eda5a1d3b": "이슈 연결을 해제할 수 없습니다",
5696 + "6672a18b56815053": "이슈를 연결할 수 없습니다",
5697 + "a0295b5f63009ecf": "서버가 거부했습니다.",
5698 + "5fb273ac66588155": "{count, plural, other {스레드 {count}개에서 연결됨}}",
5699 + "938b14127a3c907d": "연결된 스레드",
5700 + "5bde91110c65afca": "{label}. 명령 팔레트에서 검색하세요.",
5701 + "1d1268c1a332a292": "이 스레드와 연결 해제",
5702 + "882a7614e3caa566": "이 스레드에 연결",
5703 + "bdb2f1444e74c895": "이슈를 스레드에 연결",
5704 "6a717189b43e9f0e": "열림",
5705 "f8700aef3eb2cf71": "닫힘",
5706 "c9735ce17719123b": "전체",
@@ -6839,13 +6847,8 @@
6847 ],
6848 "94154d8491776868": "{term, select, mr {병합 요청} cr {변경 요청} other {풀 리퀘스트}} 연결을 해제할 수 없습니다",
6849 "29bb9b5b565a6df6": "{term, select, mr {병합 요청을} cr {변경 요청을} other {풀 리퀘스트를}} 연결할 수 없습니다",
6842 - "5fb273ac66588155": "{count, plural, other {스레드 {count}개에서 연결됨}}",
6843 - "938b14127a3c907d": "연결된 스레드",
6844 - "5bde91110c65afca": "{label}. 명령 팔레트에서 검색하세요.",
6850 "d37dbc4847107d90": "이 스레드에서 연결 해제",
6851 "141d12d6b7f3c002": "이 스레드에 연결",
6847 - "34cc63390ad793cc": "스레드 선택",
6848 - "8f12309ead62e38a": "스레드 또는 프로젝트 검색...",
6852 "beb920ffd1cac72b": [
6853 {
6854 "t": "Branch",
@@ -6862,8 +6865,6 @@
6865 " ",
6866 "스레드에 연결"
6867 ],
6865 - "2f664754d005d9a7": "활성 스레드를 찾을 수 없습니다.",
6866 - "6095e59daf8ac2d6": "연결됨",
6868 "5d7ee2409e2c527c": "호스트에서 활동 열기",
6869 "fcc3e653e0fff1d9": "{count, plural, other {작성자 {formatted}명}}",
6870 "b105bbd107c5f3ea": "{count, plural, other {답글 {formatted}개}}",
apps/web/src/i18n/translations/pt-BR.json
+13 -12
@@ -2457,6 +2457,10 @@
2457 "33c7e68fca089036": "Thread, {title}",
2458 "b4b98a0287c282e2": "Está em outra máquina, então o agente desta máquina não consegue lê-lo. Remova-o ou volte para enviar.",
2459 "c6196d99000642b4": "Abrir thread",
2460 + "34cc63390ad793cc": "Escolha uma thread",
2461 + "8f12309ead62e38a": "Pesquisar threads ou projetos...",
2462 + "2f664754d005d9a7": "Nenhuma thread ativa encontrada.",
2463 + "6095e59daf8ac2d6": "Vinculada",
2464 "dd52ffa80d5eff97": "Thread concluída",
2465 "fd1316b1f627872b": "Aprovação necessária",
2466 "a3178769f8308cbc": "A thread falhou",
@@ -5653,9 +5657,6 @@
5657 "cdac45c7efe1cfcc": "nenhum",
5658 "115e0df4e8da2704": "Responsáveis",
5659 "7dd58ad67a6de5ba": "ninguém",
5656 - "4a9e547eda5a1d3b": "Não foi possível desvincular a issue",
5657 - "6672a18b56815053": "Não foi possível vincular a issue",
5658 - "a0295b5f63009ecf": "O servidor recusou.",
5660 "ae9a4e2921967de9": "Não foi possível alterar os rótulos",
5661 "6ec1aa91fbfa75d2": "Não foi possível alterar os responsáveis",
5662 "4f2e859dcaa7569c": "Não foi possível ler os comentários mais antigos",
@@ -5691,8 +5692,6 @@
5692 "52f00fe91208ef71": "_Nenhuma descrição fornecida._",
5693 "56ca98b79cc9ce49": "Atividade ({count})",
5694 "ddc5e5413923c471": "Você não pode comentar aqui.",
5694 - "1d1268c1a332a292": "Desvincular desta thread",
5695 - "882a7614e3caa566": "Vincular a esta thread",
5695 "516def6f5a881e00": "Fecha esta issue",
5696 "0014ce0aaf1bd68a": "Somente leitura",
5697 "fd93f4720ff70aaf": "Nenhuma",
@@ -5712,6 +5711,15 @@
5711 "309a68dc21af399d": "Qualquer pessoa",
5712 "4dc86e84bb5ece63": "Não foi possível ler as pessoas",
5713 "4103b6b8e0ff3f46": "Há mais pessoas do que as listadas aqui.",
5714 + "4a9e547eda5a1d3b": "Não foi possível desvincular a issue",
5715 + "6672a18b56815053": "Não foi possível vincular a issue",
5716 + "a0295b5f63009ecf": "O servidor recusou.",
5717 + "5fb273ac66588155": "{count, plural, one {Vinculado a partir de {count} thread} other {Vinculado a partir de {count} threads}}",
5718 + "938b14127a3c907d": "Threads vinculadas",
5719 + "5bde91110c65afca": "{label}. Pesquise na paleta de comandos.",
5720 + "1d1268c1a332a292": "Desvincular desta thread",
5721 + "882a7614e3caa566": "Vincular a esta thread",
5722 + "bdb2f1444e74c895": "Vincular a issue a uma thread",
5723 "6a717189b43e9f0e": "Aberta",
5724 "f8700aef3eb2cf71": "Fechada",
5725 "c9735ce17719123b": "Todas",
@@ -6867,13 +6875,8 @@
6875 ],
6876 "94154d8491776868": "Não foi possível desvincular {term, select, mr {o merge request} cr {a solicitação de alteração} other {o pull request}}",
6877 "29bb9b5b565a6df6": "Não foi possível vincular {term, select, mr {o merge request} cr {a solicitação de alteração} other {o pull request}}",
6870 - "5fb273ac66588155": "{count, plural, one {Vinculado a partir de {count} thread} other {Vinculado a partir de {count} threads}}",
6871 - "938b14127a3c907d": "Threads vinculadas",
6872 - "5bde91110c65afca": "{label}. Pesquise na paleta de comandos.",
6878 "d37dbc4847107d90": "Desvincular desta thread",
6879 "141d12d6b7f3c002": "Vincular a esta thread",
6875 - "34cc63390ad793cc": "Escolha uma thread",
6876 - "8f12309ead62e38a": "Pesquisar threads ou projetos...",
6880 "beb920ffd1cac72b": [
6881 "Vincular",
6882 " ",
@@ -6892,8 +6895,6 @@
6895 " ",
6896 "a uma thread"
6897 ],
6895 - "2f664754d005d9a7": "Nenhuma thread ativa encontrada.",
6896 - "6095e59daf8ac2d6": "Vinculada",
6898 "5d7ee2409e2c527c": "Abrir a atividade no host",
6899 "fcc3e653e0fff1d9": "{count, plural, one {{formatted} autor} other {{formatted} autores}}",
6900 "b105bbd107c5f3ea": "{count, plural, one {{formatted} resposta} other {{formatted} respostas}}",
apps/web/src/i18n/translations/ru.json
+13 -12
@@ -2457,6 +2457,10 @@
2457 "33c7e68fca089036": "Тред, {title}",
2458 "b4b98a0287c282e2": "Находится на другой машине, поэтому агент этой машины не может его прочитать. Удалите его или переключитесь обратно, чтобы отправить.",
2459 "c6196d99000642b4": "Открыть тред",
2460 + "34cc63390ad793cc": "Выберите тред",
2461 + "8f12309ead62e38a": "Поиск тредов или проектов...",
2462 + "2f664754d005d9a7": "Активные треды не найдены.",
2463 + "6095e59daf8ac2d6": "Привязан",
2464 "dd52ffa80d5eff97": "Тред завершён",
2465 "fd1316b1f627872b": "Нужно подтверждение",
2466 "a3178769f8308cbc": "Ошибка в треде",
@@ -5653,9 +5657,6 @@
5657 "cdac45c7efe1cfcc": "нет",
5658 "115e0df4e8da2704": "Исполнители",
5659 "7dd58ad67a6de5ba": "нет",
5656 - "4a9e547eda5a1d3b": "Не удалось отвязать issue",
5657 - "6672a18b56815053": "Не удалось привязать issue",
5658 - "a0295b5f63009ecf": "Сервер отклонил запрос.",
5660 "ae9a4e2921967de9": "Не удалось изменить метки",
5661 "6ec1aa91fbfa75d2": "Не удалось изменить исполнителей",
5662 "4f2e859dcaa7569c": "Не удалось прочитать старые комментарии",
@@ -5691,8 +5692,6 @@
5692 "52f00fe91208ef71": "_Описание отсутствует._",
5693 "56ca98b79cc9ce49": "Активность ({count})",
5694 "ddc5e5413923c471": "Здесь нельзя комментировать.",
5694 - "1d1268c1a332a292": "Отвязать от этого треда",
5695 - "882a7614e3caa566": "Привязать к этому треду",
5695 "516def6f5a881e00": "Закроет этот issue",
5696 "0014ce0aaf1bd68a": "Только чтение",
5697 "fd93f4720ff70aaf": "Нет",
@@ -5712,6 +5711,15 @@
5711 "309a68dc21af399d": "Любой",
5712 "4dc86e84bb5ece63": "Не удалось прочитать список людей",
5713 "4103b6b8e0ff3f46": "Людей больше, чем показано здесь.",
5714 + "4a9e547eda5a1d3b": "Не удалось отвязать issue",
5715 + "6672a18b56815053": "Не удалось привязать issue",
5716 + "a0295b5f63009ecf": "Сервер отклонил запрос.",
5717 + "5fb273ac66588155": "{count, plural, one {Привязан к {count} треду} few {Привязан к {count} тредам} many {Привязан к {count} тредам} other {Привязан к {count} треда}}",
5718 + "938b14127a3c907d": "Привязанные треды",
5719 + "5bde91110c65afca": "{label}. Ищите в палитре команд.",
5720 + "1d1268c1a332a292": "Отвязать от этого треда",
5721 + "882a7614e3caa566": "Привязать к этому треду",
5722 + "bdb2f1444e74c895": "Привязать issue к треду",
5723 "6a717189b43e9f0e": "Открыт",
5724 "f8700aef3eb2cf71": "Закрыт",
5725 "c9735ce17719123b": "Все",
@@ -6867,13 +6875,8 @@
6875 ],
6876 "94154d8491776868": "{term, select, mr {Не удалось отвязать мерж-реквест} cr {Не удалось отвязать запрос на изменение} other {Не удалось отвязать пул-реквест}}",
6877 "29bb9b5b565a6df6": "{term, select, mr {Не удалось привязать мерж-реквест} cr {Не удалось привязать запрос на изменение} other {Не удалось привязать пул-реквест}}",
6870 - "5fb273ac66588155": "{count, plural, one {Привязан к {count} треду} few {Привязан к {count} тредам} many {Привязан к {count} тредам} other {Привязан к {count} треда}}",
6871 - "938b14127a3c907d": "Привязанные треды",
6872 - "5bde91110c65afca": "{label}. Ищите в палитре команд.",
6878 "d37dbc4847107d90": "Отвязать от этого треда",
6879 "141d12d6b7f3c002": "Привязать к этому треду",
6875 - "34cc63390ad793cc": "Выберите тред",
6876 - "8f12309ead62e38a": "Поиск тредов или проектов...",
6880 "beb920ffd1cac72b": [
6881 "Привязать",
6882 " ",
@@ -6892,8 +6895,6 @@
6895 " ",
6896 "к треду"
6897 ],
6895 - "2f664754d005d9a7": "Активные треды не найдены.",
6896 - "6095e59daf8ac2d6": "Привязан",
6898 "5d7ee2409e2c527c": "Открыть активность на хосте",
6899 "fcc3e653e0fff1d9": "{count, plural, one {{formatted} автор} few {{formatted} автора} many {{formatted} авторов} other {{formatted} автора}}",
6900 "b105bbd107c5f3ea": "{count, plural, one {{formatted} ответ} few {{formatted} ответа} many {{formatted} ответов} other {{formatted} ответа}}",
apps/web/src/i18n/translations/sv.json
+13 -12
@@ -2457,6 +2457,10 @@
2457 "33c7e68fca089036": "Tråd, {title}",
2458 "b4b98a0287c282e2": "Finns på en annan dator, så den här datorns agent kan inte läsa den. Ta bort den eller byt tillbaka för att skicka.",
2459 "c6196d99000642b4": "Öppna tråd",
2460 + "34cc63390ad793cc": "Välj en tråd",
2461 + "8f12309ead62e38a": "Sök trådar eller projekt...",
2462 + "2f664754d005d9a7": "Inga aktiva trådar hittades.",
2463 + "6095e59daf8ac2d6": "Länkad",
2464 "dd52ffa80d5eff97": "Tråden slutfördes",
2465 "fd1316b1f627872b": "Godkännande behövs",
2466 "a3178769f8308cbc": "Tråden misslyckades",
@@ -5654,9 +5658,6 @@
5658 "cdac45c7efe1cfcc": "inga",
5659 "115e0df4e8da2704": "Tilldelade",
5660 "7dd58ad67a6de5ba": "ingen",
5657 - "4a9e547eda5a1d3b": "Kunde inte ta bort länken till ärendet",
5658 - "6672a18b56815053": "Kunde inte länka ärendet",
5659 - "a0295b5f63009ecf": "Servern nekade.",
5661 "ae9a4e2921967de9": "Kunde inte ändra etiketter",
5662 "6ec1aa91fbfa75d2": "Kunde inte ändra tilldelade",
5663 "4f2e859dcaa7569c": "Äldre kommentarer kunde inte läsas",
@@ -5692,8 +5693,6 @@
5693 "52f00fe91208ef71": "_Ingen beskrivning angiven._",
5694 "56ca98b79cc9ce49": "Aktivitet ({count})",
5695 "ddc5e5413923c471": "Du kan inte kommentera här.",
5695 - "1d1268c1a332a292": "Ta bort länken från den här tråden",
5696 - "882a7614e3caa566": "Länka till den här tråden",
5696 "516def6f5a881e00": "Stänger det här ärendet",
5697 "0014ce0aaf1bd68a": "Skrivskyddad",
5698 "fd93f4720ff70aaf": "Inga",
@@ -5713,6 +5712,15 @@
5712 "309a68dc21af399d": "Vem som helst",
5713 "4dc86e84bb5ece63": "Personerna kunde inte läsas",
5714 "4103b6b8e0ff3f46": "Det finns fler personer än som listas här.",
5715 + "4a9e547eda5a1d3b": "Kunde inte ta bort länken till ärendet",
5716 + "6672a18b56815053": "Kunde inte länka ärendet",
5717 + "a0295b5f63009ecf": "Servern nekade.",
5718 + "5fb273ac66588155": "{count, plural, one {Länkad från {count} tråd} other {Länkad från {count} trådar}}",
5719 + "938b14127a3c907d": "Länkade trådar",
5720 + "5bde91110c65afca": "{label}. Sök i kommandopaletten.",
5721 + "1d1268c1a332a292": "Ta bort länken från den här tråden",
5722 + "882a7614e3caa566": "Länka till den här tråden",
5723 + "bdb2f1444e74c895": "Länka ärendet till en tråd",
5724 "6a717189b43e9f0e": "Öppet",
5725 "f8700aef3eb2cf71": "Stängt",
5726 "c9735ce17719123b": "Alla",
@@ -6873,13 +6881,8 @@
6881 ],
6882 "94154d8491776868": "Kunde inte ta bort länken till {term, select, mr {merge requesten} cr {ändringsbegäran} other {pull requesten}}",
6883 "29bb9b5b565a6df6": "Kunde inte länka {term, select, mr {merge requesten} cr {ändringsbegäran} other {pull requesten}}",
6876 - "5fb273ac66588155": "{count, plural, one {Länkad från {count} tråd} other {Länkad från {count} trådar}}",
6877 - "938b14127a3c907d": "Länkade trådar",
6878 - "5bde91110c65afca": "{label}. Sök i kommandopaletten.",
6884 "d37dbc4847107d90": "Ta bort länken från den här tråden",
6885 "141d12d6b7f3c002": "Länka till den här tråden",
6881 - "34cc63390ad793cc": "Välj en tråd",
6882 - "8f12309ead62e38a": "Sök trådar eller projekt...",
6886 "beb920ffd1cac72b": [
6887 "Länka",
6888 " ",
@@ -6898,8 +6901,6 @@
6901 " ",
6902 "till en tråd"
6903 ],
6901 - "2f664754d005d9a7": "Inga aktiva trådar hittades.",
6902 - "6095e59daf8ac2d6": "Länkad",
6904 "5d7ee2409e2c527c": "Öppna aktiviteten på värden",
6905 "fcc3e653e0fff1d9": "{count, plural, one {{formatted} författare} other {{formatted} författare}}",
6906 "b105bbd107c5f3ea": "{count, plural, one {{formatted} svar} other {{formatted} svar}}",
apps/web/src/i18n/translations/zh.json
+13 -12
@@ -2461,6 +2461,10 @@
2461 "33c7e68fca089036": "会话,{title}",
2462 "b4b98a0287c282e2": "它在另一台机器上,本机的智能体读不到它。请移除它,或切回那台机器再发送。",
2463 "c6196d99000642b4": "打开会话",
2464 + "34cc63390ad793cc": "选择会话",
2465 + "8f12309ead62e38a": "搜索会话或项目…",
2466 + "2f664754d005d9a7": "未找到活动会话。",
2467 + "6095e59daf8ac2d6": "已关联",
2468 "dd52ffa80d5eff97": "会话已完成",
2469 "fd1316b1f627872b": "需要批准",
2470 "a3178769f8308cbc": "会话失败",
@@ -5660,9 +5664,6 @@
5664 "cdac45c7efe1cfcc": "无",
5665 "115e0df4e8da2704": "受理人",
5666 "7dd58ad67a6de5ba": "无",
5663 - "4a9e547eda5a1d3b": "无法取消关联 issue",
5664 - "6672a18b56815053": "无法关联 issue",
5665 - "a0295b5f63009ecf": "服务器拒绝了操作。",
5667 "ae9a4e2921967de9": "无法更改标签",
5668 "6ec1aa91fbfa75d2": "无法更改受理人",
5669 "4f2e859dcaa7569c": "无法读取较早的评论",
@@ -5698,8 +5699,6 @@
5699 "52f00fe91208ef71": "_未提供描述。_",
5700 "56ca98b79cc9ce49": "活动({count})",
5701 "ddc5e5413923c471": "你无法在此评论。",
5701 - "1d1268c1a332a292": "取消与此会话的关联",
5702 - "882a7614e3caa566": "关联到此会话",
5702 "516def6f5a881e00": "将关闭此 issue",
5703 "0014ce0aaf1bd68a": "只读",
5704 "fd93f4720ff70aaf": "无",
@@ -5719,6 +5718,15 @@
5718 "309a68dc21af399d": "任何人",
5719 "4dc86e84bb5ece63": "无法读取人员列表",
5720 "4103b6b8e0ff3f46": "还有更多人员未在此列出。",
5721 + "4a9e547eda5a1d3b": "无法取消关联 issue",
5722 + "6672a18b56815053": "无法关联 issue",
5723 + "a0295b5f63009ecf": "服务器拒绝了操作。",
5724 + "5fb273ac66588155": "{count, plural, other {已从 {count} 个会话关联}}",
5725 + "938b14127a3c907d": "已关联的会话",
5726 + "5bde91110c65afca": "{label}。可在命令面板中搜索。",
5727 + "1d1268c1a332a292": "取消与此会话的关联",
5728 + "882a7614e3caa566": "关联到此会话",
5729 + "bdb2f1444e74c895": "将 issue 关联到会话",
5730 "6a717189b43e9f0e": "开放",
5731 "f8700aef3eb2cf71": "已关闭",
5732 "c9735ce17719123b": "全部",
@@ -6882,13 +6890,8 @@
6890 ],
6891 "94154d8491776868": "无法取消关联该 {term, select, mr {MR} cr {change request} other {PR}}",
6892 "29bb9b5b565a6df6": "无法关联该 {term, select, mr {MR} cr {change request} other {PR}}",
6885 - "5fb273ac66588155": "{count, plural, other {已从 {count} 个会话关联}}",
6886 - "938b14127a3c907d": "已关联的会话",
6887 - "5bde91110c65afca": "{label}。可在命令面板中搜索。",
6893 "d37dbc4847107d90": "取消与此会话的关联",
6894 "141d12d6b7f3c002": "关联到此会话",
6890 - "34cc63390ad793cc": "选择会话",
6891 - "8f12309ead62e38a": "搜索会话或项目…",
6895 "beb920ffd1cac72b": [
6896 "将",
6897 " ",
@@ -6907,8 +6910,6 @@
6910 " ",
6911 "关联到会话"
6912 ],
6910 - "2f664754d005d9a7": "未找到活动会话。",
6911 - "6095e59daf8ac2d6": "已关联",
6913 "5d7ee2409e2c527c": "在托管平台上打开动态",
6914 "fcc3e653e0fff1d9": "{count, plural, other {{formatted} 位作者}}",
6915 "b105bbd107c5f3ea": "{count, plural, other {{formatted} 条回复}}",
packages/client-runtime/src/state/issues.ts
+12
@@ -23,6 +23,7 @@ import {
23 createAtomCommandScheduler,
24 createEnvironmentRpcCommand,
25 createEnvironmentRpcQueryAtomFamily,
26 + createEnvironmentRpcSubscriptionAtomFamily,
27 } from "./runtime.ts";
28 import type { EnvironmentRegistry } from "../connection/registry.ts";
29
@@ -174,7 +175,18 @@ export function createIssueEnvironmentAtoms<R, E>(
175 { environmentId, input }: { readonly environmentId: EnvironmentId; readonly input: IssueRef },
176 registry: AtomRegistry.AtomRegistry,
177 ) => Effect.sync(() => registry.refresh(detail({ environmentId, input: detailRef(input) })));
178 + const linkedThreadSignals = createEnvironmentRpcSubscriptionAtomFamily(runtime, {
179 + label: "environment-data:issues:linked-thread-refreshes",
180 + tag: WS_METHODS.pullRequestsSubscribeLinkedThreadRefreshes,
181 + });
182 return {
183 + /** The threads an issue is linked to, reread when the server signals a link changed. */
184 + linkedThreads: createEnvironmentRpcQueryAtomFamily(runtime, {
185 + label: "environment-data:issues:linked-threads",
186 + tag: WS_METHODS.issuesLinkedThreads,
187 + staleTimeMs: 0,
188 + refreshTrigger: ({ environmentId }) => linkedThreadSignals({ environmentId, input: {} }),
189 + }),
190 list: createEnvironmentRpcQueryAtomFamily(runtime, {
191 label: "environment-data:issues:list",
192 tag: WS_METHODS.issuesList,
packages/contracts/src/environment.ts
+2
@@ -210,6 +210,8 @@ export const ExecutionEnvironmentCapabilities = Schema.Struct({
210 shellOlderSettled: Schema.optionalKey(Schema.Boolean),
211 /** Publishes a pull request refresh when linked-thread answers change; older servers need polling. */
212 linkedThreadRefreshes: Schema.optionalKey(Schema.Boolean),
213 + /** Answers `issues.linkedThreads`, the threads an issue is linked to. */
214 + issueLinkedThreads: Schema.optionalKey(Schema.Boolean),
215 });
216 export type ExecutionEnvironmentCapabilities = typeof ExecutionEnvironmentCapabilities.Type;
217
packages/contracts/src/issue.ts
+15
@@ -7,6 +7,7 @@ import {
7 NonNegativeInt,
8 PositiveInt,
9 ProjectId,
10 + ThreadId,
11 TrimmedNonEmptyString,
12 } from "./baseSchemas.ts";
13 import {
@@ -528,6 +529,20 @@ export function threadIssueKeysEqual(left: ThreadIssueKey, right: ThreadIssueKey
529 return threadIssueKeyOf(left) === threadIssueKeyOf(right);
530 }
531
532 +/** The threads an issue is linked to, most recently active first. */
533 +export const IssueLinkedThreadsResult = Schema.Struct({
534 + threads: Schema.Array(
535 + Schema.Struct({
536 + id: ThreadId,
537 + projectId: ProjectId,
538 + title: Schema.String,
539 + archivedAt: Schema.NullOr(IsoDateTime),
540 + settled: Schema.Boolean,
541 + }),
542 + ),
543 +});
544 +export type IssueLinkedThreadsResult = typeof IssueLinkedThreadsResult.Type;
545 +
546 /**
547 * A tracker that is not a git host: it is reached with its own credential rather than a
548 * checkout's, and a project opts into it by binding one of the tracker's scopes. Everything a
packages/contracts/src/rpc.ts
+10
@@ -177,6 +177,7 @@ import {
177 IssueCreateInput,
178 IssueCreateResult,
179 IssueDetail,
180 + IssueLinkedThreadsResult,
181 IssueListInput,
182 IssueListResult,
183 IssueOperationError,
@@ -192,6 +193,7 @@ import {
193 IssueTrackerConnectionList,
194 IssueUnavailableError,
195 IssueUpdateInput,
196 + ThreadIssueKey,
197 } from "./issue.ts";
198 import {
199 GuestShareCreateError,
@@ -637,6 +639,7 @@ export const WS_METHODS = {
639 issuesUpdate: "issues.update",
640 issuesSetState: "issues.setState",
641 issuesReact: "issues.react",
642 + issuesLinkedThreads: "issues.linkedThreads",
643 issueTrackersList: "issueTrackers.list",
644 issueTrackersConnect: "issueTrackers.connect",
645 issueTrackersBindProject: "issueTrackers.bindProject",
@@ -1341,6 +1344,12 @@ const WsIssuesDetailRpc = Rpc.make(WS_METHODS.issuesDetail, {
1344 });
1345
1346 /** Older comments, one page at a time, past the cursor the detail handed over. */
1347 +const WsIssuesLinkedThreadsRpc = Rpc.make(WS_METHODS.issuesLinkedThreads, {
1348 + payload: ThreadIssueKey,
1349 + success: IssueLinkedThreadsResult,
1350 + error: IssueRpcError,
1351 +});
1352 +
1353 const WsIssuesCommentsRpc = Rpc.make(WS_METHODS.issuesComments, {
1354 payload: IssueCommentsPageInput,
1355 success: IssueCommentsPage,
@@ -2251,6 +2260,7 @@ export const WsRpcGroup = RpcGroup.make(
2260 WsIssuesCommentsRpc,
2261 WsIssuesTemplatesRpc,
2262 WsIssuesCandidatesRpc,
2263 + WsIssuesLinkedThreadsRpc,
2264 WsIssuesCreateRpc,
2265 WsIssuesCommentRpc,
2266 WsIssuesUpdateRpc,