diff --git a/bun.lock b/bun.lock index c1057dc4ec..8d153fe368 100644 --- a/bun.lock +++ b/bun.lock @@ -408,7 +408,7 @@ }, "packages/client": { "name": "@librechat/client", - "version": "0.4.75", + "version": "0.4.76", "devDependencies": { "@babel/core": "^7.28.5", "@babel/preset-env": "^7.29.5", diff --git a/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx b/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx index 5e66812729..91ddf85467 100644 --- a/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx +++ b/client/src/components/Nav/SettingsTabs/Data/SharedLinks.tsx @@ -1,4 +1,4 @@ -import { useCallback, useState, useMemo } from 'react'; +import { useCallback, useState, useMemo, useRef } from 'react'; import { Trans } from 'react-i18next'; import { useRecoilValue } from 'recoil'; import { Link } from 'react-router-dom'; @@ -42,6 +42,7 @@ export default function SharedLinks() { const localize = useLocalize(); const { showToast } = useToastContext(); const [isOpen, setIsOpen] = useState(false); + const contentRef = useRef(null); const searchStore = useRecoilValue(store.search); const [isDeleteOpen, setIsDeleteOpen] = useState(false); const isSmallScreen = useMediaQuery('(max-width: 768px)'); @@ -64,6 +65,17 @@ export default function SharedLinks() { })); }, []); + const getRowId = useCallback((row: SharedLinkRow) => row.shareId, []); + + /** Radix would otherwise seat focus on the search field, flashing its ring every + * time the dialog opens. Anchor focus to the content instead: it is a landing + * spot rather than a tab stop, so it shows no ring and the first Tab reaches a + * real control that does. */ + const handleOpenAutoFocus = useCallback((event: Event) => { + event.preventDefault(); + contentRef.current?.focus(); + }, []); + const allLinks = useMemo(() => { if (!data?.pages) { return []; @@ -184,11 +196,11 @@ export default function SharedLinks() { to={`/share/${shareId}`} target="_blank" rel="noopener noreferrer" - className="group flex items-center gap-1 truncate rounded-sm text-link underline decoration-1 underline-offset-2 hover:decoration-2 focus:outline-none focus:ring-2 focus:ring-text-primary" + className="group flex items-center gap-1.5 truncate rounded-sm font-medium text-text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-text-primary" > {title}