From ae39c56f11fcbd35f5145f08fb396d37e6d86b05 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Fri, 6 Nov 2026 02:36:54 +0000 Subject: [PATCH 01/14] feat(web): style dictation with the redesign primitives --- apps/web/src/components/chat/ChatComposer.tsx | 167 ++++++++++------- .../chat/ComposerFooterControls.tsx | 8 +- .../chat/ComposerPrimaryActions.tsx | 64 ++++++- .../components/chat/ComposerSpeechButton.tsx | 173 +++++++++++++++--- .../components/chat/VoiceInputErrorPill.tsx | 2 +- .../src/components/chat/VoiceInputPill.tsx | 2 +- .../src/components/chat/VoiceInputSetup.tsx | 20 +- .../settings/MicrophoneOrderList.tsx | 8 +- .../components/settings/MicrophoneTest.tsx | 35 ++-- .../settings/SpeechModelComparison.tsx | 14 +- .../settings/VoiceSettingsPanel.tsx | 38 ++-- .../src/speech/useEnvironmentSpeechInput.ts | 34 ++++ apps/web/src/speech/useTextFieldSpeech.tsx | 2 +- docs/user/voice-input.md | 7 +- vite.config.ts | 10 - 15 files changed, 413 insertions(+), 171 deletions(-) diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 9e226f4990b4d..2061a9f706c7f 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -147,8 +147,13 @@ import { import { attachmentUploadBlockReason } from "../../lib/attachmentUploadState"; import { useDictationShortcut } from "../../speech/useDictationShortcut"; import { useDictationSubmissionShortcut } from "../../speech/useDictationSubmissionShortcut"; -import { useEnvironmentSpeechInput } from "../../speech/useEnvironmentSpeechInput"; -import { ComposerSpeechButton, ComposerSpeechRecordingPill } from "./ComposerSpeechButton"; +import { + useEnvironmentSpeechInput, + useSpeechUnavailableReason, +} from "../../speech/useEnvironmentSpeechInput"; +import { ComposerSpeechButton } from "./ComposerSpeechButton"; +import { VoiceInputErrorPill } from "./VoiceInputErrorPill"; +import { COMPOSER_PILL_SLOT_BUTTON_CLASS_NAME } from "./ComposerPrimaryActions"; import type { AssistantCitationSourceAnchor } from "~/lib/assistantTextSelection"; import { shortcutLabelForCommand, type ShortcutMatchContext } from "../../keybindings"; import { @@ -1041,7 +1046,6 @@ export function ChatComposer(props: ChatComposerProps) { null, ); const [isDragOverComposer, setIsDragOverComposer] = useState(false); - const [isComposerFooterCompact, setIsComposerFooterCompact] = useState(false); const [isComposerPrimaryActionsCompact, setIsComposerPrimaryActionsCompact] = useState(false); const [isComposerModelPickerOpen, setIsComposerModelPickerOpen] = useState(false); const isMobileViewport = useMediaQuery("max-sm"); @@ -1602,7 +1606,6 @@ export function ChatComposer(props: ChatComposerProps) { const measureCompactLayouts = () => { const composerFormWidth = composerForm.clientWidth; const options = { hasWideActions: false }; - setIsComposerFooterCompact(shouldUseCompactComposerFooter(composerFormWidth)); setIsComposerPrimaryActionsCompact( shouldUseCompactComposerFooter(composerFormWidth, options) && shouldUseCompactComposerPrimaryActions(composerFormWidth, options), @@ -1961,8 +1964,6 @@ export function ChatComposer(props: ChatComposerProps) { }, }); const { blocksSubmission: voiceInputActive, submitAfterDictation } = speechInput; - // A compact footer gives the dictation capsule the whole row beside the send button. - const dictationTakesFooter = isComposerFooterCompact && speechInput.state.phase !== "idle"; const submissionTarget = activePendingProgress ? "pending-user-input" : "provider-turn"; const submissionBlocked = isComposerSubmissionBlocked({ submissionTarget, @@ -1986,6 +1987,13 @@ export function ChatComposer(props: ChatComposerProps) { modelPickerOpen: isComposerModelPickerOpen, ...(backgroundThread ? { targetRef: composerFormRef } : {}), }); + // The editor freezes while dictation runs and drops focus; collapsing then would hide the recording pill. + const dictationActiveRef = useRef(false); + // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- publishes dictation activity to the asynchronous blur check + useEffect(() => { + dictationActiveRef.current = speechInput.state.phase !== "idle"; + }); + const speechUnavailableReason = useSpeechUnavailableReason(speechInput); const resolveActiveComposerTrigger = (): { snapshot: { value: string; cursor: number; expandedCursor: number }; @@ -2414,6 +2422,29 @@ export function ChatComposer(props: ChatComposerProps) { }); }; const expandMobileComposerStable = useStableCallback(expandMobileComposer); + const showsSpeechAction = speechInput.available || speechUnavailableReason !== null; + const renderSpeechAction = (inPill: boolean) => + showsSpeechAction ? ( + { + if (isComposerCollapsedMobile) expandMobileComposerStable(); + void speechInput.start(); + }} + dictation={{ + level: speechInput.level, + onStop: () => void speechInput.stop(), + onSkipPostProcessing: () => speechInput.skipPostProcessing(), + }} + /> + ) : null; + // While recording, the send slot becomes Stop and finishes the recording. + const stopDictationStable = useStableCallback(() => void speechInput.stop()); + const onStopDictation = speechInput.state.phase === "recording" ? stopDictationStable : undefined; // Escape dismisses the suggestion so Tab moves focus again. const { suggestion: promptSuggestion, dismiss: dismissPromptSuggestion } = usePromptSuggestion( @@ -3081,7 +3112,7 @@ export function ChatComposer(props: ChatComposerProps) { } composerBlurFrameRef.current = window.requestAnimationFrame(() => { composerBlurFrameRef.current = null; - if (mobileComposerExpandInFlightRef.current) { + if (mobileComposerExpandInFlightRef.current || dictationActiveRef.current) { return; } const composerSurface = composerSurfaceRef.current; @@ -3666,41 +3697,56 @@ export function ChatComposer(props: ChatComposerProps) { isEditingQueuedMessage={isEditingQueuedMessage} onInterrupt={handleInterruptPrimaryActionStable} > - + {onStopDictation ? ( + + ) : null} @@ -3873,8 +3919,9 @@ export function ChatComposer(props: ChatComposerProps) { data-chat-composer-transition-actions="true" className="z-1 flex w-max max-w-full items-center justify-end gap-1.5 self-start justify-self-end [grid-area:prompt]" > - {dictationTakesFooter ? null : composerAttachButton} + {composerAttachButton} - {speechInput.available ? ( - <> - void speechInput.start()} - onStop={() => void speechInput.stop()} - onCancel={() => speechInput.cancel()} - onSkipPostProcessing={() => speechInput.skipPostProcessing()} - /> - void speechInput.start()} - /> - + {speechInput.available && speechInput.state.phase === "error" ? ( + void speechInput.start()} + onDismiss={() => speechInput.cancel()} + /> ) : null}
{speechInput.preview.committed} diff --git a/apps/web/src/components/chat/ComposerFooterControls.tsx b/apps/web/src/components/chat/ComposerFooterControls.tsx index b39160c0a1071..6dde903eed4fe 100644 --- a/apps/web/src/components/chat/ComposerFooterControls.tsx +++ b/apps/web/src/components/chat/ComposerFooterControls.tsx @@ -185,6 +185,7 @@ export function ComposerPermissionsSection(props: { export const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryActions(props: { children?: React.ReactNode; + renderSpeechAction?: ((inPill: boolean) => React.ReactNode) | undefined; compact: boolean; canOperateThread: boolean; isPreparingWorktree: boolean; @@ -213,8 +214,9 @@ export const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryA onResume: () => void; onPreviousPendingQuestion: () => void; onInterrupt: () => void; + onStopDictation?: (() => void) | undefined; + stopDictationShortcutLabel?: string | null; compactBeforeSendTokens: number | null; - hideCompactToggle: boolean; keepFullHistory: boolean; onToggleKeepFullHistory: () => void; }) { @@ -239,12 +241,14 @@ export const ComposerFooterPrimaryActions = memo(function ComposerFooterPrimaryA canResume={props.canResume} preserveComposerFocusOnPointerDown={props.preserveComposerFocusOnPointerDown ?? false} isEditingQueuedMessage={props.isEditingQueuedMessage} + renderSpeechAction={props.renderSpeechAction} onSubmitMessage={props.onSubmitMessage} onResume={props.onResume} onPreviousPendingQuestion={props.onPreviousPendingQuestion} onInterrupt={props.onInterrupt} + onStopDictation={props.onStopDictation} + stopDictationShortcutLabel={props.stopDictationShortcutLabel ?? null} compactBeforeSendTokens={props.compactBeforeSendTokens} - hideCompactToggle={props.hideCompactToggle} keepFullHistory={props.keepFullHistory} onToggleKeepFullHistory={props.onToggleKeepFullHistory} > diff --git a/apps/web/src/components/chat/ComposerPrimaryActions.tsx b/apps/web/src/components/chat/ComposerPrimaryActions.tsx index 80b65bf97a4ae..884338a947296 100644 --- a/apps/web/src/components/chat/ComposerPrimaryActions.tsx +++ b/apps/web/src/components/chat/ComposerPrimaryActions.tsx @@ -57,12 +57,16 @@ interface ComposerPrimaryActionsProps { canResume?: boolean; preserveComposerFocusOnPointerDown?: boolean; isEditingQueuedMessage?: boolean; + /** The dictation mic: a slot in the send and stop pill, a quiet icon before the other actions. */ + renderSpeechAction?: ((inPill: boolean) => ReactNode) | undefined; onSubmitMessage?: MouseEventHandler; onResume?: () => void; onPreviousPendingQuestion: () => void; onInterrupt: () => void; + /** Set while dictation records: the stop slot finishes it instead of sending. */ + onStopDictation?: (() => void) | undefined; + stopDictationShortcutLabel?: string | null; compactBeforeSendTokens?: number | null; - hideCompactToggle?: boolean; keepFullHistory?: boolean; onToggleKeepFullHistory?: () => void; } @@ -152,6 +156,9 @@ function StopGenerationButton({ preserveComposerFocusOnPointerDown, onStopRequested, onInterrupt, + leading = null, + onStopDictation, + stopDictationShortcutLabel = null, }: { stopPhase: StopPhase; canOperateThread: boolean; @@ -159,10 +166,21 @@ function StopGenerationButton({ preserveComposerFocusOnPointerDown: boolean; onStopRequested: () => void; onInterrupt: () => void; + /** The dictation mic slot that shares the pill. */ + leading?: ReactNode; + /** Set while dictation records: the stop slot finishes it instead of interrupting. */ + onStopDictation?: (() => void) | undefined; + stopDictationShortcutLabel?: string | null; }) { const isStopDisabled = stopPhase === "pending"; + const stopLabel = onStopDictation + ? "Stop voice input" + : stopPhase === "pending" + ? "Stopping" + : "Stop generation"; return ( + {leading} { + if (onStopDictation) { + onStopDictation(); + return; + } if (!canOperateThread || isStopDisabled) return; onStopRequested(); onInterrupt(); }} - aria-label={stopPhase === "pending" ? "Stopping" : "Stop generation"} + aria-label={stopLabel} /> } > - {stopPhase === "pending" ? "Stopping…" : "Interrupt"} + + {onStopDictation + ? `${stopLabel}${stopDictationShortcutLabel ? ` (${stopDictationShortcutLabel})` : ""}` + : stopPhase === "pending" + ? "Stopping…" + : "Interrupt"} + ); @@ -256,12 +284,14 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ canResume = false, preserveComposerFocusOnPointerDown = false, isEditingQueuedMessage = false, + renderSpeechAction, onSubmitMessage, onResume, onPreviousPendingQuestion, onInterrupt, + onStopDictation, + stopDictationShortcutLabel = null, compactBeforeSendTokens = null, - hideCompactToggle = false, keepFullHistory = false, onToggleKeepFullHistory, }: ComposerPrimaryActionsProps) { @@ -282,6 +312,8 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ const isSendDisabled = !canOperateThread || sendDisabledReason !== null; // The stop square sits in the same pill as send, so the pill never changes shape. + // While dictating it ends the recording; a running turn's stop returns after. + const stopsDictation = onStopDictation !== undefined && !pendingAction; const renderStopGenerationButton = (insidePendingAction: boolean) => ( setStopPhase("pending")} onInterrupt={onInterrupt} + leading={insidePendingAction ? null : renderSpeechAction?.(true)} + {...(stopsDictation ? { onStopDictation } : {})} + stopDictationShortcutLabel={stopDictationShortcutLabel} /> ); @@ -307,6 +342,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ if (pendingAction) { return (
+ {renderSpeechAction?.(false)} {pendingAction.questionIndex > 0 ? ( compact ? ( - + {glyph} + + + {unavailable ?? label} + {showsShortcut && props.shortcutLabel ? ` (${props.shortcutLabel})` : ""} + {phase !== "idle" && !isRecording ? " (Esc cancels)" : ""} + + ); } @@ -195,9 +324,9 @@ export function ComposerSpeechRecordingPill(props: { ) : ( <> - + {presentation.status} - + )}
diff --git a/apps/web/src/components/chat/VoiceInputErrorPill.tsx b/apps/web/src/components/chat/VoiceInputErrorPill.tsx index e4b04e6792303..d28889d24eab9 100644 --- a/apps/web/src/components/chat/VoiceInputErrorPill.tsx +++ b/apps/web/src/components/chat/VoiceInputErrorPill.tsx @@ -79,7 +79,7 @@ export function VoiceInputErrorPill(props: { tabIndex={0} role="status" aria-label={message} - className="flex min-w-0 items-center gap-1.5 rounded-sm text-sm font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset" + className="flex min-w-0 items-center gap-1.5 rounded-sm text-label outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset" /> } > diff --git a/apps/web/src/components/chat/VoiceInputPill.tsx b/apps/web/src/components/chat/VoiceInputPill.tsx index 1aa238a8c4b28..0971d31cbd2f1 100644 --- a/apps/web/src/components/chat/VoiceInputPill.tsx +++ b/apps/web/src/components/chat/VoiceInputPill.tsx @@ -66,7 +66,7 @@ export function VoiceInputPill({ "h-7 rounded-md max-sm:order-first max-sm:basis-full sm:h-6" : "h-9 max-w-fit grow-[1.5] basis-0 rounded-full p-0.5 sm:h-8", tone === "error" - ? "bg-destructive/6 text-destructive ring-destructive/24" + ? "bg-destructive/6 text-destructive-foreground ring-destructive/24" : "bg-muted/48 ring-border", )} > diff --git a/apps/web/src/components/chat/VoiceInputSetup.tsx b/apps/web/src/components/chat/VoiceInputSetup.tsx index 9e694e8b263a0..c5588a1deddb4 100644 --- a/apps/web/src/components/chat/VoiceInputSetup.tsx +++ b/apps/web/src/components/chat/VoiceInputSetup.tsx @@ -103,16 +103,16 @@ export function VoiceInputSetup(props: { /> {props.step === 0 ? ( -
+
{model ? ( -
+
-

{model.name}

- +

{model.name}

+ {Math.round(model.size / 1024 / 1024)} MB
-

+

{model.recommended && props.language ? `Recommended for ${languageLabel(props.language)}. ` : ""} @@ -133,7 +133,7 @@ export function VoiceInputSetup(props: { style={{ width: `${progress ?? 0}%` }} />

-

+

{model.state === "verifying" ? "Verifying…" : progress === null @@ -149,14 +149,14 @@ export function VoiceInputSetup(props: {

) : null} {props.error ? ( -

+

{props.error}

) : null}
) : ( -
+
@@ -214,12 +214,12 @@ export function VoiceInputSetup(props: {
{selectedIsUnavailable ? ( -

+

That microphone is unplugged. Pick another one.

) : null} {microphoneError ? ( -

+

{microphoneError}

) : null} diff --git a/apps/web/src/components/settings/MicrophoneOrderList.tsx b/apps/web/src/components/settings/MicrophoneOrderList.tsx index e5bd92755d27a..7a9cd657b42d9 100644 --- a/apps/web/src/components/settings/MicrophoneOrderList.tsx +++ b/apps/web/src/components/settings/MicrophoneOrderList.tsx @@ -111,17 +111,17 @@ function MicrophoneRow(props: { isDragging && "relative z-10 rounded-lg bg-background shadow-md", )} > - {props.position} - + {props.position} + {name} {props.inUse ? ( - + In use ) : props.notConnected ? ( - Not connected + Not connected ) : null} ); const panel = error ? ( -

+

{error}

) : phase === "starting" ? ( - + Opening microphone… ) : phase === "recording" ? ( @@ -226,7 +227,7 @@ export function MicrophoneTest({ {formatTime(elapsed)} / {formatTime(LOOPBACK_SECONDS)} @@ -253,7 +254,7 @@ export function MicrophoneTest({ {panel ? (
@@ -277,7 +278,6 @@ function MicrophonePlayback({ src, duration }: { src: string; duration: number } const [playing, setPlaying] = useState(false); const [position, setPosition] = useState(0); const [failed, setFailed] = useState(false); - const progress = duration > 0 ? Math.min(position / duration, 1) * 100 : 0; const togglePlayback = async () => { const player = audio.current; @@ -316,27 +316,24 @@ function MicrophonePlayback({ src, duration }: { src: string; duration: number } {playing ? : } {failed ? ( -

+

Could not play this recording. Try recording again.

) : ( - { - const next = Number(event.target.value); + label="Recording playback position" + trackClassName="bg-muted" + playedClassName="bg-primary" + onSeek={(next) => { if (audio.current) audio.current.currentTime = next; setPosition(next); }} - className="h-1 min-w-0 flex-1 cursor-pointer appearance-none rounded-full bg-muted accent-primary focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring [&::-webkit-slider-thumb]:size-2.5 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-primary [&::-moz-range-thumb]:size-2.5 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:bg-primary" /> )} diff --git a/apps/web/src/components/settings/SpeechModelComparison.tsx b/apps/web/src/components/settings/SpeechModelComparison.tsx index 4842c688b36dd..46d5553a3fe14 100644 --- a/apps/web/src/components/settings/SpeechModelComparison.tsx +++ b/apps/web/src/components/settings/SpeechModelComparison.tsx @@ -1,5 +1,6 @@ import type { EnvironmentSpeechModel, SpeechBenchmarkTier } from "@t3tools/contracts"; +import { Text } from "../ui/text"; import { languageLabel } from "./SpeechLanguageSelect"; const commonLanguages = [ @@ -65,7 +66,7 @@ export function ModelBenchmarks({ (code): code is string => code !== undefined, ); return ( -
+
{visible.map((code) => { const score = data?.accuracy[code]; return ( @@ -73,8 +74,10 @@ export function ModelBenchmarks({ {languageLabel(code)}:{" "} {score ? ( <> - {score.grade} ( - {score.errorPercent}% error) + + {score.grade} + {" "} + ({score.errorPercent}% error) ) : ( "not benchmarked" @@ -90,7 +93,10 @@ export function ModelBenchmarks({ "not benchmarked" ) : ( <> - {seconds} s / 30 s + + {seconds} s + {" "} + / 30 s )} diff --git a/apps/web/src/components/settings/VoiceSettingsPanel.tsx b/apps/web/src/components/settings/VoiceSettingsPanel.tsx index 9167f614d9fe2..c6a46b7663157 100644 --- a/apps/web/src/components/settings/VoiceSettingsPanel.tsx +++ b/apps/web/src/components/settings/VoiceSettingsPanel.tsx @@ -192,7 +192,7 @@ type ModelCardProps = { function ModelBadge(props: { icon: ReactNode; label: string; tooltip: string }) { return ( - }> + }> {props.icon} {props.label} @@ -216,36 +216,36 @@ function ModelCard(props: ModelCardProps) { >
- {model.name} + {model.name} {model.recommended ? ( } + icon={} label="Recommended" tooltip="A good default pick for the languages it covers." /> ) : null} {model.supportsStreaming ? ( } + icon={} label="Live preview" tooltip="Shows words in your draft as you speak, before the recording finishes." /> ) : null} {model.supportsTranslation ? ( } + icon={} label="Translate" tooltip="Can write English text from speech in another language. Turn on Translate to English to use it." /> ) : null}
{model.description ? ( -

+

{model.description}

) : null} {model.linkedFrom ? ( -

+

Using your file at {model.linkedFrom}

) : null} @@ -277,7 +277,7 @@ function ModelCard(props: ModelCardProps) { style={{ width: `${progress}%` }} />
-

+

{model.state === "verifying" ? "Verifying download…" : `${Math.round(progress)}% downloaded`} @@ -295,7 +295,7 @@ function ModelCard(props: ModelCardProps) { disabled={!props.canCancel} onClick={props.onCancel} > - + ) : model.state === "downloadable" ? ( ) : null ) : ( - + {speech.status?.supported === false ? speech.status.reason : "Waiting for the environment to connect"} @@ -1157,7 +1157,7 @@ function TranscriptionTest(props: {

{speech.preview || transcript !== null ? null : ( -

+

Say a sentence. Cleanup is skipped, so you see exactly what the model heard.

)} @@ -1165,7 +1165,7 @@ function TranscriptionTest(props: {

{speech.preview ? ( <> @@ -1363,7 +1363,7 @@ export function VoiceSettingsPanel() { {SHORTCUT_MODES[mode].label} - + {SHORTCUT_MODES[mode].hint} diff --git a/apps/web/src/speech/useEnvironmentSpeechInput.ts b/apps/web/src/speech/useEnvironmentSpeechInput.ts index cb9b777998741..914afc81d8e68 100644 --- a/apps/web/src/speech/useEnvironmentSpeechInput.ts +++ b/apps/web/src/speech/useEnvironmentSpeechInput.ts @@ -142,6 +142,40 @@ export function useVoiceTranscriptionDestination() { }; } +/** + * Why the composer mic cannot start yet, or null when it can or should not show at all + * (a browser that cannot capture audio has nothing to turn on). + */ +export function useSpeechUnavailableReason(speech: { + readonly available: boolean; + readonly status: EnvironmentSpeechStatus | null; +}) { + const hydrated = useClientSettingsHydrated(); + const choice = useAudioChoice(); + const grant = choice === "off" ? null : choice; + const destination = useVoiceTranscriptionDestination(); + const environment = useEnvironment(destination.environmentId); + const connection = Option.getOrNull(usePreparedConnection(destination.environmentId)); + const canCapture = + typeof navigator !== "undefined" && + Boolean(navigator.mediaDevices?.getUserMedia) && + typeof AudioWorkletNode !== "undefined"; + if (!canCapture || speech.available) return null; + const where = destination.label ?? "The voice destination"; + if (destination.prepared) { + return speech.status?.supported === false ? speech.status.reason : "Checking voice input."; + } + if (!hydrated) return "Loading voice settings."; + if (!grant) return "Voice input is off. Turn it on in Settings > Voice."; + if (!connection || !environment?.serverConfig) { + return `${where} is not connected. Check Settings > Voice.`; + } + if (environment.serverConfig.environment.capabilities.voiceTranscription !== true) { + return `${where} can't transcribe voice. Pick another destination in Settings > Voice.`; + } + return `Voice input is not ready on ${where}. Check Settings > Voice.`; +} + export function useEnvironmentSpeechInput(input: HookInput) { const navigate = useNavigate(); const destination = useVoiceTranscriptionDestination(); diff --git a/apps/web/src/speech/useTextFieldSpeech.tsx b/apps/web/src/speech/useTextFieldSpeech.tsx index b8ccad995fa06..5ee484fd03504 100644 --- a/apps/web/src/speech/useTextFieldSpeech.tsx +++ b/apps/web/src/speech/useTextFieldSpeech.tsx @@ -76,7 +76,7 @@ export function TextFieldSpeechControls({ {speech.preview ? (

{speech.preview.committed} {speech.preview.tentative} diff --git a/docs/user/voice-input.md b/docs/user/voice-input.md index 4da5e0b750a87..c2bc0676e618a 100644 --- a/docs/user/voice-input.md +++ b/docs/user/voice-input.md @@ -82,15 +82,16 @@ while you record; models with built-in long-form support transcribe when you sto ## Dictate Press the microphone in the composer, or `mod+shift+d` (`mod` is Command on -macOS and Ctrl elsewhere). Press again, or the check mark, to finish; `Esc` +macOS and Ctrl elsewhere). While you record, the microphone shows live bars and +Send becomes Stop. Press the shortcut again, the bars, or Stop to finish; `Esc` discards the recording and leaves your draft unchanged. Recordings last up to five minutes. Text is inserted at the cursor or replaces the selection you had when recording started, and the editor is read-only while dictation runs. Changes that reach the draft meanwhile, such as a cited message, are kept; the text then goes after your selection instead of replacing it. -Pressing Send while dictating finishes the recording and sends the draft once -the transcript has been inserted. Cancelling also cancels that queued send. In +Using your send shortcut while dictating finishes the recording and sends the +draft once the transcript has been inserted. Cancelling also cancels that queued send. In the other editors, Save, Comment, Reply, Submit review, or Attach works the same way, and the shortcut targets the editor that has focus, or the composer when none does. In the desktop browser's annotation editor, the microphone and diff --git a/vite.config.ts b/vite.config.ts index 11d546ccfa6d0..06556db20fd7b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -770,8 +770,6 @@ export default defineConfig({ "apps/web/src/components/sidebar/SidebarUpdateReleaseNotes.tsx": 1, "apps/web/src/components/ThreadStatusIndicators.tsx": 1, "apps/web/src/components/usage/UsageLimitsPooled.tsx": 1, - "apps/web/src/components/settings/MicrophoneTest.tsx": 1, - "apps/web/src/components/settings/SpeechModelComparison.tsx": 1, "apps/web/src/components/settings/TextGeneratorsSettings.tsx": 2, }).map(([file, maxOccurrences]) => { const rule: ["error", { maxOccurrences: number }] = ["error", { maxOccurrences }]; @@ -1007,16 +1005,8 @@ export default defineConfig({ "apps/web/src/components/sidebar/SidebarChrome.tsx": 1, "apps/web/src/components/sidebar/SidebarProviderUpdatePill.tsx": 1, "apps/web/src/components/ThreadCommandSubtitle.tsx": 1, - "apps/web/src/components/chat/ComposerSpeechButton.tsx": 2, - "apps/web/src/components/chat/VoiceInputErrorPill.tsx": 1, - "apps/web/src/components/chat/VoiceInputSetup.tsx": 8, - "apps/web/src/components/settings/MicrophoneTest.tsx": 4, "apps/web/src/components/settings/SecretsSettings.tsx": 1, - "apps/web/src/components/settings/SpeechModelComparison.tsx": 3, "apps/web/src/components/settings/CloudVoiceConfiguration.tsx": 8, - "apps/web/src/components/settings/MicrophoneOrderList.tsx": 4, - "apps/web/src/components/settings/VoiceSettingsPanel.tsx": 14, - "apps/web/src/speech/useTextFieldSpeech.tsx": 1, }).map(([file, maxOccurrences]) => { const rule: ["error", { maxOccurrences: number }] = ["error", { maxOccurrences }]; return { files: [file], rules: { "t3code/no-raw-type-classes": rule } }; From 1d739efc699839acb82e354a36117ebee28775b0 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 12 Nov 2026 09:48:16 +0000 Subject: [PATCH 02/14] fix(web): format main's voice settings and keep the recording time on the meta role --- apps/web/src/components/chat/ComposerSpeechButton.tsx | 2 +- apps/web/src/components/settings/VoiceSettingsPanel.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/chat/ComposerSpeechButton.tsx b/apps/web/src/components/chat/ComposerSpeechButton.tsx index 72dcaf3c92ae4..a278a3dfb11c7 100644 --- a/apps/web/src/components/chat/ComposerSpeechButton.tsx +++ b/apps/web/src/components/chat/ComposerSpeechButton.tsx @@ -72,7 +72,7 @@ function RecordingStatus(props: { return ( <> - + {formatElapsed(elapsedSeconds)} {props.recordingLimitSeconds !== undefined ? ` / ${formatElapsed(props.recordingLimitSeconds)}` diff --git a/apps/web/src/components/settings/VoiceSettingsPanel.tsx b/apps/web/src/components/settings/VoiceSettingsPanel.tsx index c6a46b7663157..90074096186da 100644 --- a/apps/web/src/components/settings/VoiceSettingsPanel.tsx +++ b/apps/web/src/components/settings/VoiceSettingsPanel.tsx @@ -240,9 +240,7 @@ function ModelCard(props: ModelCardProps) { ) : null}

{model.description ? ( -

- {model.description} -

+

{model.description}

) : null} {model.linkedFrom ? (

From 1c93ee56fd783170252d2353d84752e7cf5d5ace Mon Sep 17 00:00:00 2001 From: shivam <91240327+shivamhwp@users.noreply.github.com> Date: Thu, 12 Nov 2026 08:43:15 +0530 Subject: [PATCH 03/14] fix(web): dictation can be cancelled by touch again (#33897) Co-authored-by: Claude Opus 5.5 --- apps/web/src/components/chat/ChatComposer.tsx | 11 +++++++- .../components/chat/ComposerSpeechButton.tsx | 25 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 2061a9f706c7f..b414f790bb5a6 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -151,7 +151,7 @@ import { useEnvironmentSpeechInput, useSpeechUnavailableReason, } from "../../speech/useEnvironmentSpeechInput"; -import { ComposerSpeechButton } from "./ComposerSpeechButton"; +import { ComposerSpeechButton, ComposerSpeechCancelButton } from "./ComposerSpeechButton"; import { VoiceInputErrorPill } from "./VoiceInputErrorPill"; import { COMPOSER_PILL_SLOT_BUTTON_CLASS_NAME } from "./ComposerPrimaryActions"; import type { AssistantCitationSourceAnchor } from "~/lib/assistantTextSelection"; @@ -3974,6 +3974,15 @@ export function ChatComposer(props: ChatComposerProps) { onDismiss={() => speechInput.cancel()} /> ) : null} + {speechInput.available && + speechInput.state.phase !== "idle" && + speechInput.state.phase !== "error" ? ( + speechInput.cancel()} + /> + ) : null} + + + ); +} + // Each bar reads the level a sample apart, so the three never move in lockstep, and the // middle bar reaches highest so loud speech reads as a wave rather than a flat block. const SPEECH_BAR_SAMPLE_OFFSETS = [1, 0, 2] as const; From 740a029d97c65644c2514ffcc21031b12369f8b7 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:00:18 +0000 Subject: [PATCH 04/14] fix(web): compile layer 5 against main's issues and clipboard APIs --- apps/web/src/components/ChatView.tsx | 1 + .../ProviderUpdateLaunchNotification.tsx | 25 +++++++++++--- .../chat/ComposerPrimaryActions.tsx | 2 +- .../components/issue/IssueCommentComposer.tsx | 6 ++-- apps/web/src/components/issue/IssuesPage.tsx | 27 ++++++++++++++- .../pullRequest/PullRequestSummaryTab.tsx | 34 +++++++++++++++---- .../pullRequest/PullRequestsPage.tsx | 1 + .../pullRequest/pullRequestSavedViews.test.ts | 6 ---- .../pullRequest/pullRequestSavedViews.ts | 1 - 9 files changed, 78 insertions(+), 25 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index 1d6a11d1da132..e88a9ebac81df 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -3481,6 +3481,7 @@ export default function ChatView(props: ChatViewProps) { ? addPullRequestsSurfaceStable : undefined, }} + issuesSupported={serverConfig?.environment.capabilities.issues === true} files={{ projectId: activeProject?.id, projectName: activeProject?.title ?? null, diff --git a/apps/web/src/components/ProviderUpdateLaunchNotification.tsx b/apps/web/src/components/ProviderUpdateLaunchNotification.tsx index c5be98b4a4af3..b075f190dd454 100644 --- a/apps/web/src/components/ProviderUpdateLaunchNotification.tsx +++ b/apps/web/src/components/ProviderUpdateLaunchNotification.tsx @@ -1,8 +1,10 @@ import { useAtomValue } from "@effect/atom-react"; import { PROVIDER_DISPLAY_NAMES } from "@t3tools/contracts"; +import { msg } from "gt-react"; import { useEffect, useRef } from "react"; import { writeTextToClipboard } from "../hooks/useCopyToClipboard"; +import { m } from "../i18n/messages"; import { primaryServerProvidersAtom } from "../state/server"; import { CommandBlock } from "./CommandBlock"; import { ProviderInstanceIcon } from "./chat/ProviderInstanceIcon"; @@ -44,15 +46,28 @@ export function ProviderUpdateLaunchNotification() { key, toastManager.add({ type: "info", - title: `${name} ${advisory.latestVersion} is available`, + title: m( + msg("{provider} {version} is available", { + provider: name, + version: advisory.latestVersion, + }), + ), description: current - ? `You're on ${current}. New sessions will use the updated provider.` - : "New sessions will use the updated provider.", + ? m( + msg("You''re on {version}. New sessions will use the updated provider.", { + version: current, + }), + ) + : m(msg("New sessions will use the updated provider.")), timeout: 0, actionProps: { - children: "Copy update command", + children: m(msg("Copy update command")), onClick: () => { - void writeTextToClipboard(command, "update command"); + void writeTextToClipboard(command, { + target: "update command", + unavailableMessage: msg("Clipboard API is unavailable while copying update command."), + failureMessage: msg("Failed to copy update command to the clipboard."), + }); }, }, data: { diff --git a/apps/web/src/components/chat/ComposerPrimaryActions.tsx b/apps/web/src/components/chat/ComposerPrimaryActions.tsx index 2ae59a0c21856..efb81ef120800 100644 --- a/apps/web/src/components/chat/ComposerPrimaryActions.tsx +++ b/apps/web/src/components/chat/ComposerPrimaryActions.tsx @@ -583,7 +583,7 @@ export const ComposerPrimaryActions = memo(function ComposerPrimaryActions({ * The mic + send pill. Send and stop render inside it, and dictation's mic * joins as a sibling slot before them, so the pill keeps one shape in every state. */ -function ComposerSendPill({ className, children }: { className?: string; children: ReactNode }) { +export function ComposerSendPill({ className, children }: { className?: string; children: ReactNode }) { return ( {children} diff --git a/apps/web/src/components/issue/IssueCommentComposer.tsx b/apps/web/src/components/issue/IssueCommentComposer.tsx index e8902854dbb16..de0370e4a04af 100644 --- a/apps/web/src/components/issue/IssueCommentComposer.tsx +++ b/apps/web/src/components/issue/IssueCommentComposer.tsx @@ -9,9 +9,7 @@ import { TextFieldSpeechControls, useTextFieldSpeech } from "~/speech/useTextFie import { issueEnvironment } from "~/state/issues"; import { useAtomCommand } from "~/state/use-atom-command"; -import { cn } from "~/lib/utils"; - -import { COMPOSER_PILL_BUTTON_CLASS_NAME, ComposerSendPill } from "../chat/ComposerPrimaryActions"; +import { COMPOSER_PILL_SLOT_BUTTON_CLASS_NAME, ComposerSendPill } from "../chat/ComposerPrimaryActions"; import { ComposerSurface } from "../chat/ComposerSurface"; import { readableFailure } from "../pullRequest/pullRequestDetail.logic"; import { Spinner } from "../ui/spinner"; @@ -102,7 +100,7 @@ export function IssueCommentComposer({

diff --git a/apps/web/src/components/chat/PanelLayoutControls.tsx b/apps/web/src/components/chat/PanelLayoutControls.tsx index 66c182cfd2e47..036207c46b396 100644 --- a/apps/web/src/components/chat/PanelLayoutControls.tsx +++ b/apps/web/src/components/chat/PanelLayoutControls.tsx @@ -53,7 +53,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({ rightPanelAvailable, rightPanelOpen, rightPanelShortcutLabel, - rightPanelUnavailableLabel = "Right panel is unavailable", + rightPanelUnavailableLabel, onToggleTerminal, onToggleThreadPanel, onToggleRightPanel, @@ -100,7 +100,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({ className="shrink-0 [-webkit-app-region:no-drag]" pressed={terminalOpen} onPressedChange={onToggleTerminal} - aria-label="Toggle terminal drawer" + aria-label={gt("Toggle terminal drawer")} variant="ghost" size="sm" disabled={!terminalAvailable} @@ -110,8 +110,10 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({
{terminalAvailable - ? `Toggle terminal drawer${terminalShortcutLabel ? ` (${terminalShortcutLabel})` : ""}` - : "Terminal drawer is unavailable"} + ? terminalShortcutLabel + ? gt("Toggle terminal drawer ({shortcut})", { shortcut: terminalShortcutLabel }) + : gt("Toggle terminal drawer") + : gt("Terminal drawer is unavailable")}
) : null} @@ -122,7 +124,7 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({ className="shrink-0 [-webkit-app-region:no-drag]" pressed={rightPanelOpen} onPressedChange={onToggleRightPanel} - aria-label="Toggle right panel" + aria-label={gt("Toggle right panel")} data-right-panel-toggle variant="ghost" size="sm" @@ -133,8 +135,10 @@ export const PanelLayoutControls = memo(function PanelLayoutControls({ {rightPanelAvailable - ? `Toggle right panel${rightPanelShortcutLabel ? ` (${rightPanelShortcutLabel})` : ""}` - : rightPanelUnavailableLabel} + ? rightPanelShortcutLabel + ? gt("Toggle right panel ({shortcut})", { shortcut: rightPanelShortcutLabel }) + : gt("Toggle right panel") + : (rightPanelUnavailableLabel ?? gt("Right panel is unavailable"))} ) : null} diff --git a/apps/web/src/components/chat/QueuedRunsControl.tsx b/apps/web/src/components/chat/QueuedRunsControl.tsx index 480db6ae4883c..28e1273f4666f 100644 --- a/apps/web/src/components/chat/QueuedRunsControl.tsx +++ b/apps/web/src/components/chat/QueuedRunsControl.tsx @@ -742,7 +742,7 @@ function QueuedMessage(props: { /> } > - Open automation + Open automation ) : null} diff --git a/apps/web/src/components/chat/SecretRequestCard.tsx b/apps/web/src/components/chat/SecretRequestCard.tsx index c41c6028242fc..a9b3b4482fc5d 100644 --- a/apps/web/src/components/chat/SecretRequestCard.tsx +++ b/apps/web/src/components/chat/SecretRequestCard.tsx @@ -22,7 +22,7 @@ import type { SecretProviderId, } from "@t3tools/contracts"; import { useAtomValue } from "@effect/atom-react"; -import { useMessages } from "gt-react"; +import { T, useMessages, Var } from "gt-react"; import { CheckIcon, ExternalLinkIcon, @@ -174,7 +174,7 @@ function PendingSecretRequestForm(props: { className="ms-auto flex min-w-0 items-center gap-1 text-meta text-muted-foreground" > - {secretRequestPrivacyNote(item)} + {secretRequestPrivacyNote(item, messages)}

{link !== null ? ( @@ -184,7 +184,9 @@ function PendingSecretRequestForm(props: { size="sm" render={} > - Open {link.host} + + Open {link.host} + {/* A link found in the reason is already shown there. */} @@ -250,7 +252,7 @@ function PendingSecretRequestForm(props: { )}
{error !== null ? ( diff --git a/apps/web/src/components/chat/ThreadAutomationsPanel.tsx b/apps/web/src/components/chat/ThreadAutomationsPanel.tsx index 9c182cbe45e01..ba958a4e6cbb1 100644 --- a/apps/web/src/components/chat/ThreadAutomationsPanel.tsx +++ b/apps/web/src/components/chat/ThreadAutomationsPanel.tsx @@ -155,7 +155,7 @@ export function ThreadAutomationsPanel(props: { {boundTasks.length === 0 && tasksQuery.error === null ? (
- No automations scheduled + No automations scheduled
) : null}
diff --git a/apps/web/src/components/chat/ThreadRelationshipsControl.tsx b/apps/web/src/components/chat/ThreadRelationshipsControl.tsx index 4a51c54275370..2ecc13c207fbc 100644 --- a/apps/web/src/components/chat/ThreadRelationshipsControl.tsx +++ b/apps/web/src/components/chat/ThreadRelationshipsControl.tsx @@ -916,15 +916,17 @@ export function ThreadRelationshipsPanel(props: { {isParent ? ( - "Parent" + gt("Parent", { $context: "noun, the parent thread" }) ) : !isSubagent ? ( edge.kind === "transfer" ? ( relationship ) : ( - "Fork" + gt("Fork", { $context: "noun, a forked thread" }) ) ) : failed ? ( - Failed + + Failed + ) : ( <> {agent && deriveSubagentElapsedMs(agent, 0) !== null ? ( @@ -933,7 +935,11 @@ export function ThreadRelationshipsPanel(props: { threadRelationshipStatusLabel(rowStatus, m) )} {rowStatus === "running" || rowStatus === "in_progress" ? ( - + ) : null} )} diff --git a/apps/web/src/components/chat/TimelineWorkGroupRows.tsx b/apps/web/src/components/chat/TimelineWorkGroupRows.tsx index 54411bb15f6e5..b67203713fb34 100644 --- a/apps/web/src/components/chat/TimelineWorkGroupRows.tsx +++ b/apps/web/src/components/chat/TimelineWorkGroupRows.tsx @@ -506,10 +506,11 @@ export function WorkingTimelineRow({ row }: { row: Extract openTerminal(terminalId) : null; - const scriptName = snapshot.setupScript?.name ?? "Setup script"; + const scriptName = snapshot.setupScript?.name ?? gt("Setup script"); return ( } > - Background setup + + Background setup + undefined} onToggleRightPanel={toggleRightPanel} /> diff --git a/apps/web/src/components/settings/AddEnvironmentDialog.tsx b/apps/web/src/components/settings/AddEnvironmentDialog.tsx index e65341f615444..05f768e6912d9 100644 --- a/apps/web/src/components/settings/AddEnvironmentDialog.tsx +++ b/apps/web/src/components/settings/AddEnvironmentDialog.tsx @@ -512,7 +512,11 @@ export function AddEnvironmentDialog({ onClick={() => void handleAddSavedBackend()} > - {isAddingSavedBackend ? "Adding…" : routeTarget ? "Add route" : "Add environment"} + {isAddingSavedBackend + ? gt("Adding…") + : routeTarget + ? gt("Add route") + : gt("Add environment")}
); @@ -641,7 +645,11 @@ export function AddEnvironmentDialog({ onClick={() => void handleAddSavedBackend()} > - {isAddingSavedBackend ? "Adding…" : routeTarget ? "Add route" : "Add environment"} + {isAddingSavedBackend + ? gt("Adding…") + : routeTarget + ? gt("Add route") + : gt("Add environment")} diff --git a/apps/web/src/components/settings/AuthorizedClientsSettings.tsx b/apps/web/src/components/settings/AuthorizedClientsSettings.tsx index a563e6bcc528b..131effc9bb9c8 100644 --- a/apps/web/src/components/settings/AuthorizedClientsSettings.tsx +++ b/apps/web/src/components/settings/AuthorizedClientsSettings.tsx @@ -1062,7 +1062,7 @@ export function ReachableAddressRow({ }) { const gt = useGT(); const { copyToClipboard, isCopied } = useCopyToClipboard({ - onCopy: () => toastManager.add({ type: "success", title: "Address copied" }), + onCopy: () => toastManager.add({ type: "success", title: resolveMessage(msg("Address copied")) }), onError: (error) => toastManager.add( stackedThreadToast({ diff --git a/apps/web/src/components/settings/StorageSettings.tsx b/apps/web/src/components/settings/StorageSettings.tsx index c2ee34963c042..b09714eeca99d 100644 --- a/apps/web/src/components/settings/StorageSettings.tsx +++ b/apps/web/src/components/settings/StorageSettings.tsx @@ -808,14 +808,14 @@ export function WorktreeCleanupSection({ title }: { title?: string }) { /> )} updateWorktree({ worktreeUnchanged })} /> diff --git a/apps/web/src/components/ui/standalone-page.tsx b/apps/web/src/components/ui/standalone-page.tsx index bb9b215e3e62c..527fc8ca0990f 100644 --- a/apps/web/src/components/ui/standalone-page.tsx +++ b/apps/web/src/components/ui/standalone-page.tsx @@ -4,7 +4,7 @@ import { isElectron } from "../../env"; const backdropClassNames = { error: - "absolute inset-x-0 top-0 h-44 bg-[radial-gradient(44rem_16rem_at_top,color-mix(in_srgb,var(--color-red-500)_16%,transparent),transparent)]", + "inset-x-0 top-0 h-44 bg-[radial-gradient(44rem_16rem_at_top,color-mix(in_srgb,var(--color-red-500)_16%,transparent),transparent)]", // The auth card (pairing, CLI connect) sits on the flat pane. plain: "", }; @@ -31,7 +31,7 @@ export function StandalonePage({ > {tone === "plain" ? null : (
-
+
)} diff --git a/apps/web/src/routes/_chat.index.tsx b/apps/web/src/routes/_chat.index.tsx index b511be0fa9255..2e6ee53809310 100644 --- a/apps/web/src/routes/_chat.index.tsx +++ b/apps/web/src/routes/_chat.index.tsx @@ -2,6 +2,7 @@ import { workspaceAreaProps } from "../lib/workspaceFocus"; import { RefreshIcon } from "~/components/ui/refresh-icon"; import { scopeProjectRef } from "@t3tools/client-runtime/environment"; import { createFileRoute, useRouter } from "@tanstack/react-router"; +import { T, useGT } from "gt-react"; import { useEffect, useEffectEvent, useRef, useState } from "react"; import { isElectron } from "../env"; @@ -91,7 +92,8 @@ function IndexDraftLanding() { } function DraftStartError({ onRetry }: { readonly onRetry: () => void }) { - const contentArea = workspaceAreaProps("home", 1, "Home"); + const gt = useGT(); + const contentArea = workspaceAreaProps("home", 1, gt("Home", { $context: "the home screen" })); return ( void }) { {isElectron ? : null} - Couldn’t start a new thread + + Couldn’t start a new thread + - The project is still available. Try opening the draft again. + The project is still available. Try opening the draft again.
From 2c7ab331f258e624f3d6473f3944bbe0421ffc28 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:11:46 +0000 Subject: [PATCH 06/14] fix(web): fit main's linked-issue views to layer 5's primitives --- apps/web/src/components/ThreadLinkPicker.tsx | 6 +++--- .../src/components/chat/ThreadDetailsIssueRows.tsx | 12 +++++------- apps/web/src/components/issue/IssueLinkPreview.tsx | 10 ++++------ .../src/components/issue/IssueListFilterPickers.tsx | 1 + apps/web/src/components/sidebar/SidebarThreadRow.tsx | 2 +- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/apps/web/src/components/ThreadLinkPicker.tsx b/apps/web/src/components/ThreadLinkPicker.tsx index 8b7befc6ba915..78abff29c3edb 100644 --- a/apps/web/src/components/ThreadLinkPicker.tsx +++ b/apps/web/src/components/ThreadLinkPicker.tsx @@ -49,7 +49,7 @@ export function ThreadLinkPicker({ {candidates.length === 0 ? ( -
+
No active threads found.
) : ( @@ -65,14 +65,14 @@ export function ThreadLinkPicker({ {thread.title || gt("Untitled thread")} - + {projectNames.get(thread.projectId)} {linked ? ( <> - + Linked diff --git a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx index bb3a5e2d54d3d..270ef329fb1fa 100644 --- a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx +++ b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx @@ -18,6 +18,7 @@ import { PULL_REQUEST_ROW_NUMBER_CLASS, PullRequestRowLines, } from "../pullRequest/PullRequestListRow"; +import { PAGE_ROW_HOVER_CLASS, PAGE_ROW_PRESS_CLASS } from "../pullRequest/PullRequestRow"; import { PullRequestActorLabel } from "../pullRequest/pullRequestPresentation"; import { ThreadDetailsControl } from "./ThreadDetailsControl"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; @@ -108,7 +109,7 @@ function LinkedIssueRow({
} />} + render={} />} > {glyph} {title} @@ -116,13 +117,13 @@ function LinkedIssueRow({
{lines}
-
+
{link.displayKey} {trackerIcon} {comments} @@ -131,10 +132,7 @@ function LinkedIssueRow({ ) : ( {lines} diff --git a/apps/web/src/components/issue/IssueLinkPreview.tsx b/apps/web/src/components/issue/IssueLinkPreview.tsx index c4082f19633a2..c7bfc1d74383b 100644 --- a/apps/web/src/components/issue/IssueLinkPreview.tsx +++ b/apps/web/src/components/issue/IssueLinkPreview.tsx @@ -68,7 +68,7 @@ export function IssueLinkPreviewFallback({ }) { const detail = useEnvironmentQuery(issueEnvironment.detail(target)).data; return detail === null ? ( -

{originalUrl}

+

{originalUrl}

) : ( ); @@ -86,22 +86,20 @@ function IssuePreviewCardBody({ detail }: { detail: IssueDetail }) { : author.login; return (
-
+
{detail.scope} {detail.displayKey} - · {state.label}
-

+

{detail.title}

-
+
{authorLabel} - · opened {createdAt} diff --git a/apps/web/src/components/issue/IssueListFilterPickers.tsx b/apps/web/src/components/issue/IssueListFilterPickers.tsx index a5dc5ce57678c..45b45c744af76 100644 --- a/apps/web/src/components/issue/IssueListFilterPickers.tsx +++ b/apps/web/src/components/issue/IssueListFilterPickers.tsx @@ -127,6 +127,7 @@ export function IssueFiltersMenu(props: { {props.projects.length > 1 || props.project ? ( { diff --git a/apps/web/src/components/sidebar/SidebarThreadRow.tsx b/apps/web/src/components/sidebar/SidebarThreadRow.tsx index 8e356191cfe40..6d44cb4159bc2 100644 --- a/apps/web/src/components/sidebar/SidebarThreadRow.tsx +++ b/apps/web/src/components/sidebar/SidebarThreadRow.tsx @@ -1272,7 +1272,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP event.stopPropagation()} > From 16ccc7b5528bbd143ddcd4e3ba299cf3cc7db980 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:12:50 +0000 Subject: [PATCH 07/14] fix(web): linked issue rows use the page row hover and press classes --- apps/web/src/components/chat/ThreadDetailsIssueRows.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx index 270ef329fb1fa..11f7ce877bbd2 100644 --- a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx +++ b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx @@ -23,6 +23,13 @@ import { PullRequestActorLabel } from "../pullRequest/pullRequestPresentation"; import { ThreadDetailsControl } from "./ThreadDetailsControl"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; +const LINKED_ISSUE_ROW_CLASS = cn( + PULL_REQUEST_ROW_CLASS, + PAGE_ROW_HOVER_CLASS, + PAGE_ROW_PRESS_CLASS, + "px-2", +); + function LinkedIssueRow({ link, threadRef, @@ -132,7 +139,7 @@ function LinkedIssueRow({ ) : ( {lines} From 9377b684a15ed117604f0a4d415dbece87b40725 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:15:08 +0000 Subject: [PATCH 08/14] fix(web): linked issue rows use the page row classes --- .../chat/ThreadDetailsIssueRows.tsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx index 11f7ce877bbd2..9ae8790a832f1 100644 --- a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx +++ b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx @@ -18,18 +18,15 @@ import { PULL_REQUEST_ROW_NUMBER_CLASS, PullRequestRowLines, } from "../pullRequest/PullRequestListRow"; -import { PAGE_ROW_HOVER_CLASS, PAGE_ROW_PRESS_CLASS } from "../pullRequest/PullRequestRow"; +import { + PAGE_ROW_CLASS, + PAGE_ROW_HOVER_CLASS, + PAGE_ROW_PRESS_CLASS, +} from "../pullRequest/PullRequestRow"; import { PullRequestActorLabel } from "../pullRequest/pullRequestPresentation"; import { ThreadDetailsControl } from "./ThreadDetailsControl"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; -const LINKED_ISSUE_ROW_CLASS = cn( - PULL_REQUEST_ROW_CLASS, - PAGE_ROW_HOVER_CLASS, - PAGE_ROW_PRESS_CLASS, - "px-2", -); - function LinkedIssueRow({ link, threadRef, @@ -115,9 +112,7 @@ function LinkedIssueRow({ return compact ? (
- } />} - > + } />}> {glyph} {title} @@ -139,7 +134,12 @@ function LinkedIssueRow({ ) : ( {lines} From 9a13e9efd663fdbf4a645a5fcece5929b0b0aff6 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:15:35 +0000 Subject: [PATCH 09/14] style: match the repo formatter --- apps/web/src/components/DiffPanel.tsx | 6 +++++- apps/web/src/components/GitActionsControl.tsx | 10 +++++++--- .../ProviderUpdateLaunchNotification.tsx | 4 +++- apps/web/src/components/chat/ChatComposer.tsx | 4 +++- .../chat/ComposerPendingApprovalActions.tsx | 4 +++- .../components/chat/ComposerPrimaryActions.tsx | 8 +++++++- .../web/src/components/chat/TimelineOverlays.tsx | 16 +++++++++------- apps/web/src/components/device/DevicePanel.tsx | 4 +++- .../components/issue/IssueCommentComposer.tsx | 5 ++++- .../src/components/issue/IssueLinkPreview.tsx | 4 +--- .../settings/AcpSessionManagementSection.tsx | 6 +++++- .../components/settings/AddEnvironmentDialog.tsx | 8 ++++---- .../settings/AppearanceSettingsPanel.tsx | 6 +++++- .../settings/AuthorizedClientsSettings.tsx | 3 ++- .../components/settings/NotificationSettings.tsx | 6 +++++- .../settings/ProjectDefaultsSettings.tsx | 6 +++++- .../src/components/settings/SettingsPanels.tsx | 6 +++++- .../settings/TelemetryExportSettings.tsx | 3 ++- 18 files changed, 78 insertions(+), 31 deletions(-) diff --git a/apps/web/src/components/DiffPanel.tsx b/apps/web/src/components/DiffPanel.tsx index da1b60bc0bbf3..aecc95d9a68a3 100644 --- a/apps/web/src/components/DiffPanel.tsx +++ b/apps/web/src/components/DiffPanel.tsx @@ -998,7 +998,11 @@ export default function DiffPanel({ {commit.subject} - {formatRelativeTimeLabel(commit.committedAt, Date.parse(now), messages)} + {formatRelativeTimeLabel( + commit.committedAt, + Date.parse(now), + messages, + )} diff --git a/apps/web/src/components/GitActionsControl.tsx b/apps/web/src/components/GitActionsControl.tsx index 070e26be1a992..921a80ffd159f 100644 --- a/apps/web/src/components/GitActionsControl.tsx +++ b/apps/web/src/components/GitActionsControl.tsx @@ -1222,7 +1222,11 @@ export default function GitActionsControl({ return ( <> {presentation === "shortcut" ? null : displayMode === "panel" && isRepo ? ( -
+
{showActions ? ( - View changes - + View changes + {!showActions ? changesSummary : null} {keybindings && ( diff --git a/apps/web/src/components/ProviderUpdateLaunchNotification.tsx b/apps/web/src/components/ProviderUpdateLaunchNotification.tsx index b075f190dd454..16d2dfaccba32 100644 --- a/apps/web/src/components/ProviderUpdateLaunchNotification.tsx +++ b/apps/web/src/components/ProviderUpdateLaunchNotification.tsx @@ -65,7 +65,9 @@ export function ProviderUpdateLaunchNotification() { onClick: () => { void writeTextToClipboard(command, { target: "update command", - unavailableMessage: msg("Clipboard API is unavailable while copying update command."), + unavailableMessage: msg( + "Clipboard API is unavailable while copying update command.", + ), failureMessage: msg("Failed to copy update command to the clipboard."), }); }, diff --git a/apps/web/src/components/chat/ChatComposer.tsx b/apps/web/src/components/chat/ChatComposer.tsx index 823a17b508297..fa737fabda294 100644 --- a/apps/web/src/components/chat/ChatComposer.tsx +++ b/apps/web/src/components/chat/ChatComposer.tsx @@ -3924,7 +3924,9 @@ export function ChatComposer(props: ChatComposerProps) { : environmentDisconnected ? m(DISCONNECTED_COMPOSER_PLACEHOLDER) : (offeredPromptSuggestion ?? - gt("Ask anything, @tag files/folders, $use skills, or / for commands")) + gt( + "Ask anything, @tag files/folders, $use skills, or / for commands", + )) } placeholderSuffix={ offeredPromptSuggestion !== null ? ( diff --git a/apps/web/src/components/chat/ComposerPendingApprovalActions.tsx b/apps/web/src/components/chat/ComposerPendingApprovalActions.tsx index 642a08872f8c5..e257e12abd6fd 100644 --- a/apps/web/src/components/chat/ComposerPendingApprovalActions.tsx +++ b/apps/web/src/components/chat/ComposerPendingApprovalActions.tsx @@ -133,7 +133,9 @@ export function ComposerPendingApprovalActions({ } + render={ +
diff --git a/apps/web/src/components/device/DevicePanel.tsx b/apps/web/src/components/device/DevicePanel.tsx index 45bcce787bc6e..be5d7e6582feb 100644 --- a/apps/web/src/components/device/DevicePanel.tsx +++ b/apps/web/src/components/device/DevicePanel.tsx @@ -484,7 +484,9 @@ export function DevicePanel(props: { ? grouped.map((group) => (

- {group.platform === "ios" ? gt("iOS Simulators") : gt("Android Emulators")} + {group.platform === "ios" + ? gt("iOS Simulators") + : gt("Android Emulators")}

{group.devices.map((device) => ( diff --git a/apps/web/src/components/issue/IssueCommentComposer.tsx b/apps/web/src/components/issue/IssueCommentComposer.tsx index de0370e4a04af..257bce96a6aa3 100644 --- a/apps/web/src/components/issue/IssueCommentComposer.tsx +++ b/apps/web/src/components/issue/IssueCommentComposer.tsx @@ -9,7 +9,10 @@ import { TextFieldSpeechControls, useTextFieldSpeech } from "~/speech/useTextFie import { issueEnvironment } from "~/state/issues"; import { useAtomCommand } from "~/state/use-atom-command"; -import { COMPOSER_PILL_SLOT_BUTTON_CLASS_NAME, ComposerSendPill } from "../chat/ComposerPrimaryActions"; +import { + COMPOSER_PILL_SLOT_BUTTON_CLASS_NAME, + ComposerSendPill, +} from "../chat/ComposerPrimaryActions"; import { ComposerSurface } from "../chat/ComposerSurface"; import { readableFailure } from "../pullRequest/pullRequestDetail.logic"; import { Spinner } from "../ui/spinner"; diff --git a/apps/web/src/components/issue/IssueLinkPreview.tsx b/apps/web/src/components/issue/IssueLinkPreview.tsx index c7bfc1d74383b..a7d1ea5ef1c3f 100644 --- a/apps/web/src/components/issue/IssueLinkPreview.tsx +++ b/apps/web/src/components/issue/IssueLinkPreview.tsx @@ -94,9 +94,7 @@ function IssuePreviewCardBody({ detail }: { detail: IssueDetail }) { {state.label}
-

- {detail.title} -

+

{detail.title}

{authorLabel} diff --git a/apps/web/src/components/settings/AcpSessionManagementSection.tsx b/apps/web/src/components/settings/AcpSessionManagementSection.tsx index ae63d81536061..5d0eb7cd1555c 100644 --- a/apps/web/src/components/settings/AcpSessionManagementSection.tsx +++ b/apps/web/src/components/settings/AcpSessionManagementSection.tsx @@ -434,7 +434,11 @@ function InstanceSessionManagement( props.onProjectChange(value as ProjectId); }} > - + {props.projects.find((project) => project.id === projectId)?.title} diff --git a/apps/web/src/components/settings/AddEnvironmentDialog.tsx b/apps/web/src/components/settings/AddEnvironmentDialog.tsx index 05f768e6912d9..925d075b75145 100644 --- a/apps/web/src/components/settings/AddEnvironmentDialog.tsx +++ b/apps/web/src/components/settings/AddEnvironmentDialog.tsx @@ -646,10 +646,10 @@ export function AddEnvironmentDialog({ > {isAddingSavedBackend - ? gt("Adding…") - : routeTarget - ? gt("Add route") - : gt("Add environment")} + ? gt("Adding…") + : routeTarget + ? gt("Add route") + : gt("Add environment")}
diff --git a/apps/web/src/components/settings/AppearanceSettingsPanel.tsx b/apps/web/src/components/settings/AppearanceSettingsPanel.tsx index f1ecff2aaf4da..a88f250721185 100644 --- a/apps/web/src/components/settings/AppearanceSettingsPanel.tsx +++ b/apps/web/src/components/settings/AppearanceSettingsPanel.tsx @@ -312,7 +312,11 @@ export function AppearanceSettingsPanel() { updateSettings({ effortDisplay: value }); }} > - + {m(EFFORT_DISPLAY_LABELS[settings.effortDisplay])} diff --git a/apps/web/src/components/settings/AuthorizedClientsSettings.tsx b/apps/web/src/components/settings/AuthorizedClientsSettings.tsx index 131effc9bb9c8..456224c465215 100644 --- a/apps/web/src/components/settings/AuthorizedClientsSettings.tsx +++ b/apps/web/src/components/settings/AuthorizedClientsSettings.tsx @@ -1062,7 +1062,8 @@ export function ReachableAddressRow({ }) { const gt = useGT(); const { copyToClipboard, isCopied } = useCopyToClipboard({ - onCopy: () => toastManager.add({ type: "success", title: resolveMessage(msg("Address copied")) }), + onCopy: () => + toastManager.add({ type: "success", title: resolveMessage(msg("Address copied")) }), onError: (error) => toastManager.add( stackedThreadToast({ diff --git a/apps/web/src/components/settings/NotificationSettings.tsx b/apps/web/src/components/settings/NotificationSettings.tsx index 7fbf30a4f652e..b9b0a4312007f 100644 --- a/apps/web/src/components/settings/NotificationSettings.tsx +++ b/apps/web/src/components/settings/NotificationSettings.tsx @@ -74,7 +74,11 @@ export function NotificationSettings() { updateSettings({ notificationMode: value }); }} > - + {m(NOTIFICATION_MODE_LABELS[mode])} diff --git a/apps/web/src/components/settings/ProjectDefaultsSettings.tsx b/apps/web/src/components/settings/ProjectDefaultsSettings.tsx index 97d5576c6afc4..a6c2666e773c7 100644 --- a/apps/web/src/components/settings/ProjectDefaultsSettings.tsx +++ b/apps/web/src/components/settings/ProjectDefaultsSettings.tsx @@ -651,7 +651,11 @@ export function WorktreeSubmodulesRow() { if (isWorktreeSubmodules(value)) updateSettings({ worktreeSubmodules: value }); }} > - }> + } + > {(value: string | null) => isWorktreeSubmodules(value) diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx index 3e626a7ca14b2..f12cb8fdc6891 100644 --- a/apps/web/src/components/settings/SettingsPanels.tsx +++ b/apps/web/src/components/settings/SettingsPanels.tsx @@ -1840,7 +1840,11 @@ function ScopedCompactIdleThreadsRow() { if (mode) updateSettings({ idleCompaction: mode.value }); }} > - + {(value: string | null) => value === null diff --git a/apps/web/src/components/settings/TelemetryExportSettings.tsx b/apps/web/src/components/settings/TelemetryExportSettings.tsx index 7f4afbf619fa7..9b1c4782d56a0 100644 --- a/apps/web/src/components/settings/TelemetryExportSettings.tsx +++ b/apps/web/src/components/settings/TelemetryExportSettings.tsx @@ -73,7 +73,8 @@ function endpointStatus( dot: "bg-muted-foreground/40", }; } - if (check?.url !== url) return { label: resolve(msg("Not checked")), dot: "bg-muted-foreground/40" }; + if (check?.url !== url) + return { label: resolve(msg("Not checked")), dot: "bg-muted-foreground/40" }; const { result } = check; if (result === null) return { label: resolve(msg("Checking…")), dot: "bg-warning" }; switch (result._tag) { From db029bfe3b92a8a199b1b41997cc725788399922 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:27:07 +0000 Subject: [PATCH 10/14] test(web): main's issue badge and preview-browser tests follow layer 5's look --- apps/web/src/components/ChatView.browser.test.tsx | 2 +- .../components/files/FilePreviewPanel.browser.test.tsx | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/web/src/components/ChatView.browser.test.tsx b/apps/web/src/components/ChatView.browser.test.tsx index 564e034dd9ed3..e7ec563f98e5e 100644 --- a/apps/web/src/components/ChatView.browser.test.tsx +++ b/apps/web/src/components/ChatView.browser.test.tsx @@ -216,7 +216,7 @@ it("opens a linked Linear issue from an inactive thread's sidebar badge", async name: `Issue ${issue.displayKey}: ${issue.title}, Open`, }); await expect.element(badge).toBeVisible(); - expect(badge.element().querySelector("svg")).toHaveClass(/text-emerald-600/); + expect(badge.element().querySelector("svg")).toHaveClass(/text-success-foreground/); await userEvent.hover(badge); const issueName = `Issue ${issue.displayKey}: ${liveTitle}`; const previewLink = page.getByRole("link", { name: issueName }); diff --git a/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx b/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx index d697d0e520074..e13023d407dd2 100644 --- a/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx +++ b/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx @@ -473,11 +473,14 @@ describe("open file in preview browser", () => { truncated: false, }; await using screen = await render(filePreview("page.html")); - const button = screen.getByRole("button", { name: "Open file in preview browser" }); + const openInBrowser = async () => { + await userEvent.click(screen.getByRole("button", { name: "More file actions" })); + await userEvent.click(screen.getByRole("menuitem", { name: "Open file in preview browser" })); + }; - await userEvent.click(button); + await openInBrowser(); await vi.waitFor(() => expect(state.openedBrowserUrls).toHaveLength(1)); - await userEvent.click(button); + await openInBrowser(); await vi.waitFor(() => expect(state.openedBrowserUrls).toHaveLength(2)); expect(state.openedBrowserUrls[1], "the second click reused the first signed URL").not.toBe( From ee76adf02bf21c4833055058c46f492be3d0f306 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:28:09 +0000 Subject: [PATCH 11/14] test(web): find the preview-browser menu item in its portal --- .../src/components/files/FilePreviewPanel.browser.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx b/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx index e13023d407dd2..953deb8f5eb6c 100644 --- a/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx +++ b/apps/web/src/components/files/FilePreviewPanel.browser.test.tsx @@ -3,7 +3,7 @@ import { EnvironmentId, ThreadId, type ProjectReadFileResult } from "@t3tools/co import { AsyncResult } from "effect/reactivity"; import { StrictMode, type ReactNode } from "react"; import { describe, expect, it, vi } from "vite-plus/test"; -import { userEvent } from "vite-plus/test/browser"; +import { page, userEvent } from "vite-plus/test/browser"; import { act, fakeTimers, render } from "../../../test/render"; import appCss from "~/index.css?inline"; import { isMacPlatform } from "~/lib/utils"; @@ -475,7 +475,7 @@ describe("open file in preview browser", () => { await using screen = await render(filePreview("page.html")); const openInBrowser = async () => { await userEvent.click(screen.getByRole("button", { name: "More file actions" })); - await userEvent.click(screen.getByRole("menuitem", { name: "Open file in preview browser" })); + await userEvent.click(page.getByRole("menuitem", { name: "Open file in preview browser" })); }; await openInBrowser(); From 7efb845b82cea7a4f0e1e970569dc7fe0540dfd2 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 02:31:35 +0000 Subject: [PATCH 12/14] fix(web): subagent group row keeps main's translated label and resolvers --- .../web/src/components/chat/TimelineV2EventRow.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/chat/TimelineV2EventRow.tsx b/apps/web/src/components/chat/TimelineV2EventRow.tsx index 29ba316352d26..e5c1e0d9e1715 100644 --- a/apps/web/src/components/chat/TimelineV2EventRow.tsx +++ b/apps/web/src/components/chat/TimelineV2EventRow.tsx @@ -8,6 +8,7 @@ import { subagentGroupSummary, summarizeSubagentStatuses, } from "@t3tools/client-runtime/state/subagent-display"; +import { useGT, useMessages } from "gt-react"; import { memo, use, useState } from "react"; import { ChevronDownIcon } from "lucide-react"; import { cn } from "~/lib/utils"; @@ -57,6 +58,8 @@ export const V2SubagentGroup = memo(function V2SubagentGroup({ row: Extract; }) { const ctx = use(TimelineRowCtx); + const gt = useGT(); + const m = useMessages(); const groupId = `subagent-group:${row.id}`; const [expanded, setExpanded] = useState(() => ctx.workGroupViewState.expandedEntries.has(groupId), @@ -79,9 +82,14 @@ export const V2SubagentGroup = memo(function V2SubagentGroup({ completedAt: live?.completedAt ?? item.completedAt, }; }); - const summary = subagentGroupSummary(agents); - const label = `${members.length} ${members.length === 1 ? "subagent" : "subagents"}`; - const statusSummary = summarizeSubagentStatuses(agents.map(({ status }) => status)); + const summary = subagentGroupSummary(agents, m); + const label = gt("{count, plural, one {{count} subagent} other {{count} subagents}}", { + count: members.length, + }); + const statusSummary = summarizeSubagentStatuses( + agents.map(({ status }) => status), + m, + ); const toggleExpanded = (open: boolean) => { ctx.onToggleWorkEntry(row.id, !open); if (open) ctx.workGroupViewState.expandedEntries.add(groupId); From 032bd44dedceae8f20260dab19ca67a8e511ee1e Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 03:14:32 +0000 Subject: [PATCH 13/14] fix(web): main's new issue views share layer 6's lines --- apps/web/src/components/ThreadLinkPicker.tsx | 6 +-- .../chat/ThreadDetailsIssueRows.tsx | 44 ++++++++++--------- .../src/components/issue/IssueLinkPreview.tsx | 22 +++++----- .../issue/IssueListFilterPickers.tsx | 3 +- .../issue/issuesSearch.logic.test.ts | 4 +- .../components/issue/issuesSearch.logic.ts | 42 +++++++++++++++--- 6 files changed, 78 insertions(+), 43 deletions(-) diff --git a/apps/web/src/components/ThreadLinkPicker.tsx b/apps/web/src/components/ThreadLinkPicker.tsx index 78abff29c3edb..aa829572d57b3 100644 --- a/apps/web/src/components/ThreadLinkPicker.tsx +++ b/apps/web/src/components/ThreadLinkPicker.tsx @@ -49,7 +49,7 @@ export function ThreadLinkPicker({ {candidates.length === 0 ? ( -
+
No active threads found.
) : ( @@ -65,14 +65,14 @@ export function ThreadLinkPicker({ {thread.title || gt("Untitled thread")} - + {projectNames.get(thread.projectId)} {linked ? ( <> - + Linked diff --git a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx index 9ae8790a832f1..00c88d3128634 100644 --- a/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx +++ b/apps/web/src/components/chat/ThreadDetailsIssueRows.tsx @@ -18,12 +18,12 @@ import { PULL_REQUEST_ROW_NUMBER_CLASS, PullRequestRowLines, } from "../pullRequest/PullRequestListRow"; +import { PullRequestActorLabel } from "../pullRequest/pullRequestPresentation"; import { PAGE_ROW_CLASS, PAGE_ROW_HOVER_CLASS, PAGE_ROW_PRESS_CLASS, } from "../pullRequest/PullRequestRow"; -import { PullRequestActorLabel } from "../pullRequest/pullRequestPresentation"; import { ThreadDetailsControl } from "./ThreadDetailsControl"; import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; @@ -110,25 +110,29 @@ function LinkedIssueRow({ ); return compact ? ( -
- - } />}> - {glyph} - {title} - - -
{lines}
-
-
-
- {link.displayKey} - {trackerIcon} - {comments} +
+ {glyph} +
+ + } />} + > + {title} + + +
{lines}
+
+
+
+ {link.displayKey} + {trackerIcon} + {comments} +
) : ( diff --git a/apps/web/src/components/issue/IssueLinkPreview.tsx b/apps/web/src/components/issue/IssueLinkPreview.tsx index a7d1ea5ef1c3f..1f1041eae9306 100644 --- a/apps/web/src/components/issue/IssueLinkPreview.tsx +++ b/apps/web/src/components/issue/IssueLinkPreview.tsx @@ -68,7 +68,7 @@ export function IssueLinkPreviewFallback({ }) { const detail = useEnvironmentQuery(issueEnvironment.detail(target)).data; return detail === null ? ( -

{originalUrl}

+

{originalUrl}

) : ( ); @@ -86,22 +86,24 @@ function IssuePreviewCardBody({ detail }: { detail: IssueDetail }) { : author.login; return (
-
+
{detail.scope} {detail.displayKey} - + {state.label}
-

{detail.title}

-
+

{detail.title}

+
- {authorLabel} - - - opened {createdAt} - + + {authorLabel} + + + opened {createdAt} + +
diff --git a/apps/web/src/components/issue/IssueListFilterPickers.tsx b/apps/web/src/components/issue/IssueListFilterPickers.tsx index 45b45c744af76..b38bfc889bc1e 100644 --- a/apps/web/src/components/issue/IssueListFilterPickers.tsx +++ b/apps/web/src/components/issue/IssueListFilterPickers.tsx @@ -7,6 +7,7 @@ import type { } from "@t3tools/contracts"; import { FolderGit2Icon, + FolderIcon, LayersIcon, ListFilterIcon, TagIcon, @@ -127,7 +128,7 @@ export function IssueFiltersMenu(props: { {props.projects.length > 1 || props.project ? ( { diff --git a/apps/web/src/components/issue/issuesSearch.logic.test.ts b/apps/web/src/components/issue/issuesSearch.logic.test.ts index 2d4aad1072b01..4592fe76a06cb 100644 --- a/apps/web/src/components/issue/issuesSearch.logic.test.ts +++ b/apps/web/src/components/issue/issuesSearch.logic.test.ts @@ -39,8 +39,8 @@ describe("issueFilterProjects", () => { new Map([[environmentId, "laptop"]]), ); expect(choices.map((choice) => [choice.id, choice.title])).toEqual([ - ["main", "t3code · laptop · /work/main"], - ["worktree", "t3code · laptop · /work/worktree"], + ["main", "t3code (laptop, /work/main)"], + ["worktree", "t3code (laptop, /work/worktree)"], ]); }); }); diff --git a/apps/web/src/components/issue/issuesSearch.logic.ts b/apps/web/src/components/issue/issuesSearch.logic.ts index 808acd1242f0d..730a7954e4be7 100644 --- a/apps/web/src/components/issue/issuesSearch.logic.ts +++ b/apps/web/src/components/issue/issuesSearch.logic.ts @@ -1,4 +1,3 @@ -import { pullRequestFilterProjects } from "@t3tools/client-runtime/pull-request-project-filter"; import type { EnvironmentProject } from "@t3tools/client-runtime/state/models"; import type { EnvironmentId, ProjectId } from "@t3tools/contracts"; @@ -36,14 +35,43 @@ export const issuesSearchFromUrl = (raw: Record): IssuesSearch key: bounded(raw.key), }); +type Labeled = Project & { + readonly label: string; + readonly details: ReadonlyArray; +}; + +const distinguish = ( + projects: ReadonlyArray>, + detail: (project: Project) => string, +): ReadonlyArray> => { + const counts = new Map(); + const key = (project: Labeled) => JSON.stringify([project.label, project.details]); + for (const project of projects) counts.set(key(project), (counts.get(key(project)) ?? 0) + 1); + return projects.map((project) => + (counts.get(key(project)) ?? 0) > 1 + ? { ...project, details: [...project.details, detail(project)] } + : project, + ); +}; + /** One choice per project: projects on one repository can read different Linear teams. */ export const issueFilterProjects = ( projects: ReadonlyArray, environmentLabels: ReadonlyMap, -) => - pullRequestFilterProjects( - projects - .filter((project) => !project.isScratch) - .map((project) => ({ ...project, repositoryIdentity: null })), - environmentLabels, +) => { + const labeled = projects + .filter((project) => !project.isScratch) + .map((project) => ({ ...project, label: project.title, details: [] as string[] })); + const byServer = distinguish( + labeled, + (project) => environmentLabels.get(project.environmentId) ?? project.environmentId, ); + const byPath = distinguish(byServer, (project) => project.workspaceRoot); + const byEnvironment = distinguish(byPath, (project) => project.environmentId); + return distinguish(byEnvironment, (project) => project.id) + .map(({ label, details, ...project }) => ({ + ...project, + title: details.length === 0 ? label : `${label} (${details.join(", ")})`, + })) + .toSorted((left, right) => left.title.localeCompare(right.title)); +}; From bde9d0f7512a816f51cd77addd06b2919cd6eb24 Mon Sep 17 00:00:00 2001 From: maria-rcks Date: Thu, 19 Nov 2026 04:33:32 +0000 Subject: [PATCH 14/14] fix(web): terminal close prompts use main's translated label --- apps/web/src/components/chat/useChatTerminalActions.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/chat/useChatTerminalActions.ts b/apps/web/src/components/chat/useChatTerminalActions.ts index da96781b7d586..6b48d3f19e459 100644 --- a/apps/web/src/components/chat/useChatTerminalActions.ts +++ b/apps/web/src/components/chat/useChatTerminalActions.ts @@ -10,7 +10,7 @@ import type { ComposerHandleRef } from "../../composerHandleContext"; import type { selectThreadTerminalUiState } from "../../terminalUiStateStore"; import { useStableCallback } from "../../hooks/useStableCallback"; import { useThreadTerminalActions } from "../terminal/useThreadTerminalActions"; -import { getTerminalLabel } from "@t3tools/shared/terminalLabels"; +import { getTerminalLabel } from "@t3tools/shared/terminalLabelsCopy"; import { AuthTerminalReadScope, AuthTerminalOperateScope, @@ -394,7 +394,7 @@ export function useChatTerminalActions(input: ChatTerminalActionsInput) { const closePanelTerminalStable = useStableCallback(closePanelTerminal); const requestCloseTerminal = (terminalId: string) => { if (!hasTerminalWriteAccess()) return; - const label = activeTerminalLabelsById.get(terminalId) ?? getTerminalLabel(terminalId); + const label = activeTerminalLabelsById.get(terminalId) ?? getTerminalLabel(terminalId, m); void confirmTerminalClose([label]).then((confirmed) => { if (confirmed && readEnvironmentScope(environmentId, AuthTerminalOperateScope)) { closeTerminal(terminalId); @@ -404,7 +404,7 @@ export function useChatTerminalActions(input: ChatTerminalActionsInput) { const requestCloseTerminalStable = useStableCallback(requestCloseTerminal); const requestClosePanelTerminal = (terminalId: string) => { if (!hasTerminalWriteAccess()) return; - const label = activeTerminalLabelsById.get(terminalId) ?? getTerminalLabel(terminalId); + const label = activeTerminalLabelsById.get(terminalId) ?? getTerminalLabel(terminalId, m); void confirmTerminalClose([label]).then((confirmed) => { if (confirmed && readEnvironmentScope(environmentId, AuthTerminalOperateScope)) { closePanelTerminal(terminalId);