fix(rtl): fix code block direction, selector alignment, and narrow-screen padding

- Add direction: ltr to pre elements so code always displays LTR in RTL UI
- Fix selector secondary text: text-left → text-start, add w-full to
  prevent RTL flex cross-axis drift
- Add dir="ltr" to model path span (opencode/model-id is always LTR)
- Restore padding-inline-start: 2.5rem in narrow-screen media query
  where padding shorthand was overriding it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
MusiCode
2026-03-18 16:01:42 +00:00
committed by Shantur Rathore
parent db3a786b48
commit df6c96453f
6 changed files with 8 additions and 3 deletions

View File

@@ -295,7 +295,7 @@ export default function ModelSelector(props: ModelSelectorProps) {
{t("modelSelector.trigger.primary", { model: currentModelValue()?.name ?? t("modelSelector.none") })}
</span>
{currentModelValue() && (
<span class="selector-trigger-secondary">
<span class="selector-trigger-secondary" dir="ltr">
{currentModelValue()!.providerId}/{currentModelValue()!.id}
</span>
)}

View File

@@ -40,11 +40,11 @@
}
.selector-trigger-primary--align-left {
@apply text-left w-full;
@apply text-start w-full;
}
.selector-trigger-secondary {
@apply text-xs text-left truncate;
@apply text-xs text-start truncate w-full;
color: var(--text-muted);
}

View File

@@ -136,6 +136,7 @@
border-radius: 8px;
padding: 0.75rem;
margin: 1rem 0;
direction: ltr;
}
.markdown-body pre:not(.shiki) code,

View File

@@ -258,6 +258,7 @@
padding: 8px;
background-color: var(--surface-code);
border-radius: 4px;
direction: ltr;
}
.message-error-part {

View File

@@ -344,6 +344,7 @@
.prompt-input {
min-height: 0;
padding: 0.5rem 0.75rem;
padding-inline-start: 2.5rem; /* preserve space for nav buttons */
padding-bottom: 0.75rem;
}

View File

@@ -549,6 +549,7 @@
min-height: auto;
max-height: none;
overflow-y: visible;
direction: ltr;
}
/* Shiki injects inline background colors; force token surfaces. */
@@ -762,6 +763,7 @@
overflow-x: auto;
max-height: var(--tool-call-max-height-compact, calc(25 * 1.4em));
overflow-y: scroll;
direction: ltr;
}
.tool-call-section code {