OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.
Python
refactor: Improve SaaS styles (#1356)
Mike Fortman5f3de615e55a
diff --git a/frontend/app/chat/_components/chat-input.tsx b/frontend/app/chat/_components/chat-input.tsxindex d92c02f63..d59d5cc8b 100644--- a/frontend/app/chat/_components/chat-input.tsx+++ b/frontend/app/chat/_components/chat-input.tsx@@ -521,7 +521,7 @@ export const ChatInput = forwardRef<ChatInputHandle, ChatInputProps>(type="submit"size="iconSm"disabled={(!input.trim() && !uploadedFile) || loading}- className="!rounded-md h-8 w-8 p-0"+ className="chat-submit !rounded-md h-8 w-8 p-0">{loading ? (<Loader2 className="h-4 w-4 animate-spin" />diff --git a/frontend/app/chat/_components/function-calls.tsx b/frontend/app/chat/_components/function-calls.tsxindex fa4f75912..19c39bc07 100644--- a/frontend/app/chat/_components/function-calls.tsx+++ b/frontend/app/chat/_components/function-calls.tsx@@ -1,4 +1,5 @@import { ChevronDown, ChevronRight, Settings } from "lucide-react";+import { Badge } from "@/components/ui/badge";import type { FunctionCall } from "../_types/types";interface FunctionCallsProps {@@ -29,7 +30,7 @@ export function FunctionCalls({return (<divkey={index}- className="rounded-lg bg-blue-500/10 border border-blue-500/20 p-3"+ className="fc-card rounded-lg bg-blue-500/10 border border-blue-500/20 p-3"><divclassName="flex items-center gap-2 cursor-pointer hover:bg-blue-500/5 -m-3 p-3 rounded-lg transition-colors"@@ -40,21 +41,22 @@ export function FunctionCalls({Function Call: {displayName}</span>{fc.id && (- <span className="text-xs text-blue-300/70 font-mono">+ <span className="text-xs text-blue-400 font-mono">{fc.id.substring(0, 8)}...</span>)}- <div- className={`px-2 py-1 rounded text-xs font-medium ${+ <Badge+ variant="outline"+ className={fc.status === "completed"- ? "bg-green-500/20 text-green-400"+ ? "fc-status-completed border-green-500/40 bg-green-500/20 text-green-400": fc.status === "error"- ? "bg-red-500/20 text-red-400"- : "bg-yellow-500/20 text-yellow-400"- }`}+ ? "border-red-500/40 bg-red-500/20 text-red-400"+ : "border-yellow-500/40 bg-yellow-500/20 text-yellow-400"+ }>{fc.status}- </div>+ </Badge>{isExpanded ? (<ChevronDown className="h-4 w-4 text-blue-400" />) : (@@ -68,7 +70,7 @@ export function FunctionCalls({{fc.type && (<div className="text-xs text-muted-foreground mb-3"><span className="font-medium">Type:</span>- <span className="ml-2 px-2 py-1 bg-muted/30 rounded font-mono">+ <span className="fc-value ml-2 px-2 py-1 bg-muted/30 rounded font-mono">{fc.type}</span></div>@@ -78,7 +80,7 @@ export function FunctionCalls({{fc.id && (<div className="text-xs text-muted-foreground mb-3"><span className="font-medium">ID:</span>- <span className="ml-2 px-2 py-1 bg-muted/30 rounded font-mono">+ <span className="fc-value ml-2 px-2 py-1 bg-muted/30 rounded font-mono">{fc.id}</span></div>diff --git a/frontend/app/globals.css b/frontend/app/globals.cssindex e527507a4..07901046b 100644--- a/frontend/app/globals.css+++ b/frontend/app/globals.css@@ -59,6 +59,9 @@--component-icon: #d8598a;--flow-icon: #2f67d0;+ --badge: 0 0% 0%; /* #000000 */+ --badge-foreground: 0 0% 100%; /* #FFFFFF */+--radius: 0.5rem;--sidebar-background: 0 0% 98%;@@ -142,6 +145,9 @@--sidebar-border: 240 3.7% 15.9%;--sidebar-ring: 217.2 91.2% 59.8%;+ --badge: 0 0% 25%; /* #404040 */+ --badge-foreground: 0 0% 100%; /* #FFFFFF */+/* Failure Colors */--failure-soft: #46080933;--failure-pill: #fb2c361a;@@ -156,7 +162,7 @@[data-theme="ibm"] {--background: 0 0% 100%; /* same as OSS light #ffffff */--foreground: 0 0% 15%; /* IBM Gray 100 #262626 */- --card: 0 0% 100%;+ --card: 0 0% 96%; /* IBM Gray 10 #f4f4f4 */--card-foreground: 0 0% 15%;--popover: 0 0% 100%;--popover-foreground: 0 0% 15%;@@ -167,10 +173,10 @@--secondary-foreground: 0 0% 15%;--secondary-hover: 0 0% 90%; /* IBM Gray 20 #e0e0e0 */--muted: 0 0% 90%; /* IBM Gray 20 #e0e0e0 */- --muted-foreground: 0 0% 78%; /* IBM Gray 30 #C6C6C6 - Secondary text IBM */+ --muted-foreground: 0 0% 32%; /* IBM Gray 70 #525252 - Secondary text IBM light */--accent: 0 0% 90%;--accent-foreground: 0 0% 15%;- --border: 240 5% 96%; /* same as --muted from :root (240 5% 96%) */+ --border: 0 0% 78%; /* same as --muted from :root (240 5% 96%) */--input: 0 0% 82%;--ring: 217 100% 45%;--placeholder-foreground: var(@@ -228,25 +234,27 @@--text-text-01: 0 0% 9%;--link-primary: 217 100% 45%;--button-tertiary: 217 100% 45%;++ --badge: 0 0% 22.4%; /* #393939 */+ --badge-foreground: 0 0% 95.7%; /* #F4F4F4 */}/* IBM Dark */[data-theme="ibm"].dark {--background: 0 0% 8.6%; /* IBM Gray 100 #161616 */--foreground: 0 0% 97%; /* IBM Gray 10 #f4f4f4 */- --card: 0 0% 12%; /* IBM Gray 90 #1c1c1c → ~#262626 */+ --card: 0 0% 15%; /* IBM Gray 90 #262626 */--card-foreground: 0 0% 97%;--popover: 0 0% 12%;--popover-foreground: 0 0% 97%;- /* Dark UI: lighter blue (Blue 40 ~#78A9FF), not Blue 60 */- --primary: 217 100% 74%;- --primary-foreground: 0 0% 9%;+ --primary: 217 100% 45%; /* IBM Blue 60 #0f62fe */+ --primary-foreground: 0 0% 100%;--primary-hover: 217 100% 82%;--secondary: 0 0% 12%;--secondary-foreground: 0 0% 97%;--secondary-hover: 0 0% 18%; /* IBM Gray 80 #393939 */--muted: 0 0% 18%; /* IBM Gray 80 */- --muted-foreground: 0 0% 32%; /* IBM Gray 70 #525252 - Secondary text IBM */+ --muted-foreground: 0 0% 78%; /* IBM Gray 30 #C6C6C6 - Secondary text IBM dark */--accent: 0 0% 18%;--accent-foreground: 0 0% 97%;--border: 0 0% 22.4%; /* IBM Gray 80 #393939 - Ui-border 3 */@@ -306,11 +314,9 @@--text-text-01: 0 0% 95.7%;--link-primary: 217 100% 74%;--button-tertiary: 217 100% 74%;- }- /* IBM Settings: Override muted-foreground for settings page */- [data-theme="ibm"] .ibm-settings-page {- --muted-foreground: 0 0% 78%; /* #C6C6C6 - IBM Gray 30 */+ --badge: 0 0% 32%; /* #525252 */+ --badge-foreground: 0 0% 95.7%; /* #F4F4F4 */}/* IBM Settings: section titles (productive heading-04); beats CardTitle utilities */@@ -359,7 +365,7 @@border: none;border-radius: 0;border-bottom: 2px solid hsl(var(--input));- background-color: hsl(var(--card));+ background-color: hsl(var(--muted));}[data-theme="ibm"] .primary-input:hover {@@ -453,6 +459,58 @@color: hsl(var(--primary));}+ [data-theme="ibm"] .fc-card {+ background-color: #eaeff6;+ }++ [data-theme="ibm"] .fc-card pre,+ [data-theme="ibm"] .fc-card .fc-value {+ background-color: rgba(120, 169, 255, 0.2); /* #78A9FF at 20% */+ }++ [data-theme="ibm"]:not(.dark) .fc-card .fc-id {+ color: #0f62fe;+ }++ [data-theme="ibm"].dark .fc-card {+ background-color: #1d2431;+ }++ [data-theme="ibm"]:not(.dark) .chat-submit {+ background-color: transparent;+ color: #161616;+ }++ [data-theme="ibm"]:not(.dark) .chat-submit:hover:not(:disabled) {+ background-color: #e8e8e8;+ }++ [data-theme="ibm"].dark .chat-submit {+ background-color: transparent;+ color: #f4f4f4;+ }++ [data-theme="ibm"].dark .chat-submit:hover:not(:disabled) {+ background-color: rgba(141, 141, 141, 0.4);+ }++ [data-theme="ibm"]:not(.dark) .fc-status-completed {+ background-color: #a7f0ba;+ color: #0e6027;+ border-color: #a7f0ba;+ }++ [data-theme="ibm"].dark .fc-status-completed {+ background-color: #0e6027;+ color: #a7f0ba;+ border-color: #0e6027;+ }++ [data-theme="ibm"].dark .fc-card pre,+ [data-theme="ibm"].dark .fc-card .fc-value {+ background-color: rgba(15, 98, 254, 0.2); /* #0F62FE at 20% */+ }+* {@apply border-border;}diff --git a/frontend/app/knowledge/chunks/page.tsx b/frontend/app/knowledge/chunks/page.tsxindex ceafe40c0..c93d85341 100644--- a/frontend/app/knowledge/chunks/page.tsx+++ b/frontend/app/knowledge/chunks/page.tsx@@ -9,6 +9,7 @@ import { KnowledgeSearchInput } from "@/components/knowledge-search-input";// import { Label } from "@/components/ui/label";// import { Checkbox } from "@/components/ui/checkbox";import { ProtectedRoute } from "@/components/protected-route";+import { Badge } from "@/components/ui/badge";import { Button } from "@/components/ui/button";import {Tooltip,@@ -203,9 +204,9 @@ function ChunksPageContent() {<span className="text-sm font-bold">Chunk {chunk.index}</span>- <span className="bg-background p-1 rounded text-xs text-muted-foreground/70">+ <Badge variant="secondary">{chunk.text.length} chars- </span>+ </Badge><div className="py-1"><ButtononClick={() => handleCopy(chunk.text, index)}@@ -221,9 +222,9 @@ function ChunksPageContent() {</div></div>- <span className="bg-background p-1 rounded text-xs text-muted-foreground/70">+ <Badge variant="secondary">{chunk.score.toFixed(2)} score- </span>+ </Badge>{/* TODO: Update to use active toggle */}{/* <span className="px-2 py-1 text-green-500">diff --git a/frontend/components/AgGrid/agGridStyles.css b/frontend/components/AgGrid/agGridStyles.cssindex 00483dea3..11995b2da 100644--- a/frontend/components/AgGrid/agGridStyles.css+++ b/frontend/components/AgGrid/agGridStyles.css@@ -43,12 +43,15 @@ body {[data-theme="ibm"] .ag-root-wrapper,[data-theme="ibm"] .ag-root-wrapper-body,[data-theme="ibm"] .ag-header {- border-radius: 0 !important;+ border-radius: 1px !important;overflow: hidden;}/* IBM Theme specific AG Grid styles - Light Mode */+[data-theme="ibm"] body,[data-theme="ibm"] {+ --ag-background-color: #f4f4f4;+ --ag-text-color: #525252;--ag-row-border: hsl(var(--border));--ag-borders: solid 1px hsl(var(--border));--ag-border-color: hsl(var(--border));@@ -97,12 +100,12 @@ body {/* Square checkboxes for IBM theme - Light mode */.ag-checkbox-input-wrapper {- border-radius: 0 !important;+ border-radius: 1px !important;border-color: #161616 !important;}.ag-checkbox-input-wrapper.ag-checked {- border-radius: 0 !important;+ border-radius: 1px !important;background-color: #161616 !important;border-color: #161616 !important;}@@ -111,10 +114,18 @@ body {border-color: #161616 !important;background-color: #e0e0e0 !important;}++ .ag-paging-panel {+ color: #525252;+ }}/* IBM Theme Dark mode */+[data-theme="ibm"].dark body,[data-theme="ibm"].dark {+ --ag-background-color: #262626;+ --ag-text-color: #525252;+.ag-header {background-color: #393939 !important;}@@ -145,4 +156,8 @@ body {background-color: #f4f4f4 !important;border-color: #f4f4f4 !important;}++ .ag-paging-panel {+ color: #c6c6c6;+ }}diff --git a/frontend/components/ui/badge.tsx b/frontend/components/ui/badge.tsxindex ef7e5b356..80485d6e7 100644--- a/frontend/components/ui/badge.tsx+++ b/frontend/components/ui/badge.tsx@@ -11,7 +11,7 @@ const badgeVariants = cva(default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:- "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",+ "border-transparent bg-badge text-badge-foreground hover:bg-badge/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline: "text-foreground",diff --git a/frontend/tailwind.config.ts b/frontend/tailwind.config.tsindex 8131ac5d4..ac4b1cb8d 100644--- a/frontend/tailwind.config.ts+++ b/frontend/tailwind.config.ts@@ -165,6 +165,10 @@ const config = {"component-icon": "var(--component-icon)","flow-icon": "var(--flow-icon)","placeholder-foreground": "hsl(var(--placeholder-foreground))",+ badge: {+ DEFAULT: "hsl(var(--badge))",+ foreground: "hsl(var(--badge-foreground))",+ },warning: {DEFAULT: "hsl(var(--warning))",foreground: "hsl(var(--warning-foreground))",