From 21c03b7c92c1b4b3d33fc9b7a0bfbdf1ab025cee Mon Sep 17 00:00:00 2001 From: Danny Avila Date: Mon, 7 Sep 2026 12:45:30 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=95=93=20style:=20Move=20the=20Queued-Mes?= =?UTF-8?q?sage=20Hint=20Into=20a=20Hover=20Tooltip=20on=20the=20Clock=20I?= =?UTF-8?q?con=20(#15706)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ๐Ÿ•“ style: Move the Queued-Message Hint Into a Hover Tooltip on the Clock Icon "Sends when this response finishes" rendered as a caption row under the queued chips for as long as a run was pending, costing composer height for a single reassurance. The clock icon of each queued row now carries that sentence as a hover tooltip and as its accessible name, and the caption row is gone. Nothing else about the row changes: warning states keep their triangle, and the hint disappears with the run as before. * โŒจ๏ธ fix: Give the Queued-Hint Clock an Explicit Tab Stop and Focus Ring The tooltip anchor was already focusable through Ariakit's Focusable default, and opens on focus-visible, but nothing said so and no ring showed where focus was. Make the tab stop explicit, add the same focus-visible ring the row's buttons use, and prove the keyboard path with a test. The hover test now allows for Ariakit's show timer on a loaded CI shard, which is what failed the first run. Codex round 1 (P2) on #15706. * ๐Ÿงช test: Move the Pointer Between Coordinates Before Expecting the Queued Hint Tooltip Ariakit's hover detector treats a pointer as moving only when consecutive mousemove events differ in screen coordinates; its NODE_ENV=test shortcut does not apply under the CI runner's NODE_ENV, which is why the hover test passed locally and failed in the shard. Two moves at distinct coordinates make the test environment-independent; the keyboard test was already deterministic. --- .../Chat/Input/PendingSteerChips.tsx | 48 ++++++++++++------ .../__tests__/PendingSteerChips.test.tsx | 50 +++++++++++++------ 2 files changed, 68 insertions(+), 30 deletions(-) diff --git a/client/src/components/Chat/Input/PendingSteerChips.tsx b/client/src/components/Chat/Input/PendingSteerChips.tsx index dc820c6d0e..04078e80ee 100644 --- a/client/src/components/Chat/Input/PendingSteerChips.tsx +++ b/client/src/components/Chat/Input/PendingSteerChips.tsx @@ -1,7 +1,7 @@ import { memo, useMemo, useRef, useState, useCallback } from 'react'; import { useAtomValue } from 'jotai'; import { useRecoilValue } from 'recoil'; -import { useToastContext } from '@librechat/client'; +import { TooltipAnchor, useToastContext } from '@librechat/client'; import { X, Zap, @@ -77,6 +77,33 @@ function QuoteCount({ count, label }: { count: number; label: string }) { ); } +/** + * The one fact a queued row needs to convey ("did my message vanish?" it did + * not) rides the clock as a hover hint and its accessible name while a run is + * pending, instead of a caption row that costs composer height at rest. The + * anchor is a tab stop with a visible ring so keyboard users reach the same + * hint: the tooltip opens on focus-visible as well as on hover. + */ +function QueuedIcon({ warning, hint }: { warning: boolean; hint?: string }) { + if (warning) { + return