From 1076a36475edacbb67c641010a70db0de70e98bc Mon Sep 17 00:00:00 2001 From: Trezy Date: Wed, 27 May 2026 14:34:05 +0000 Subject: [PATCH] refactor: move script list to a sidebar and show all possible script slots for a lexicon Signed-off-by: Trezy --- web/src/app/dashboard/lexicons/[id]/lexicon-detail.tsx | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------- web/src/components/code-panels.tsx | 2 +- 2 file(s) changed, 65 insertion(s)(+), 110 deletion(s)(-) diff --git a/web/src/app/dashboard/lexicons/[id]/lexicon-detail.tsx b/web/src/app/dashboard/lexicons/[id]/lexicon-detail.tsx --- a/web/src/app/dashboard/lexicons/[id]/lexicon-detail.tsx +++ b/web/src/app/dashboard/lexicons/[id]/lexicon-detail.tsx @@ -1,7 +1,7 @@ "use client"; import { useCallback, useEffect, useState } from "react"; -import { IconPlus } from "@tabler/icons-react"; +import { IconPlus, IconScript, IconScriptX } from "@tabler/icons-react"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; @@ -19,12 +19,6 @@ import type { Script, TriggerKind } from "@/types/scripts"; import { SiteHeader } from "@/components/site-header"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; @@ -237,9 +231,16 @@ )} - {/* Trigger-keyed scripts that target this lexicon. Each row - either links to the existing script or to the New Script - page pre-filled with the trigger id. */} + + +
+ + {targetingTriggers.length > 0 && ( )}
- {/* JSON editor only — scripts (record-event handlers, XRPC - handlers, label-arrival handlers) are managed via the - "Scripts targeting this lexicon" panel above. */} - - {/* Actions */}