Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: shrink the resume glyph, trim the queueing hint and round the scroll corner (#11179)
Michael Han91f904342308
diff --git a/studio/frontend/src/components/assistant-ui/prompt-queue-list.tsx b/studio/frontend/src/components/assistant-ui/prompt-queue-list.tsxindex 2e4a9ead5cc..d82774fe09f 100644--- a/studio/frontend/src/components/assistant-ui/prompt-queue-list.tsx+++ b/studio/frontend/src/components/assistant-ui/prompt-queue-list.tsx@@ -151,327 +151,345 @@ export function PromptQueueList({}return (+ // Browsers paint the scrollbar outside the scroller's own radius, so the+ // rounding and the clip live on this frame instead.<div- ref={listRef}- className="relative z-0 mx-3 mb-[-8px] max-h-[28dvh] overflow-y-auto rounded-t-[20px] border border-border/60 bg-background px-1.5 pt-1 pb-3 text-muted-foreground sm:mx-5 sm:px-2 dark:bg-[color-mix(in_srgb,var(--card)_50%,var(--background))] [&_button]:border-0 [&_button]:shadow-none [&_.aui-button-icon:focus-visible]:bg-accent"- aria-label={t("promptQueue.regionLabel", {- current: entry.current,- total: entry.total,- })}+ data-queue-frame=""+ className="relative z-0 mx-3 mb-[-8px] overflow-hidden rounded-t-[20px] border border-border/60 bg-background sm:mx-5 dark:bg-[color-mix(in_srgb,var(--card)_50%,var(--background))]">- <p id={instructionsId} className="sr-only">- {t("promptQueue.reorderInstructions")}- </p>- <div role="status" aria-live="polite" className="sr-only">- {announcement}- </div>- <div role="list" aria-label={t("promptQueue.listLabel")}>- {items.map((item, index) => {- const isEditing = editingItem?.id === item.id;- const position = index + 1;- const moveIndex = movableItems.findIndex(- (candidate) => candidate.id === item.id,- );- const canMove =- !activeEditingId && moveIndex >= 0 && movableItems.length > 1;- const previous = movableItems[moveIndex - 1];- const next = movableItems[moveIndex + 1];- return (- <div- key={item.id}- role="listitem"- data-queue-item-id={item.id}- data-queue-dragging={draggingId === item.id || undefined}- aria-label={t("promptQueue.itemLabel", {- position,- total: items.length,- prompt: item.prompt,- })}- className={cn(- "group relative rounded-lg transition-colors",- draggingId && "will-change-transform",- draggingId === item.id && "z-10 opacity-50",- )}- >- {isEditing ? (- <div className="group/queue-editor flex flex-wrap items-center justify-end gap-2 px-1 py-2">- <div className="w-full overflow-hidden rounded-lg border-0 bg-muted/40 p-3 has-[:focus-visible]:bg-muted dark:bg-card dark:has-[:focus-visible]:bg-accent">- <textarea- ref={inputRef}- value={draft}- rows={2}- onChange={(event) => setDraft(event.currentTarget.value)}- onCompositionStart={() => setComposing(true)}- onCompositionUpdate={() => setComposing(true)}- onCompositionEnd={() => setComposing(false)}- // Blur commits or cancels any composition first, so it is- // a safe unconditional reset.- onBlur={() => setComposing(false)}- onKeyDown={(event) => {- // The candidate window owns this key, Escape included:- // cancelling here would discard the draft instead.- if (- event.nativeEvent.isComposing ||- event.nativeEvent.keyCode === 229- ) {- setComposing(true);- return;+ <div+ ref={listRef}+ className="max-h-[28dvh] overflow-y-auto px-1.5 pt-1 pb-3 text-muted-foreground sm:px-2 [&_button]:border-0 [&_button]:shadow-none [&_.aui-button-icon:focus-visible]:bg-accent"+ aria-label={t("promptQueue.regionLabel", {+ current: entry.current,+ total: entry.total,+ })}+ >+ <p id={instructionsId} className="sr-only">+ {t("promptQueue.reorderInstructions")}+ </p>+ <div role="status" aria-live="polite" className="sr-only">+ {announcement}+ </div>+ <div role="list" aria-label={t("promptQueue.listLabel")}>+ {items.map((item, index) => {+ const isEditing = editingItem?.id === item.id;+ const position = index + 1;+ const moveIndex = movableItems.findIndex(+ (candidate) => candidate.id === item.id,+ );+ const canMove =+ !activeEditingId && moveIndex >= 0 && movableItems.length > 1;+ const previous = movableItems[moveIndex - 1];+ const next = movableItems[moveIndex + 1];+ return (+ <div+ key={item.id}+ role="listitem"+ data-queue-item-id={item.id}+ data-queue-dragging={draggingId === item.id || undefined}+ aria-label={t("promptQueue.itemLabel", {+ position,+ total: items.length,+ prompt: item.prompt,+ })}+ className={cn(+ "group relative rounded-lg transition-colors",+ draggingId && "will-change-transform",+ draggingId === item.id && "z-10 opacity-50",+ )}+ >+ {isEditing ? (+ <div className="group/queue-editor flex flex-wrap items-center justify-end gap-2 px-1 py-2">+ <div className="w-full overflow-hidden rounded-lg border-0 bg-muted/40 p-3 has-[:focus-visible]:bg-muted dark:bg-card dark:has-[:focus-visible]:bg-accent">+ <textarea+ ref={inputRef}+ value={draft}+ rows={2}+ onChange={(event) =>+ setDraft(event.currentTarget.value)}- if (composingRef.current) {- // Candidate-confirming Enter can arrive as- // non-composing; keep it gated. It follows the- // composition immediately, so the gate is not- // re-armed here and a stuck flag times out.- if (event.key === "Enter") {- if (!event.shiftKey) event.preventDefault();+ onCompositionStart={() => setComposing(true)}+ onCompositionUpdate={() => setComposing(true)}+ onCompositionEnd={() => setComposing(false)}+ // Blur commits or cancels any composition first, so it is+ // a safe unconditional reset.+ onBlur={() => setComposing(false)}+ onKeyDown={(event) => {+ // The candidate window owns this key, Escape included:+ // cancelling here would discard the draft instead.+ if (+ event.nativeEvent.isComposing ||+ event.nativeEvent.keyCode === 229+ ) {+ setComposing(true);return;}- // Any other key means the composition really ended.- setComposing(false);- }- if (event.key === "Escape") {+ if (composingRef.current) {+ // Candidate-confirming Enter can arrive as+ // non-composing; keep it gated. It follows the+ // composition immediately, so the gate is not+ // re-armed here and a stuck flag times out.+ if (event.key === "Enter") {+ if (!event.shiftKey) event.preventDefault();+ return;+ }+ // Any other key means the composition really ended.+ setComposing(false);+ }+ if (event.key === "Escape") {+ event.preventDefault();+ event.stopPropagation();+ finishEditing();+ return;+ }+ // Same chord as the composer send. The helper owns the+ // repeat and Shift+Enter guards.+ if (+ composerSubmitIntent(+ {+ key: event.key,+ metaKey: event.metaKey,+ ctrlKey: event.ctrlKey,+ shiftKey: event.shiftKey,+ altKey: event.altKey,+ repeat: event.repeat,+ isComposing: event.nativeEvent.isComposing,+ keyCode: event.nativeEvent.keyCode,+ },+ sendShortcut,+ )+ ) {+ event.preventDefault();+ event.stopPropagation();+ saveEditing();+ }+ }}+ // Negative margins move the resize grip out to the corner,+ // stopping short of the radius so it is not clipped; the+ // matching padding keeps the text where it was.+ className="-mr-1.5 -mb-1.5 block max-h-36 min-h-12 w-[calc(100%+0.375rem)] resize-y border-0 bg-transparent pt-0 pr-1.5 pb-1.5 pl-1 text-sm text-foreground outline-none"+ aria-label={t("promptQueue.editLabel", { position })}+ />+ </div>+ <span+ aria-hidden="true"+ className="invisible mr-auto text-xs font-medium text-foreground group-has-[textarea:focus-visible]/queue-editor:visible"+ >+ {t("promptQueue.editingHint")}+ </span>+ <Button+ type="button"+ variant="ghost"+ size="sm"+ className="focus-visible:bg-accent"+ onClick={finishEditing}+ >+ {t("promptQueue.cancel")}+ </Button>+ <Button+ type="button"+ size="sm"+ className="focus-visible:bg-primary/80"+ disabled={!draft.trim()}+ onClick={saveEditing}+ >+ {t("promptQueue.save")}+ </Button>+ </div>+ ) : (+ <div className="flex min-h-11 items-center gap-1 sm:min-h-12">+ <TooltipIconButton+ type="button"+ tooltip={t("promptQueue.dragTooltip")}+ aria-label={t("promptQueue.reorderLabel", {+ position,+ total: items.length,+ })}+ aria-describedby={instructionsId}+ className="h-8 w-4 shrink-0 touch-none cursor-grab text-muted-foreground/50 hover:bg-transparent hover:text-muted-foreground/50 active:cursor-grabbing pointer-coarse:h-11 pointer-coarse:w-8 dark:hover:bg-transparent"+ disabled={!canMove}+ onPointerDown={(event) => onPointerDown(event, item.id)}+ onPointerMove={onPointerMove}+ onPointerUp={onPointerUp}+ onPointerCancel={cancelDrag}+ onLostPointerCapture={cancelDrag}+ onKeyDown={(event) => {+ if (event.key === "Escape" && cancelDrag()) {event.preventDefault();event.stopPropagation();- finishEditing();return;}- // Same chord as the composer send. The helper owns the- // repeat and Shift+Enter guards.- if (- composerSubmitIntent(- {- key: event.key,- metaKey: event.metaKey,- ctrlKey: event.ctrlKey,- shiftKey: event.shiftKey,- altKey: event.altKey,- repeat: event.repeat,- isComposing: event.nativeEvent.isComposing,- keyCode: event.nativeEvent.keyCode,- },- sendShortcut,- )- ) {- event.preventDefault();- event.stopPropagation();- saveEditing();- }- }}- // Negative margins move the resize grip out to the corner,- // stopping short of the radius so it is not clipped; the- // matching padding keeps the text where it was.- className="-mr-1.5 -mb-1.5 block max-h-36 min-h-12 w-[calc(100%+0.375rem)] resize-y border-0 bg-transparent pt-0 pr-1.5 pb-1.5 pl-1 text-sm text-foreground outline-none"- aria-label={t("promptQueue.editLabel", { position })}- />- </div>- <span- aria-hidden="true"- className="invisible mr-auto text-xs font-medium text-foreground group-has-[textarea:focus-visible]/queue-editor:visible"- >- {t("promptQueue.editingHint")}- </span>- <Button- type="button"- variant="ghost"- size="sm"- className="focus-visible:bg-accent"- onClick={finishEditing}- >- {t("promptQueue.cancel")}- </Button>- <Button- type="button"- size="sm"- className="focus-visible:bg-primary/80"- disabled={!draft.trim()}- onClick={saveEditing}- >- {t("promptQueue.save")}- </Button>- </div>- ) : (- <div className="flex min-h-11 items-center gap-1 sm:min-h-12">- <TooltipIconButton- type="button"- tooltip={t("promptQueue.dragTooltip")}- aria-label={t("promptQueue.reorderLabel", {- position,- total: items.length,- })}- aria-describedby={instructionsId}- className="h-8 w-4 shrink-0 touch-none cursor-grab text-muted-foreground/50 hover:bg-transparent hover:text-muted-foreground/50 active:cursor-grabbing pointer-coarse:h-11 pointer-coarse:w-8 dark:hover:bg-transparent"- disabled={!canMove}- onPointerDown={(event) => onPointerDown(event, item.id)}- onPointerMove={onPointerMove}- onPointerUp={onPointerUp}- onPointerCancel={cancelDrag}- onLostPointerCapture={cancelDrag}- onKeyDown={(event) => {- if (event.key === "Escape" && cancelDrag()) {+ const targets: Record<string, string | undefined> = {+ ArrowUp: previous?.id,+ ArrowDown: next?.id,+ Home: movableItems[0]?.id,+ End: movableItems.at(-1)?.id,+ };+ if (!(event.key in targets)) return;event.preventDefault();event.stopPropagation();- return;- }- const targets: Record<string, string | undefined> = {- ArrowUp: previous?.id,- ArrowDown: next?.id,- Home: movableItems[0]?.id,- End: movableItems.at(-1)?.id,- };- if (!(event.key in targets)) return;- event.preventDefault();- event.stopPropagation();- move(item.id, targets[event.key]);- }}- >- <GripVerticalIcon className="size-4" />- </TooltipIconButton>- <ListEndIcon- className="hidden size-4 shrink-0 text-muted-foreground/60 sm:block"- aria-hidden="true"- />- <span className="min-w-0 flex-1 truncate px-1.5 text-sm text-foreground/80">- {item.prompt}- </span>- {index === 0 && entry.paused && (- <span className="hidden shrink-0 px-1 text-xs text-muted-foreground sm:inline">- {t("promptQueue.paused")}- </span>- )}- <TooltipIconButton- type="button"- tooltip={t("promptQueue.steerTooltip")}- aria-label={t("promptQueue.steerLabel", { position })}- disabled={!item.canEdit || !item.canRemove}- className="h-8 w-auto shrink-0 gap-1.5 px-2 font-normal text-muted-foreground hover:text-foreground pointer-coarse:h-11"- onClick={() => {- setAnnouncement(- t(- onSteer(item.id)- ? "promptQueue.announceSteered"- : "promptQueue.announceSteerFailed",- ),- );- }}- >- <CornerDownRightIcon className="size-4" />- <span>{t("promptQueue.steer")}</span>- </TooltipIconButton>- <TooltipIconButton- type="button"- tooltip={t("promptQueue.removeTooltip")}- aria-label={t("promptQueue.removeLabel", { position })}- disabled={!item.canRemove}- className="size-8 shrink-0 text-muted-foreground hover:text-destructive pointer-coarse:size-11"- onClick={() => {- if (onRemove(item.id))- setAnnouncement(t("promptQueue.announceRemoved"));- }}- >- <HugeiconsIcon icon={Delete02Icon} strokeWidth={1.8} />- </TooltipIconButton>- <NonModalDropdownMenu- trigger={(triggerRef) => (- <TooltipIconButton- ref={triggerRef}- tooltip={t("promptQueue.moreTooltip")}- data-queue-menu- aria-label={t("promptQueue.moreLabel", { position })}- className="size-8 shrink-0 text-muted-foreground hover:text-foreground data-[state=open]:bg-accent data-[state=open]:text-foreground pointer-coarse:size-11"- >- <MoreHorizontalIcon className="size-4" />- </TooltipIconButton>- )}- align="end"- side="bottom"- sideOffset={6}- className="w-56 rounded-2xl border border-border/60 p-1.5 shadow-lg"- // Opening the menu must not select an item on pointer release.- onPointerUpCapture={(event) => event.preventDefault()}- onCloseAutoFocus={(event) => {- if (!editFromMenuRef.current) return;- event.preventDefault();- editFromMenuRef.current = false;- inputRef.current?.focus();- }}- >- <DropdownMenuItem- disabled={!item.canEdit}- onSelect={() => {- editFromMenuRef.current = true;- startEditing(item);+ move(item.id, targets[event.key]);}}>- <HugeiconsIcon icon={Edit03Icon} strokeWidth={1.8} />- {t("promptQueue.editItem")}- </DropdownMenuItem>- <DropdownMenuItem- onSelect={() => {- void copyToClipboard(item.prompt).then((copied) =>- setAnnouncement(- t(- copied- ? "promptQueue.announceCopied"- : "promptQueue.announceCopyFailed",- ),+ <GripVerticalIcon className="size-4" />+ </TooltipIconButton>+ <ListEndIcon+ className="hidden size-4 shrink-0 text-muted-foreground/60 sm:block"+ aria-hidden="true"+ />+ <span className="min-w-0 flex-1 truncate px-1.5 text-sm text-foreground/80">+ {item.prompt}+ </span>+ {index === 0 && entry.paused && (+ <span className="hidden shrink-0 px-1 text-xs text-muted-foreground sm:inline">+ {t("promptQueue.paused")}+ </span>+ )}+ <TooltipIconButton+ type="button"+ tooltip={t("promptQueue.steerTooltip")}+ aria-label={t("promptQueue.steerLabel", { position })}+ disabled={!item.canEdit || !item.canRemove}+ className="h-8 w-auto shrink-0 gap-1.5 px-2 font-normal text-muted-foreground hover:text-foreground pointer-coarse:h-11"+ onClick={() => {+ setAnnouncement(+ t(+ onSteer(item.id)+ ? "promptQueue.announceSteered"+ : "promptQueue.announceSteerFailed",),);}}>- <HugeiconsIcon icon={Copy01Icon} strokeWidth={1.8} />- {t("promptQueue.copyItem")}- </DropdownMenuItem>- <DropdownMenuSeparator />- <Tooltip delayDuration={300} disableHoverableContent={true}>- <TooltipTrigger asChild={true} disableClickToggle={true}>- <DropdownMenuItem- onSelect={() => {- const behavior = followUpBehavior === "queue" ? "steer" : "queue";- setFollowUpBehavior(behavior);+ <CornerDownRightIcon className="size-4" />+ <span>{t("promptQueue.steer")}</span>+ </TooltipIconButton>+ <TooltipIconButton+ type="button"+ tooltip={t("promptQueue.removeTooltip")}+ aria-label={t("promptQueue.removeLabel", { position })}+ disabled={!item.canRemove}+ className="size-8 shrink-0 text-muted-foreground hover:text-destructive pointer-coarse:size-11"+ onClick={() => {+ if (onRemove(item.id))+ setAnnouncement(t("promptQueue.announceRemoved"));+ }}+ >+ <HugeiconsIcon icon={Delete02Icon} strokeWidth={1.8} />+ </TooltipIconButton>+ <NonModalDropdownMenu+ trigger={(triggerRef) => (+ <TooltipIconButton+ ref={triggerRef}+ tooltip={t("promptQueue.moreTooltip")}+ data-queue-menu+ aria-label={t("promptQueue.moreLabel", { position })}+ className="size-8 shrink-0 text-muted-foreground hover:text-foreground data-[state=open]:bg-accent data-[state=open]:text-foreground pointer-coarse:size-11"+ >+ <MoreHorizontalIcon className="size-4" />+ </TooltipIconButton>+ )}+ align="end"+ side="bottom"+ sideOffset={6}+ className="w-56 rounded-2xl border border-border/60 p-1.5 shadow-lg"+ // Opening the menu must not select an item on pointer release.+ onPointerUpCapture={(event) => event.preventDefault()}+ onCloseAutoFocus={(event) => {+ if (!editFromMenuRef.current) return;+ event.preventDefault();+ editFromMenuRef.current = false;+ inputRef.current?.focus();+ }}+ >+ <DropdownMenuItem+ disabled={!item.canEdit}+ onSelect={() => {+ editFromMenuRef.current = true;+ startEditing(item);+ }}+ >+ <HugeiconsIcon icon={Edit03Icon} strokeWidth={1.8} />+ {t("promptQueue.editItem")}+ </DropdownMenuItem>+ <DropdownMenuItem+ onSelect={() => {+ void copyToClipboard(item.prompt).then((copied) =>setAnnouncement(t(- behavior === "queue"- ? "promptQueue.announceQueueingOn"- : "promptQueue.announceQueueingOff",+ copied+ ? "promptQueue.announceCopied"+ : "promptQueue.announceCopyFailed",),- );- }}+ ),+ );+ }}+ >+ <HugeiconsIcon icon={Copy01Icon} strokeWidth={1.8} />+ {t("promptQueue.copyItem")}+ </DropdownMenuItem>+ <DropdownMenuSeparator />+ <Tooltip+ delayDuration={300}+ disableHoverableContent={true}+ >+ <TooltipTrigger+ asChild={true}+ disableClickToggle={true}+ >+ <DropdownMenuItem+ onSelect={() => {+ const behavior =+ followUpBehavior === "queue"+ ? "steer"+ : "queue";+ setFollowUpBehavior(behavior);+ setAnnouncement(+ t(+ behavior === "queue"+ ? "promptQueue.announceQueueingOn"+ : "promptQueue.announceQueueingOff",+ ),+ );+ }}+ >+ <ListEndIcon />+ {t(+ followUpBehavior === "queue"+ ? "promptQueue.turnOffQueueing"+ : "promptQueue.turnOnQueueing",+ )}+ </DropdownMenuItem>+ </TooltipTrigger>+ <TooltipContent+ side="top"+ align="end"+ sideOffset={8}+ collisionPadding={8}+ className="prompt-queue-option-tooltip pointer-events-none max-w-[min(20rem,calc(100vw-1rem))]">- <ListEndIcon />{t(followUpBehavior === "queue"- ? "promptQueue.turnOffQueueing"- : "promptQueue.turnOnQueueing",- )}+ ? "promptQueue.queueingOffHint"+ : "promptQueue.queueingOnHint",+ )}{" "}+ {t("promptQueue.queueingHintShared")}+ </TooltipContent>+ </Tooltip>+ {entry.paused && (+ <DropdownMenuItem onSelect={onResume}>+ <QueueResumeIcon className="size-3.5" />+ {t("promptQueue.resume")}</DropdownMenuItem>- </TooltipTrigger>- <TooltipContent- side="top"- align="end"- sideOffset={8}- collisionPadding={8}- className="prompt-queue-option-tooltip pointer-events-none max-w-[min(20rem,calc(100vw-1rem))]"- >- {t(- followUpBehavior === "queue"- ? "promptQueue.queueingOffHint"- : "promptQueue.queueingOnHint",- )}{" "}- {t("promptQueue.queueingHintShared")}- </TooltipContent>- </Tooltip>- {entry.paused && (- <DropdownMenuItem onSelect={onResume}>- <QueueResumeIcon className="size-3.5" />- {t("promptQueue.resume")}- </DropdownMenuItem>- )}- </NonModalDropdownMenu>- </div>- )}- </div>- );- })}+ )}+ </NonModalDropdownMenu>+ </div>+ )}+ </div>+ );+ })}+ </div></div></div>);diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsxindex 24177cf200f..a685f1c6489 100644--- a/studio/frontend/src/components/assistant-ui/thread.tsx+++ b/studio/frontend/src/components/assistant-ui/thread.tsx@@ -323,7 +323,6 @@ import {ChevronRightIcon,Columns2Icon,SlidersHorizontalIcon,- FastForwardIcon,GitBranchIcon,GlobeIcon,HeadphonesIcon,@@ -6835,7 +6834,8 @@ const ComposerRightControls: FC<{className="aui-composer-send ml-1.5 size-9 rounded-full"aria-label="Resume queue">- <QueueResumeIcon />+ {/* Solid glyph, so it is smaller than the stroked send arrow. */}+ <QueueResumeIcon className="size-4" /></TooltipIconButton>) : queueEntry?.dispatched && !queueEntry.paused ? (<Button@@ -7278,8 +7278,8 @@ const ContinueMessageBarForLastMessage: FC = () => {className="h-7 shrink-0 gap-1.5 text-xs"onClick={handleContinue}>- <FastForwardIcon strokeWidth={1.75} className="size-3.5" />- Continue+ <QueueResumeIcon className="size-3.5" />+ Resume</Button>)}</div>diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex bc0335e6b23..8ac6e979cd3 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -62,9 +62,9 @@ export const ar = {announceMoveFailed: "تغيّر الطابور قبل التمكن من نقل هذه الرسالة. حاول مرة أخرى.",announceDragReset: "تغيّر الطابور. اسحب مرة أخرى لإعادة ترتيب الرسائل المتبقية.",editingHint: "جارٍ تعديل الرسالة",- queueingOffHint: "الرسائل الجديدة توقف الرد الحالي وتُنفَّذ بعده.",- queueingOnHint: "الرسائل الجديدة تنتظر دورها وتُنفَّذ بالترتيب.",- queueingHintShared: "تبقى الرسائل الموجودة في الطابور.",+ queueingOffHint: "الرسائل الجديدة تقاطع الرد وتُنفَّذ بعده.",+ queueingOnHint: "الرسائل الجديدة تنتظر دورها.",+ queueingHintShared: "يبقى الطابور كما هو.",},picker: {onDevice: "على الجهاز",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex cf473b55bb0..a40464ad029 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -62,9 +62,9 @@ export const de = {announceMoveFailed: "Die Warteschlange hat sich geändert, bevor diese Nachricht verschoben werden konnte. Versuche es erneut.",announceDragReset: "Die Warteschlange hat sich geändert. Ziehe erneut, um die übrigen Nachrichten umzusortieren.",editingHint: "Nachricht wird bearbeitet",- queueingOffHint: "Neue Nachrichten stoppen die aktuelle Antwort und laufen als Nächstes.",- queueingOnHint: "Neue Nachrichten warten und laufen der Reihe nach.",- queueingHintShared: "Eingereihte Nachrichten bleiben erhalten.",+ queueingOffHint: "Neue Nachrichten unterbrechen und laufen als Nächstes.",+ queueingOnHint: "Neue Nachrichten warten auf ihren Platz.",+ queueingHintShared: "Die Warteschlange bleibt erhalten.",},picker: {onDevice: "Auf dem Gerät",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex 0c6235ef49a..f2b4c592d85 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -64,9 +64,9 @@ export const en = {announceDragReset:"The queue changed. Drag again to reorder the remaining prompts.",editingHint: "Editing message",- queueingOffHint: "New messages stop the current response and run next.",- queueingOnHint: "New messages wait their turn and run in order.",- queueingHintShared: "Queued prompts are kept.",+ queueingOffHint: "New messages interrupt and run next.",+ queueingOnHint: "New messages wait their turn.",+ queueingHintShared: "The queue is kept.",},picker: {onDevice: "On Device",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 4e9249469b2..8361ab647bb 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -62,9 +62,9 @@ export const es = {announceMoveFailed: "La cola cambió antes de poder mover este mensaje. Inténtalo de nuevo.",announceDragReset: "La cola cambió. Arrastra de nuevo para reordenar los mensajes restantes.",editingHint: "Editando el mensaje",- queueingOffHint: "Los mensajes nuevos detienen la respuesta actual y se ejecutan a continuación.",- queueingOnHint: "Los mensajes nuevos esperan su turno y se ejecutan en orden.",- queueingHintShared: "Los mensajes en cola se conservan.",+ queueingOffHint: "Los mensajes nuevos interrumpen y se ejecutan a continuación.",+ queueingOnHint: "Los mensajes nuevos esperan su turno.",+ queueingHintShared: "La cola se conserva.",},picker: {onDevice: "En el dispositivo",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 8dc332518d1..8b5d0ae8b1e 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -62,9 +62,9 @@ export const fr = {announceMoveFailed: "La file d’attente a changé avant que ce message puisse être déplacé. Réessayez.",announceDragReset: "La file d’attente a changé. Faites glisser à nouveau pour réorganiser les messages restants.",editingHint: "Modification du message",- queueingOffHint: "Les nouveaux messages arrêtent la réponse en cours et sont exécutés ensuite.",- queueingOnHint: "Les nouveaux messages attendent leur tour et sont exécutés dans l’ordre.",- queueingHintShared: "Les messages en file d’attente sont conservés.",+ queueingOffHint: "Les nouveaux messages interrompent et passent ensuite.",+ queueingOnHint: "Les nouveaux messages attendent leur tour.",+ queueingHintShared: "La file d’attente est conservée.",},picker: {onDevice: "Sur l'appareil",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex d559f5a4136..84a8c86fc06 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -62,9 +62,9 @@ export const hi = {announceMoveFailed: "इस संदेश को खिसकाने से पहले कतार बदल गई। फिर कोशिश करें।",announceDragReset: "कतार बदल गई। बाकी संदेशों का क्रम बदलने के लिए फिर से खींचें।",editingHint: "संदेश संपादित हो रहा है",- queueingOffHint: "नए संदेश मौजूदा उत्तर रोककर अगले चलते हैं।",- queueingOnHint: "नए संदेश अपनी बारी का इंतज़ार कर क्रम से चलते हैं।",- queueingHintShared: "कतार के संदेश बने रहते हैं।",+ queueingOffHint: "नए संदेश बीच में आकर अगले चलते हैं।",+ queueingOnHint: "नए संदेश अपनी बारी का इंतज़ार करते हैं।",+ queueingHintShared: "कतार बनी रहती है।",},picker: {onDevice: "डिवाइस पर",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex a524e89e684..9448ee138af 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -59,9 +59,9 @@ export const it = {announceMoveFailed: "La coda è cambiata prima che questo messaggio potesse essere spostato. Riprova.",announceDragReset: "La coda è cambiata. Trascina di nuovo per riordinare i messaggi rimanenti.",editingHint: "Modifica del messaggio",- queueingOffHint: "I nuovi messaggi interrompono la risposta corrente e vengono eseguiti subito dopo.",- queueingOnHint: "I nuovi messaggi attendono il turno e vengono eseguiti in ordine.",- queueingHintShared: "I messaggi in coda vengono mantenuti.",+ queueingOffHint: "I nuovi messaggi interrompono e vengono eseguiti subito dopo.",+ queueingOnHint: "I nuovi messaggi attendono il turno.",+ queueingHintShared: "La coda viene mantenuta.",},common: {cancel: "Annulla",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex c887b619c16..0ae537203c0 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -63,9 +63,9 @@ export const ja = {announceMoveFailed: "移動前にキューが変更されました。再試行してください。",announceDragReset: "キューが変更されました。残りのメッセージをもう一度ドラッグして並べ替えてください。",editingHint: "メッセージを編集中",- queueingOffHint: "新しいメッセージは現在の応答を停止して次に実行されます。",- queueingOnHint: "新しいメッセージは順番待ちになり、順に実行されます。",- queueingHintShared: "キュー内のメッセージは保持されます。",+ queueingOffHint: "新しいメッセージが割り込んで実行されます。",+ queueingOnHint: "新しいメッセージは順番待ちになります。",+ queueingHintShared: "キューは保持されます。",},picker: {onDevice: "デバイス上",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex 3e5407422fc..a70bb77b30b 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -62,9 +62,9 @@ export const ko = {announceMoveFailed: "옮기기 전에 대기열이 변경되었습니다. 다시 시도하세요.",announceDragReset: "대기열이 변경되었습니다. 남은 메시지를 다시 드래그해 순서를 바꾸세요.",editingHint: "메시지 편집 중",- queueingOffHint: "새 메시지가 현재 응답을 중지하고 다음에 실행됩니다.",- queueingOnHint: "새 메시지는 순서를 기다렸다가 차례로 실행됩니다.",- queueingHintShared: "대기 중인 메시지는 유지됩니다.",+ queueingOffHint: "새 메시지가 끼어들어 먼저 실행됩니다.",+ queueingOnHint: "새 메시지는 순서를 기다립니다.",+ queueingHintShared: "대기열은 유지됩니다.",},picker: {onDevice: "기기",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex 9130058f11e..16e0c1619ff 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -62,9 +62,9 @@ export const ptBR = {announceMoveFailed: "A fila mudou antes que esta mensagem pudesse ser movida. Tente de novo.",announceDragReset: "A fila mudou. Arraste de novo para reordenar as mensagens restantes.",editingHint: "Editando a mensagem",- queueingOffHint: "Mensagens novas interrompem a resposta atual e são executadas em seguida.",- queueingOnHint: "Mensagens novas esperam a vez e são executadas em ordem.",- queueingHintShared: "As mensagens na fila são mantidas.",+ queueingOffHint: "Mensagens novas interrompem e são executadas em seguida.",+ queueingOnHint: "Mensagens novas esperam a vez.",+ queueingHintShared: "A fila é mantida.",},picker: {onDevice: "No dispositivo",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex cad2651a1cb..b80e3dbe9aa 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -62,9 +62,9 @@ export const ru = {announceMoveFailed: "Очередь изменилась до того, как сообщение удалось переместить. Повторите попытку.",announceDragReset: "Очередь изменилась. Перетащите снова, чтобы изменить порядок оставшихся сообщений.",editingHint: "Изменение сообщения",- queueingOffHint: "Новые сообщения останавливают текущий ответ и выполняются следующими.",- queueingOnHint: "Новые сообщения ждут очереди и выполняются по порядку.",- queueingHintShared: "Сообщения в очереди сохраняются.",+ queueingOffHint: "Новые сообщения прерывают ответ и выполняются следующими.",+ queueingOnHint: "Новые сообщения ждут своей очереди.",+ queueingHintShared: "Очередь сохраняется.",},picker: {onDevice: "На устройстве",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex 1d6c8236c42..1101b6e90f9 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -62,9 +62,9 @@ export const zhCN = {announceMoveFailed: "移动前队列已发生变更。请重试。",announceDragReset: "队列已变更。请重新拖动以排序其余消息。",editingHint: "正在编辑消息",- queueingOffHint: "新消息会停止当前回复并优先执行。",+ queueingOffHint: "新消息会打断当前回复并优先执行。",queueingOnHint: "新消息会排队并按顺序执行。",- queueingHintShared: "已排队的消息会保留。",+ queueingHintShared: "队列会保留。",},picker: {onDevice: "本机",diff --git a/studio/frontend/tests/chat-continuation.test.ts b/studio/frontend/tests/chat-continuation.test.tsindex fc836ded33c..717a64f790d 100644--- a/studio/frontend/tests/chat-continuation.test.ts+++ b/studio/frontend/tests/chat-continuation.test.ts@@ -337,7 +337,7 @@ test("the bar offers the way out in place of a Continue that cannot help", () =>/if \(!reason \|\| \(!remedy && !resumable\)\) \{\n\s*return null;/,"the way out is gated on the turn being resumable again",);- // Reading the cancelled status first shows "Response stopped" and offers Continue.+ // Reading the cancelled status first shows "Response stopped" and offers Resume.assert.match(thread,/cancelled && !isProviderReportedReason\(stamped\?\.reason\)/,@@ -350,8 +350,8 @@ test("the bar offers the way out in place of a Continue that cannot help", () =>);assert.match(thread,- /\{remedy \? null : \([\s\S]{0,400}Continue\n\s*<\/Button>/,- "Continue is offered again for a cut it cannot help",+ /\{remedy \? null : \([\s\S]{0,400}Resume\n\s*<\/Button>/,+ "the resume button is offered again for a cut it cannot help",);});diff --git a/tests/studio/playwright_queue_localization.py b/tests/studio/playwright_queue_localization.pyindex bf8b3ce7d41..2394ebe4c2c 100644--- a/tests/studio/playwright_queue_localization.py+++ b/tests/studio/playwright_queue_localization.py@@ -207,6 +207,74 @@ def check_stuck_composition_recovers(page, base):print("PASS: a stuck composition recovers on timeout and on blur", flush = True)+# Reads the glyph's painted box back into viewBox units, so the check does not+# depend on the rendered icon size.+GLYPH_GEOMETRY = """() => {+ const item = [...document.querySelectorAll('[role="menuitem"]')]+ .find((element) => element.textContent.trim() === 'Resume queue');+ const svg = item.querySelector('svg'), path = svg.querySelector('path');+ const box = svg.getBoundingClientRect(), glyph = path.getBoundingClientRect();+ const units = 24 / box.width;+ return {+ dx: ((glyph.x + glyph.width / 2) - (box.x + box.width / 2)) * units,+ dy: ((glyph.y + glyph.height / 2) - (box.y + box.height / 2)) * units,+ };+}"""+++def check_resume_icon_centred(page, base):+ # The play glyph is not centred in its own viewBox, so the icon shifts it+ # back. Without that the triangle sits right of the button's centre.+ seed(page, base)+ page.get_by_role("button", name = "Simulate paused queue", exact = True).click()+ page.get_by_role("button", name = "More options for queued prompt 1", exact = True).click()+ page.get_by_role("menuitem", name = "Resume queue", exact = True).wait_for()+ offset = page.evaluate(GLYPH_GEOMETRY)+ # The raw glyph is 0.15 units off centre, so this tolerance still catches it.+ assert abs(offset["dx"]) < 0.05, offset+ assert abs(offset["dy"]) < 0.05, offset+ print("PASS: the resume glyph is centred in its icon box", flush = True)+++def check_queue_frame_clips_scrollbar(page, base):+ # Scrollbars are painted outside the scroller's own radius, so a long queue+ # squared off the top corners. The rounding has to clip from outside.+ seed(page, base)+ page.get_by_role("button", name = "Long queue", exact = True).click()+ layout = page.evaluate(+ """() => {+ const scroller = document.querySelector('[aria-label^="Prompt queue"]');+ const frame = scroller.parentElement;+ const style = getComputedStyle(scroller), outer = getComputedStyle(frame);+ const s = scroller.getBoundingClientRect(), f = frame.getBoundingClientRect();+ return {+ overflows: scroller.scrollHeight > scroller.clientHeight,+ scrollerRadius: style.borderTopRightRadius,+ scrollerOverflow: style.overflowY,+ frameRadius: outer.borderTopRightRadius,+ frameOverflow: outer.overflow,+ frameBorder: parseFloat(outer.borderTopWidth),+ insetRight: f.right - s.right,+ insetTop: s.top - f.top,+ };+ }"""+ )+ assert layout["overflows"], layout+ assert layout["scrollerOverflow"] == "auto", layout+ # The scroller must not own the rounding, or it clips its own scrollbar.+ assert layout["scrollerRadius"] == "0px", layout+ assert layout["frameOverflow"] == "hidden", layout+ assert parse_px(layout["frameRadius"]) > 0, layout+ # The gutter sits inside the frame, so the rounded clip covers it.+ assert layout["insetRight"] >= layout["frameBorder"] - 0.5, layout+ assert layout["insetTop"] >= layout["frameBorder"] - 0.5, layout+ print("PASS: the queue frame rounds and clips the scrollbar corner", flush = True)+++def parse_px(value):+ return float(value.removesuffix("px"))++def main():server = Nonetry:@@ -236,6 +304,8 @@ def main():check_escape_during_ime(page, base)check_candidate_confirming_enter(page, base)check_stuck_composition_recovers(page, base)+ check_resume_icon_centred(page, base)+ check_queue_frame_clips_scrollbar(page, base)assert not errors, errorsfinally:browser.close()