Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
📄 fix: Mirror Agents, Prompts, Skills and Other Pages for RTL (#17268)
Marco Beretta30e2a3add679
diff --git a/client/src/components/Agents/AgentDetailContent.tsx b/client/src/components/Agents/AgentDetailContent.tsxindex 91c2470b1b..eba36c572d 100644--- a/client/src/components/Agents/AgentDetailContent.tsx+++ b/client/src/components/Agents/AgentDetailContent.tsx@@ -271,7 +271,7 @@ const AgentDetailContent: React.FC<AgentDetailContentProps> = ({<Buttonvariant="ghost"size="icon-sm"- className="-mt-2 -mr-2 shrink-0 rtl:mr-0 rtl:-ml-2"+ className="-me-2 -mt-2 shrink-0"aria-label={localize('com_ui_close')}><X className="size-4" aria-hidden="true" />@@ -285,7 +285,7 @@ const AgentDetailContent: React.FC<AgentDetailContentProps> = ({layoutScrollclassName="relative z-10 min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 pt-4 pb-5 sm:px-6 sm:pb-6">- <OGDialogHeader className="space-y-0 text-left sm:text-left rtl:text-right sm:rtl:text-right">+ <OGDialogHeader className="space-y-0 text-start">{/* The avatar holds the top of the row and the copy centres on it,so a title with a line or two of description reads as one blockbeside it. Once the copy is the taller of the two there is@@ -370,7 +370,7 @@ const AgentDetailContent: React.FC<AgentDetailContentProps> = ({<Buttonkey={starter.key}variant="outline"- className="h-auto min-h-14 items-start justify-between gap-3 py-3 text-left whitespace-normal rtl:text-right"+ className="h-auto min-h-14 items-start justify-between gap-3 py-3 text-start whitespace-normal"aria-disabled={actionsDisabled || undefined}onClick={() => {if (!actionsDisabled) {diff --git a/client/src/components/Agents/CategoryTabs.tsx b/client/src/components/Agents/CategoryTabs.tsxindex dee47ee8c0..3fd95f9291 100644--- a/client/src/components/Agents/CategoryTabs.tsx+++ b/client/src/components/Agents/CategoryTabs.tsx@@ -19,6 +19,8 @@ interface CategoryTabsProps {onChange: (value: string) => void;}+const ARROW_SWAP: Record<string, string> = { ArrowLeft: 'ArrowRight', ArrowRight: 'ArrowLeft' };+/** Keyboard-accessible category filters with immediate selection feedback. */const CategoryTabs: React.FC<CategoryTabsProps> = ({categories,@@ -56,11 +58,14 @@ const CategoryTabs: React.FC<CategoryTabsProps> = ({);// Handle keyboard navigation between tabs- const handleKeyDown = (e: React.KeyboardEvent, currentCategory: string) => {+ const handleKeyDown = (e: React.KeyboardEvent<HTMLElement>, currentCategory: string) => {const currentIndex = categories.findIndex((cat) => cat.value === currentCategory);let newIndex = currentIndex;- switch (e.key) {+ const isRtl = getComputedStyle(e.currentTarget).direction === 'rtl';+ const key = isRtl ? (ARROW_SWAP[e.key] ?? e.key) : e.key;++ switch (key) {case 'ArrowLeft':e.preventDefault();newIndex = currentIndex > 0 ? currentIndex - 1 : categories.length - 1;diff --git a/client/src/components/Agents/tests/CategoryTabs.spec.tsx b/client/src/components/Agents/tests/CategoryTabs.spec.tsxindex afc14a95fe..70be6c3840 100644--- a/client/src/components/Agents/tests/CategoryTabs.spec.tsx+++ b/client/src/components/Agents/tests/CategoryTabs.spec.tsx@@ -1,6 +1,6 @@import React from 'react';import userEvent from '@testing-library/user-event';-import { render, screen } from '@testing-library/react';+import { fireEvent, render, screen } from '@testing-library/react';import '@testing-library/jest-dom';import type t from 'librechat-data-provider';import CategoryTabs from '../CategoryTabs';@@ -220,4 +220,52 @@ describe('CategoryTabs', () => {expect(tabTexts[1]).toBe('All');expect(tabTexts.length).toBe(5);});++ describe('arrow key navigation', () => {+ beforeEach(() => {+ /** jsdom does not inherit `direction`, so resolve it from the nearest `dir` attribute. */+ const original = window.getComputedStyle.bind(window);+ jest.spyOn(window, 'getComputedStyle').mockImplementation((el, pseudo) => {+ const style = original(el, pseudo);+ const dir = el.closest('[dir]')?.getAttribute('dir') ?? 'ltr';+ return new Proxy(style, {+ get: (target, prop) =>+ prop === 'direction' ? dir : (Reflect.get(target, prop, target) as unknown),+ });+ });+ });++ afterEach(() => {+ jest.restoreAllMocks();+ });++ const press = (dir: 'ltr' | 'rtl', key: string) => {+ const { container } = render(+ <div dir={dir} style={{ direction: dir }}>+ <CategoryTabs+ categories={mockCategories}+ activeTab="all"+ isLoading={false}+ onChange={mockOnChange}+ />+ </div>,+ );+ fireEvent.keyDown(container.querySelector('#category-tab-all') as HTMLElement, { key });+ };++ it('moves to the next tab on ArrowRight in LTR', () => {+ press('ltr', 'ArrowRight');+ expect(mockOnChange).toHaveBeenCalledWith('general');+ });++ it('moves to the previous tab on ArrowRight in RTL', () => {+ press('rtl', 'ArrowRight');+ expect(mockOnChange).toHaveBeenCalledWith('promoted');+ });++ it('moves to the next tab on ArrowLeft in RTL', () => {+ press('rtl', 'ArrowLeft');+ expect(mockOnChange).toHaveBeenCalledWith('general');+ });+ });});diff --git a/client/src/components/Auth/AuthLayout.tsx b/client/src/components/Auth/AuthLayout.tsxindex b14b7653ec..53d80dd0da 100644--- a/client/src/components/Auth/AuthLayout.tsx+++ b/client/src/components/Auth/AuthLayout.tsx@@ -100,7 +100,7 @@ function AuthLayout({</div></BlinkAnimation><DisplayError />- <div className="absolute bottom-0 left-0 md:m-4">+ <div className="absolute inset-s-0 bottom-0 md:m-4"><ThemeSelector /></div>diff --git a/client/src/components/Auth/Footer.tsx b/client/src/components/Auth/Footer.tsxindex 4b88c34fa4..2168c4dc2b 100644--- a/client/src/components/Auth/Footer.tsx+++ b/client/src/components/Auth/Footer.tsx@@ -39,7 +39,7 @@ function Footer({ startupConfig }: { startupConfig: TStartupConfig | null | unde<div className="m-4 flex justify-center gap-2" role="contentinfo">{privacyPolicyRender}{privacyPolicyRender && termsOfServiceRender && (- <div className="border-border-medium border-r" />+ <div className="border-border-medium border-e" />)}{termsOfServiceRender}</div>diff --git a/client/src/components/Auth/LoginForm.tsx b/client/src/components/Auth/LoginForm.tsxindex b46867699d..657f50794b 100644--- a/client/src/components/Auth/LoginForm.tsx+++ b/client/src/components/Auth/LoginForm.tsx@@ -86,7 +86,7 @@ const LoginForm: React.FC<TLoginFormProps> = ({ onSubmit, startupConfig, error,{localize('com_auth_email_verification_resend_prompt')}<buttontype="button"- className="text-link ml-2 hover:underline"+ className="text-link ms-2 hover:underline"onClick={handleResendEmail}disabled={resendLinkMutation.isLoading}>diff --git a/client/src/components/Auth/RequestPasswordReset.tsx b/client/src/components/Auth/RequestPasswordReset.tsxindex 24492052db..2d09419ac4 100644--- a/client/src/components/Auth/RequestPasswordReset.tsx+++ b/client/src/components/Auth/RequestPasswordReset.tsx@@ -111,7 +111,7 @@ function RequestPasswordReset() {/><labelhtmlFor="email"- className="bg-surface-primary text-text-secondary peer-placeholder-shown:text-text-tertiary peer-focus:text-accent-primary peer-placeholder-shown:top-theme-auth-label-rest absolute -top-2 left-2 z-10 px-2 text-sm transition-all peer-placeholder-shown:text-base peer-focus:-top-2 peer-focus:text-sm"+ className="bg-surface-primary text-text-secondary peer-placeholder-shown:text-text-tertiary peer-focus:text-accent-primary peer-placeholder-shown:top-theme-auth-label-rest absolute inset-s-2 -top-2 z-10 px-2 text-sm transition-all peer-placeholder-shown:text-base peer-focus:-top-2 peer-focus:text-sm">{localize('com_auth_email_address')}</label>diff --git a/client/src/components/Auth/VerifyEmail.tsx b/client/src/components/Auth/VerifyEmail.tsxindex b47ca6b1fe..2ae46b6ac3 100644--- a/client/src/components/Auth/VerifyEmail.tsx+++ b/client/src/components/Auth/VerifyEmail.tsx@@ -127,7 +127,7 @@ function RequestPasswordReset() {return (<div className="bg-surface-primary flex min-h-screen flex-col items-center justify-center pt-6 sm:pt-0">- <div className="absolute bottom-0 left-0 m-4">+ <div className="absolute inset-s-0 bottom-0 m-4"><ThemeSelector /></div><div className="flex flex-col items-center justify-center">@@ -155,7 +155,7 @@ function RequestPasswordReset() {type="button"variant="hyperlink"size="bare"- className="ml-2 inline"+ className="ms-2 inline"onClick={handleResendEmail}disabled={resendEmailMutation.isLoading}>diff --git a/client/src/components/Endpoints/EndpointIcon.tsx b/client/src/components/Endpoints/EndpointIcon.tsxindex ff31c4a2be..c53612dd97 100644--- a/client/src/components/Endpoints/EndpointIcon.tsx+++ b/client/src/components/Endpoints/EndpointIcon.tsx@@ -17,7 +17,7 @@ const emptyEndpointsConfig = {} as TEndpointsConfig;export default function EndpointIcon({conversation,endpointsConfig = emptyEndpointsConfig,- className = 'mr-0',+ className = 'me-0',assistantMap,agentsMap,context,diff --git a/client/src/components/Endpoints/MessageEndpointIcon.tsx b/client/src/components/Endpoints/MessageEndpointIcon.tsxindex 12605e0d6e..7787bdf375 100644--- a/client/src/components/Endpoints/MessageEndpointIcon.tsx+++ b/client/src/components/Endpoints/MessageEndpointIcon.tsx@@ -78,7 +78,7 @@ const MessageEndpointIcon: React.FC<IconProps> = (props) => {};const errorBadge = error === true && (- <span className="border-surface-primary bg-status-error-strong text-text-on-status text-3xs absolute top-[1.25rem] right-0 -mr-2 flex h-3 w-3 items-center justify-center rounded-full border">+ <span className="border-surface-primary bg-status-error-strong text-text-on-status text-3xs absolute inset-e-0 top-[1.25rem] -me-2 flex h-3 w-3 items-center justify-center rounded-full border">!</span>);diff --git a/client/src/components/Endpoints/MinimalIcon.tsx b/client/src/components/Endpoints/MinimalIcon.tsxindex 7864b3175b..51f5fa5997 100644--- a/client/src/components/Endpoints/MinimalIcon.tsx+++ b/client/src/components/Endpoints/MinimalIcon.tsx@@ -38,7 +38,7 @@ const MinimalIcon: React.FC<IconProps> = (props) => {>{icon}{error === true && (- <span className="border-surface-primary bg-status-error-strong text-text-on-status text-3xs absolute top-[1.25rem] right-0 -mr-2 flex h-4 w-4 items-center justify-center rounded-full border">+ <span className="border-surface-primary bg-status-error-strong text-text-on-status text-3xs absolute inset-e-0 top-[1.25rem] -me-2 flex h-4 w-4 items-center justify-center rounded-full border">!</span>)}diff --git a/client/src/components/Endpoints/SaveAsPresetDialog.tsx b/client/src/components/Endpoints/SaveAsPresetDialog.tsxindex e43e142cb3..ff65fac472 100644--- a/client/src/components/Endpoints/SaveAsPresetDialog.tsx+++ b/client/src/components/Endpoints/SaveAsPresetDialog.tsx@@ -69,7 +69,7 @@ const SaveAsPresetDialog = ({ open, onOpenChange, preset }: TEditPresetProps) =>className="flex w-full flex-col items-center gap-2"><div className="grid w-full items-center gap-2">- <Label htmlFor={inputId} className="text-left text-sm font-medium">+ <Label htmlFor={inputId} className="text-start text-sm font-medium">{localize('com_endpoint_preset_name')}</Label><Inputdiff --git a/client/src/components/Endpoints/Settings/Assistants.tsx b/client/src/components/Endpoints/Settings/Assistants.tsxindex 7d1fd9bfd4..4757e9e532 100644--- a/client/src/components/Endpoints/Settings/Assistants.tsx+++ b/client/src/components/Endpoints/Settings/Assistants.tsx@@ -150,7 +150,7 @@ export default function Settings({ conversation, setOption, models, readonly }:</div><div className="col-span-6 flex flex-col items-center justify-start gap-6"><div className="grid w-full items-center gap-2">- <Label htmlFor="promptPrefix" className="text-left text-sm font-medium">+ <Label htmlFor="promptPrefix" className="text-start text-sm font-medium">{localize('com_endpoint_prompt_prefix_assistants')}{' '}<small className="high-contrast:opacity-100 opacity-40">({localize('com_endpoint_default_blank')})@@ -169,7 +169,7 @@ export default function Settings({ conversation, setOption, models, readonly }:/></div><div className="grid w-full items-center gap-2">- <Label htmlFor="instructions" className="text-left text-sm font-medium">+ <Label htmlFor="instructions" className="text-start text-sm font-medium">{localize('com_endpoint_instructions_assistants')}{' '}<small className="high-contrast:opacity-100 opacity-40">({localize('com_endpoint_default_blank')})diff --git a/client/src/components/Endpoints/Settings/Examples.tsx b/client/src/components/Endpoints/Settings/Examples.tsxindex 0fb313f431..cb94eb2f00 100644--- a/client/src/components/Endpoints/Settings/Examples.tsx+++ b/client/src/components/Endpoints/Settings/Examples.tsx@@ -30,7 +30,7 @@ function Examples({ readonly, examples, setExample, addExample, removeExample }:} flex flex-col items-center justify-start gap-6 sm:col-span-1`}><div className="grid w-full items-center gap-2">- <Label htmlFor={`input-${idx}`} className="text-left text-sm font-medium">+ <Label htmlFor={`input-${idx}`} className="text-start text-sm font-medium">{localize('com_ui_input')}{' '}<small className="high-contrast:opacity-100 opacity-40">({localize('com_endpoint_default_blank')})@@ -57,7 +57,7 @@ function Examples({ readonly, examples, setExample, addExample, removeExample }:} flex flex-col items-center justify-start gap-6 sm:col-span-1`}><div className="grid w-full items-center gap-2">- <Label htmlFor={`output-${idx}`} className="text-left text-sm font-medium">+ <Label htmlFor={`output-${idx}`} className="text-start text-sm font-medium">{localize('com_endpoint_output')}{' '}<small className="high-contrast:opacity-100 opacity-40">({localize('com_endpoint_default_blank')})@@ -82,7 +82,7 @@ function Examples({ readonly, examples, setExample, addExample, removeExample }:<div className="flex justify-center"><Buttontype="button"- className="text-text-primary hover:bg-surface-hover hover:text-text-primary mt-1 mr-2 h-auto items-center justify-center bg-transparent px-3 text-xs font-normal focus:ring-0 focus:ring-offset-0 dark:focus:ring-offset-0"+ className="text-text-primary hover:bg-surface-hover hover:text-text-primary me-2 mt-1 h-auto items-center justify-center bg-transparent px-3 text-xs font-normal focus:ring-0 focus:ring-offset-0 dark:focus:ring-offset-0"onClick={removeExample}><Minus className="w-[1rem]" aria-hidden="true" />diff --git a/client/src/components/Endpoints/URLIcon.tsx b/client/src/components/Endpoints/URLIcon.tsxindex df80b5fffa..730d882ff6 100644--- a/client/src/components/Endpoints/URLIcon.tsx+++ b/client/src/components/Endpoints/URLIcon.tsx@@ -12,7 +12,7 @@ export const URLIcon = memo(altName,containerStyle = { width: pxToRem(FALLBACK_ICON_PX), height: pxToRem(FALLBACK_ICON_PX) },imageStyle = { width: '100%', height: '100%' },- className = 'icon-md mr-1 shrink-0 overflow-hidden rounded-full',+ className = 'icon-md me-1 shrink-0 overflow-hidden rounded-full',provider,}: {iconURL: string;@@ -38,8 +38,8 @@ export const URLIcon = memo(</div>{imageError && iconURL && (<div- className="bg-status-error-strong absolute flex items-center justify-center rounded-full"- style={{ width: pxToRem(14), height: pxToRem(14), top: 0, right: 0 }}+ className="bg-status-error-strong absolute inset-e-0 top-0 flex items-center justify-center rounded-full"+ style={{ width: pxToRem(14), height: pxToRem(14) }}><AlertCircle className="text-text-on-status size-2.5" aria-hidden="true" /></div>diff --git a/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx b/client/src/components/Input/SetKeyDialog/GoogleConfig.tsxindex b984dcede2..7131960c25 100644--- a/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx+++ b/client/src/components/Input/SetKeyDialog/GoogleConfig.tsx@@ -25,10 +25,10 @@ const GoogleConfig = ({ userKey, setUserKey }: Pick<TConfigProps, 'userKey' | 'sreturn (<><div className="flex flex-row">- <Label htmlFor={AuthKeys.GOOGLE_SERVICE_KEY} className="text-left text-sm font-medium">+ <Label htmlFor={AuthKeys.GOOGLE_SERVICE_KEY} className="text-start text-sm font-medium">{localize('com_endpoint_config_google_service_key')}</Label>- <Label variant="secondary" className="mx-1 text-right text-sm">+ <Label variant="secondary" className="mx-1 text-end text-sm">{localize('com_endpoint_config_google_cloud_platform')}</Label><br />diff --git a/client/src/components/Input/SetKeyDialog/InputWithLabel.tsx b/client/src/components/Input/SetKeyDialog/InputWithLabel.tsxindex 280ca83df3..b0ca8e4346 100644--- a/client/src/components/Input/SetKeyDialog/InputWithLabel.tsx+++ b/client/src/components/Input/SetKeyDialog/InputWithLabel.tsx@@ -31,11 +31,11 @@ const InputWithLabel: FC<InputWithLabelProps> = forwardRef((props, ref) => {return (<><div className={cn('mt-4 flex flex-row', labelClassName)}>- <Label htmlFor={id} className="text-left text-sm font-medium">+ <Label htmlFor={id} className="text-start text-sm font-medium">{label}</Label>{subLabel && (- <Label variant="secondary" className="mx-1 text-right text-sm">+ <Label variant="secondary" className="mx-1 text-end text-sm">{subLabel}</Label>)}diff --git a/client/src/components/Input/SetKeyDialog/SetKeyDialog.tsx b/client/src/components/Input/SetKeyDialog/SetKeyDialog.tsxindex 5f05e6a0d5..14acc3a64f 100644--- a/client/src/components/Input/SetKeyDialog/SetKeyDialog.tsx+++ b/client/src/components/Input/SetKeyDialog/SetKeyDialog.tsx@@ -125,7 +125,7 @@ const RevokeKeysButton = ({<OGDialogTitle>{localize('com_ui_revoke_key_endpoint', { 0: endpoint })}</OGDialogTitle></OGDialogHeader><div className="py-4">- <Label className="text-left text-sm font-medium">+ <Label className="text-start text-sm font-medium">{localize('com_ui_revoke_key_confirm')}</Label></div>diff --git a/client/src/components/Insights/InsightsView.tsx b/client/src/components/Insights/InsightsView.tsxindex 821a6a2372..0ce83b6775 100644--- a/client/src/components/Insights/InsightsView.tsx+++ b/client/src/components/Insights/InsightsView.tsx@@ -174,6 +174,7 @@ function Sparkline({return (<div+ dir="ltr"className="text-status-info relative mt-2 h-14 w-full outline-hidden"role="img"tabIndex={0}@@ -304,16 +305,14 @@ function TopUsersTable({<EmptyState message={localize('com_insights_no_data')} />) : (<div className="overflow-x-auto">- <table className="w-full min-w-[26.25rem] text-left text-sm">+ <table className="w-full min-w-[26.25rem] text-start text-sm"><thead className="border-border-medium text-text-secondary border-b text-xs"><tr><th className="px-2 py-2 font-medium">{localize('com_insights_user')}</th>- <th className="px-2 py-2 text-right font-medium">+ <th className="px-2 py-2 text-end font-medium">{localize('com_insights_messages')}</th>- <th className="px-2 py-2 text-right font-medium">- {localize('com_insights_chats')}- </th>+ <th className="px-2 py-2 text-end font-medium">{localize('com_insights_chats')}</th></tr></thead><tbody className="divide-border-light divide-y">@@ -322,10 +321,10 @@ function TopUsersTable({<td className="px-2 py-3"><UserCell {...entry} localize={localize} /></td>- <td className="px-2 py-3 text-right tabular-nums">+ <td className="px-2 py-3 text-end tabular-nums">{formatExactValue(entry.messages, locale)}</td>- <td className="px-2 py-3 text-right tabular-nums">+ <td className="px-2 py-3 text-end tabular-nums">{formatExactValue(entry.conversations, locale)}</td></tr>@@ -372,20 +371,20 @@ function ChurnedUsersTable({<EmptyState message={localize('com_insights_no_data')} />) : (<div className="overflow-x-auto">- <table className="w-full min-w-[35rem] table-fixed text-left text-sm">+ <table className="w-full min-w-[35rem] table-fixed text-start text-sm"><thead className="border-border-medium text-text-secondary border-b text-xs"><tr><th className="w-[34%] px-2 py-2 font-medium">{localize('com_insights_user')}</th>- <th className="w-[12%] px-2 py-2 text-right font-medium">+ <th className="w-[12%] px-2 py-2 text-end font-medium">{localize('com_insights_messages')}</th>- <th className="w-[12%] px-2 py-2 text-right font-medium">+ <th className="w-[12%] px-2 py-2 text-end font-medium">{localize('com_insights_chats')}</th>- <th className="w-[21%] px-2 py-2 text-right font-medium">+ <th className="w-[21%] px-2 py-2 text-end font-medium">{localize('com_insights_first_seen')}</th>- <th className="w-[21%] px-2 py-2 text-right font-medium">+ <th className="w-[21%] px-2 py-2 text-end font-medium">{localize('com_insights_last_seen')}</th></tr>@@ -396,16 +395,16 @@ function ChurnedUsersTable({<td className="overflow-hidden px-2 py-3"><UserCell {...entry} localize={localize} /></td>- <td className="px-2 py-3 text-right tabular-nums">+ <td className="px-2 py-3 text-end tabular-nums">{formatExactValue(entry.messages, locale)}</td>- <td className="px-2 py-3 text-right tabular-nums">+ <td className="px-2 py-3 text-end tabular-nums">{formatExactValue(entry.conversations, locale)}</td>- <td className="text-text-secondary px-2 py-3 text-right whitespace-nowrap">+ <td className="text-text-secondary px-2 py-3 text-end whitespace-nowrap">{formatDate(entry.firstSeen, locale)}</td>- <td className="text-text-secondary px-2 py-3 text-right whitespace-nowrap">+ <td className="text-text-secondary px-2 py-3 text-end whitespace-nowrap">{formatDate(entry.lastSeen, locale)}</td></tr>@@ -466,17 +465,17 @@ function LatestConversations({</div></div><div className="overflow-x-auto">- <table className="w-full min-w-[56.25rem] table-fixed text-left text-sm">+ <table className="w-full min-w-[56.25rem] table-fixed text-start text-sm"><thead className="border-border-medium text-text-secondary border-b text-xs"><tr><th className="w-[7.5rem] px-2 py-2 font-medium">{localize('com_insights_date')}</th><th className="w-[12rem] px-2 py-2 font-medium">{localize('com_insights_user')}</th><th className="w-[10rem] px-2 py-2 font-medium">{localize('com_insights_agent')}</th><th className="px-2 py-2 font-medium">{localize('com_insights_first_message')}</th>- <th className="w-20 px-2 py-2 text-right font-medium">+ <th className="w-20 px-2 py-2 text-end font-medium">{localize('com_insights_messages')}</th>- <th className="w-20 px-2 py-2 text-right font-medium">+ <th className="w-20 px-2 py-2 text-end font-medium">{localize('com_insights_total_tokens')}</th></tr>@@ -499,10 +498,10 @@ function LatestConversations({{conversation.firstMessage || localize('com_insights_no_message')}</span></td>- <td className="px-2 py-3 text-right tabular-nums">+ <td className="px-2 py-3 text-end tabular-nums">{formatExactValue(conversation.messages, locale)}</td>- <td className="px-2 py-3 text-right tabular-nums">+ <td className="px-2 py-3 text-end tabular-nums">{formatValue(conversation.totalTokens, locale)}</td></tr>diff --git a/client/src/components/MCP/MCPServerMenuItem.tsx b/client/src/components/MCP/MCPServerMenuItem.tsxindex 4e6af7a03e..4b8fa7db80 100644--- a/client/src/components/MCP/MCPServerMenuItem.tsx+++ b/client/src/components/MCP/MCPServerMenuItem.tsx@@ -73,7 +73,7 @@ export default function MCPServerMenuItem({<divaria-hidden="true"className={cn(- 'border-surface-secondary absolute -right-0.5 -bottom-0.5 h-3 w-3 rounded-full border-2',+ 'border-surface-secondary absolute -inset-e-0.5 -bottom-0.5 h-3 w-3 rounded-full border-2',statusColor,)}/>diff --git a/client/src/components/MCP/StackedMCPIcons.tsx b/client/src/components/MCP/StackedMCPIcons.tsxindex 6b6f4fcf10..cf57dfa123 100644--- a/client/src/components/MCP/StackedMCPIcons.tsx+++ b/client/src/components/MCP/StackedMCPIcons.tsx@@ -16,12 +16,12 @@ const sizeConfig = {sm: {icon: 'h-[1.125rem] w-[1.125rem]',container: 'h-[1.375rem] w-[1.375rem]',- overlap: '-ml-2.5',+ overlap: '-ms-2.5',},md: {icon: 'h-5 w-5',container: 'h-6 w-6',- overlap: '-ml-3',+ overlap: '-ms-3',},};diff --git a/client/src/components/Plugins/Store/PluginAuthForm.tsx b/client/src/components/Plugins/Store/PluginAuthForm.tsxindex f0cc29cf74..c909fca085 100644--- a/client/src/components/Plugins/Store/PluginAuthForm.tsx+++ b/client/src/components/Plugins/Store/PluginAuthForm.tsx@@ -115,7 +115,7 @@ function PluginAuthForm({return (<form className="flex w-full flex-col" method="POST" onSubmit={submit}>- <div className="flex max-h-[40vh] flex-col gap-4 overflow-y-auto pr-1">+ <div className="flex max-h-[40vh] flex-col gap-4 overflow-y-auto pe-1">{authConfig.map((config: TPluginAuthConfig, i: number) => {const authField = config.authField.split('||')[0];const isOptional = config.optional === true;diff --git a/client/src/components/Projects/ProjectBadge.tsx b/client/src/components/Projects/ProjectBadge.tsxindex 02907e172e..aea8fee15e 100644--- a/client/src/components/Projects/ProjectBadge.tsx+++ b/client/src/components/Projects/ProjectBadge.tsx@@ -13,7 +13,7 @@ function ProjectBadge({ projectId }: { projectId: string }) {<div className="pointer-events-none absolute inset-x-0 top-12 z-5 flex justify-center px-3 md:top-14"><Linkto={`/projects/${encodeURIComponent(projectId)}`}- className="border-border-light bg-surface-secondary text-text-secondary hover:bg-surface-hover hover:text-text-primary focus-visible:ring-text-primary pointer-events-auto inline-flex h-7 max-w-full items-center gap-1.5 rounded-full border pr-3 pl-2.5 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-hidden"+ className="border-border-light bg-surface-secondary text-text-secondary hover:bg-surface-hover hover:text-text-primary focus-visible:ring-text-primary pointer-events-auto inline-flex h-7 max-w-full items-center gap-1.5 rounded-full border ps-2.5 pe-3 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:outline-hidden"aria-label={localize('com_ui_project_open_workspace', { name })}><Folder className="size-3.5 shrink-0" aria-hidden="true" />diff --git a/client/src/components/Projects/ProjectChatList.tsx b/client/src/components/Projects/ProjectChatList.tsxindex eeedb52f32..2623470ed8 100644--- a/client/src/components/Projects/ProjectChatList.tsx+++ b/client/src/components/Projects/ProjectChatList.tsx@@ -117,7 +117,7 @@ const ConversationRow = memo() : null}</Button>{conversationId ? (- <div className="pr-2">+ <div className="pe-2"><ProjectChatOptionsconversation={conversation}isMenuOpen={isMenuOpen}diff --git a/client/src/components/Projects/ProjectChatOptions.tsx b/client/src/components/Projects/ProjectChatOptions.tsxindex 9973857cfc..9297db5cd2 100644--- a/client/src/components/Projects/ProjectChatOptions.tsx+++ b/client/src/components/Projects/ProjectChatOptions.tsx@@ -60,7 +60,7 @@ function ProjectChatOptions({ conversation, isMenuOpen, setIsMenuOpen }: ProjectsetIsOpen={setIsMenuOpen}className="z-[125]"minWidth="11rem"- iconClassName="mr-2 text-text-secondary"+ iconClassName="me-2 text-text-secondary"trigger={<Ariakit.MenuButtonref={menuButtonRef}diff --git a/client/src/components/Projects/ProjectInstructionsDialog.tsx b/client/src/components/Projects/ProjectInstructionsDialog.tsxindex e65cff4a3d..a5e0a29f21 100644--- a/client/src/components/Projects/ProjectInstructionsDialog.tsx+++ b/client/src/components/Projects/ProjectInstructionsDialog.tsx@@ -189,7 +189,7 @@ export default function ProjectInstructionsDialog({<p id={`${formId}-instructions-help`} className="sr-only">{localize('com_ui_project_instructions_help')}</p>- <p className="text-text-tertiary text-right text-xs tabular-nums" aria-live="polite">+ <p className="text-text-tertiary text-end text-xs tabular-nums" aria-live="polite">{instructions.length}/{instructionsLimit}</p></div>diff --git a/client/src/components/Projects/ProjectWorkspace.tsx b/client/src/components/Projects/ProjectWorkspace.tsxindex 6a32d57721..91779d03e9 100644--- a/client/src/components/Projects/ProjectWorkspace.tsx+++ b/client/src/components/Projects/ProjectWorkspace.tsx@@ -35,6 +35,7 @@ import {} from '~/data-provider';import ProjectInstructionsDialog from './ProjectInstructionsDialog';import { useElementSize, useLocalize, useNewConvo } from '~/hooks';+import useDocumentDirection from '~/hooks/useDocumentDirection';import OpenSidebar from '~/components/Chat/Menus/OpenSidebar';import useDrawerViewport from '~/hooks/Nav/useDrawerViewport';import ProjectDeleteDialog from './ProjectDeleteDialog';@@ -46,6 +47,7 @@ import store from '~/store';type ChatSortField = 'updatedAt' | 'createdAt';+const WORKSPACE_PANEL_IDS_RTL = ['project-chats', 'project-details'];const WORKSPACE_PANEL_IDS = ['project-details', 'project-chats'];const DETAILS_PANEL_IDS_WITH_FILES = ['project-instructions', 'project-files'];const DETAILS_PANEL_IDS = ['project-instructions'];@@ -96,9 +98,11 @@ export default function ProjectWorkspace() {/** Panel sizes are a workspace-wide preference, so they persist per browser* rather than per project; the files panel keys its own layout so hiding it* (no RAG service) does not overwrite the split used when it is present. */+ const direction = useDocumentDirection();+ const reversed = direction === 'rtl';const workspaceLayout = useDefaultLayout({id: 'project-workspace-layout',- panelIds: WORKSPACE_PANEL_IDS,+ panelIds: reversed ? WORKSPACE_PANEL_IDS_RTL : WORKSPACE_PANEL_IDS,storage: localStorage,});const detailsLayout = useDefaultLayout({@@ -362,6 +366,76 @@ export default function ProjectWorkspace() {<ProjectResources key={project._id} project={project} />) : null;+ /** react-resizable-panels reads drag deltas physically, so under RTL the group+ * stays LTR and renders these in reverse, each panel restoring the document+ * direction for its content. */+ const workspacePanels = [+ <ResizablePanel+ key="details"+ id="project-details"+ {...(reversed ? { dir: direction } : {})}+ defaultSize="45"+ minSize="25"+ maxSize="70"+ className="min-w-0"+ >+ <div className="flex h-full min-h-0 min-w-0 flex-col gap-4 py-6 ps-4 md:ps-6">+ <div className="pe-3">{detailsHeader}</div>+ {/** The gutter before the workspace separator lives on each section rather than+ * this column, so the details group reaches the panel edge and its horizontal+ * separator overlaps the vertical one. Dragging that overlap resizes both+ * groups at once, which is what moves all three panels together. */}+ <div ref={detailsGroupRef} className="min-h-0 flex-1">+ <ResizablePanelGroup+ orientation="vertical"+ id="project-details-panels"+ defaultLayout={detailsLayout.defaultLayout}+ onLayoutChanged={detailsLayout.onLayoutChanged}+ resizeTargetMinimumSize={RESIZE_TARGET_SIZE}+ className="h-full"+ >+ <ResizablePanel+ id="project-instructions"+ defaultSize="55"+ minSize={detailsPanelMinSize}+ className="min-h-0"+ >+ <div className="h-full pe-3 pb-3">{instructionsSection}</div>+ </ResizablePanel>+ {filesSection != null && (+ <>+ <ResizableHandleAlt withHandle />+ <ResizablePanel+ id="project-files"+ defaultSize="45"+ minSize={detailsPanelMinSize}+ className="min-h-0"+ >+ <div className="h-full pe-3 pt-3">{filesSection}</div>+ </ResizablePanel>+ </>+ )}+ </ResizablePanelGroup>+ </div>+ </div>+ </ResizablePanel>,+ /* The separator binds to its neighbours when it mounts, so it remounts with the order;+ * the panels keep their keys and their content. */+ <ResizableHandleAlt key={`handle-${direction}`} withHandle />,+ <ResizablePanel+ key="chats"+ id="project-chats"+ {...(reversed ? { dir: direction } : {})}+ defaultSize="55"+ minSize="30"+ className="min-w-0"+ >+ <div className="flex h-full min-h-0 min-w-0 flex-col py-6 ps-3 pe-4 md:pe-6">+ {chatsSection}+ </div>+ </ResizablePanel>,+ ];+return (<main className="bg-surface-primary-alt text-text-primary flex h-full min-h-0 min-w-0 flex-col"><header className="border-border-light bg-surface-primary-alt sticky top-0 z-10 border-b">@@ -372,16 +446,16 @@ export default function ProjectWorkspace() {variant="section-action"size="sm"onClick={() => navigate('/projects')}- className="-ml-1.5"+ className="-ms-1.5">- <ArrowLeft className="size-4" aria-hidden="true" />+ <ArrowLeft className="size-4 rtl:-scale-x-100" aria-hidden="true" />{localize('com_ui_all_projects')}</Button><Buttontype="button"size="sm"shape="round"- className="ml-auto shrink-0"+ className="ms-auto shrink-0"variant="default"onClick={startProjectChat}aria-label={localize('com_ui_new_chat_in_project', { name: project.name })}@@ -449,60 +523,9 @@ export default function ProjectWorkspace() {onLayoutChanged={workspaceLayout.onLayoutChanged}resizeTargetMinimumSize={RESIZE_TARGET_SIZE}className="min-h-0 flex-1"+ {...(reversed ? { dir: 'ltr' } : {})}>- <ResizablePanel- id="project-details"- defaultSize="45"- minSize="25"- maxSize="70"- className="min-w-0"- >- <div className="flex h-full min-h-0 min-w-0 flex-col gap-4 py-6 pl-4 md:pl-6">- <div className="pr-3">{detailsHeader}</div>- {/** The gutter before the workspace separator lives on each section rather than- * this column, so the details group reaches the panel edge and its horizontal- * separator overlaps the vertical one. Dragging that overlap resizes both- * groups at once, which is what moves all three panels together. */}- <div ref={detailsGroupRef} className="min-h-0 flex-1">- <ResizablePanelGroup- orientation="vertical"- id="project-details-panels"- defaultLayout={detailsLayout.defaultLayout}- onLayoutChanged={detailsLayout.onLayoutChanged}- resizeTargetMinimumSize={RESIZE_TARGET_SIZE}- className="h-full"- >- <ResizablePanel- id="project-instructions"- defaultSize="55"- minSize={detailsPanelMinSize}- className="min-h-0"- >- <div className="h-full pr-3 pb-3">{instructionsSection}</div>- </ResizablePanel>- {filesSection != null && (- <>- <ResizableHandleAlt withHandle />- <ResizablePanel- id="project-files"- defaultSize="45"- minSize={detailsPanelMinSize}- className="min-h-0"- >- <div className="h-full pt-3 pr-3">{filesSection}</div>- </ResizablePanel>- </>- )}- </ResizablePanelGroup>- </div>- </div>- </ResizablePanel>- <ResizableHandleAlt withHandle />- <ResizablePanel id="project-chats" defaultSize="55" minSize="30" className="min-w-0">- <div className="flex h-full min-h-0 min-w-0 flex-col py-6 pr-4 pl-3 md:pr-6">- {chatsSection}- </div>- </ResizablePanel>+ {reversed ? workspacePanels.reverse() : workspacePanels}</ResizablePanelGroup>)}</main>diff --git a/client/src/components/Projects/ProjectsNavBar.tsx b/client/src/components/Projects/ProjectsNavBar.tsxindex b8d633b1aa..56ecfe0f88 100644--- a/client/src/components/Projects/ProjectsNavBar.tsx+++ b/client/src/components/Projects/ProjectsNavBar.tsx@@ -26,7 +26,7 @@ export default function ProjectsNavBar({ onCreate, search, onSearchChange }: Prolabel={localize('com_ui_search_projects')}containerClassName="order-last w-full min-w-0 md:order-none md:w-auto md:max-w-md md:flex-1"/>- <div className="ml-auto flex shrink-0 items-center gap-2">+ <div className="ms-auto flex shrink-0 items-center gap-2"><Buttontype="button"variant="default"diff --git a/client/src/components/Projects/ProjectsView.tsx b/client/src/components/Projects/ProjectsView.tsxindex 635fd3143f..85f1dce056 100644--- a/client/src/components/Projects/ProjectsView.tsx+++ b/client/src/components/Projects/ProjectsView.tsx@@ -118,7 +118,7 @@ function ProjectCard({) : null}</span></Button>- <div className="absolute top-2 right-2">+ <div className="absolute inset-e-2 top-2"><DropdownPopupportal={true}focusLoop={true}@@ -128,7 +128,7 @@ function ProjectCard({setIsOpen={setIsMenuOpen}className="z-[125]"minWidth="11rem"- iconClassName="mr-2 text-text-secondary"+ iconClassName="me-2 text-text-secondary"trigger={<Ariakit.MenuButtonaria-label={localize('com_ui_more_options')}diff --git a/client/src/components/Prompts/dialogs/DeletePrompt.tsx b/client/src/components/Prompts/dialogs/DeletePrompt.tsxindex 90333fab11..1a112f7c87 100644--- a/client/src/components/Prompts/dialogs/DeletePrompt.tsx+++ b/client/src/components/Prompts/dialogs/DeletePrompt.tsx@@ -49,7 +49,7 @@ const DeleteConfirmDialog = ({main={<div className="flex w-full flex-col items-center gap-2"><div className="grid w-full items-center gap-2">- <p className="text-text-primary text-left text-sm">+ <p className="text-text-primary text-start text-sm">{localize('com_ui_delete_confirm_prompt_version_var', { 0: name })}</p></div>diff --git a/client/src/components/Prompts/display/PromptTextCard.tsx b/client/src/components/Prompts/display/PromptTextCard.tsxindex bd40bcb26b..87a7de3fc5 100644--- a/client/src/components/Prompts/display/PromptTextCard.tsx+++ b/client/src/components/Prompts/display/PromptTextCard.tsx@@ -53,7 +53,7 @@ const PromptTextCard = ({ mainText }: PromptTextCardProps) => {return (<div className="border-border-medium relative flex h-full flex-col rounded-xl border bg-transparent">- <div className="absolute top-2 right-2 z-10">+ <div className="absolute inset-e-2 top-2 z-10"><TooltipAnchordescription={isCopied ? localize('com_ui_copied') : localize('com_ui_copy')}render={diff --git a/client/src/components/Prompts/display/PromptVariables.tsx b/client/src/components/Prompts/display/PromptVariables.tsxindex b9f262e0ce..f434b8ec35 100644--- a/client/src/components/Prompts/display/PromptVariables.tsx+++ b/client/src/components/Prompts/display/PromptVariables.tsx@@ -46,7 +46,10 @@ const DropdownVariableCard = ({ parsed }: { parsed: ParsedVariable }) => {><div className="mb-2 flex items-center gap-2"><div className="bg-surface-tertiary flex size-6 items-center justify-center rounded-md">- <ChevronRight className="text-text-secondary size-3.5" aria-hidden="true" />+ <ChevronRight+ className="text-text-secondary size-3.5 rtl:-scale-x-100"+ aria-hidden="true"+ /></div><span className="text-text-primary text-sm font-medium">{parsed.name}</span><span className="bg-surface-tertiary text-text-secondary text-3xs rounded-full px-1.5 py-0.5 font-medium">diff --git a/client/src/components/Prompts/display/PromptVersions.tsx b/client/src/components/Prompts/display/PromptVersions.tsxindex 3f829a0ca7..05489b20a8 100644--- a/client/src/components/Prompts/display/PromptVersions.tsx+++ b/client/src/components/Prompts/display/PromptVersions.tsx@@ -32,7 +32,7 @@ const VersionBadge = ({>{isProduction ? (<>- <span className="slow-pulse size-1.5 rounded-full bg-status-success" />+ <span className="slow-pulse bg-status-success size-1.5 rounded-full" /><span>{label}</span></>) : (@@ -84,7 +84,7 @@ const VersionCard = ({<div className="relative flex w-6 shrink-0 justify-center">{/* Vertical line - extends through mb-2 gap + mt-3 to reach next circle */}{index < totalVersions - 1 && (- <div className="absolute -bottom-5 top-0 w-0.5 bg-border-light" />+ <div className="bg-border-light absolute top-0 -bottom-5 w-0.5" />)}{/* Circle marker - mt-3 aligns with card title (card has p-3) */}<div@@ -105,10 +105,10 @@ const VersionCard = ({<buttontype="button"className={cn(- 'group mb-2 ml-2 flex flex-1 flex-col rounded-lg border p-3 text-left',+ 'group ms-2 mb-2 flex flex-1 flex-col rounded-lg border p-3 text-start',isSelected? 'border-status-success-border bg-status-success-subtle'- : 'border-border-medium bg-transparent hover:border-border-heavy hover:bg-surface-hover',+ : 'border-border-medium hover:border-border-heavy hover:bg-surface-hover bg-transparent',)}onClick={onClick}aria-label={localize('com_ui_version_var', { 0: `${versionNumber}` })}@@ -141,7 +141,7 @@ const VersionCard = ({</div><time- className="mt-1 text-xs text-text-secondary"+ className="text-text-secondary mt-1 text-xs"dateTime={prompt.createdAt}title={new Date(prompt.createdAt).toLocaleString(undefined, { hour12 })}>diff --git a/client/src/components/Prompts/editor/Markdown.tsx b/client/src/components/Prompts/editor/Markdown.tsxindex 6d2ee8f408..ddf7feb247 100644--- a/client/src/components/Prompts/editor/Markdown.tsx+++ b/client/src/components/Prompts/editor/Markdown.tsx@@ -9,7 +9,7 @@ const highlightVariables = (text: string): React.ReactNode[] => {return (<bkey={index}- className="bg-status-warning-subtle text-text-warning ml-[0.5] rounded-lg p-0.25 font-medium"+ className="bg-status-warning-subtle text-text-warning ms-[0.5] rounded-lg p-0.25 font-medium">{`{{${part}}}`}</b>diff --git a/client/src/components/Prompts/editor/PromptEditor.tsx b/client/src/components/Prompts/editor/PromptEditor.tsxindex b9ebc0d59b..e0b1272620 100644--- a/client/src/components/Prompts/editor/PromptEditor.tsx+++ b/client/src/components/Prompts/editor/PromptEditor.tsx@@ -47,11 +47,11 @@ const PromptEditor: React.FC<Props> = ({ name, isEditing, setIsEditing }) => {<h2 className="sr-only">{localize('com_ui_control_bar')}</h2><divclassName={cn(- 'border-border-medium relative w-full flex-1 overflow-auto rounded-xl border p-3 text-left transition-all duration-200 sm:p-4',+ 'border-border-medium relative w-full flex-1 overflow-auto rounded-xl border p-3 text-start transition-all duration-200 sm:p-4',isEditing ? '' : 'hover:bg-surface-tertiary cursor-pointer',)}>- <div className="absolute top-2 right-2 z-10 flex items-center gap-1">+ <div className="absolute inset-e-2 top-2 z-10 flex items-center gap-1"><VariablesDropdown fieldName={name} finalFocus={textareaRef} /><TooltipAnchordescription={isEditing ? localize('com_ui_save') : localize('com_ui_edit')}diff --git a/client/src/components/Prompts/fields/Command.tsx b/client/src/components/Prompts/fields/Command.tsxindex d13f7e698a..980bda6627 100644--- a/client/src/components/Prompts/fields/Command.tsx+++ b/client/src/components/Prompts/fields/Command.tsx@@ -53,9 +53,10 @@ const Command = ({<label htmlFor={commandId} className="text-text-secondary block px-4 pt-2 text-sm md:hidden">{localize('com_ui_command_placeholder')}</label>- <div className="text-text-secondary relative flex h-10 items-center gap-1 pr-2 pl-4 text-sm">+ <div className="text-text-secondary relative flex h-10 items-center gap-1 ps-4 pe-2 text-sm"><SquareSlash className="icon-sm shrink-0" aria-hidden="true" />- <div className="relative min-w-0 flex-1">+ {/* The wrapper reserves the counter's side so it follows the inline end; <Input> owns its own padding. */}+ <div className="relative min-w-0 flex-1 pe-11"><Inputtype="text"id={commandId}@@ -64,13 +65,13 @@ const Command = ({placeholder=" "value={command}onChange={handleInputChange}- className="peer w-full border-none pr-14"+ className="peer w-full border-none"aria-label={localize('com_ui_command_placeholder')}/><labelhtmlFor={commandId}className={cn(- 'text-text-secondary peer-focus:text-text-primary pointer-events-none absolute top-0.5 left-0 hidden max-w-[calc(100%-3.5rem)] origin-[0] translate-y-2 scale-100 rounded px-1 text-sm transition-transform duration-200 peer-placeholder-shown:translate-y-2 peer-placeholder-shown:scale-100 peer-focus:-translate-y-3 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-3 peer-[:not(:placeholder-shown)]:scale-75 md:block',+ 'text-text-secondary peer-focus:text-text-primary pointer-events-none absolute inset-s-0 top-0.5 hidden max-w-[calc(100%-3.5rem)] origin-[0] translate-y-2 scale-100 rounded px-1 text-sm transition-transform duration-200 peer-placeholder-shown:translate-y-2 peer-placeholder-shown:scale-100 peer-focus:-translate-y-3 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-3 peer-[:not(:placeholder-shown)]:scale-75 md:block rtl:origin-right',labelBgClassName,)}>@@ -78,7 +79,7 @@ const Command = ({</label></div>{disabled !== true && (- <span className="text-text-secondary absolute right-2 shrink-0 text-xs md:text-sm">{`${charCount}/${Constants.COMMANDS_MAX_LENGTH}`}</span>+ <span className="text-text-secondary absolute inset-e-2 shrink-0 text-xs md:text-sm">{`${charCount}/${Constants.COMMANDS_MAX_LENGTH}`}</span>)}</div></div>diff --git a/client/src/components/Prompts/fields/Description.tsx b/client/src/components/Prompts/fields/Description.tsxindex 3aeefc38b0..f22f8e400a 100644--- a/client/src/components/Prompts/fields/Description.tsx+++ b/client/src/components/Prompts/fields/Description.tsx@@ -53,9 +53,10 @@ const Description = ({>{localize('com_ui_description_placeholder')}</label>- <div className="text-text-secondary relative flex h-10 items-center gap-1 pr-2 pl-4 text-sm">+ <div className="text-text-secondary relative flex h-10 items-center gap-1 ps-4 pe-2 text-sm"><Info className="icon-sm shrink-0" aria-hidden="true" />- <div className="relative min-w-0 flex-1">+ {/* The wrapper reserves the counter's side so it follows the inline end; <Input> owns its own padding. */}+ <div className="relative min-w-0 flex-1 pe-11"><Inputtype="text"id={descriptionId}@@ -64,13 +65,13 @@ const Description = ({placeholder=" "value={description}onChange={handleInputChange}- className="peer w-full border-none pr-14"+ className="peer w-full border-none"aria-label={localize('com_ui_description_placeholder')}/><labelhtmlFor={descriptionId}className={cn(- 'text-text-secondary peer-focus:text-text-primary pointer-events-none absolute top-0.5 left-0 hidden max-w-[calc(100%-3.5rem)] origin-[0] translate-y-2 scale-100 rounded px-1 text-sm transition-transform duration-200 peer-placeholder-shown:translate-y-2 peer-placeholder-shown:scale-100 peer-focus:-translate-y-3 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-3 peer-[:not(:placeholder-shown)]:scale-75 md:block',+ 'text-text-secondary peer-focus:text-text-primary pointer-events-none absolute inset-s-0 top-0.5 hidden max-w-[calc(100%-3.5rem)] origin-[0] translate-y-2 scale-100 rounded px-1 text-sm transition-transform duration-200 peer-placeholder-shown:translate-y-2 peer-placeholder-shown:scale-100 peer-focus:-translate-y-3 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-3 peer-[:not(:placeholder-shown)]:scale-75 md:block rtl:origin-right',labelBgClassName,)}>@@ -78,7 +79,7 @@ const Description = ({</label></div>{!disabled && (- <span className="text-text-secondary absolute right-2 shrink-0 text-xs md:text-sm">{`${charCount}/${MAX_LENGTH}`}</span>+ <span className="text-text-secondary absolute inset-e-2 shrink-0 text-xs md:text-sm">{`${charCount}/${MAX_LENGTH}`}</span>)}</div></div>diff --git a/client/src/components/Prompts/fields/PromptName.tsx b/client/src/components/Prompts/fields/PromptName.tsxindex 8a4d809f6c..585c9a4dc2 100644--- a/client/src/components/Prompts/fields/PromptName.tsx+++ b/client/src/components/Prompts/fields/PromptName.tsx@@ -107,7 +107,7 @@ const PromptName: React.FC<Props> = ({ name, isLoading = false, isError = false,setIsEditing(true);}}}- className="text-text-primary hover:text-text-secondary h-8 min-w-0 flex-1 cursor-text truncate pl-2 text-left text-base font-semibold transition-colors focus:outline-hidden"+ className="text-text-primary hover:text-text-secondary h-8 min-w-0 flex-1 cursor-text truncate ps-2 text-start text-base font-semibold transition-colors focus:outline-hidden"aria-label={localize('com_ui_edit') + ': ' + (newName ?? '')}>{newName}@@ -121,7 +121,7 @@ const PromptName: React.FC<Props> = ({ name, isLoading = false, isError = false,);return (- <div className="group/title relative mr-2 flex h-8 min-w-0 flex-1 items-center">+ <div className="group/title relative me-2 flex h-8 min-w-0 flex-1 items-center">{isEditing ? (<Inputref={inputRef}@@ -137,7 +137,7 @@ const PromptName: React.FC<Props> = ({ name, isLoading = false, isError = false,) : (readView)}- <div className="ml-1.5 flex shrink-0 items-center justify-center">+ <div className="ms-1.5 flex shrink-0 items-center justify-center">{saveStatus === 'saving' && (<Loader2className="text-text-secondary size-4 animate-spin"diff --git a/client/src/components/Prompts/forms/CreatePromptForm.tsx b/client/src/components/Prompts/forms/CreatePromptForm.tsxindex 4d9997bdb5..4b381f79a2 100644--- a/client/src/components/Prompts/forms/CreatePromptForm.tsx+++ b/client/src/components/Prompts/forms/CreatePromptForm.tsx@@ -141,7 +141,7 @@ const CreatePromptForm = ({{...field}id="prompt-name"type="text"- className="peer text-text-primary mr-2 w-full p-2 text-2xl"+ className="peer text-text-primary me-2 w-full p-2 text-2xl"placeholder=" "tabIndex={0}aria-label={localize('com_ui_prompt_name')}@@ -150,7 +150,7 @@ const CreatePromptForm = ({<labelhtmlFor="prompt-name"className={cn(- 'text-text-secondary peer-focus:text-text-primary pointer-events-none absolute -top-1 left-3 origin-[0] translate-y-3 scale-100 rounded px-1 text-base transition-transform duration-200 peer-placeholder-shown:translate-y-3 peer-placeholder-shown:scale-100 peer-focus:-translate-y-2 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:scale-75',+ 'text-text-secondary peer-focus:text-text-primary pointer-events-none absolute inset-s-3 -top-1 origin-[0] translate-y-3 scale-100 rounded px-1 text-base transition-transform duration-200 peer-placeholder-shown:translate-y-3 peer-placeholder-shown:scale-100 peer-focus:-translate-y-2 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:scale-75 rtl:origin-right',labelBgClassName,)}>@@ -177,7 +177,7 @@ const CreatePromptForm = ({<div className="flex w-full flex-col gap-4 md:mt-[1.075rem]"><div className="flex flex-col"><header className="border-border-medium flex items-center justify-between rounded-t-xl border bg-transparent p-2">- <div className="ml-1 flex items-center gap-2">+ <div className="ms-1 flex items-center gap-2"><FileText className="text-text-secondary size-4" aria-hidden="true" /><h2 className="text-text-primary text-sm font-semibold">{localize('com_ui_prompt_text')}*diff --git a/client/src/components/Prompts/forms/PromptForm.tsx b/client/src/components/Prompts/forms/PromptForm.tsxindex fe8030aeb6..3a4e8ffee8 100644--- a/client/src/components/Prompts/forms/PromptForm.tsx+++ b/client/src/components/Prompts/forms/PromptForm.tsx@@ -517,7 +517,7 @@ const PromptForm = ({ promptId: promptIdProp }: { promptId?: string }) => {onClick={() => setShowSidePanel(true)}aria-label={localize('com_ui_versions')}>- <Menu className="size-4 sm:mr-1.5" aria-hidden="true" />+ <Menu className="size-4 sm:me-1.5" aria-hidden="true" /><span className="hidden sm:inline">{localize('com_ui_versions')}</span></Button>)}@@ -564,7 +564,7 @@ const PromptForm = ({ promptId: promptIdProp }: { promptId?: string }) => {{/* Versions Sidebar - Advanced Mode Only */}{editorMode === PromptsEditorMode.ADVANCED && (- <div className="border-border-medium hidden w-72 shrink-0 border-l lg:block xl:w-80">+ <div className="border-border-medium hidden w-72 shrink-0 border-s lg:block xl:w-80"><VersionsPanelgroup={group}prompts={prompts}@@ -601,8 +601,8 @@ const PromptForm = ({ promptId: promptIdProp }: { promptId?: string }) => {<divref={sidePanelRef}className={cn(- 'border-border-medium bg-surface-primary-alt fixed top-0 right-0 z-[110] flex h-full flex-col border-l shadow-xl lg:hidden',- showSidePanel ? 'translate-x-0' : 'translate-x-full',+ 'border-border-medium bg-surface-primary-alt fixed inset-e-0 top-0 z-[110] flex h-full flex-col border-s shadow-xl lg:hidden',+ showSidePanel ? 'translate-x-0' : 'translate-x-full rtl:-translate-x-full',)}style={{width: 'min(85vw, 380px)',diff --git a/client/src/components/Prompts/forms/VariableForm.tsx b/client/src/components/Prompts/forms/VariableForm.tsxindex d230b0272b..7e76e7afb3 100644--- a/client/src/components/Prompts/forms/VariableForm.tsx+++ b/client/src/components/Prompts/forms/VariableForm.tsx@@ -204,7 +204,7 @@ export default function VariableForm({/><labelhtmlFor={`fields.${index}.value`}- className="text-text-secondary peer-focus:text-text-primary absolute top-0 left-3 text-sm transition-all duration-200 peer-focus:-top-6 peer-focus:left-1 peer-focus:text-xs peer-[:not(:placeholder-shown)]:-top-6 peer-[:not(:placeholder-shown)]:left-1 peer-[:not(:placeholder-shown)]:text-xs"+ className="text-text-secondary peer-focus:text-text-primary absolute inset-s-3 top-0 text-sm transition-all duration-200 peer-focus:inset-s-1 peer-focus:-top-6 peer-focus:text-xs peer-[:not(:placeholder-shown)]:inset-s-1 peer-[:not(:placeholder-shown)]:-top-6 peer-[:not(:placeholder-shown)]:text-xs">{field.config.variable}</label>diff --git a/client/src/components/Prompts/lists/ChatGroupItem.tsx b/client/src/components/Prompts/lists/ChatGroupItem.tsxindex f786c6c54e..8f6fcd8700 100644--- a/client/src/components/Prompts/lists/ChatGroupItem.tsx+++ b/client/src/components/Prompts/lists/ChatGroupItem.tsx@@ -116,21 +116,21 @@ function ChatGroupItem({{label: localize('com_ui_preview'),onClick: () => setPreviewDialogOpen(true),- icon: <Eye className="icon-sm text-text-primary mr-2" aria-hidden="true" />,+ icon: <Eye className="icon-sm text-text-primary me-2" aria-hidden="true" />,},];if (canEdit) {items.push({label: localize('com_ui_edit'),onClick: () => navigate(`${PROMPT_PATH}/${group._id}`),- icon: <SquarePen className="icon-sm text-text-primary mr-2" aria-hidden="true" />,+ icon: <SquarePen className="icon-sm text-text-primary me-2" aria-hidden="true" />,});}if (canDelete) {items.push({label: localize('com_ui_delete'),onClick: () => setDeleteOpen(true),- icon: <Trash className="icon-sm text-text-primary mr-2" aria-hidden="true" />,+ icon: <Trash className="icon-sm text-text-primary me-2" aria-hidden="true" />,});}return items;@@ -205,7 +205,7 @@ function ChatGroupItem({{/* The menu shares the title's line, so only the title gives way to it.The snippet below keeps the full width of the row either way. */}<div- className={cn(rowActionSlotClasses({ open: menuOpen }), 'relative z-10 ml-auto')}+ className={cn(rowActionSlotClasses({ open: menuOpen }), 'relative z-10 ms-auto')}><DropdownPopupportal={true}diff --git a/client/src/components/Prompts/sidebar/GroupSidePanel.tsx b/client/src/components/Prompts/sidebar/GroupSidePanel.tsxindex 93dc66e54f..f1403c9490 100644--- a/client/src/components/Prompts/sidebar/GroupSidePanel.tsx+++ b/client/src/components/Prompts/sidebar/GroupSidePanel.tsx@@ -89,7 +89,7 @@ export default function GroupSidePanel({ref={containerRef}isLoading={!!groupsQuery.isLoading}skeleton={<PromptGroupSkeleton />}- className="text-text-primary flex scrollbar-gutter-stable flex-col gap-2 overflow-x-hidden pr-1 pb-3 pl-3"+ className="text-text-primary flex scrollbar-gutter-stable flex-col gap-2 overflow-x-hidden ps-3 pe-1 pb-3"><List groups={promptGroups} isChatRoute={isChatRoute} />{/* Appending the next page, so the loaded rows stay put */}diff --git a/client/src/components/Prompts/utils/SkeletonForm.tsx b/client/src/components/Prompts/utils/SkeletonForm.tsxindex 3a430a0978..233a6d2b45 100644--- a/client/src/components/Prompts/utils/SkeletonForm.tsx+++ b/client/src/components/Prompts/utils/SkeletonForm.tsx@@ -8,7 +8,7 @@ export default function SkeletonForm() {</div><div className="flex h-full w-full flex-col md:flex-row">{/* Left Section */}- <div className="border-border-medium-alt flex-1 overflow-y-auto p-4 md:max-h-[calc(100vh-9.375rem)] md:border-r">+ <div className="border-border-medium-alt flex-1 overflow-y-auto p-4 md:max-h-[calc(100vh-9.375rem)] md:border-e"><Skeleton className="h-96" /></div></div>diff --git a/client/src/components/Share/ShareArtifacts.tsx b/client/src/components/Share/ShareArtifacts.tsxindex 653c4e0331..4a4b4877e1 100644--- a/client/src/components/Share/ShareArtifacts.tsx+++ b/client/src/components/Share/ShareArtifacts.tsx@@ -9,6 +9,7 @@ import UndockedArtifacts from '~/components/Artifacts/UndockedArtifacts';import { artifactsUndocked } from '~/components/Artifacts/state';import { ArtifactsProvider, EditorProvider } from '~/Providers';import { ARTIFACTS_SHEET_MAX_WIDTH } from '~/utils/breakpoints';+import useDocumentDirection from '~/hooks/useDocumentDirection';import { useGetSharedStartupConfig } from '~/data-provider';import useScaledMaxWidth from '~/hooks/useScaledMaxWidth';import { isCodeOnlyArtifact } from '~/utils/artifacts';@@ -129,6 +130,39 @@ export function ShareArtifactsContainer({const pane = paneContext != null ? <ShareArtifactsPanel contextValue={paneContext} /> : null;const overlay = paneContext != null ? <ShareArtifactsOverlay contextValue={paneContext} /> : null;const showDockedPanel = pane != null && !isUndocked && !isSmallScreen;+ const direction = useDocumentDirection();+ const reversed = direction === 'rtl';++ /* react-resizable-panels reads drag deltas physically, so under RTL the group+ * stays LTR and the panels render in reverse, each restoring the document+ * direction for its content. Keys keep both panels mounted across the swap. */+ const panels = [+ <ResizablePanel+ key="content"+ defaultSize={`${showDockedPanel ? 100 - normalizedArtifactSize : 100}`}+ minSize="35"+ id="share-content"+ {...(reversed ? { dir: direction } : {})}+ >+ {mainContent}+ </ResizablePanel>,+ /* The separator binds to its neighbours when it mounts, so it remounts with the order. */+ showDockedPanel && (+ <ResizableHandleAlt key={`handle-${direction}`} withHandle className="text-text-primary" />+ ),+ showDockedPanel && (+ <ResizablePanel+ key="artifacts"+ defaultSize={`${normalizedArtifactSize}`}+ minSize="20"+ maxSize="60"+ id="share-artifacts"+ {...(reversed ? { dir: direction } : {})}+ >+ {pane}+ </ResizablePanel>+ ),+ ];/* The transcript keeps one place in the tree through every state: React* cannot preserve it across a change of ancestry, so opening the pane,@@ -142,25 +176,9 @@ export function ShareArtifactsContainer({orientation="horizontal"className="h-full w-full"onLayoutChanged={handleLayoutChanged}+ {...(reversed ? { dir: 'ltr' } : {})}>- <ResizablePanel- defaultSize={`${showDockedPanel ? 100 - normalizedArtifactSize : 100}`}- minSize="35"- id="share-content"- >- {mainContent}- </ResizablePanel>- {showDockedPanel && <ResizableHandleAlt withHandle className="text-text-primary" />}- {showDockedPanel && (- <ResizablePanel- defaultSize={`${normalizedArtifactSize}`}- minSize="20"- maxSize="60"- id="share-artifacts"- >- {pane}- </ResizablePanel>- )}+ {reversed ? panels.reverse() : panels}</ResizablePanelGroup>{pane != null && isUndocked && <UndockedArtifacts>{pane}</UndockedArtifacts>}{pane != null && !isUndocked && isSmallScreen && overlay}@@ -178,7 +196,7 @@ interface ShareArtifactsPanelProps {function ShareArtifactsPanel({ contextValue }: ShareArtifactsPanelProps) {return (<ArtifactsProvider value={contextValue}>- <div className="border-border-light bg-surface-primary flex h-full w-full border-l shadow-2xl">+ <div className="border-border-light bg-surface-primary flex h-full w-full border-s shadow-2xl"><Suspense fallback={null}><Artifacts /></Suspense>@@ -193,7 +211,7 @@ function ShareArtifactsPanel({ contextValue }: ShareArtifactsPanelProps) {function ShareArtifactsOverlay({ contextValue }: ShareArtifactsPanelProps) {return (<div- className="fixed inset-y-0 right-0 z-40 flex w-full max-w-full sm:max-w-[26.25rem]"+ className="fixed inset-y-0 inset-e-0 z-40 flex w-full max-w-full sm:max-w-[26.25rem]"role="complementary"aria-label="Artifacts panel">diff --git a/client/src/components/Share/ShareView.tsx b/client/src/components/Share/ShareView.tsxindex 96f936d494..94302dcc62 100644--- a/client/src/components/Share/ShareView.tsx+++ b/client/src/components/Share/ShareView.tsx@@ -416,7 +416,7 @@ export function ShareHeader({className={cn('border-border-medium transition-colors',isMobile- ? 'absolute right-4 bottom-4 justify-center p-0 shadow-lg'+ ? 'absolute inset-e-4 bottom-4 justify-center p-0 shadow-lg': 'gap-2 self-start px-4 py-2',)}>@@ -431,7 +431,7 @@ export function ShareHeader({onPointerDownOutside={handleDialogOutside}onInteractOutside={handleDialogOutside}>- <OGDialogHeader className="text-left">+ <OGDialogHeader className="text-start"><OGDialogTitle>{settingsLabel}</OGDialogTitle></OGDialogHeader><div className="flex max-h-[70vh] flex-col gap-4 overflow-y-auto pt-2 text-sm">diff --git a/client/src/components/Sharing/AccessRolesPicker.tsx b/client/src/components/Sharing/AccessRolesPicker.tsxindex b99959200d..f655e98fce 100644--- a/client/src/components/Sharing/AccessRolesPicker.tsx+++ b/client/src/components/Sharing/AccessRolesPicker.tsx@@ -64,7 +64,7 @@ export default function AccessRolesPicker({},render: (props) => (<button {...props}>- <div className="flex flex-col items-start gap-0.5 text-left">+ <div className="flex flex-col items-start gap-0.5 text-start"><span className="text-text-primary font-medium">{localizedInfo.name}</span><span className="text-text-secondary text-xs">{localizedInfo.description}</span></div>diff --git a/client/src/components/Sharing/GenericGrantAccessDialog.tsx b/client/src/components/Sharing/GenericGrantAccessDialog.tsxindex aed8d849b4..3a11a0143b 100644--- a/client/src/components/Sharing/GenericGrantAccessDialog.tsx+++ b/client/src/components/Sharing/GenericGrantAccessDialog.tsx@@ -316,7 +316,7 @@ export default function GenericGrantAccessDialog({<OGDialog open={isModalOpen} onOpenChange={handleModalOpenChange} modal><OGDialogTrigger asChild>{TriggerComponent}</OGDialogTrigger><OGDialogContent className="flex max-h-[90dvh] w-11/12 max-w-5xl flex-col gap-0 overflow-hidden p-0">- <OGDialogHeader className="shrink-0 px-5 py-5 pr-14 text-left sm:px-6">+ <OGDialogHeader className="shrink-0 px-5 py-5 pe-14 text-start sm:px-6"><div className="flex items-start gap-3"><div className="border-border-light bg-surface-secondary text-text-secondary flex size-10 shrink-0 items-center justify-center rounded-xl border"><Users className="size-5" aria-hidden="true" />diff --git a/client/src/components/Sharing/PeoplePicker/SearchPicker.tsx b/client/src/components/Sharing/PeoplePicker/SearchPicker.tsxindex 9c4310ba61..4adfec4b26 100644--- a/client/src/components/Sharing/PeoplePicker/SearchPicker.tsx+++ b/client/src/components/Sharing/PeoplePicker/SearchPicker.tsx@@ -88,9 +88,9 @@ export function SearchPicker<TOption extends { key: string; value: string }>({)}>{isLoading ? (- <Spinner className="absolute left-3 h-4 w-4" />+ <Spinner className="absolute inset-s-3 h-4 w-4" />) : (- <Search className="text-text-secondary absolute left-3 h-4 w-4" aria-hidden="true" />+ <Search className="text-text-secondary absolute inset-s-3 h-4 w-4" aria-hidden="true" />)}<Ariakit.Comboboxrender={<Input />}@@ -116,7 +116,7 @@ export function SearchPicker<TOption extends { key: string; value: string }>({value={localQuery}// autoSelectplaceholder={placeholder || localize('com_ui_select_options')}- className={cn('h-10 w-full pl-10 text-sm leading-tight', inputClassName)}+ className={cn('h-10 w-full ps-10 text-sm leading-tight', inputClassName)}/></div></>diff --git a/client/src/components/Sharing/PeoplePicker/SelectedPrincipalsList.tsx b/client/src/components/Sharing/PeoplePicker/SelectedPrincipalsList.tsxindex 62c1e8d762..43126a7750 100644--- a/client/src/components/Sharing/PeoplePicker/SelectedPrincipalsList.tsx+++ b/client/src/components/Sharing/PeoplePicker/SelectedPrincipalsList.tsx@@ -91,7 +91,7 @@ export default function SelectedPrincipalsList({<div className="flex w-full shrink-0 items-center justify-end gap-2 sm:w-auto">{showInsightsAccess && onInsightsAccessChange && (- <div className="mr-auto flex items-center gap-2 sm:mr-1">+ <div className="me-auto flex items-center gap-2 sm:me-1"><Checkboxchecked={hasAutomaticInsightsAccess || share.viewInsights === true}disabled={hasAutomaticInsightsAccess}diff --git a/client/src/components/Skills/dialogs/DeleteSkill.tsx b/client/src/components/Skills/dialogs/DeleteSkill.tsxindex ffe51f03c3..0118da93c7 100644--- a/client/src/components/Skills/dialogs/DeleteSkill.tsx+++ b/client/src/components/Skills/dialogs/DeleteSkill.tsx@@ -79,7 +79,7 @@ function DeleteSkill({ skillId, skillName, disabled, onDelete }: DeleteSkillProptitle={localize('com_ui_delete')}className="max-w-[28.125rem]"main={- <p className="text-text-primary text-left text-sm">+ <p className="text-text-primary text-start text-sm">{localize('com_ui_skill_delete_confirm', { 0: skillName })}</p>}diff --git a/client/src/components/Skills/display/SkillFileViewer.tsx b/client/src/components/Skills/display/SkillFileViewer.tsxindex 36147e5ab7..ea738cd7bc 100644--- a/client/src/components/Skills/display/SkillFileViewer.tsx+++ b/client/src/components/Skills/display/SkillFileViewer.tsx@@ -85,7 +85,7 @@ function SkillFileViewer({ skillId, relativePath, skill }: SkillFileViewerProps)className="text-text-secondary hover:bg-surface-hover hover:text-text-primary rounded-md p-1 transition-colors"aria-label={localize('com_ui_back')}>- <ArrowLeft className="size-4" />+ <ArrowLeft className="size-4 rtl:-scale-x-100" /></button><FileText className="text-text-secondary size-4 shrink-0" aria-hidden="true" /><span className="text-text-primary min-w-0 flex-1 truncate text-sm font-medium">diff --git a/client/src/components/Skills/forms/CreateSkillForm.tsx b/client/src/components/Skills/forms/CreateSkillForm.tsxindex d549514adf..8e1a6ee40e 100644--- a/client/src/components/Skills/forms/CreateSkillForm.tsx+++ b/client/src/components/Skills/forms/CreateSkillForm.tsx@@ -169,7 +169,7 @@ export default function CreateSkillForm({{...field}id="skill-name"type="text"- className="peer text-text-primary mr-2 w-full p-2 text-2xl"+ className="peer text-text-primary me-2 w-full p-2 text-2xl"placeholder=" "tabIndex={0}aria-label={localize('com_ui_name')}@@ -179,7 +179,7 @@ export default function CreateSkillForm({/><labelhtmlFor="skill-name"- className="bg-surface-primary-alt text-text-secondary peer-focus:text-text-primary pointer-events-none absolute -top-1 left-3 origin-[0] translate-y-3 scale-100 rounded px-1 text-base transition-transform duration-200 peer-placeholder-shown:translate-y-3 peer-placeholder-shown:scale-100 peer-focus:-translate-y-2 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:scale-75"+ className="bg-surface-primary-alt text-text-secondary peer-focus:text-text-primary pointer-events-none absolute inset-s-3 -top-1 origin-[0] translate-y-3 scale-100 rounded px-1 text-base transition-transform duration-200 peer-placeholder-shown:translate-y-3 peer-placeholder-shown:scale-100 peer-focus:-translate-y-2 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:scale-75 rtl:origin-right">{localize('com_ui_name')}*</label>@@ -223,7 +223,7 @@ export default function CreateSkillForm({className="mb-1 text-sm font-medium">{localize('com_ui_description')}- <span className="text-text-destructive ml-0.5">*</span>+ <span className="text-text-destructive ms-0.5">*</span></Label><TextareaAutosizevariant="framed"diff --git a/client/src/components/Skills/forms/InvocationModePicker.tsx b/client/src/components/Skills/forms/InvocationModePicker.tsxindex 5fff30d768..53465069bb 100644--- a/client/src/components/Skills/forms/InvocationModePicker.tsx+++ b/client/src/components/Skills/forms/InvocationModePicker.tsx@@ -41,7 +41,7 @@ export default function InvocationModePicker({ value, onChange }: InvocationMode},render: (props) => (<button {...props}>- <div className="flex flex-col items-start gap-0.5 text-left">+ <div className="flex flex-col items-start gap-0.5 text-start"><span className="text-text-primary font-medium">{localize(invocationLabels[mode])}</span>diff --git a/client/src/components/Skills/forms/SkillContentEditor.tsx b/client/src/components/Skills/forms/SkillContentEditor.tsxindex 4c7f6cec62..ea225522de 100644--- a/client/src/components/Skills/forms/SkillContentEditor.tsx+++ b/client/src/components/Skills/forms/SkillContentEditor.tsx@@ -58,11 +58,11 @@ const SkillContentEditor: React.FC<SkillContentEditorProps> = ({<h2 className="sr-only">{localize('com_ui_skill_content')}</h2><divclassName={cn(- 'border-border-medium relative w-full flex-1 overflow-auto rounded-xl border p-3 text-left transition-all duration-200 sm:p-4',+ 'border-border-medium relative w-full flex-1 overflow-auto rounded-xl border p-3 text-start transition-all duration-200 sm:p-4',isEditing ? '' : 'hover:bg-surface-tertiary cursor-pointer',)}>- <div className="absolute top-2 right-2 z-10">+ <div className="absolute inset-e-2 top-2 z-10"><TooltipAnchordescription={isEditing ? localize('com_ui_save') : localize('com_ui_edit')}render={diff --git a/client/src/components/Skills/forms/SkillForm.tsx b/client/src/components/Skills/forms/SkillForm.tsxindex becbe41c09..d06df18e72 100644--- a/client/src/components/Skills/forms/SkillForm.tsx+++ b/client/src/components/Skills/forms/SkillForm.tsx@@ -196,7 +196,7 @@ export default function SkillForm({ skillId }: SkillFormProps) {id="skill-name"type="text"readOnly={readOnly}- className="peer text-text-primary mr-2 w-full p-2 text-2xl"+ className="peer text-text-primary me-2 w-full p-2 text-2xl"placeholder=" "tabIndex={0}aria-label={localize('com_ui_name')}@@ -206,7 +206,7 @@ export default function SkillForm({ skillId }: SkillFormProps) {/><labelhtmlFor="skill-name"- className="bg-surface-primary-alt text-text-secondary peer-focus:text-text-primary pointer-events-none absolute -top-1 left-3 origin-[0] translate-y-3 scale-100 rounded px-1 text-base transition-transform duration-200 peer-placeholder-shown:translate-y-3 peer-placeholder-shown:scale-100 peer-focus:-translate-y-2 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:scale-75"+ className="bg-surface-primary-alt text-text-secondary peer-focus:text-text-primary pointer-events-none absolute inset-s-3 -top-1 origin-[0] translate-y-3 scale-100 rounded px-1 text-base transition-transform duration-200 peer-placeholder-shown:translate-y-3 peer-placeholder-shown:scale-100 peer-focus:-translate-y-2 peer-focus:scale-75 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:scale-75 rtl:origin-right">{localize('com_ui_name')}*</label>@@ -262,7 +262,7 @@ export default function SkillForm({ skillId }: SkillFormProps) {<AlertTriangle className="size-4" aria-hidden="true" />{localize('com_ui_skill_warnings')}</div>- <ul className="ml-6 list-disc">+ <ul className="ms-6 list-disc">{warnings.map((w) => (<li key={`${w.field}:${w.code}`}>{w.message}</li>))}@@ -291,7 +291,7 @@ export default function SkillForm({ skillId }: SkillFormProps) {className="mb-1 text-sm font-medium">{localize('com_ui_description')}- <span className="text-text-destructive ml-0.5">*</span>+ <span className="text-text-destructive ms-0.5">*</span></Label><TextareaAutosizevariant="framed"diff --git a/client/src/components/Skills/lists/SkillList.tsx b/client/src/components/Skills/lists/SkillList.tsxindex a7523b766c..e8cc29a125 100644--- a/client/src/components/Skills/lists/SkillList.tsx+++ b/client/src/components/Skills/lists/SkillList.tsx@@ -38,12 +38,12 @@ export default function SkillList({><ChevronRightclassName={cn(- 'size-3 shrink-0 text-text-secondary transition-transform duration-200',- sectionOpen && 'rotate-90',+ 'text-text-secondary size-3 shrink-0 transition-transform duration-200',+ sectionOpen ? 'rotate-90' : 'rtl:rotate-180',)}aria-hidden="true"/>- <span className="text-xs text-text-secondary">{localize('com_ui_my_skills')}</span>+ <span className="text-text-secondary text-xs">{localize('com_ui_my_skills')}</span></button></div>@@ -51,7 +51,7 @@ export default function SkillList({<Collapse open={sectionOpen}><div className="flex flex-col gap-px">{skills.length === 0 ? (- <p className="px-3 py-4 text-center text-xs text-text-secondary">+ <p className="text-text-secondary px-3 py-4 text-center text-xs">{localize('com_ui_skills_empty')}</p>) : (diff --git a/client/src/components/Skills/lists/SkillListItem.tsx b/client/src/components/Skills/lists/SkillListItem.tsxindex 652d0b9936..0f0c77ff52 100644--- a/client/src/components/Skills/lists/SkillListItem.tsx+++ b/client/src/components/Skills/lists/SkillListItem.tsx@@ -145,7 +145,7 @@ function FileTreeNode({return (<buttontype="button"- style={{ ...style, paddingLeft: `${indentRem}rem` }}+ style={{ ...style, '--skill-indent': `${indentRem}rem` } as React.CSSProperties}onClick={(e) => {e.stopPropagation();if (isFolder) {@@ -157,7 +157,7 @@ function FileTreeNode({}}}className={cn(- 'flex w-full items-center gap-1.5 rounded-lg text-sm select-none',+ 'flex w-full items-center gap-1.5 rounded-lg ps-(--skill-indent) text-sm select-none',isFileActive? 'bg-surface-active text-text-primary font-medium': 'text-text-secondary hover:bg-surface-nav-hover hover:text-text-primary',@@ -169,7 +169,7 @@ function FileTreeNode({<ChevronRightclassName={cn('size-3 shrink-0 transition-transform duration-150',- isOpen && 'rotate-90',+ isOpen ? 'rotate-90' : 'rtl:rotate-180',)}aria-hidden="true"/>@@ -306,7 +306,7 @@ function SkillListItem({screen reader, which announces one name for two different actions. */}<divclassName={cn(- 'text-text-primary flex w-full items-center gap-1 rounded-lg pr-1 text-sm select-none',+ 'text-text-primary flex w-full items-center gap-1 rounded-lg pe-1 text-sm select-none',isActive && !activeFile && 'bg-surface-active',!isActive && 'hover:bg-surface-nav-hover',)}@@ -314,7 +314,7 @@ function SkillListItem({<buttontype="button"onClick={handleSkillClick}- className="focus-visible:ring-text-primary flex min-w-0 flex-1 cursor-pointer items-center gap-3 rounded-lg py-1.5 pl-3 text-left outline-hidden focus-visible:ring-2 focus-visible:ring-inset"+ className="focus-visible:ring-text-primary flex min-w-0 flex-1 cursor-pointer items-center gap-3 rounded-lg py-1.5 ps-3 text-start outline-hidden focus-visible:ring-2 focus-visible:ring-inset"aria-current={isActive ? 'true' : undefined}><span className="flex size-6 shrink-0 items-center justify-center">@@ -353,7 +353,7 @@ function SkillListItem({</div>{/* Inline file tree */}- <Collapse open={expanded && hasFiles} className="ml-5">+ <Collapse open={expanded && hasFiles} className="ms-5"><InlineFileTree files={files} activeFile={activeFile} onFileClick={handleFileClick} /></Collapse></div>diff --git a/client/src/components/Skills/sidebar/SkillsAccordion.tsx b/client/src/components/Skills/sidebar/SkillsAccordion.tsxindex 5f00683210..fe9503e875 100644--- a/client/src/components/Skills/sidebar/SkillsAccordion.tsx+++ b/client/src/components/Skills/sidebar/SkillsAccordion.tsx@@ -8,7 +8,7 @@ export default function SkillsAccordion() {const { user } = useAuthContext();return (<div className="flex h-full w-full flex-col overflow-hidden">- <SkillsSidePanel className="min-h-0 flex-1 border-r-0" />+ <SkillsSidePanel className="min-h-0 flex-1 border-e-0" />{user?.role === SystemRoles.ADMIN && (<PanelFooter><AdminSettings />diff --git a/client/src/components/Skills/sidebar/SkillsSidePanel.tsx b/client/src/components/Skills/sidebar/SkillsSidePanel.tsxindex ee8a3bf482..091fdd76bf 100644--- a/client/src/components/Skills/sidebar/SkillsSidePanel.tsx+++ b/client/src/components/Skills/sidebar/SkillsSidePanel.tsx@@ -49,7 +49,7 @@ export default function SkillsSidePanel({ className }: SkillsSidePanelProps) {return (<divclassName={cn(- 'border-border-light flex h-full w-full flex-col overflow-hidden border-r pt-2',+ 'border-border-light flex h-full w-full flex-col overflow-hidden border-e pt-2',className,)}>diff --git a/client/src/components/Tools/AssistantToolsDialog.tsx b/client/src/components/Tools/AssistantToolsDialog.tsxindex 492da7b275..659ecfda70 100644--- a/client/src/components/Tools/AssistantToolsDialog.tsx+++ b/client/src/components/Tools/AssistantToolsDialog.tsx@@ -157,13 +157,13 @@ function AssistantToolsDialog({}}><OGDialogContent- className="gap-0 overflow-hidden overflow-y-auto p-0 text-left max-sm:h-full sm:mx-7 sm:my-8 sm:max-w-2xl lg:max-w-5xl xl:max-w-7xl"+ className="gap-0 overflow-hidden overflow-y-auto p-0 text-start max-sm:h-full sm:mx-7 sm:my-8 sm:max-w-2xl lg:max-w-5xl xl:max-w-7xl"style={{ minHeight: 'min(38.125rem, 90vh)' }}><div><div className="border-border-medium flex items-center justify-between border-b px-4 pt-5 pb-4 sm:p-6"><div className="flex items-center">- <div className="text-center sm:text-left">+ <div className="text-center sm:text-start"><OGDialogTitle className="text-lg leading-6 font-medium">{isAgentTools? localize('com_nav_tool_dialog_agents')diff --git a/client/src/components/Variables/Editor.tsx b/client/src/components/Variables/Editor.tsxindex bf589255fe..77bbd2375f 100644--- a/client/src/components/Variables/Editor.tsx+++ b/client/src/components/Variables/Editor.tsx@@ -104,8 +104,8 @@ export default function VariableEditor({<Label className={labelClassName} htmlFor={id}>{label}</Label>- {/* `ml-auto` keeps the actions right-aligned when the label is visually hidden. */}- <div className="ml-auto flex items-center gap-0.5">+ {/* `ms-auto` keeps the actions right-aligned when the label is visually hidden. */}+ <div className="ms-auto flex items-center gap-0.5">{showVariables && (<DropdownPopupportal={portal}@@ -165,8 +165,8 @@ export default function VariableEditor({className="flex h-[85vh] max-h-[85vh] w-11/12 max-w-6xl flex-col gap-4 p-6"showCloseButton={false}>- <OGDialogHeader className="mb-2 pr-14">- <OGDialogTitle className="text-left text-2xl font-semibold">{label}</OGDialogTitle>+ <OGDialogHeader className="mb-2 pe-14">+ <OGDialogTitle className="text-start text-2xl font-semibold">{label}</OGDialogTitle></OGDialogHeader><Textareavalue={value}diff --git a/client/src/components/ui/AdminSettingsDialog.tsx b/client/src/components/ui/AdminSettingsDialog.tsxindex 382d0a6c96..1cc312698b 100644--- a/client/src/components/ui/AdminSettingsDialog.tsx+++ b/client/src/components/ui/AdminSettingsDialog.tsx@@ -201,7 +201,7 @@ const AdminSettingsDialog: React.FC<AdminSettingsDialogProps> = ({<OGDialogContentclassName={dialogContentClassName ?? 'w-11/12 max-w-2xl gap-0 overflow-hidden p-0'}>- <OGDialogHeader className="px-5 py-5 pr-14 text-left sm:px-6">+ <OGDialogHeader className="px-5 py-5 pe-14 text-start sm:px-6"><div className="flex items-center gap-3"><div className="border-border-light bg-surface-secondary text-text-secondary flex size-10 shrink-0 items-center justify-center rounded-xl border"><ShieldEllipsis className="size-5" aria-hidden="true" />diff --git a/client/src/components/ui/LocalizedDateRangePicker.tsx b/client/src/components/ui/LocalizedDateRangePicker.tsxindex 51ea48fdb9..22f776ecdf 100644--- a/client/src/components/ui/LocalizedDateRangePicker.tsx+++ b/client/src/components/ui/LocalizedDateRangePicker.tsx@@ -152,7 +152,7 @@ export default function LocalizedDateRangePicker({<Popover.Trigger asChild><Button variant="outline" className="w-full min-w-0 justify-start px-3"><CalendarDays className="size-4 shrink-0" aria-hidden="true" />- <span className="min-w-0 flex-1 truncate text-left">{formattedRange}</span>+ <span className="min-w-0 flex-1 truncate text-start">{formattedRange}</span><ChevronDown className="text-text-secondary size-4 shrink-0" aria-hidden="true" /></Button></Popover.Trigger>diff --git a/client/src/hooks/useDocumentDirection.ts b/client/src/hooks/useDocumentDirection.tsnew file mode 100644index 0000000000..8ada060006--- /dev/null+++ b/client/src/hooks/useDocumentDirection.ts@@ -0,0 +1,18 @@+import { useSyncExternalStore } from 'react';++type Direction = 'ltr' | 'rtl';++const subscribe = (onChange: () => void) => {+ const observer = new MutationObserver(onChange);+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ['dir'] });+ return () => observer.disconnect();+};++const getSnapshot = (): Direction => (document.documentElement.dir === 'rtl' ? 'rtl' : 'ltr');++const getServerSnapshot = (): Direction => 'ltr';++/** Reads the document direction and re-renders when `<html dir>` changes. */+export default function useDocumentDirection(): Direction {+ return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);+}diff --git a/e2e/specs/mock/scenarios/dialog-scrim-role.spec.ts b/e2e/specs/mock/scenarios/dialog-scrim-role.spec.tsindex 232e9cac96..936232ea31 100644--- a/e2e/specs/mock/scenarios/dialog-scrim-role.spec.ts+++ b/e2e/specs/mock/scenarios/dialog-scrim-role.spec.ts@@ -101,8 +101,17 @@ async function seedConversation(title: string): Promise<string> {async function openConversationDeleteDialog(page: Page, title: string) {const row = page.getByTestId('convo-item').filter({ hasText: title }).first();await expect(row).toBeVisible({ timeout: 20000 });- await row.hover();- await row.getByRole('button', { name: 'Conversation Menu Options' }).click();+ /* Focusing the row mounts and reveals its menu button the way a hover does, and keeps+ * to this row when rows left by earlier specs in the shard shift the list under the+ * pointer. A chat still streaming in the sidebar can remount the row and drop the+ * mounted button, so the focus is repeated until the button holds it. */+ const menuButton = row.getByRole('button', { name: 'Conversation Menu Options' });+ await expect(async () => {+ await row.getByRole('button', { name: `${title} conversation` }).focus();+ await menuButton.focus({ timeout: 2000 });+ await expect(menuButton).toBeFocused({ timeout: 1000 });+ }).toPass({ timeout: 20000 });+ await page.keyboard.press('Enter');await page.getByRole('menuitem', { name: 'Delete' }).click();await expect(page.getByRole('dialog', { name: 'Delete chat?' })).toBeVisible({ timeout: 10000 });}diff --git a/e2e/specs/mock/scenarios/rtl-pages.spec.ts b/e2e/specs/mock/scenarios/rtl-pages.spec.tsnew file mode 100644index 0000000000..bec778159a--- /dev/null+++ b/e2e/specs/mock/scenarios/rtl-pages.spec.ts@@ -0,0 +1,269 @@+import { expect, test } from '@playwright/test';+import type { Locator, Page } from '@playwright/test';+import {+ NEW_CHAT_PATH,+ MOCK_ENDPOINTS,+ getAccessToken,+ requestJson,+ selectMockEndpoint,+ sendMessageAndWaitForCompletion,+} from '../helpers';+import { cleanupAgent, uniqueAgentName, waitForPersistedAgent } from '../agents.helpers';++/**+ * Under a right-to-left interface the split views mirror: the panel that sits at the+ * inline start in LTR moves to the right, and dragging a separator still moves it with+ * the pointer. react-resizable-panels measures drags physically, so these pages keep the+ * group LTR and render the panels in reverse; the separator would otherwise drag backwards.+ */++const VIEWPORT = { width: 1280, height: 800 };+const DRAG = 80;++/** The resizable split views only render at desktop widths. */+test.use({ viewport: VIEWPORT });++async function setDirection(page: Page, dir: 'ltr' | 'rtl') {+ await page.evaluate((value) => {+ document.documentElement.dir = value;+ }, dir);+}++async function box(locator: Locator) {+ const rect = await locator.boundingBox();+ if (rect == null) {+ throw new Error('expected a laid out element');+ }+ return rect;+}++/** Drags a separator horizontally by `dx` pixels with the pointer. */+async function dragSeparator(page: Page, separator: Locator, dx: number) {+ const rect = await box(separator);+ const x = rect.x + rect.width / 2;+ const y = rect.y + rect.height / 2;+ /* react-resizable-panels captures the pointer on the first move, so that move has to+ * stay on the separator the way a real pointer's would; a coarse first step can land+ * inside an artifact iframe, which swallows the rest of the drag. */+ const steps = Math.abs(dx);+ await page.mouse.move(x, y);+ await page.mouse.down();+ await page.mouse.move(x + dx, y, { steps });+ await page.mouse.up();+}++test('the project workspace mirrors under RTL and its separator follows the pointer @scenario:rtl-project-workspace-mirrors-and-drags', async ({+ page,+}) => {+ test.setTimeout(90_000);+ await page.goto(NEW_CHAT_PATH, { timeout: 15_000 });+ const token = await getAccessToken(page);+ const project = await requestJson<{ _id: string }>(page, {+ path: '/api/projects',+ token,+ method: 'POST',+ body: { name: `E2E RTL Workspace ${Date.now()}` },+ });++ try {+ await page.goto(`/projects/${project._id}`, { timeout: 15_000 });+ const details = page.locator('#project-details');+ const chats = page.locator('#project-chats');+ await expect(details).toBeVisible();+ await expect(chats).toBeVisible();++ /* LTR keeps details at the inline start, on the left. */+ expect((await box(details)).x).toBeLessThan((await box(chats)).x);++ await setDirection(page, 'rtl');+ await expect(details).toHaveAttribute('dir', 'rtl');+ await expect(chats).toHaveAttribute('dir', 'rtl');+ const before = { details: await box(details), chats: await box(chats) };+ expect(before.details.x).toBeGreaterThan(before.chats.x);++ /* The separator sits between chats (left) and details (right); dragging it right+ * narrows details and widens chats. */+ const separator = page.locator('[data-group]#project-workspace > [role="separator"]');+ await expect(separator).toHaveCount(1);+ await dragSeparator(page, separator, DRAG);+ await expect+ .poll(async () => (await box(details)).width)+ .toBeLessThan(before.details.width - DRAG / 2);+ expect((await box(chats)).width).toBeGreaterThan(before.chats.width + DRAG / 2);+ expect((await box(details)).x).toBeGreaterThan((await box(chats)).x);++ /* The panels were reordered while mounted; the arrow keys still move the separator+ * the way they point. */+ const dragged = (await box(details)).width;+ await separator.focus();+ await page.keyboard.press('ArrowRight');+ await expect.poll(async () => (await box(details)).width).toBeLessThan(dragged - 4);+ } finally {+ await requestJson(page, {+ path: `/api/projects/${encodeURIComponent(project._id)}`,+ token,+ method: 'DELETE',+ }).catch(() => undefined);+ }+});++test('a shared link mirrors its artifacts pane under RTL and its separator follows the pointer @scenario:rtl-share-artifacts-mirrors-and-drags', async ({+ page,+ browser,+ baseURL,+}) => {+ test.setTimeout(180_000);+ if (typeof baseURL !== 'string') {+ throw new Error('baseURL must be configured for shared-link mock e2e tests');+ }++ await page.goto(NEW_CHAT_PATH, { timeout: 10_000 });+ await selectMockEndpoint(page, MOCK_ENDPOINTS[0]);+ await sendMessageAndWaitForCompletion(page, 'E2E_HTML_ARTIFACT_REPLY', { timeout: 60_000 });+ await expect(page).toHaveURL(/\/c\/(?!new)[0-9a-fA-F-]{36}$/);++ await page.getByRole('button', { name: 'Chat options' }).click();+ await page.getByTestId('share-conversation-menu-item').click();+ await expect(page.getByRole('dialog', { name: 'Share link to chat' })).toBeVisible();+ await page.getByRole('button', { name: 'Create a shared link' }).click();+ const sharedLinkInput = page.getByTestId('shared-link-url');+ await expect(sharedLinkInput).toHaveValue(/\/share\//);+ const sharedLinkUrl = (await sharedLinkInput.inputValue()).trim();++ const readerContext = await browser.newContext({ viewport: VIEWPORT });+ try {+ const reader = await readerContext.newPage();+ await reader.goto(new URL(sharedLinkUrl, baseURL).toString(), { timeout: 20_000 });+ const content = reader.locator('#share-content');+ const artifacts = reader.locator('#share-artifacts');+ await expect(artifacts).toBeVisible({ timeout: 20_000 });++ /* LTR docks the pane at the inline end, on the right. */+ expect((await box(artifacts)).x).toBeGreaterThan((await box(content)).x);++ await setDirection(reader, 'rtl');+ await expect(artifacts).toHaveAttribute('dir', 'rtl');+ const before = { content: await box(content), artifacts: await box(artifacts) };+ expect(before.artifacts.x).toBeLessThan(before.content.x);++ /* The pane is now on the left; dragging the separator left narrows it. */+ const separator = reader+ .locator('[data-group]')+ .filter({ has: artifacts })+ .locator(':scope > [role="separator"]');+ await expect(separator).toHaveCount(1);+ await dragSeparator(reader, separator, -DRAG);+ await expect+ .poll(async () => (await box(artifacts)).width)+ .toBeLessThan(before.artifacts.width - DRAG / 2);+ expect((await box(content)).width).toBeGreaterThan(before.content.width + DRAG / 2);+ expect((await box(artifacts)).x).toBeLessThan((await box(content)).x);++ const dragged = (await box(artifacts)).width;+ await separator.focus();+ await reader.keyboard.press('ArrowRight');+ await expect.poll(async () => (await box(artifacts)).width).toBeGreaterThan(dragged + 4);+ } finally {+ await readerContext.close();+ }+});++test('the agent detail close button bleeds past the inline end under RTL @scenario:rtl-agent-detail-close-at-inline-end', async ({+ page,+}) => {+ test.setTimeout(90_000);+ await page.goto(NEW_CHAT_PATH, { timeout: 10_000 });+ const token = await getAccessToken(page);+ const name = uniqueAgentName('E2E RTL Detail');+ const description = 'An agent whose detail dialog is opened under RTL.';+ const agent = await requestJson<{ id: string }>(page, {+ path: '/api/agents',+ token,+ method: 'POST',+ body: {+ name,+ description,+ instructions: 'Use the mock model.',+ provider: MOCK_ENDPOINTS[0].label,+ model: MOCK_ENDPOINTS[0].model,+ model_parameters: {},+ tools: [],+ category: 'general',+ },+ });++ try {+ await waitForPersistedAgent(page, name, description);+ await page.goto(`/agents/all?q=${encodeURIComponent(name)}`, { timeout: 10_000 });+ await setDirection(page, 'rtl');+ await page.getByRole('button', { name, exact: true }).click();++ const dialog = page.getByRole('dialog');+ const close = dialog.getByRole('button', { name: 'Close' }).first();+ await expect(close).toBeVisible();+ /* The negative end margin pulls the button outward, onto the left edge in RTL, so it+ * starts before its wrapper; a margin on the start side would push it into the header. */+ const offset = await close.evaluate((node) => {+ const wrapper = node.parentElement?.getBoundingClientRect();+ const rect = node.getBoundingClientRect();+ return { start: (wrapper?.left ?? 0) - rect.left, end: rect.right - (wrapper?.right ?? 0) };+ });+ expect(offset.start).toBeGreaterThan(4);+ expect(offset.end).toBeLessThanOrEqual(0.5);+ } finally {+ await cleanupAgent(page, agent.id).catch(() => undefined);+ }+});++test('a prompt command keeps its typed text clear of the counter under RTL @scenario:rtl-prompt-counter-clear-of-text', async ({+ page,+}) => {+ await page.goto(NEW_CHAT_PATH, { timeout: 15_000 });+ const promptsButton = page.getByRole('button', { name: 'Prompts', exact: true });+ if ((await promptsButton.getAttribute('aria-pressed')) !== 'true') {+ await promptsButton.click();+ }+ await page.getByRole('button', { name: 'Create Prompt' }).click();+ const input = page.getByRole('dialog').getByRole('textbox', {+ name: 'Optional: Enter a command for the prompt or name will be used',+ });+ await expect(input).toBeVisible();+ await input.fill('a'.repeat(40));+ const counter = input.locator('xpath=../..').getByText(/^\d+\/\d+$/);+ await expect(counter).toBeVisible();++ /* LTR: the counter sits after the field, at the right. */+ expect((await box(input)).x + (await box(input)).width).toBeLessThanOrEqual(+ (await box(counter)).x + 1,+ );++ await setDirection(page, 'rtl');+ /* RTL: the counter moves to the left and the field ends before it. */+ await expect.poll(async () => (await box(counter)).x).toBeLessThan((await box(input)).x);+ const field = await box(input);+ const count = await box(counter);+ expect(count.x + count.width).toBeLessThanOrEqual(field.x + 1);+});++test('marketplace category tabs follow the visual arrow direction under RTL @scenario:rtl-category-tabs-arrow-keys', async ({+ page,+}) => {+ test.setTimeout(60_000);+ await page.goto('/agents/all', { timeout: 30_000 });+ const tabs = page.getByRole('tablist').first().getByRole('tab');+ await expect(tabs.nth(1)).toBeVisible();++ await setDirection(page, 'rtl');+ const first = tabs.first();+ const second = tabs.nth(1);+ /* The first tab sits at the inline start, which is now the right. */+ expect((await box(first)).x).toBeGreaterThan((await box(second)).x);++ await first.click();+ await expect(first).toHaveAttribute('aria-selected', 'true');+ await expect(first).toBeFocused();+ await page.keyboard.press('ArrowLeft');+ await expect(second).toBeFocused();+ await page.keyboard.press('ArrowRight');+ await expect(first).toBeFocused();+});diff --git a/eslint-suppressions.json b/eslint-suppressions.jsonindex 6d46e02e8c..d0ade1c008 100644--- a/eslint-suppressions.json+++ b/eslint-suppressions.json@@ -924,12 +924,12 @@},"client/src/components/Prompts/fields/Command.tsx": {"shadcn/no-restyle": {- "count": 2+ "count": 1}},"client/src/components/Prompts/fields/Description.tsx": {"shadcn/no-restyle": {- "count": 2+ "count": 1}},"client/src/components/Prompts/fields/PromptName.tsx": {@@ -1325,11 +1325,6 @@"count": 5}},- "client/src/components/Skills/lists/SkillListItem.tsx": {- "shadcn/no-inline-styles": {- "count": 1- }- },"client/src/components/Skills/tree/SkillFileEditor.tsx": {"shadcn/no-arbitrary-values": {"count": 1