From 7999ad628cca38be12d34f4b7f741665e462314f Mon Sep 17 00:00:00 2001 From: nimbus Date: Mon, 2 Nov 2026 23:15:35 -0600 Subject: [PATCH 1/3] feat(web): copy paths, branches, titles or IDs of every selected thread --- apps/web/src/components/Sidebar.logic.test.ts | 25 +++++++++ apps/web/src/components/Sidebar.logic.ts | 53 ++++++++++++++++++ apps/web/src/components/Sidebar.tsx | 54 ++++++++++++++++++- .../src/threadReference.test.ts | 26 ++++++++- .../client-runtime/src/threadReference.ts | 32 ++++++++--- 5 files changed, 181 insertions(+), 9 deletions(-) diff --git a/apps/web/src/components/Sidebar.logic.test.ts b/apps/web/src/components/Sidebar.logic.test.ts index 0e3f47b7f9ed8..7a495aa47b421 100644 --- a/apps/web/src/components/Sidebar.logic.test.ts +++ b/apps/web/src/components/Sidebar.logic.test.ts @@ -6,6 +6,7 @@ import { describe, expect, it } from "vite-plus/test"; import * as Cause from "effect/Cause"; import { AsyncResult } from "effect/reactivity"; import { + bulkThreadCopyText, shouldCreateNewThreadInCurrentProject, deleteSelectedThreadEntries, getFallbackThreadIdAfterDelete, @@ -59,6 +60,30 @@ import { const localEnvironmentId = EnvironmentId.make("environment-local"); +describe("bulkThreadCopyText", () => { + const entries = [ + { id: "t1", title: "Lead gen", branch: "t3/ops", path: "/repo/.t3/ops" }, + { id: "t2", title: "Sales calls", branch: "t3/ops", path: "/repo/.t3/ops" }, + { id: "t3", title: "Lead gen", branch: null, path: "/repo" }, + ]; + + it.each([ + ["copy-thread-id", "t1\nt2\nt3", 3, "thread IDs"], + ["copy-title", "Lead gen\nSales calls\nLead gen", 3, "titles"], + ["copy-branch", "t3/ops", 1, "branches"], + ["copy-path", "/repo/.t3/ops\n/repo", 2, "paths"], + ] as const)( + "copies %s one per line, listing shared worktrees once", + (action, text, count, noun) => { + expect(bulkThreadCopyText(entries, action)).toEqual({ text, count, noun }); + }, + ); + + it("copies nothing when no selected thread has the value", () => { + expect(bulkThreadCopyText([entries[2]!], "copy-branch")).toBeNull(); + }); +}); + describe("deleteSelectedThreadEntries", () => { const entries = [{ threadKey: "one" }, { threadKey: "two" }, { threadKey: "three" }] as const; const success = AsyncResult.success(undefined); diff --git a/apps/web/src/components/Sidebar.logic.ts b/apps/web/src/components/Sidebar.logic.ts index ef229d1424c38..439ba7d6d5c06 100644 --- a/apps/web/src/components/Sidebar.logic.ts +++ b/apps/web/src/components/Sidebar.logic.ts @@ -638,6 +638,59 @@ export function buildBulkUnpinContextMenuItem(input: { return { id: "unpin", label: `Unpin (${input.pinnedCount})` }; } +export type BulkThreadCopyAction = + | "copy-path" + | "copy-branch" + | "copy-thread" + | "copy-title" + | "copy-thread-id"; + +export interface BulkThreadCopyEntry { + readonly id: string; + readonly title: string; + readonly branch: string | null; + readonly path: string | null; +} + +export function buildBulkCopyContextMenuItem( + entries: readonly BulkThreadCopyEntry[], +): ContextMenuItem<"copy" | BulkThreadCopyAction> { + return { + id: "copy", + label: `Copy (${entries.length})`, + separatorBefore: true, + children: [ + ...(entries.some((entry) => entry.path) + ? [{ id: "copy-path" as const, label: "Paths" }] + : []), + ...(entries.some((entry) => entry.branch) + ? [{ id: "copy-branch" as const, label: "Branches" }] + : []), + { id: "copy-thread", label: "Threads" }, + { id: "copy-title", label: "Titles" }, + { id: "copy-thread-id", label: "Thread IDs" }, + ], + }; +} + +const BULK_COPY_FIELDS = { + "copy-path": { field: "path", noun: "paths" }, + "copy-branch": { field: "branch", noun: "branches" }, + "copy-title": { field: "title", noun: "titles" }, + "copy-thread-id": { field: "id", noun: "thread IDs" }, +} as const; + +/** One line per thread; branches and paths shared by several threads appear once. */ +export function bulkThreadCopyText( + entries: readonly BulkThreadCopyEntry[], + action: keyof typeof BULK_COPY_FIELDS, +): { text: string; count: number; noun: string } | null { + const { field, noun } = BULK_COPY_FIELDS[action]; + const values = entries.flatMap((entry) => entry[field] ?? []); + const lines = field === "branch" || field === "path" ? [...new Set(values)] : values; + return lines.length === 0 ? null : { text: lines.join("\n"), count: lines.length, noun }; +} + export interface ThreadStatusPill { label: | "Working" diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 2b1a8403935c6..0fa39cc3175ff 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -9,6 +9,7 @@ import { import { discardComposerDraft } from "../lib/discardComposerDraft"; import { requestCustomSnooze } from "./CustomSnoozeDialog"; import { useAtomValue } from "@effect/atom-react"; +import * as Arr from "effect/Array"; import * as Option from "effect/Option"; import { Atom } from "effect/reactivity"; import * as Schema from "effect/Schema"; @@ -183,8 +184,10 @@ import { filterSidebarV2VisibleThreads, groupSidebarThreadsByProject, sidebarFolderExpansionKeys, + buildBulkCopyContextMenuItem, buildBulkTitleRegenerationContextMenuItem, buildBulkUnpinContextMenuItem, + bulkThreadCopyText, deleteSelectedThreadEntries, filterSidebarProjectScopeItems, firstValidTimestampMs, @@ -237,7 +240,10 @@ import { } from "./sidebar/routeReveal"; import { stackedThreadToast, toastManager } from "./ui/toast"; import { copyThreadReference } from "../lib/copyThreadReference"; -import { threadChipCopyTarget } from "@t3tools/client-runtime/thread-reference"; +import { + threadChipCopyTarget, + threadChipsCopyTarget, +} from "@t3tools/client-runtime/thread-reference"; import { Button } from "./ui/button"; import { isProjectPinShortcut, ProjectPinButton } from "./ProjectPinButton"; import { @@ -990,6 +996,23 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve ); }, }); + const { copyToClipboard: copyLinesToClipboard } = useCopyToClipboard<{ + count: number; + noun: string; + }>({ + onCopy: ({ count, noun }) => { + toastManager.add({ type: "success", title: `${count} ${noun} copied` }); + }, + onError: (error, { noun }) => { + toastManager.add( + stackedThreadToast({ + type: "error", + title: `Failed to copy ${noun}`, + description: error instanceof Error ? error.message : "An error occurred.", + }), + ); + }, + }); const boringSidebarEnabled = useClientSettings((settings) => settings.boringSidebarEnabled); const folderRowsMultiline = useClientSettings((settings) => settings.boringSidebarMultilineRows); const newThreadContext = useHandleNewThread(); @@ -2312,6 +2335,15 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve const unpinMenuItem = buildBulkUnpinContextMenuItem({ pinnedCount: pinnedSelectedThreads.length, }); + const copyEntries = selectedThreads.map((thread) => ({ + id: thread.id, + title: thread.title, + branch: thread.branch, + path: + thread.worktreePath ?? + projectByKey.get(`${thread.environmentId}:${thread.projectId}`)?.workspaceRoot ?? + null, + })); // Presets sync across environments, so the first selected thread's stand for all. const menuOpenedAt = new Date(); const snoozePresets = resolveSnoozePresets( @@ -2363,6 +2395,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve ] : []), { id: "mark-unread", label: `Mark unread (${count})` }, + buildBulkCopyContextMenuItem(copyEntries), { id: "delete", label: `Delete (${count})`, @@ -2374,6 +2407,25 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve ), ); if (clicked._tag === "Failure" || clicked.value === null) return; + switch (clicked.value) { + case "copy-thread": { + const chips = selectedThreads.map((thread) => ({ + threadRef: scopeThreadRef(thread.environmentId, thread.id), + title: thread.title, + })); + if (Arr.isReadonlyArrayNonEmpty(chips)) + void copyThreadReference(threadChipsCopyTarget(chips, configuredHostedAppUrl())); + return; + } + case "copy-path": + case "copy-branch": + case "copy-title": + case "copy-thread-id": { + const copy = bulkThreadCopyText(copyEntries, clicked.value); + if (copy) copyLinesToClipboard(copy.text, copy); + return; + } + } const actionTargets = clicked.value === "unpin" ? pinnedSelectedThreads diff --git a/packages/client-runtime/src/threadReference.test.ts b/packages/client-runtime/src/threadReference.test.ts index 88905f9cec532..42ee67bcce443 100644 --- a/packages/client-runtime/src/threadReference.test.ts +++ b/packages/client-runtime/src/threadReference.test.ts @@ -6,7 +6,7 @@ import { import { threadLinkContextReferences } from "@t3tools/shared/composerContextReferences"; import { describe, expect, it } from "vite-plus/test"; -import { resolveThreadReferenceCopyTarget } from "./threadReference.ts"; +import { resolveThreadReferenceCopyTarget, threadChipsCopyTarget } from "./threadReference.ts"; const thread = { threadRef: { environmentId: EnvironmentId.make("env-1"), threadId: ThreadId.make("thread-1") }, @@ -112,4 +112,28 @@ describe("resolveThreadReferenceCopyTarget", () => { ?.value, ).toBe("https://preview.t3.codes/threads/env-1/thread-1"); }); + + it("copies several threads, across machines, as chips that paste back together", () => { + const other = { + threadRef: { + environmentId: EnvironmentId.make("env-2"), + threadId: ThreadId.make("thread-2"), + }, + title: "Ship the release", + }; + const target = threadChipsCopyTarget([thread, other]); + + expect(target).toMatchObject({ kind: "thread", successTitle: "2 threads copied" }); + const pasted = decodeComposerContextFragment(encodeComposerContextFragment(target.fragment!)); + expect(pasted?.records).toEqual([ + expect.objectContaining({ environmentId: "env-1", threadId: "thread-1" }), + expect.objectContaining({ environmentId: "env-2", threadId: "thread-2" }), + ]); + expect(target.value).toBe( + "https://app.t3.codes/threads/env-1/thread-1\nhttps://app.t3.codes/threads/env-2/thread-2", + ); + expect( + threadLinkContextReferences(target.value, pasted!.records, () => undefined).records, + ).toEqual(pasted!.records); + }); }); diff --git a/packages/client-runtime/src/threadReference.ts b/packages/client-runtime/src/threadReference.ts index 17fa5df458935..12264ebfc4a43 100644 --- a/packages/client-runtime/src/threadReference.ts +++ b/packages/client-runtime/src/threadReference.ts @@ -21,6 +21,11 @@ export interface ThreadReferenceCopyTarget { readonly failureTitle: string; } +interface ThreadChip { + readonly threadRef: ScopedThreadRef; + readonly title: string; +} + /** * A link that opens the thread from anywhere, through `hostedAppUrl`, this build's hosted app. It * pastes back as a chip into any composer whose agent reads that thread's machine. @@ -30,15 +35,28 @@ export function threadChipCopyTarget( title: string, hostedAppUrl?: string, ): ThreadReferenceCopyTarget { - const record = threadContextRecord(threadRef, title); + return threadChipsCopyTarget([{ threadRef, title }], hostedAppUrl); +} + +/** Each chip carries its own machine, so a selection may span environments. */ +export function threadChipsCopyTarget( + threads: readonly [ThreadChip, ...ThreadChip[]], + hostedAppUrl?: string, +): ThreadReferenceCopyTarget { + const records = threads.map(({ threadRef, title }) => threadContextRecord(threadRef, title)); + const single = records.length === 1; return { kind: "thread", - value: hostedThreadLink(threadRef, hostedAppUrl), - description: record.title, - fragment: { version: 1, source: { environmentId: threadRef.environmentId }, records: [record] }, - clipboardTarget: "thread", - successTitle: "Thread copied", - failureTitle: "Failed to copy thread", + value: threads.map(({ threadRef }) => hostedThreadLink(threadRef, hostedAppUrl)).join("\n"), + description: records.map((record) => record.title).join(", "), + fragment: { + version: 1, + source: { environmentId: threads[0].threadRef.environmentId }, + records, + }, + clipboardTarget: single ? "thread" : "threads", + successTitle: single ? "Thread copied" : `${records.length} threads copied`, + failureTitle: single ? "Failed to copy thread" : "Failed to copy threads", }; } From ff96e353d142e959b17669bfd22f80e89302bfb7 Mon Sep 17 00:00:00 2001 From: nimbus Date: Mon, 2 Nov 2026 23:43:33 -0600 Subject: [PATCH 2/3] fix(web): keep copied titles on one line and cap thread chips at the paste limit --- apps/web/src/components/Sidebar.logic.test.ts | 11 ++++++++++- apps/web/src/components/Sidebar.logic.ts | 14 ++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/Sidebar.logic.test.ts b/apps/web/src/components/Sidebar.logic.test.ts index 7a495aa47b421..4c46076f2981c 100644 --- a/apps/web/src/components/Sidebar.logic.test.ts +++ b/apps/web/src/components/Sidebar.logic.test.ts @@ -6,6 +6,7 @@ import { describe, expect, it } from "vite-plus/test"; import * as Cause from "effect/Cause"; import { AsyncResult } from "effect/reactivity"; import { + buildBulkCopyContextMenuItem, bulkThreadCopyText, shouldCreateNewThreadInCurrentProject, deleteSelectedThreadEntries, @@ -63,7 +64,7 @@ const localEnvironmentId = EnvironmentId.make("environment-local"); describe("bulkThreadCopyText", () => { const entries = [ { id: "t1", title: "Lead gen", branch: "t3/ops", path: "/repo/.t3/ops" }, - { id: "t2", title: "Sales calls", branch: "t3/ops", path: "/repo/.t3/ops" }, + { id: "t2", title: "Sales\ncalls", branch: "t3/ops", path: "/repo/.t3/ops" }, { id: "t3", title: "Lead gen", branch: null, path: "/repo" }, ]; @@ -79,6 +80,14 @@ describe("bulkThreadCopyText", () => { }, ); + it("disables thread chips past the paste limit", () => { + const many = Array.from({ length: 201 }, (_, index) => ({ ...entries[2]!, id: `t${index}` })); + const threads = (selection: typeof entries) => + buildBulkCopyContextMenuItem(selection).children?.find((item) => item.id === "copy-thread"); + expect(threads(entries)?.disabled).toBeUndefined(); + expect(threads(many)).toMatchObject({ disabled: true, label: "Threads (up to 200)" }); + }); + it("copies nothing when no selected thread has the value", () => { expect(bulkThreadCopyText([entries[2]!], "copy-branch")).toBeNull(); }); diff --git a/apps/web/src/components/Sidebar.logic.ts b/apps/web/src/components/Sidebar.logic.ts index 439ba7d6d5c06..63598feb459ab 100644 --- a/apps/web/src/components/Sidebar.logic.ts +++ b/apps/web/src/components/Sidebar.logic.ts @@ -17,6 +17,7 @@ import { } from "@t3tools/client-runtime/state/thread-search"; import { foldSearchQuery, rankSearchItems, scoreThreadSearch } from "@t3tools/shared/paletteSearch"; import { + COMPOSER_CONTEXT_MAX_RECORDS, isListedThreadLineage, type ContextMenuItem, type EnvironmentId, @@ -666,7 +667,14 @@ export function buildBulkCopyContextMenuItem( ...(entries.some((entry) => entry.branch) ? [{ id: "copy-branch" as const, label: "Branches" }] : []), - { id: "copy-thread", label: "Threads" }, + // More records than this fail to decode on paste, so they would not come back as chips. + entries.length > COMPOSER_CONTEXT_MAX_RECORDS + ? { + id: "copy-thread" as const, + label: `Threads (up to ${COMPOSER_CONTEXT_MAX_RECORDS})`, + disabled: true, + } + : { id: "copy-thread" as const, label: "Threads" }, { id: "copy-title", label: "Titles" }, { id: "copy-thread-id", label: "Thread IDs" }, ], @@ -686,7 +694,9 @@ export function bulkThreadCopyText( action: keyof typeof BULK_COPY_FIELDS, ): { text: string; count: number; noun: string } | null { const { field, noun } = BULK_COPY_FIELDS[action]; - const values = entries.flatMap((entry) => entry[field] ?? []); + const values = entries.flatMap((entry) => + field === "title" ? entry.title.replace(/\s*[\r\n]+\s*/g, " ") : (entry[field] ?? []), + ); const lines = field === "branch" || field === "path" ? [...new Set(values)] : values; return lines.length === 0 ? null : { text: lines.join("\n"), count: lines.length, noun }; } From 6d744b18620381fa7cdb41a02efcbb218bdbc1ff Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Wed, 18 Nov 2026 09:35:34 +0000 Subject: [PATCH 3/3] fix(web): preserve bulk thread identities and translated copy messages --- apps/mobile/src/i18n/translations/de.json | 2 ++ apps/mobile/src/i18n/translations/en.json | 2 ++ apps/mobile/src/i18n/translations/es.json | 2 ++ apps/mobile/src/i18n/translations/fr.json | 2 ++ apps/mobile/src/i18n/translations/ja.json | 2 ++ apps/mobile/src/i18n/translations/ko.json | 2 ++ apps/mobile/src/i18n/translations/pt-BR.json | 2 ++ apps/mobile/src/i18n/translations/ru.json | 2 ++ apps/mobile/src/i18n/translations/sv.json | 2 ++ apps/mobile/src/i18n/translations/zh.json | 2 ++ apps/web/src/components/Sidebar.tsx | 21 +++++++++++++++++-- apps/web/src/i18n/translations/de.json | 17 ++++++++++++++- apps/web/src/i18n/translations/en.json | 17 ++++++++++++++- apps/web/src/i18n/translations/es.json | 17 ++++++++++++++- apps/web/src/i18n/translations/fr.json | 17 ++++++++++++++- apps/web/src/i18n/translations/ja.json | 17 ++++++++++++++- apps/web/src/i18n/translations/ko.json | 17 ++++++++++++++- apps/web/src/i18n/translations/pt-BR.json | 17 ++++++++++++++- apps/web/src/i18n/translations/ru.json | 17 ++++++++++++++- apps/web/src/i18n/translations/sv.json | 17 ++++++++++++++- apps/web/src/i18n/translations/zh.json | 17 ++++++++++++++- .../src/threadReference.test.ts | 7 ++++--- .../client-runtime/src/threadReference.ts | 17 +++++++++++++-- 23 files changed, 218 insertions(+), 17 deletions(-) diff --git a/apps/mobile/src/i18n/translations/de.json b/apps/mobile/src/i18n/translations/de.json index c9d43d96b3eb8..f4fe1ee9827bc 100644 --- a/apps/mobile/src/i18n/translations/de.json +++ b/apps/mobile/src/i18n/translations/de.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {{started} Review-Leitfaden gestartet} other {{started} Review-Leitfäden gestartet}}", "5dce4a54eaffeccf": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten} other {Versucht, {started} Review-Leitfäden zu starten}}", "420bea546d5f8802": "Thread kopiert", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Thread konnte nicht kopiert werden", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR-Link kopiert", "1b88f6a5e9fdeea7": "PR-Link konnte nicht kopiert werden", "b063ecd06059857f": "Wird komprimiert, bevor der Cache abläuft…", diff --git a/apps/mobile/src/i18n/translations/en.json b/apps/mobile/src/i18n/translations/en.json index 7a89a1cf37c22..09a4580e5b864 100644 --- a/apps/mobile/src/i18n/translations/en.json +++ b/apps/mobile/src/i18n/translations/en.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Started {started} review guide} other {Started {started} review guides}}", "5dce4a54eaffeccf": "{started, plural, one {Tried to start {started} review guide} other {Tried to start {started} review guides}}", "420bea546d5f8802": "Thread copied", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Failed to copy thread", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR link copied", "1b88f6a5e9fdeea7": "Failed to copy PR link", "b063ecd06059857f": "Compacting before the cache expires…", diff --git a/apps/mobile/src/i18n/translations/es.json b/apps/mobile/src/i18n/translations/es.json index 288dbfc7da2cf..2ad08abe49825 100644 --- a/apps/mobile/src/i18n/translations/es.json +++ b/apps/mobile/src/i18n/translations/es.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Inició {started} guía de revisión} other {Inició {started} guías de revisión}}", "5dce4a54eaffeccf": "{started, plural, one {Intentó iniciar {started} guía de revisión} other {Intentó iniciar {started} guías de revisión}}", "420bea546d5f8802": "Hilo copiado", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "No se pudo copiar el hilo", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Enlace de la PR copiado", "1b88f6a5e9fdeea7": "No se pudo copiar el enlace de la PR", "b063ecd06059857f": "Compactando antes de que caduque la caché…", diff --git a/apps/mobile/src/i18n/translations/fr.json b/apps/mobile/src/i18n/translations/fr.json index 28ec2284fca74..7f24d81504bd9 100644 --- a/apps/mobile/src/i18n/translations/fr.json +++ b/apps/mobile/src/i18n/translations/fr.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {{started} guide de revue lancé} other {{started} guides de revue lancés}}", "5dce4a54eaffeccf": "{started, plural, one {Tentative de lancer {started} guide de revue} other {Tentative de lancer {started} guides de revue}}", "420bea546d5f8802": "Fil copié", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Échec de la copie du fil", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Lien de la PR copié", "1b88f6a5e9fdeea7": "Échec de la copie du lien de la PR", "b063ecd06059857f": "Compactage avant l’expiration du cache…", diff --git a/apps/mobile/src/i18n/translations/ja.json b/apps/mobile/src/i18n/translations/ja.json index f6741fdb8b775..bd396f9a36576 100644 --- a/apps/mobile/src/i18n/translations/ja.json +++ b/apps/mobile/src/i18n/translations/ja.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, other {{started} 件のレビューガイドを開始しました}}", "5dce4a54eaffeccf": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました}}", "420bea546d5f8802": "スレッドをコピーしました", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "スレッドをコピーできませんでした", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR のリンクをコピーしました", "1b88f6a5e9fdeea7": "PR のリンクをコピーできませんでした", "b063ecd06059857f": "キャッシュの期限切れ前に圧縮しています…", diff --git a/apps/mobile/src/i18n/translations/ko.json b/apps/mobile/src/i18n/translations/ko.json index b1ef20ba0f347..75014ae12ee13 100644 --- a/apps/mobile/src/i18n/translations/ko.json +++ b/apps/mobile/src/i18n/translations/ko.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, other {검토 가이드 {started}개 시작함}}", "5dce4a54eaffeccf": "{started, plural, other {검토 가이드 {started}개 시작 시도함}}", "420bea546d5f8802": "스레드 복사됨", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "스레드를 복사하지 못했습니다", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR 링크 복사됨", "1b88f6a5e9fdeea7": "PR 링크를 복사하지 못했습니다", "b063ecd06059857f": "캐시가 만료되기 전에 압축하는 중…", diff --git a/apps/mobile/src/i18n/translations/pt-BR.json b/apps/mobile/src/i18n/translations/pt-BR.json index b40494fca3885..8feb88a9315b4 100644 --- a/apps/mobile/src/i18n/translations/pt-BR.json +++ b/apps/mobile/src/i18n/translations/pt-BR.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Iniciou {started} guia de revisão} other {Iniciou {started} guias de revisão}}", "5dce4a54eaffeccf": "{started, plural, one {Tentou iniciar {started} guia de revisão} other {Tentou iniciar {started} guias de revisão}}", "420bea546d5f8802": "Thread copiada", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Falha ao copiar a thread", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Link do PR copiado", "1b88f6a5e9fdeea7": "Falha ao copiar o link do PR", "b063ecd06059857f": "Compactando antes de o cache expirar…", diff --git a/apps/mobile/src/i18n/translations/ru.json b/apps/mobile/src/i18n/translations/ru.json index cadf07e57eda9..4a9687cae32f7 100644 --- a/apps/mobile/src/i18n/translations/ru.json +++ b/apps/mobile/src/i18n/translations/ru.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Начато {started} руководство по ревью} few {Начато {started} руководства по ревью} many {Начато {started} руководств по ревью} other {Начато {started} руководства по ревью}}", "5dce4a54eaffeccf": "{started, plural, one {Попытка начать {started} руководство по ревью} few {Попытка начать {started} руководства по ревью} many {Попытка начать {started} руководств по ревью} other {Попытка начать {started} руководства по ревью}}", "420bea546d5f8802": "Тред скопирован", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Не удалось скопировать тред", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Ссылка на PR скопирована", "1b88f6a5e9fdeea7": "Не удалось скопировать ссылку на PR", "b063ecd06059857f": "Сжатие до истечения кеша…", diff --git a/apps/mobile/src/i18n/translations/sv.json b/apps/mobile/src/i18n/translations/sv.json index 3a0273aef36fd..b0a0bc6c5cb7c 100644 --- a/apps/mobile/src/i18n/translations/sv.json +++ b/apps/mobile/src/i18n/translations/sv.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Startade {started} granskningsguide} other {Startade {started} granskningsguider}}", "5dce4a54eaffeccf": "{started, plural, one {Försökte starta {started} granskningsguide} other {Försökte starta {started} granskningsguider}}", "420bea546d5f8802": "Tråden kopierades", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Det gick inte att kopiera tråden", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR-länken kopierades", "1b88f6a5e9fdeea7": "Det gick inte att kopiera PR-länken", "b063ecd06059857f": "Komprimerar innan cachen går ut…", diff --git a/apps/mobile/src/i18n/translations/zh.json b/apps/mobile/src/i18n/translations/zh.json index f1c394c60c606..6b7ae3b763493 100644 --- a/apps/mobile/src/i18n/translations/zh.json +++ b/apps/mobile/src/i18n/translations/zh.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, other {已开始 {started} 份审查导览}}", "5dce4a54eaffeccf": "{started, plural, other {尝试开始 {started} 份审查导览}}", "420bea546d5f8802": "已复制会话", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "无法复制会话", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "已复制 PR 链接", "1b88f6a5e9fdeea7": "无法复制 PR 链接", "b063ecd06059857f": "正在缓存过期前压缩…", diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 3110ccb9cab79..f605d49a560e5 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -999,13 +999,30 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve noun: string; }>({ onCopy: ({ count, noun }) => { - toastManager.add({ type: "success", title: gt("{count} {noun} copied", { count, noun }) }); + toastManager.add({ + type: "success", + title: + noun === "paths" + ? gt("{count} paths copied", { count }) + : noun === "branches" + ? gt("{count} branches copied", { count }) + : noun === "titles" + ? gt("{count} titles copied", { count }) + : gt("{count} thread IDs copied", { count }), + }); }, onError: (error, { noun }) => { toastManager.add( stackedThreadToast({ type: "error", - title: gt("Failed to copy {noun}", { noun }), + title: + noun === "paths" + ? gt("Failed to copy paths") + : noun === "branches" + ? gt("Failed to copy branches") + : noun === "titles" + ? gt("Failed to copy titles") + : gt("Failed to copy thread IDs"), description: thrownErrorMessage(error, m) ?? gt("An error occurred."), }), ); diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 648fd58859dbe..11face70d7c03 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {{started} Review-Leitfaden gestartet} other {{started} Review-Leitfäden gestartet}}", "5dce4a54eaffeccf": "{started, plural, one {Versucht, {started} Review-Leitfaden zu starten} other {Versucht, {started} Review-Leitfäden zu starten}}", "420bea546d5f8802": "Thread kopiert", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Thread konnte nicht kopiert werden", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR-Link kopiert", "1b88f6a5e9fdeea7": "PR-Link konnte nicht kopiert werden", "b063ecd06059857f": "Wird komprimiert, bevor der Cache abläuft…", @@ -2346,6 +2348,12 @@ "e7a50ab49cdfd076": "Wird neu erzeugt… ({count})", "6523a0ca24b57fde": "Titel neu erzeugen ({count})", "96adc8bf3106015d": "Loslösen ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "Branches", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "Genehmigung ausstehend", "a28d4938d473c33f": "Wartet auf Eingabe", "c7c6c2345a741768": "Gastanfrage", @@ -2358,6 +2366,14 @@ "e54720cac68f2adb": "Alle Projekte", "ac47f86df1c31a4a": "Branch konnte nicht kopiert werden", "4e6305459e784fea": "Thread-ID konnte nicht kopiert werden", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "Der Thread-Titel darf nicht leer sein", "5c14b37b13312503": "Thread konnte nicht umbenannt werden", "fc97f746bdabe59f": "Thread konnte nicht erledigt werden", @@ -11252,7 +11268,6 @@ "81f82840d9589bc9": "Neue Worktrees starten vom Remote auf Standard zurücksetzen", "f68e05c50f67ab91": "Neue Worktrees standardmäßig vom Remote starten", "9fe97e290e08f82f": "Erstellung", - "10e3b1efa85ed4b3": "Branches", "eb61b42f989896b8": "{domains} und {last}", "fa338b04cd05c0cf": "{count, plural, one {{domains} und {count} weitere} other {{domains} und {count} weitere}}", "f37c0766ca212865": "Niedrig", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 599944358b5bb..7e5ab3518ff3c 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Started {started} review guide} other {Started {started} review guides}}", "5dce4a54eaffeccf": "{started, plural, one {Tried to start {started} review guide} other {Tried to start {started} review guides}}", "420bea546d5f8802": "Thread copied", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Failed to copy thread", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR link copied", "1b88f6a5e9fdeea7": "Failed to copy PR link", "b063ecd06059857f": "Compacting before the cache expires…", @@ -2346,6 +2348,12 @@ "e7a50ab49cdfd076": "Regenerating… ({count})", "6523a0ca24b57fde": "Regenerate titles ({count})", "96adc8bf3106015d": "Unpin ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "Branches", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "Pending Approval", "a28d4938d473c33f": "Awaiting Input", "c7c6c2345a741768": "Guest Request", @@ -2358,6 +2366,14 @@ "e54720cac68f2adb": "All projects", "ac47f86df1c31a4a": "Failed to copy branch", "4e6305459e784fea": "Failed to copy thread ID", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "Thread title cannot be empty", "5c14b37b13312503": "Failed to rename thread", "fc97f746bdabe59f": "Failed to settle thread", @@ -11260,7 +11276,6 @@ "81f82840d9589bc9": "Reset new worktrees start from remote to default", "f68e05c50f67ab91": "Start new worktrees from remote by default", "9fe97e290e08f82f": "Creation", - "10e3b1efa85ed4b3": "Branches", "eb61b42f989896b8": "{domains} and {last}", "fa338b04cd05c0cf": "{count, plural, one {{domains} and {count} more} other {{domains} and {count} more}}", "f37c0766ca212865": "Low", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 956f4e17a9617..64fe97a5b3f62 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Inició {started} guía de revisión} other {Inició {started} guías de revisión}}", "5dce4a54eaffeccf": "{started, plural, one {Intentó iniciar {started} guía de revisión} other {Intentó iniciar {started} guías de revisión}}", "420bea546d5f8802": "Hilo copiado", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "No se pudo copiar el hilo", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Enlace de la PR copiado", "1b88f6a5e9fdeea7": "No se pudo copiar el enlace de la PR", "b063ecd06059857f": "Compactando antes de que caduque la caché…", @@ -2346,6 +2348,12 @@ "e7a50ab49cdfd076": "Regenerando… ({count})", "6523a0ca24b57fde": "Regenerar títulos ({count})", "96adc8bf3106015d": "Desfijar ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "Ramas", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "Aprobación pendiente", "a28d4938d473c33f": "Esperando respuesta", "c7c6c2345a741768": "Solicitud de invitado", @@ -2358,6 +2366,14 @@ "e54720cac68f2adb": "Todos los proyectos", "ac47f86df1c31a4a": "No se pudo copiar la rama", "4e6305459e784fea": "No se pudo copiar el ID del hilo", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "El título del hilo no puede estar vacío", "5c14b37b13312503": "No se pudo cambiar el nombre del hilo", "fc97f746bdabe59f": "No se pudo resolver el hilo", @@ -11245,7 +11261,6 @@ "81f82840d9589bc9": "Restablecer los worktrees nuevos empiezan desde el remoto al valor predeterminado", "f68e05c50f67ab91": "Crear los worktrees nuevos desde el remoto por defecto", "9fe97e290e08f82f": "Creación", - "10e3b1efa85ed4b3": "Ramas", "eb61b42f989896b8": "{domains} y {last}", "fa338b04cd05c0cf": "{count, plural, one {{domains} y {count} más} other {{domains} y {count} más}}", "f37c0766ca212865": "Bajo", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 1c982cc6d6f58..87fa43f6f3efb 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {{started} guide de revue lancé} other {{started} guides de revue lancés}}", "5dce4a54eaffeccf": "{started, plural, one {Tentative de lancer {started} guide de revue} other {Tentative de lancer {started} guides de revue}}", "420bea546d5f8802": "Fil copié", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Échec de la copie du fil", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Lien de la PR copié", "1b88f6a5e9fdeea7": "Échec de la copie du lien de la PR", "b063ecd06059857f": "Compactage avant l’expiration du cache…", @@ -2346,6 +2348,12 @@ "e7a50ab49cdfd076": "Régénération… ({count})", "6523a0ca24b57fde": "Régénérer les titres ({count})", "96adc8bf3106015d": "Désépingler ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "Branches", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "Approbation en attente", "a28d4938d473c33f": "Réponse attendue", "c7c6c2345a741768": "Demande d’invité", @@ -2358,6 +2366,14 @@ "e54720cac68f2adb": "Tous les projets", "ac47f86df1c31a4a": "Échec de la copie de la branche", "4e6305459e784fea": "Échec de la copie de l’ID du fil", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "Le titre du fil ne peut pas être vide", "5c14b37b13312503": "Échec du renommage du fil", "fc97f746bdabe59f": "Échec de la clôture du fil", @@ -11250,7 +11266,6 @@ "81f82840d9589bc9": "Réinitialiser le démarrage des nouveaux worktrees depuis le remote à la valeur par défaut", "f68e05c50f67ab91": "Faire partir les nouveaux worktrees du distant par défaut", "9fe97e290e08f82f": "Création", - "10e3b1efa85ed4b3": "Branches", "eb61b42f989896b8": "{domains} et {last}", "fa338b04cd05c0cf": "{count, plural, one {{domains} et {count} autre} other {{domains} et {count} autres}}", "f37c0766ca212865": "Faible", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 879531a396d2a..466af3c98044f 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, other {{started} 件のレビューガイドを開始しました}}", "5dce4a54eaffeccf": "{started, plural, other {{started} 件のレビューガイドを開始しようとしました}}", "420bea546d5f8802": "スレッドをコピーしました", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "スレッドをコピーできませんでした", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR のリンクをコピーしました", "1b88f6a5e9fdeea7": "PR のリンクをコピーできませんでした", "b063ecd06059857f": "キャッシュの期限切れ前に圧縮しています…", @@ -2344,6 +2346,12 @@ "e7a50ab49cdfd076": "再生成しています… ({count})", "6523a0ca24b57fde": "タイトルを再生成 ({count})", "96adc8bf3106015d": "ピン留めを解除 ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "ブランチ", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "承認待ち", "a28d4938d473c33f": "入力待ち", "c7c6c2345a741768": "ゲストのリクエスト", @@ -2356,6 +2364,14 @@ "e54720cac68f2adb": "すべてのプロジェクト", "ac47f86df1c31a4a": "ブランチをコピーできませんでした", "4e6305459e784fea": "スレッド ID をコピーできませんでした", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "スレッドのタイトルは空にできません", "5c14b37b13312503": "スレッドの名前を変更できませんでした", "fc97f746bdabe59f": "スレッドを対応済みにできませんでした", @@ -11200,7 +11216,6 @@ "81f82840d9589bc9": "「新しいワークツリーをリモートから開始」をデフォルトにリセット", "f68e05c50f67ab91": "デフォルトで新しいワークツリーをリモートから開始", "9fe97e290e08f82f": "作成", - "10e3b1efa85ed4b3": "ブランチ", "eb61b42f989896b8": "{domains} と {last}", "fa338b04cd05c0cf": "{count, plural, other {{domains} と他 {count} 件}}", "f37c0766ca212865": "低", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index fae8ce2ec6fc4..92d8c9f069147 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, other {검토 가이드 {started}개 시작함}}", "5dce4a54eaffeccf": "{started, plural, other {검토 가이드 {started}개 시작 시도함}}", "420bea546d5f8802": "스레드 복사됨", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "스레드를 복사하지 못했습니다", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR 링크 복사됨", "1b88f6a5e9fdeea7": "PR 링크를 복사하지 못했습니다", "b063ecd06059857f": "캐시가 만료되기 전에 압축하는 중…", @@ -2345,6 +2347,12 @@ "e7a50ab49cdfd076": "다시 생성하는 중… ({count})", "6523a0ca24b57fde": "제목 다시 생성({count})", "96adc8bf3106015d": "고정 해제({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "브랜치", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "승인 대기 중", "a28d4938d473c33f": "입력 대기 중", "c7c6c2345a741768": "게스트 요청", @@ -2357,6 +2365,14 @@ "e54720cac68f2adb": "모든 프로젝트", "ac47f86df1c31a4a": "브랜치를 복사하지 못했습니다", "4e6305459e784fea": "스레드 ID를 복사하지 못했습니다", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "스레드 제목은 비워 둘 수 없습니다", "5c14b37b13312503": "스레드 이름을 바꾸지 못했습니다", "fc97f746bdabe59f": "스레드를 정리하지 못했습니다", @@ -11197,7 +11213,6 @@ "81f82840d9589bc9": "새 워크트리를 원격에서 시작 기본값으로 재설정", "f68e05c50f67ab91": "기본적으로 새 워크트리를 원격에서 시작", "9fe97e290e08f82f": "생성", - "10e3b1efa85ed4b3": "브랜치", "eb61b42f989896b8": "{domains} 및 {last}", "fa338b04cd05c0cf": "{count, plural, other {{domains} 외 {count}개}}", "f37c0766ca212865": "낮음", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 7010bef288b16..58253b165597c 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Iniciou {started} guia de revisão} other {Iniciou {started} guias de revisão}}", "5dce4a54eaffeccf": "{started, plural, one {Tentou iniciar {started} guia de revisão} other {Tentou iniciar {started} guias de revisão}}", "420bea546d5f8802": "Thread copiada", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Falha ao copiar a thread", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Link do PR copiado", "1b88f6a5e9fdeea7": "Falha ao copiar o link do PR", "b063ecd06059857f": "Compactando antes de o cache expirar…", @@ -2346,6 +2348,12 @@ "e7a50ab49cdfd076": "Gerando novamente… ({count})", "6523a0ca24b57fde": "Gerar títulos novamente ({count})", "96adc8bf3106015d": "Desafixar ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "Branches", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "Aprovação pendente", "a28d4938d473c33f": "Aguardando resposta", "c7c6c2345a741768": "Pedido de convidado", @@ -2358,6 +2366,14 @@ "e54720cac68f2adb": "Todos os projetos", "ac47f86df1c31a4a": "Falha ao copiar o branch", "4e6305459e784fea": "Falha ao copiar o ID da thread", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "O título da thread não pode ficar vazio", "5c14b37b13312503": "Falha ao renomear a thread", "fc97f746bdabe59f": "Falha ao concluir a thread", @@ -11249,7 +11265,6 @@ "81f82840d9589bc9": "Redefinir \"Novos worktrees começam a partir do remoto\" para o padrão", "f68e05c50f67ab91": "Iniciar novos worktrees do remoto por padrão", "9fe97e290e08f82f": "Criação", - "10e3b1efa85ed4b3": "Branches", "eb61b42f989896b8": "{domains} e {last}", "fa338b04cd05c0cf": "{count, plural, one {{domains} e mais {count}} other {{domains} e mais {count}}}", "f37c0766ca212865": "Baixo", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 0766d953dd02d..fdda22758a143 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Начато {started} руководство по ревью} few {Начато {started} руководства по ревью} many {Начато {started} руководств по ревью} other {Начато {started} руководства по ревью}}", "5dce4a54eaffeccf": "{started, plural, one {Попытка начать {started} руководство по ревью} few {Попытка начать {started} руководства по ревью} many {Попытка начать {started} руководств по ревью} other {Попытка начать {started} руководства по ревью}}", "420bea546d5f8802": "Тред скопирован", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Не удалось скопировать тред", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "Ссылка на PR скопирована", "1b88f6a5e9fdeea7": "Не удалось скопировать ссылку на PR", "b063ecd06059857f": "Сжатие до истечения кеша…", @@ -2346,6 +2348,12 @@ "e7a50ab49cdfd076": "Генерация… ({count})", "6523a0ca24b57fde": "Сгенерировать названия заново ({count})", "96adc8bf3106015d": "Открепить ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "Ветки", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "Ждёт подтверждения", "a28d4938d473c33f": "Ждёт ввода", "c7c6c2345a741768": "Запрос гостя", @@ -2358,6 +2366,14 @@ "e54720cac68f2adb": "Все проекты", "ac47f86df1c31a4a": "Не удалось скопировать ветку", "4e6305459e784fea": "Не удалось скопировать ID треда", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "Название треда не может быть пустым", "5c14b37b13312503": "Не удалось переименовать тред", "fc97f746bdabe59f": "Не удалось отметить тред разобранным", @@ -11250,7 +11266,6 @@ "81f82840d9589bc9": "Сбросить «Начинать с удалённой ветки» к значению по умолчанию", "f68e05c50f67ab91": "По умолчанию начинать новые рабочие деревья с удалённой ветки", "9fe97e290e08f82f": "Создание", - "10e3b1efa85ed4b3": "Ветки", "eb61b42f989896b8": "{domains} и {last}", "fa338b04cd05c0cf": "{count, plural, one {{domains} и ещё {count}} few {{domains} и ещё {count}} many {{domains} и ещё {count}} other {{domains} и ещё {count}}}", "f37c0766ca212865": "Низкий", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 5e6d1607edf31..405c8d53e62db 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, one {Startade {started} granskningsguide} other {Startade {started} granskningsguider}}", "5dce4a54eaffeccf": "{started, plural, one {Försökte starta {started} granskningsguide} other {Försökte starta {started} granskningsguider}}", "420bea546d5f8802": "Tråden kopierades", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "Det gick inte att kopiera tråden", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "PR-länken kopierades", "1b88f6a5e9fdeea7": "Det gick inte att kopiera PR-länken", "b063ecd06059857f": "Komprimerar innan cachen går ut…", @@ -2346,6 +2348,12 @@ "e7a50ab49cdfd076": "Genererar om… ({count})", "6523a0ca24b57fde": "Generera om titlar ({count})", "96adc8bf3106015d": "Lossa ({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "Grenar", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "Väntar på godkännande", "a28d4938d473c33f": "Väntar på input", "c7c6c2345a741768": "Gästbegäran", @@ -2358,6 +2366,14 @@ "e54720cac68f2adb": "Alla projekt", "ac47f86df1c31a4a": "Det gick inte att kopiera grenen", "4e6305459e784fea": "Det gick inte att kopiera tråd-ID", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "Trådens titel får inte vara tom", "5c14b37b13312503": "Det gick inte att byta namn på tråden", "fc97f746bdabe59f": "Det gick inte att markera tråden som klar", @@ -11258,7 +11274,6 @@ "81f82840d9589bc9": "Återställ nya worktrees startar från fjärr till standard", "f68e05c50f67ab91": "Starta nya worktrees från fjärrgrenen som standard", "9fe97e290e08f82f": "Skapande", - "10e3b1efa85ed4b3": "Grenar", "eb61b42f989896b8": "{domains} och {last}", "fa338b04cd05c0cf": "{count, plural, one {{domains} och {count} till} other {{domains} och {count} till}}", "f37c0766ca212865": "Låg", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index c86b9e6c55e41..910cd1e8090c7 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -307,7 +307,9 @@ "672850007e49cfb6": "{started, plural, other {已开始 {started} 份审查导览}}", "5dce4a54eaffeccf": "{started, plural, other {尝试开始 {started} 份审查导览}}", "420bea546d5f8802": "已复制会话", + "ff21e10fe80fe57c": "{count} threads copied", "2efb2dd3bf170f67": "无法复制会话", + "ee8ae13545717b0e": "Failed to copy threads", "6c03545936b55e0b": "已复制 PR 链接", "1b88f6a5e9fdeea7": "无法复制 PR 链接", "b063ecd06059857f": "正在缓存过期前压缩…", @@ -2350,6 +2352,12 @@ "e7a50ab49cdfd076": "正在重新生成…({count})", "6523a0ca24b57fde": "重新生成标题({count})", "96adc8bf3106015d": "取消置顶({count})", + "4aa20e259aa64ba9": "Copy ({count})", + "52c19ac19b08996b": "Paths", + "10e3b1efa85ed4b3": "分支", + "7204fddf3be3612e": "Threads (up to {count})", + "07046e54864597e8": "Titles", + "ba72d92f88fdcfaa": "Thread IDs", "ae7ca1b255c0177f": "待批准", "a28d4938d473c33f": "待输入", "c7c6c2345a741768": "访客请求", @@ -2362,6 +2370,14 @@ "e54720cac68f2adb": "所有项目", "ac47f86df1c31a4a": "复制分支名失败", "4e6305459e784fea": "复制会话 ID 失败", + "7532a3cdf9b577a8": "{count} paths copied", + "b36e064c1ab0c50f": "{count} branches copied", + "d88c203698875573": "{count} titles copied", + "88ddfe0ade21a3de": "{count} thread IDs copied", + "e1ae0a8aaa41b49f": "Failed to copy paths", + "ffb2223d5cc4f94b": "Failed to copy branches", + "33fc222ddcd9d95d": "Failed to copy titles", + "80f13cf5599344f1": "Failed to copy thread IDs", "5a79b7c910831c76": "会话标题不能为空", "5c14b37b13312503": "重命名会话失败", "fc97f746bdabe59f": "收尾会话失败", @@ -11274,7 +11290,6 @@ "81f82840d9589bc9": "重置新工作树从远程开始为默认值", "f68e05c50f67ab91": "默认从远程分支创建新工作树", "9fe97e290e08f82f": "创建", - "10e3b1efa85ed4b3": "分支", "eb61b42f989896b8": "{domains} 和 {last}", "fa338b04cd05c0cf": "{count, plural, other {{domains} 和另外 {count} 个}}", "f37c0766ca212865": "低", diff --git a/packages/client-runtime/src/threadReference.test.ts b/packages/client-runtime/src/threadReference.test.ts index 42ee67bcce443..61c6421500d49 100644 --- a/packages/client-runtime/src/threadReference.test.ts +++ b/packages/client-runtime/src/threadReference.test.ts @@ -117,7 +117,7 @@ describe("resolveThreadReferenceCopyTarget", () => { const other = { threadRef: { environmentId: EnvironmentId.make("env-2"), - threadId: ThreadId.make("thread-2"), + threadId: ThreadId.make("thread-1"), }, title: "Ship the release", }; @@ -127,10 +127,11 @@ describe("resolveThreadReferenceCopyTarget", () => { const pasted = decodeComposerContextFragment(encodeComposerContextFragment(target.fragment!)); expect(pasted?.records).toEqual([ expect.objectContaining({ environmentId: "env-1", threadId: "thread-1" }), - expect.objectContaining({ environmentId: "env-2", threadId: "thread-2" }), + expect.objectContaining({ environmentId: "env-2", threadId: "thread-1" }), ]); + expect(new Set(pasted!.records.map((record) => record.contextId)).size).toBe(2); expect(target.value).toBe( - "https://app.t3.codes/threads/env-1/thread-1\nhttps://app.t3.codes/threads/env-2/thread-2", + "https://app.t3.codes/threads/env-1/thread-1\nhttps://app.t3.codes/threads/env-2/thread-1", ); expect( threadLinkContextReferences(target.value, pasted!.records, () => undefined).records, diff --git a/packages/client-runtime/src/threadReference.ts b/packages/client-runtime/src/threadReference.ts index b58573e4dbb80..2ac4795de8154 100644 --- a/packages/client-runtime/src/threadReference.ts +++ b/packages/client-runtime/src/threadReference.ts @@ -3,7 +3,10 @@ import type { ScopedThreadRef, ThreadPullRequestLink, } from "@t3tools/contracts"; -import { threadContextRecord } from "@t3tools/shared/composerContextReferences"; +import { + threadContextRecord, + toKindScopedComposerContextId, +} from "@t3tools/shared/composerContextReferences"; import { hostedThreadLink } from "@t3tools/shared/threadLinks"; import { resolveThreadCurrentPullRequestLink } from "./threadPullRequests.ts"; @@ -47,7 +50,17 @@ export function threadChipsCopyTarget( hostedAppUrl?: string, resolve: MFunctionType = mFallback, ): ThreadReferenceCopyTarget { - const records = threads.map(({ threadRef, title }) => threadContextRecord(threadRef, title)); + const records = threads.map(({ threadRef, title }) => ({ + ...threadContextRecord(threadRef, title), + ...(threads.length > 1 + ? { + contextId: toKindScopedComposerContextId( + "thread", + JSON.stringify([threadRef.environmentId, threadRef.threadId]), + ), + } + : {}), + })); const single = records.length === 1; return { kind: "thread",