From ae069826201d885c7f6cb189b893ddad49c82d58 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Fri, 10 Jul 2026 15:53:51 +0530 Subject: [PATCH] feat(gui): Switch to tailwind --- apps/gui/package.json | 13 +- apps/gui/postcss.config.mjs | 8 + apps/gui/src/app/config/page.tsx | 565 +++++++------------------------ apps/gui/src/app/globals.css | 24 +- apps/gui/src/app/layout.tsx | 2 +- apps/gui/src/app/page.tsx | 71 ++-- apps/gui/tailwind.config.ts | 11 + pnpm-lock.yaml | 502 +++++++++++++++++++++++++++ 8 files changed, 674 insertions(+), 522 deletions(-) create mode 100644 apps/gui/postcss.config.mjs create mode 100644 apps/gui/tailwind.config.ts diff --git a/apps/gui/package.json b/apps/gui/package.json index e92d50f..b7ce140 100644 --- a/apps/gui/package.json +++ b/apps/gui/package.json @@ -10,14 +10,14 @@ "lint": "next lint" }, "dependencies": { - "@omnia/core": "workspace:*", - "@omnia/llm": "workspace:*", - "@omnia/intent": "workspace:*", - "@omnia/architect": "workspace:*", "@omnia/actor": "workspace:*", + "@omnia/architect": "workspace:*", + "@omnia/core": "workspace:*", + "@omnia/intent": "workspace:*", + "@omnia/llm": "workspace:*", "@omnia/memory": "workspace:*", - "@omnia/spatial": "workspace:*", "@omnia/scenario": "workspace:*", + "@omnia/spatial": "workspace:*", "dotenv": "^17.4.2", "next": "^16.2.10", "react": "^19.2.0", @@ -27,6 +27,9 @@ "@types/node": "^26.1.0", "@types/react": "^19.2.0", "@types/react-dom": "^19.2.0", + "autoprefixer": "^10.5.2", + "postcss": "^8.5.16", + "tailwindcss": "^3.4.19", "typescript": "^6.0.3" } } diff --git a/apps/gui/postcss.config.mjs b/apps/gui/postcss.config.mjs new file mode 100644 index 0000000..a982c64 --- /dev/null +++ b/apps/gui/postcss.config.mjs @@ -0,0 +1,8 @@ +const config = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; + +export default config; diff --git a/apps/gui/src/app/config/page.tsx b/apps/gui/src/app/config/page.tsx index ebf21f7..c27aa6e 100644 --- a/apps/gui/src/app/config/page.tsx +++ b/apps/gui/src/app/config/page.tsx @@ -174,44 +174,57 @@ export default function ConfigPage() { }; return ( -
-

Configuration

+
+

Configuration

{loading &&

Loading configuration...

} - {error &&
{error}
} + {error && ( +
+ {error} +
+ )} {config && !loading && ( <> -
-

LLM Provider Instances

-
- +
+

LLM Provider Instances

+
{/* 30% area */} -
-
-

Instances

+
+
+

Instances

-
+
{instances.length === 0 ? ( -
No instances configured
+
+ No instances configured +
) : ( instances.map((inst) => (
setSelectedInstanceId(inst.id)} - className={`instance-list-item ${selectedInstanceId === inst.id ? "active" : ""}`} + className={`cursor-pointer border-b border-gray-200 border-l-[3px] px-4 py-4 transition-all hover:bg-gray-100 ${ + selectedInstanceId === inst.id + ? "border-l-blue-500 bg-blue-50" + : "border-l-transparent" + }`} > -
{inst.name}
-
+
{inst.name}
+
{inst.providerName} - {inst.isActive && Active} + {inst.isActive && ( + + Active + + )}
)) @@ -220,17 +233,19 @@ export default function ConfigPage() {
{/* 70% area */} -
-
-
-

+
+ +
+

{selectedInstanceId === "new" ? "Create New Provider Instance" : `Configure: ${editName}`}

-
- +
+ setEditName(e.target.value)} placeholder="e.g. Gemini - Production" required + className="w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm outline-none transition-[border-color,box-shadow] focus:border-blue-500 focus:ring-3 focus:ring-blue-500/15" />
-
- +
+ {editProvider && availableProviders.length > 0 && ( - + {availableProviders.find((p) => p.id === editProvider)?.description} )}
-
- +
+
-
- +
+ setEditModel(e.target.value)} placeholder="e.g. gemini-2.5-flash, gemini-2.5-pro" + className="w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-sm outline-none transition-[border-color,box-shadow] focus:border-blue-500 focus:ring-3 focus:ring-blue-500/15" />
-
+
setEditIsActive(e.target.checked)} + className="h-4 w-4 cursor-pointer" /> - +
-
-
+
+
{selectedInstanceId !== "new" && ( )}
-
-
-

-
-

Task Provider Routing

-

- Configure which LLM Provider Key Instance should handle each specific simulation task. Mappings default to the currently Active instance if not specified. +

+

Task Provider Routing

+

+ Configure which LLM Provider Key Instance should handle each specific simulation + task. Mappings default to the currently Active instance if not + specified.

-
+
{[ { key: "actor-prose", label: "Actor Prose Generation", desc: "Generates roleplay/narrative prose for Non-Player Characters." }, { key: "llm-validator", label: "LLM Validator", desc: "Arbitrates and validates proposed actions against the world state rules." }, { key: "intent-decoder", label: "Intent Decoder", desc: "Splits raw prose actions into structured intents (Player and NPC)." }, { key: "timedelta", label: "TimeDelta Generator", desc: "Calculates the duration of character actions to advance the game clock." }, ].map((task) => ( -
-
- {task.label} - {task.desc} +
+
+ {task.label} + {task.desc}