diff --git a/api/server/controllers/AuthController.spec.js b/api/server/controllers/AuthController.spec.js index 2f4b6985bc3..e0f0892bf1d 100644 --- a/api/server/controllers/AuthController.spec.js +++ b/api/server/controllers/AuthController.spec.js @@ -856,17 +856,15 @@ describe('refreshController – OpenID path', () => { expect(res.status).toHaveBeenCalledWith(403); }); - it('requires sign-in without publishing tokens when the persisted session disappeared', async () => { + it('refreshes with the cookie token when the persisted session expired', async () => { req.session.reload = jest.fn((callback) => callback(new Error('failed to load session'))); await refreshController(req, res); - expect(clearOpenIDAuthTokens).toHaveBeenCalled(); - expect(res.status).toHaveBeenCalledWith(401); - expect(res.send).toHaveBeenCalledWith({ code: 'OPENID_SESSION_MISSING' }); - expect(setOpenIDAuthTokens).not.toHaveBeenCalled(); - expect(storeOpenIDSession).not.toHaveBeenCalled(); - expect(getRefreshTokenBridge).not.toHaveBeenCalled(); + expect(clearOpenIDAuthTokens).not.toHaveBeenCalled(); + expect(setOpenIDAuthTokens).toHaveBeenCalled(); + expect(res.status).toHaveBeenCalledWith(200); + expect(res.send).not.toHaveBeenCalledWith({ code: 'OPENID_SESSION_MISSING' }); }); it('does not classify a session store outage as a missing session', async () => { diff --git a/client/src/components/Chat/Input/DuringRunSendButton.tsx b/client/src/components/Chat/Input/DuringRunSendButton.tsx index ea84300e756..0d0902e385a 100644 --- a/client/src/components/Chat/Input/DuringRunSendButton.tsx +++ b/client/src/components/Chat/Input/DuringRunSendButton.tsx @@ -1,8 +1,8 @@ import React, { forwardRef, useMemo } from 'react'; import { useRecoilValue } from 'recoil'; import { useWatch } from 'react-hook-form'; -import { SendActions, SendIcon } from '@librechat/client'; import { Zap, Clock, OctagonPause, ZapOff } from 'lucide-react'; +import { composerSubmitClasses, SendActions, SendIcon } from '@librechat/client'; import type { SendAction } from '@librechat/client'; import type { Control } from 'react-hook-form'; import type { ComposerKeyContext, KeyChordSource } from '~/utils/shortcuts'; @@ -10,7 +10,6 @@ import type { SteeringControls } from '~/hooks/Chat/useSteering'; import { isMacPlatform, resolveComposerKeyDown } from '~/utils/shortcuts'; import useComposerBindings from '~/hooks/Input/useComposerBindings'; import { useLocalize } from '~/hooks'; -import { cn } from '~/utils'; import store from '~/store'; /** The rows, the popover and the chord chips are shared with every other chat @@ -175,9 +174,7 @@ const DuringRunSendButton = React.memo( aria-label={label} id="during-run-send-button" disabled={!content || props.disabled === true} - className={cn( - 'size-theme-control rounded-theme-control-round bg-text-primary p-theme-compact text-text-primary outline-offset-4 transition-all duration-theme-normal disabled:cursor-not-allowed disabled:text-text-secondary disabled:opacity-10', - )} + className={composerSubmitClasses()} data-testid="during-run-send-button" data-during-run-action={primary} type="submit" diff --git a/client/src/components/Chat/Input/SendButton.tsx b/client/src/components/Chat/Input/SendButton.tsx index f4c855d8533..5f286840bbf 100644 --- a/client/src/components/Chat/Input/SendButton.tsx +++ b/client/src/components/Chat/Input/SendButton.tsx @@ -1,8 +1,8 @@ import React, { forwardRef } from 'react'; import { useWatch } from 'react-hook-form'; -import { SendIcon, TooltipAnchor } from '@librechat/client'; +import { composerSubmitClasses, SendIcon, TooltipAnchor } from '@librechat/client'; import type { Control } from 'react-hook-form'; -import { cn, isSubmittableMessage } from '~/utils'; +import { isSubmittableMessage } from '~/utils'; import { useLocalize } from '~/hooks'; type SendButtonProps = { @@ -24,9 +24,7 @@ const SubmitButton = React.memo( aria-label={localize('com_nav_send_message')} id="send-button" disabled={props.disabled} - className={cn( - 'size-theme-control rounded-theme-control-round bg-text-primary p-theme-compact text-text-primary outline-offset-4 transition-all duration-theme-normal disabled:cursor-not-allowed disabled:text-text-secondary disabled:opacity-10', - )} + className={composerSubmitClasses()} data-testid="send-button" type="submit" > diff --git a/client/src/components/Chat/Input/StopButton.tsx b/client/src/components/Chat/Input/StopButton.tsx index 29845444489..b3556f7e699 100644 --- a/client/src/components/Chat/Input/StopButton.tsx +++ b/client/src/components/Chat/Input/StopButton.tsx @@ -1,7 +1,6 @@ import { memo } from 'react'; -import { TooltipAnchor } from '@librechat/client'; +import { composerSubmitClasses, TooltipAnchor } from '@librechat/client'; import { useLocalize } from '~/hooks'; -import { cn } from '~/utils'; export default memo(function StopButton({ stop, @@ -19,9 +18,7 @@ export default memo(function StopButton({