From d40025cfaa03bdc0a522bed099bf4428f45c74d6 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sat, 23 May 2026 22:44:47 +0000 Subject: [PATCH] Fix triage workbench layout, chat history, and toast labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Route sidebar: add alignContent: "start" so the three grid rows size to content instead of stretching to fill the viewport. Inner grids stop cascading, queue links collapse to natural height. - Item workbench: only show the "Loading item…" placeholder when there's no data yet. Previously every itemQuery.refresh() (e.g. on a chat send) flipped loading=true, unmounted WorkbenchTwoColumn and reset ChatPanel's local history state, so user/assistant messages never rendered. - Transition toast: label the destination by state ("Approved") rather than the button copy ("Approve"). Co-Authored-By: Paperclip --- packages/plugins/plugin-triage/src/ui/app.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/plugins/plugin-triage/src/ui/app.tsx b/packages/plugins/plugin-triage/src/ui/app.tsx index e8d718f0ea4..41c894798be 100644 --- a/packages/plugins/plugin-triage/src/ui/app.tsx +++ b/packages/plugins/plugin-triage/src/ui/app.tsx @@ -562,6 +562,7 @@ export function TriageRouteSidebar({ context }: PluginRouteSidebarProps) { padding: 12, display: "grid", gap: 14, + alignContent: "start", color: tokens.fg, background: tokens.bg, fontFamily: fontStack, @@ -1071,7 +1072,7 @@ function ItemWorkbenchPage({ companyId, queueKey, itemId }: { companyId: string; ) : null} - {itemQuery.loading || !itemQuery.data ? ( + {!itemQuery.data ? (
Loading item…
) : ( (null); const transitions = allowedTransitions(item.stateKey); - async function handleTransition(toStateKey: string, label: string) { + async function handleTransition(toStateKey: string) { setError(null); setBusy(toStateKey); try { await transition({ companyId, itemId: item.id, toStateKey }); onChanged(); - toast({ title: `Item moved to ${label}`, tone: "success" }); + toast({ title: `Item moved to ${stateLabel(toStateKey)}`, tone: "success" }); } catch (err) { setError(err instanceof Error ? err.message : "Failed to transition item"); } finally { @@ -1151,7 +1152,7 @@ function TransitionBar({ key={t.toStateKey} variant={isPrimary ? "primary" : "outline"} disabled={busy !== null} - onClick={() => void handleTransition(t.toStateKey, t.label)} + onClick={() => void handleTransition(t.toStateKey)} > {busy === t.toStateKey ? `${t.label}…` : t.label}