Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

fix: light text input color and buttons in dialog (#2227)

Wallgau941891a52a37
diff --git a/frontend/app/globals.css b/frontend/app/globals.css
index 2c25ef15b..070ae2164 100644
--- a/frontend/app/globals.css
+++ b/frontend/app/globals.css
@@ -237,13 +237,14 @@
--radius: 0rem; /* IBM theme dialogs (Carbon design system style) */
}
+ /* IBM dialog chrome follows light/dark theme tokens (not always-dark Carbon). */
[data-theme="ibm"] [data-slot="dialog-content"],
[data-theme="ibm"] [role="dialog"] {
border-radius: 0 !important;
- background-color: #262626 !important;
+ background-color: hsl(var(--background)) !important;
border: none !important;
- color: #f4f4f4 !important;
- padding: 1.5rem !important;
+ color: hsl(var(--foreground)) !important;
+ padding: 0 !important;
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5) !important;
}
@@ -252,26 +253,59 @@
display: none !important;
}
- [data-theme="ibm"] [data-slot="dialog-header"] {
+ [data-theme="ibm"] [data-slot="dialog-content"] form {
+ padding-left: 1.5rem;
+ padding-right: 1.5rem;
+ }
+
+ /* Non-form dialogs (delete confirm, etc.): inset body between header and footer. */
+ [data-theme="ibm"]
+ [data-slot="dialog-content"]
+ > :not([data-slot="dialog-header"]):not([data-slot="dialog-footer"]):not(
+ button
+ ):not(form) {
+ padding-left: 1.5rem;
+ padding-right: 1.5rem;
+ }
+
+ /* Task dialog manages its own layout padding. */
+ [data-theme="ibm"] [data-slot="dialog-content"].h-task-dialog > div {
+ padding-left: 0;
+ padding-right: 0;
+ }
+
+ [data-theme="ibm"]
+ [data-slot="dialog-content"]
+ form
+ [data-slot="dialog-header"],
+ [data-theme="ibm"]
+ [data-slot="dialog-content"]
+ form
+ [data-slot="dialog-footer"] {
margin-left: -1.5rem !important;
margin-right: -1.5rem !important;
- margin-top: -1.5rem !important;
+ }
+
+ [data-theme="ibm"] [data-slot="dialog-header"] {
+ margin-left: 0 !important;
+ margin-right: 0 !important;
+ margin-top: 0 !important;
padding-left: 1.5rem !important;
padding-right: 1.5rem !important;
padding-top: 1.5rem !important;
padding-bottom: 1rem !important;
- border-bottom: 1px solid #393939 !important;
+ border-bottom: 1px solid hsl(var(--border)) !important;
}
[data-theme="ibm"] [data-slot="dialog-title"] {
font-size: 1.25rem !important;
font-weight: 400 !important;
- color: #f4f4f4 !important;
+ color: hsl(var(--foreground)) !important;
}
[data-theme="ibm"] [data-slot="dialog-description"] {
font-size: 0.875rem !important;
- color: #c6c6c6 !important;
+ color: hsl(var(--muted-foreground)) !important;
font-weight: 400 !important;
margin-top: 0.25rem !important;
}
@@ -280,69 +314,85 @@
display: grid !important;
grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
gap: 1px !important;
- background-color: #262626 !important;
- margin-left: -1.5rem !important;
- margin-right: -1.5rem !important;
- margin-bottom: -1.5rem !important;
+ background-color: hsl(var(--border)) !important;
+ margin-left: 0 !important;
+ margin-right: 0 !important;
+ margin-bottom: 0 !important;
margin-top: 1rem !important;
padding-top: 0 !important;
}
+ /* Task dialog: flush footer; match task surface tokens. */
+ [data-theme="ibm"] [data-slot="dialog-content"].h-task-dialog {
+ background-color: hsl(var(--layer-contextual)) !important;
+ color: hsl(var(--layer-contextual-foreground)) !important;
+ }
+
+ [data-theme="ibm"]
+ [data-slot="dialog-content"].h-task-dialog
+ [data-slot="dialog-footer"] {
+ margin-top: 0 !important;
+ background-color: hsl(var(--layer-contextual)) !important;
+ }
+
[data-theme="ibm"] [data-slot="dialog-footer"] > button {
width: 100% !important;
+ height: 4rem !important;
margin: 0 !important;
border: 0 !important;
border-width: 0 !important;
+ border-radius: 0 !important;
outline: none !important;
box-shadow: none !important;
- }
-
- [data-theme="ibm"] [data-slot="dialog-footer"] button:first-child {
- background-color: #6f6f6f !important;
- color: #ffffff !important;
- border-radius: 0 !important;
- height: 4rem !important;
font-size: 0.875rem !important;
font-weight: 400 !important;
justify-content: flex-start !important;
align-items: flex-start !important;
- padding-left: 1rem !important;
- padding-top: 1rem !important;
- border: 0 !important;
- outline: none !important;
- box-shadow: none !important;
+ padding: 1rem 0 0 1rem !important;
}
- [data-theme="ibm"] [data-slot="dialog-footer"] button:first-child:hover {
+ [data-theme="ibm"] [data-slot="dialog-footer"] > button:first-of-type {
+ background-color: #6f6f6f !important;
+ color: #ffffff !important;
+ }
+
+ [data-theme="ibm"] [data-slot="dialog-footer"] > button:first-of-type:hover {
background-color: #525252 !important;
border: 0 !important;
outline: none !important;
+ }
+
+ [data-theme="ibm"]
+ [data-slot="dialog-footer"]
+ > button:first-of-type:hover:not(:focus-visible) {
box-shadow: none !important;
}
- [data-theme="ibm"] [data-slot="dialog-footer"] button:last-child {
+ [data-theme="ibm"] [data-slot="dialog-footer"] > button:last-of-type {
background-color: #0f62fe !important;
color: #ffffff !important;
- border-radius: 0 !important;
- height: 4rem !important;
- font-size: 0.875rem !important;
- font-weight: 400 !important;
- justify-content: flex-start !important;
- align-items: flex-start !important;
- padding-left: 1rem !important;
- padding-top: 1rem !important;
- border: 0 !important;
- outline: none !important;
- box-shadow: none !important;
}
- [data-theme="ibm"] [data-slot="dialog-footer"] button:last-child:hover {
+ [data-theme="ibm"] [data-slot="dialog-footer"] > button:last-of-type:hover {
background-color: #0353e9 !important;
border: 0 !important;
outline: none !important;
+ }
+
+ [data-theme="ibm"]
+ [data-slot="dialog-footer"]
+ > button:last-of-type:hover:not(:focus-visible) {
box-shadow: none !important;
}
+ /* After hover resets: restore a visible focus ring (matches Button focus-visible:ring). */
+ [data-theme="ibm"] [data-slot="dialog-footer"] > button:focus-visible {
+ outline: none !important;
+ box-shadow:
+ 0 0 0 2px hsl(var(--background)),
+ 0 0 0 4px hsl(var(--ring)) !important;
+ }
+
[data-theme="ibm"] {
/* Chat (IBM) */
--chat-surface-bg: hsl(var(--background));
@@ -551,6 +601,8 @@
border-radius: 0;
border-bottom: 2px solid hsl(var(--input));
background-color: hsl(var(--layer-contextual));
+ /* Explicit color so dialog `color: #f4f4f4` does not win over light input backgrounds */
+ color: hsl(var(--layer-contextual-foreground));
}
[data-theme="ibm"].dark .primary-input {
diff --git a/frontend/components/file-chunks-panel.tsx b/frontend/components/file-chunks-panel.tsx
index 35ee119b7..7f50d9263 100644
--- a/frontend/components/file-chunks-panel.tsx
+++ b/frontend/components/file-chunks-panel.tsx
@@ -77,10 +77,18 @@ function FileChunkCard({
<>
<div className="mb-2 flex items-center justify-between gap-2">
<div className="flex min-w-0 flex-wrap items-center gap-2">
- <span className={cn("font-bold", compact ? "text-xs" : "text-sm")}>
+ <span
+ className={cn(
+ "font-bold text-foreground",
+ compact ? "text-xs" : "text-sm",
+ )}
+ >
Chunk {chunk.index}
</span>
- <Badge variant="secondary" className="text-xxs">
+ <Badge
+ variant="secondary"
+ className="text-xxs bg-background text-foreground border border-border"
+ >
{chunk.text.length} chars
</Badge>
{!compact && (
@@ -103,7 +111,10 @@ function FileChunkCard({
)}
</div>
{typeof chunk.score === "number" && chunk.score > 0 && (
- <Badge variant="secondary" className="shrink-0 text-xxs">
+ <Badge
+ variant="secondary"
+ className="shrink-0 text-xxs bg-background text-foreground border border-border"
+ >
{chunk.score.toFixed(2)} score
</Badge>
)}
@@ -111,7 +122,7 @@ function FileChunkCard({
{showContents ? (
<blockquote
className={cn(
- "min-w-0 text-muted-foreground leading-relaxed break-words [overflow-wrap:anywhere] whitespace-pre-wrap",
+ "min-w-0 text-foreground leading-relaxed break-words [overflow-wrap:anywhere] whitespace-pre-wrap",
compact ? "text-xs" : "text-sm ml-1.5",
)}
>
diff --git a/frontend/components/ingest-review.tsx b/frontend/components/ingest-review.tsx
index 4e2aa2137..5829c7cc6 100644
--- a/frontend/components/ingest-review.tsx
+++ b/frontend/components/ingest-review.tsx
@@ -487,13 +487,18 @@ function DemoChunksList({
}
>
<div className="mb-2 flex min-w-0 flex-wrap items-center gap-2">
- <span className="text-xs font-bold">Chunk {chunkIndex}</span>
- <Badge variant="secondary" className="text-xxs">
+ <span className="text-xs font-bold text-foreground">
+ Chunk {chunkIndex}
+ </span>
+ <Badge
+ variant="secondary"
+ className="text-xxs bg-background text-foreground border border-border"
+ >
{chunk.char_count} chars
</Badge>
</div>
{showContents ? (
- <blockquote className="min-w-0 text-xs text-muted-foreground leading-relaxed break-words [overflow-wrap:anywhere] whitespace-pre-wrap">
+ <blockquote className="min-w-0 text-xs text-foreground leading-relaxed break-words [overflow-wrap:anywhere] whitespace-pre-wrap">
{chunk.text_preview}
</blockquote>
) : (
diff --git a/frontend/components/task-dialog/task-dialog.tsx b/frontend/components/task-dialog/task-dialog.tsx
index e384cd979..dc630b6be 100644
--- a/frontend/components/task-dialog/task-dialog.tsx
+++ b/frontend/components/task-dialog/task-dialog.tsx
@@ -143,7 +143,7 @@ function TaskDialogContent({
className={cn(
"min-w-0",
isCloudBrand
- ? "w-1/2 justify-start rounded-none px-4 text-left"
+ ? "justify-start rounded-none px-4 text-left"
: "flex-1",
)}
disabled={isRetrying || !task}
@@ -158,7 +158,7 @@ function TaskDialogContent({
className={cn(
"min-w-0",
isCloudBrand
- ? "w-1/2 justify-start rounded-none px-4 text-left"
+ ? "justify-start rounded-none px-4 text-left"
: "flex-1",
)}
disabled={isRetrying || !task}
@@ -173,9 +173,11 @@ function TaskDialogContent({
ignoreTitleCase
className={cn(
isCloudBrand
- ? "w-1/2 shrink-0 justify-start rounded-none px-4 text-left"
+ ? cn(
+ "shrink-0 justify-start rounded-none px-4 text-left",
+ isCancelOnly && "col-span-2",
+ )
: "shrink-0",
- isCloudBrand && showRetryActions && "ml-auto",
)}
onClick={onClose}
disabled={isRetrying}