mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-24 18:19:05 +02:00
Fix triage workbench layout, chat history, and toast labels
- 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 <noreply@paperclip.ing>
This commit is contained in:
1 parent
e2ce944e9f
commit
d40025cfaa
1 file changed
+5
-4
@@ -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}
|
||||
</div>
|
||||
|
||||
{itemQuery.loading || !itemQuery.data ? (
|
||||
{!itemQuery.data ? (
|
||||
<div style={mutedStyle}>Loading item…</div>
|
||||
) : (
|
||||
<WorkbenchTwoColumn
|
||||
@@ -1109,13 +1110,13 @@ function TransitionBar({
|
||||
const [error, setError] = useState<string | null>(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}
|
||||
</Button>
|
||||
|
||||
Reference in new issue
Block a user