feat(studio): add batch actions, group search filter and smart unit category rules
CI / check (push) Failing after 30s
CI / deploy (push) Skipped
CI / publish-container (push) Skipped

This commit is contained in:
openhands committed 2026-09-11 23:35:13 +02:00
1 parent 669e20a35c
commit eb3dc4e88c
4 files changed
+85 -13

No files matched your search

@@ -557,17 +557,72 @@ export function OrganizeImportsDialog({
</div>
) : (
<>
<div className="flex items-center justify-between gap-2">
<p className="text-xs text-muted-foreground">{t("desc")}</p>
<Button
type="button"
variant="outline"
size="sm"
className="h-7 px-2 text-[10px]"
onClick={toggleAll}
>
{allApproved ? t("deselectAll") : t("selectAll")}
</Button>
<div className="flex flex-col gap-2 rounded-md border bg-[var(--admin-surface)] p-3 text-xs">
<div className="flex items-center justify-between gap-2">
<div className="relative flex-1">
<Search className="absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" />
<Input
className="h-8 pl-8 text-xs"
placeholder={t("searchGroups")}
value={groupSearchQuery}
onChange={(e) => setGroupSearchQuery(e.target.value)}
/>
</div>
<Button
type="button"
variant="outline"
size="sm"
className="h-8 px-2.5 text-[10px]"
onClick={toggleAll}
>
{allApproved ? t("deselectAll") : t("selectAll")}
</Button>
</div>
{/* Batch Actions Bar */}
<div className="flex flex-wrap items-center gap-2 border-t pt-2.5">
<span className="text-[10px] font-medium text-muted-foreground">
Batch:
</span>
<Select
value={batchLayout}
onValueChange={(v) => {
if (isValidCatalogLayout(v)) {
setBatchLayout(v);
applyBatchLayout(v);
}
}}
>
<SelectTrigger className="h-7 w-[140px] text-[10px]">
<SelectValue placeholder={t("batchLayout")} />
</SelectTrigger>
<SelectContent>
{CATALOG_LAYOUTS.map((l) => (
<SelectItem key={l} value={l} className="text-xs">
{l}
</SelectItem>
))}
</SelectContent>
</Select>
<div className="flex items-center gap-1">
<Input
className="h-7 w-[120px] text-[10px]"
placeholder={t("batchPrefix")}
value={batchPrefix}
onChange={(e) => setBatchPrefix(e.target.value)}
/>
<Button
type="button"
variant="secondary"
size="sm"
className="h-7 px-2 text-[10px]"
onClick={applyBatchPrefix}
>
{t("applyBatch")}
</Button>
</div>
</div>
</div>
{groups.map((group) => {