LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
UN-2226 [UX/UI] Improve settings navigation and modal component styling (#1569)
Athul9d7a612a70cd
diff --git a/frontend/src/components/agency/display-logs/DisplayLogs.css b/frontend/src/components/agency/display-logs/DisplayLogs.cssindex d1e9541d3..b0f637e57 100644--- a/frontend/src/components/agency/display-logs/DisplayLogs.css+++ b/frontend/src/components/agency/display-logs/DisplayLogs.css@@ -6,10 +6,10 @@}.display-logs-col-first {- font-size: 12px;+ font-size: 14px;}.display-logs-col {- font-size: 12px;+ font-size: 14px;padding-left: 5px;}diff --git a/frontend/src/components/custom-tools/editable-text/EditableText.css b/frontend/src/components/custom-tools/editable-text/EditableText.cssindex 3c6d85586..289142b1c 100644--- a/frontend/src/components/custom-tools/editable-text/EditableText.css+++ b/frontend/src/components/custom-tools/editable-text/EditableText.css@@ -18,5 +18,5 @@.input-header-text {font-weight: bold;- font-size: 20px;+ font-size: 14px;}diff --git a/frontend/src/components/deployments/body/Body.jsx b/frontend/src/components/deployments/body/Body.jsxindex 4e5e6054f..b1bcdd768 100644--- a/frontend/src/components/deployments/body/Body.jsx+++ b/frontend/src/components/deployments/body/Body.jsx@@ -12,11 +12,13 @@ function Body({ type, columns, tableData, isTableLoading, openAddModal }) {}if (!tableData?.length) {return (- <EmptyState- text={`Currently you have no ${deploymentsStaticContent[type].addBtn}`}- btnText={deploymentsStaticContent[type].addBtn}- handleClick={() => openAddModal(false)}- />+ <IslandLayout>+ <EmptyState+ text={`Currently you have no ${deploymentsStaticContent[type].addBtn}`}+ btnText={deploymentsStaticContent[type].addBtn}+ handleClick={() => openAddModal(false)}+ />+ </IslandLayout>);}return (diff --git a/frontend/src/components/input-output/data-source-card/DataSourceCard.css b/frontend/src/components/input-output/data-source-card/DataSourceCard.cssindex 2658f1b1a..d8e399ee5 100644--- a/frontend/src/components/input-output/data-source-card/DataSourceCard.css+++ b/frontend/src/components/input-output/data-source-card/DataSourceCard.css@@ -9,14 +9,17 @@}.ds-card .cover-img {- height: 180px;- width: 90%;+ height: 50%;+ width: 50%;text-align: center;padding: 10px;background-color: transparent;display: flex;align-items: center;+ justify-content: center;overflow: hidden;+ position: relative;+ z-index: 0;}.ds-card-name {@@ -40,14 +43,9 @@.cover-container {position: relative;-}--.cover-img {- position: relative;- z-index: 0;- align-items: center;display: flex;- justify-content: center;+ flex-direction: column;+ align-items: center;}.ds-card.disabled {diff --git a/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx b/frontend/src/components/input-output/data-source-card/DataSourceCard.jsxindex b6ef89cda..899d5eb18 100644--- a/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx+++ b/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx@@ -41,9 +41,10 @@ function DataSourceCard({ srcDetails, setSelectedSourceId, type }) {<div className="cover-img"><Imagesrc={srcDetails?.icon}- width="80%"- height="auto"+ width="50%"+ height="50%"preview={false}+ style={{ objectFit: "contain" }}/></div><div className="ds-card-name display-flex-center">diff --git a/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.css b/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.cssindex 2db63dc25..7588948db 100644--- a/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.css+++ b/frontend/src/components/logs-and-notifications/DisplayLogsAndNotifications.css@@ -14,7 +14,7 @@.logs-handle {height: 40px;- background-color: #eee;+ background-color: #fff;border-bottom: 1px solid #ccc;cursor: ns-resize;user-select: none;@@ -36,7 +36,7 @@.tool-logs-table .ant-table {font-family: Consolas, "Courier New", monospace;- font-size: 12px !important;+ font-size: 14px !important;background-color: #fff;}@@ -50,6 +50,6 @@}.display-logs-md {- font-size: 12px;+ font-size: 14px;padding-left: 5px;}diff --git a/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx b/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsxindex 2d351216a..32d1f1bac 100644--- a/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx+++ b/frontend/src/components/navigations/side-nav-bar/SideNavBar.jsx@@ -207,11 +207,12 @@ const SideNavBar = ({ collapsed }) => {title: "Platform",description: "Settings for the platform",image: PlatformSettingsIcon,- path: `/${orgName}/settings`,+ path: `/${orgName}/settings/platform`,active:window.location.pathname === `/${orgName}/settings` ||window.location.pathname === `/${orgName}/settings/platform` ||window.location.pathname === `/${orgName}/settings/triad` ||+ window.location.pathname === `/${orgName}/settings/review` ||window.location.pathname === `/${orgName}/users`,},],diff --git a/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsx b/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsxindex 79a995632..e3d45066d 100644--- a/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsx+++ b/frontend/src/components/navigations/tool-nav-bar/ToolNavBar.jsx@@ -36,7 +36,7 @@ function ToolNavBar({<Typographystyle={{fontWeight: 600,- fontSize: "18px",+ fontSize: "16px",display: "inline",lineHeight: "24px",}}diff --git a/frontend/src/components/onboard/onBoard.css b/frontend/src/components/onboard/onBoard.cssindex 7c70fd563..9b82488d1 100644--- a/frontend/src/components/onboard/onBoard.css+++ b/frontend/src/components/onboard/onBoard.css@@ -1,12 +1,16 @@.onboard-content {display: flex;justify-content: center;- margin-top: 50px;+ align-items: flex-start;+ height: 100vh;+ overflow-y: auto;+ padding: 50px 20px 20px 20px;+ box-sizing: border-box;}@media screen and (max-height: 900px) {.onboard-content {- margin-top: 30px;+ padding: 30px 20px 20px 20px;}}diff --git a/frontend/src/components/pipelines-or-deployments/pipelines/Pipelines.css b/frontend/src/components/pipelines-or-deployments/pipelines/Pipelines.cssindex 4d8c6247f..22324d709 100644--- a/frontend/src/components/pipelines-or-deployments/pipelines/Pipelines.css+++ b/frontend/src/components/pipelines-or-deployments/pipelines/Pipelines.css@@ -1,5 +1,4 @@.p-or-d-layout {- background-color: var(--page-bg-2);height: 100%;display: flex;flex-direction: column;diff --git a/frontend/src/components/settings/default-triad/DefaultTriad.jsx b/frontend/src/components/settings/default-triad/DefaultTriad.jsxindex b360a897f..b12dad2b3 100644--- a/frontend/src/components/settings/default-triad/DefaultTriad.jsx+++ b/frontend/src/components/settings/default-triad/DefaultTriad.jsx@@ -13,6 +13,7 @@ import SpaceWrapper from "../../widgets/space-wrapper/SpaceWrapper.jsx";import { SpinnerLoader } from "../../widgets/spinner-loader/SpinnerLoader.jsx";import "./DefaultTriad.css";import usePostHogEvents from "../../../hooks/usePostHogEvents.js";+import { SettingsLayout } from "../settings-layout/SettingsLayout.jsx";const { Option } = Select;@@ -173,9 +174,13 @@ function DefaultTriad() {};return (- <>+ <SettingsLayout activeKey="triad"><div className="plt-set-head">- <Button size="small" type="text" onClick={() => navigate(-1)}>+ <Button+ size="small"+ type="text"+ onClick={() => navigate(`/${sessionDetails?.orgName}/tools`)}+ ><ArrowLeftOutlined /></Button><Typography.Text className="plt-set-head-typo">@@ -221,7 +226,7 @@ function DefaultTriad() {)}</IslandLayout></div>- </>+ </SettingsLayout>);}diff --git a/frontend/src/components/settings/platform/PlatformSettings.css b/frontend/src/components/settings/platform/PlatformSettings.cssindex e085bf1c5..810b6c480 100644--- a/frontend/src/components/settings/platform/PlatformSettings.css+++ b/frontend/src/components/settings/platform/PlatformSettings.css@@ -1,8 +1,8 @@/* Styles for PlatformSettings */.plt-set-layout {- height: 100%;- background-color: var(--page-bg-2);+ height: calc(100vh - 60px);+ background-color: #ffffff;}.plt-set-layout-2 {diff --git a/frontend/src/components/settings/platform/PlatformSettings.jsx b/frontend/src/components/settings/platform/PlatformSettings.jsxindex 89b929418..76768791d 100644--- a/frontend/src/components/settings/platform/PlatformSettings.jsx+++ b/frontend/src/components/settings/platform/PlatformSettings.jsx@@ -15,6 +15,7 @@ import { ConfirmModal } from "../../widgets/confirm-modal/ConfirmModal.jsx";import "./PlatformSettings.css";import { useExceptionHandler } from "../../../hooks/useExceptionHandler.jsx";import usePostHogEvents from "../../../hooks/usePostHogEvents.js";+import { SettingsLayout } from "../settings-layout/SettingsLayout.jsx";const defaultKeys = [{@@ -233,100 +234,108 @@ function PlatformSettings() {};return (- <>- <div className="plt-set-head">- <Button size="small" type="text">- <ArrowLeftOutlined onClick={() => navigate(-1)} />- </Button>- <Typography.Text className="plt-set-head-typo">- Platform Settings- </Typography.Text>- </div>- <div className="plt-set-layout">- <IslandLayout>- <div className="plt-set-layout-2">- <div>- {keys.map((keyDetails, keyIndex) => {- return (- <div key={keyDetails?.keyName}>- <div>- <div className="plt-set-key-head">- <Row>- <Col>- <div className="plt-set-key-head-col-1">- <Typography.Text>- {keyDetails?.keyName}- </Typography.Text>- </div>- </Col>- <Col>- <div className="plt-set-key-head-col-2">- <Radio- checked={- keyDetails?.id && activeKey === keyIndex- }- disabled={keyDetails?.id === null}- onClick={() => handleToggle(keyIndex)}- >- Active Key- </Radio>- </div>- </Col>- </Row>- </div>+ <SettingsLayout activeKey="platform">+ <div>+ <div className="plt-set-head">+ <Button+ size="small"+ type="text"+ onClick={() => navigate(`/${sessionDetails?.orgName}/tools`)}+ >+ <ArrowLeftOutlined />+ </Button>+ <Typography.Text className="plt-set-head-typo">+ Platform Settings+ </Typography.Text>+ </div>+ <div className="plt-set-layout">+ <IslandLayout>+ <div className="plt-set-layout-2">+ <div>+ {keys.map((keyDetails, keyIndex) => {+ return (+ <div key={keyDetails?.keyName}><div>- <Row gutter={10}>- <Col>- <div className="plt-set-key-display">- <Input- size="small"- value={keys[keyIndex].key}- suffix={- <CopyOutlined- onClick={() => copyText(keys[keyIndex].key)}- />- }- />- </div>- </Col>- <Col>- <Button- size="small"- loading={isLoadingIndex === keyIndex}- onClick={() => handleGenerate(keyIndex)}- >- {keyDetails?.id?.length > 0- ? "Refresh"- : "Generate"}- </Button>- </Col>- <Col>- <ConfirmModal- handleConfirm={() => handleDelete(keyIndex)}- content="Want to delete this platform key? This action cannot be undone."- okText="Delete"- >+ <div className="plt-set-key-head">+ <Row>+ <Col>+ <div className="plt-set-key-head-col-1">+ <Typography.Text>+ {keyDetails?.keyName}+ </Typography.Text>+ </div>+ </Col>+ <Col>+ <div className="plt-set-key-head-col-2">+ <Radio+ checked={+ keyDetails?.id && activeKey === keyIndex+ }+ disabled={keyDetails?.id === null}+ onClick={() => handleToggle(keyIndex)}+ >+ Active Key+ </Radio>+ </div>+ </Col>+ </Row>+ </div>+ <div>+ <Row gutter={10}>+ <Col>+ <div className="plt-set-key-display">+ <Input+ size="small"+ value={keys[keyIndex].key}+ suffix={+ <CopyOutlined+ onClick={() =>+ copyText(keys[keyIndex].key)+ }+ />+ }+ />+ </div>+ </Col>+ <Col><Buttonsize="small"- disabled={keyDetails?.id === null}- loading={isDeletingIndex === keyIndex}+ loading={isLoadingIndex === keyIndex}+ onClick={() => handleGenerate(keyIndex)}>- <DeleteOutlined />+ {keyDetails?.id?.length > 0+ ? "Refresh"+ : "Generate"}</Button>- </ConfirmModal>- </Col>- </Row>+ </Col>+ <Col>+ <ConfirmModal+ handleConfirm={() => handleDelete(keyIndex)}+ content="Want to delete this platform key? This action cannot be undone."+ okText="Delete"+ >+ <Button+ size="small"+ disabled={keyDetails?.id === null}+ loading={isDeletingIndex === keyIndex}+ >+ <DeleteOutlined />+ </Button>+ </ConfirmModal>+ </Col>+ </Row>+ </div></div>+ {keyIndex < keys?.length - 1 && <Divider />}</div>- {keyIndex < keys?.length - 1 && <Divider />}- </div>- );- })}+ );+ })}+ </div></div>- </div>- </IslandLayout>+ </IslandLayout>+ </div></div>- </>+ </SettingsLayout>);}diff --git a/frontend/src/components/settings/settings-layout/SettingsLayout.jsx b/frontend/src/components/settings/settings-layout/SettingsLayout.jsxnew file mode 100644index 000000000..0d8acf074--- /dev/null+++ b/frontend/src/components/settings/settings-layout/SettingsLayout.jsx@@ -0,0 +1,111 @@+import { useEffect, useRef, useState } from "react";+import { useNavigate, useLocation } from "react-router-dom";+import PropTypes from "prop-types";+import "../settings/Settings.css";+import { useSessionStore } from "../../../store/session-store";++function SettingsLayout({ children, activeKey }) {+ const navigate = useNavigate();+ const location = useLocation();+ const [isSidebarVisible, setIsSidebarVisible] = useState(true);+ const sidebarRef = useRef(null);+ const { sessionDetails } = useSessionStore();++ // Show sidebar when route changes (navigating to a new settings page)+ // location.key changes even when navigating to the same path+ useEffect(() => {+ setIsSidebarVisible(true);+ }, [location.pathname, location.key]);++ // Handle click outside to close sidebar+ useEffect(() => {+ const handleClickOutside = (event) => {+ if (sidebarRef.current && !sidebarRef.current.contains(event.target)) {+ setIsSidebarVisible(false);+ }+ };++ document.addEventListener("mousedown", handleClickOutside);+ return () => {+ document.removeEventListener("mousedown", handleClickOutside);+ };+ }, []);++ // Guard against missing orgName - check AFTER all hooks+ if (!sessionDetails?.orgName) {+ return null;+ }++ const settingsMenuItems = [+ {+ key: "platform",+ label: "Platform Settings",+ path: `/${sessionDetails?.orgName}/settings/platform`,+ },+ {+ key: "users",+ label: "User Management",+ path: `/${sessionDetails?.orgName}/users`,+ },+ {+ key: "triad",+ label: "Default Triad",+ path: `/${sessionDetails?.orgName}/settings/triad`,+ },+ {+ key: "review",+ label: "Human In the Loop Settings",+ path: `/${sessionDetails?.orgName}/settings/review`,+ },+ ];++ // Determine active key from route if not provided+ const getActiveKey = () => {+ if (activeKey) return activeKey;+ const path = location.pathname;+ if (path.includes("/settings/platform")) return "platform";+ if (path.includes("/users")) return "users";+ if (path.includes("/settings/triad")) return "triad";+ if (path.includes("/settings/review")) return "review";+ return "platform";+ };++ const currentActiveKey = getActiveKey();++ return (+ <div className="settings-container">+ {isSidebarVisible && (+ <nav+ className="settings-sidebar"+ ref={sidebarRef}+ aria-label="Settings navigation"+ >+ {settingsMenuItems.map((item) => (+ <button+ key={item.key}+ type="button"+ className={`settings-menu-item ${+ currentActiveKey === item.key ? "active" : ""+ }`}+ onClick={() => navigate(item.path)}+ aria-label={item.label}+ aria-current={currentActiveKey === item.key ? "page" : undefined}+ >+ {item.label}+ </button>+ ))}+ </nav>+ )}+ <main className="settings-content" role="main">+ {children}+ </main>+ </div>+ );+}++SettingsLayout.propTypes = {+ children: PropTypes.node.isRequired,+ activeKey: PropTypes.string,+};++export { SettingsLayout };diff --git a/frontend/src/components/settings/settings/Settings.css b/frontend/src/components/settings/settings/Settings.cssindex 51f78ced8..1b44369cd 100644--- a/frontend/src/components/settings/settings/Settings.css+++ b/frontend/src/components/settings/settings/Settings.css@@ -1,23 +1,52 @@/* Styles for Settings */-.settings-bg-col {- background-color: var(--page-bg-2);+.settings-container {+ position: relative;height: 100%;+ background-color: var(--page-bg-2);+}++.settings-sidebar {+ position: fixed;+ left: 75px;+ bottom: 60px;+ width: 200px;+ background-color: #fff;+ border-radius: 4px;+ padding: 0;+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);+ z-index: 1000;}-.settings-layout {- padding: 20px;+.settings-menu-item {+ padding: 12px 16px;+ font-size: 14px;+ cursor: pointer;+ color: #000;+ transition: all 0.2s;+ border-bottom: 1px solid #f0f0f0;}-.settings-head {- margin-bottom: 8px;+.settings-menu-item:first-child {+ border-radius: 4px 4px 0 0;}-.settings-head-typo {- font-size: 18px;- font-weight: 600;+.settings-menu-item:last-child {+ border-bottom: none;+ border-radius: 0 0 4px 4px;}-.settings-plt-typo {- font-size: 14px;+.settings-menu-item:hover {+ background-color: #f5f5f5;+}++.settings-menu-item.active {+ background-color: #e6f7ff;+ color: #1890ff;+ font-weight: 500;+}++.settings-content {+ height: 100%;+ overflow: auto;}diff --git a/frontend/src/components/settings/settings/Settings.jsx b/frontend/src/components/settings/settings/Settings.jsxindex d8938e8d5..2ed2dfa0f 100644--- a/frontend/src/components/settings/settings/Settings.jsx+++ b/frontend/src/components/settings/settings/Settings.jsx@@ -1,88 +1,26 @@-import { Typography } from "antd";-import { useNavigate } from "react-router-dom";-import "./Settings.css";--import { IslandLayout } from "../../../layouts/island-layout/IslandLayout.jsx";+import { useNavigate, useLocation } from "react-router-dom";+import { useEffect } from "react";import { useSessionStore } from "../../../store/session-store";-import usePostHogEvents from "../../../hooks/usePostHogEvents.js";function Settings() {const navigate = useNavigate();+ const location = useLocation();const { sessionDetails } = useSessionStore();- const { setPostHogCustomEvent } = usePostHogEvents();- const handleDefaultTriadClick = () => {- navigate("triad");- try {- setPostHogCustomEvent("intent_select_default_triad", {- info: "Clicked on 'Default Triad' button",+ useEffect(() => {+ // Redirect to platform settings if on base settings page+ if (+ (location.pathname.endsWith("/settings") ||+ location.pathname.endsWith("/settings/")) &&+ sessionDetails?.orgName+ ) {+ navigate(`/${sessionDetails?.orgName}/settings/platform`, {+ replace: true,});- } catch (err) {- // If an error occurs while setting custom posthog event, ignore it and continue}- };-- return (- <div className="settings-bg-col">- <IslandLayout>- <div className="settings-layout">- <div className="settings-head">- <Typography.Text className="settings-head-typo">- General Settings- </Typography.Text>- </div>- <div className="settings-plt">- <Typography.Link- className="settings-plt-typo"- strong- onClick={() => navigate("platform")}- >- Platform Settings- </Typography.Link>- </div>- <div className="settings-plt">- <Typography.Link- className="settings-plt-typo"- strong- onClick={() => navigate(`/${sessionDetails?.orgName}/users`)}- >- User Management- </Typography.Link>- </div>- <div className="settings-plt">- <Typography.Link- className="settings-plt-typo"- strong- onClick={handleDefaultTriadClick}- >- Default Triad- </Typography.Link>- </div>+ }, [location.pathname, navigate, sessionDetails?.orgName]);- {sessionDetails?.isPlatformAdmin && (- <div className="settings-plt">- <Typography.Link- className="settings-plt-typo"- strong- onClick={() => navigate("admin")}- >- Admin settings- </Typography.Link>- </div>- )}- <div className="settings-plt">- <Typography.Link- className="settings-plt-typo"- strong- onClick={() => navigate("review")}- >- Human In The Loop Settings- </Typography.Link>- </div>- </div>- </IslandLayout>- </div>- );+ return null;}export { Settings };diff --git a/frontend/src/components/widgets/list-view/ListView.css b/frontend/src/components/widgets/list-view/ListView.cssindex 0deda612b..955716c4e 100644--- a/frontend/src/components/widgets/list-view/ListView.css+++ b/frontend/src/components/widgets/list-view/ListView.css@@ -59,8 +59,8 @@}.adapter-cover-img .fit-cover {- width: 120px;- height: 90px;+ width: 38px;+ height: 38px;object-fit: contain;}diff --git a/frontend/src/index.css b/frontend/src/index.cssindex 7f67b5226..fe6c7222a 100644--- a/frontend/src/index.css+++ b/frontend/src/index.css@@ -29,6 +29,11 @@ body {}/* Custom scroll bar css starts */+* {+ scrollbar-width: thin;+ scrollbar-color: #E8EDF2 transparent;+}+::-webkit-scrollbar {width: 3px;height: 5px;@@ -43,12 +48,12 @@ body {/* Handle */::-webkit-scrollbar-thumb {border-radius: 4px;- background: #e2e2e2;+ background: #E8EDF2;}/* Handle on hover */::-webkit-scrollbar-thumb:hover {- background: #b3b3b3;+ background: #D4DCE5;}/* Corner where both X and Y scroll bar meets */