Skip to content

Commit 9d97021

Browse files
committed
feat(tanstack-migrator): pin queue totals to the bottom of the widget
Move the migrating/queued/need-human counters out of the scroll area into a fixed bottom bar (solid bg + border-top) so the lists scroll behind it and the totals stay visible at the card's bottom.
1 parent 67be7a7 commit 9d97021

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

  • tanstack-migrator/web/tools/widget-queue

tanstack-migrator/web/tools/widget-queue/index.tsx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ export default function WidgetQueuePage() {
106106
<QueueContent active={active} next={next} q={q} onEnqueue={enqueue} />
107107
</div>
108108
)}
109+
110+
{/* totals pinned to the bottom — content scrolls behind it */}
111+
{q && !(loading && !data) && !(error && !data) && <QueueTotals q={q} />}
109112
</div>
110113
);
111114
}
@@ -195,17 +198,20 @@ function QueueContent({
195198
No migrations in progress or queued.
196199
</p>
197200
)}
201+
</div>
202+
);
203+
}
198204

199-
{q && (
200-
<div className="flex flex-wrap gap-x-3 gap-y-0.5 border-t border-border pt-1.5 text-[11px] text-muted-foreground tabular-nums">
201-
<span>{q.active} migrating</span>
202-
<span>{q.queued} queued</span>
203-
{q.needsHuman > 0 && (
204-
<span className="text-amber-600 dark:text-amber-400">
205-
{q.needsHuman} need human
206-
</span>
207-
)}
208-
</div>
205+
/** Totals bar pinned to the bottom of the widget — the lists scroll behind it. */
206+
function QueueTotals({ q }: { q: DashboardData["queue"] }) {
207+
return (
208+
<div className="z-10 mt-2 flex shrink-0 flex-wrap gap-x-3 gap-y-0.5 border-t border-border bg-background pt-1.5 text-[11px] text-muted-foreground tabular-nums">
209+
<span>{q.active} migrating</span>
210+
<span>{q.queued} queued</span>
211+
{q.needsHuman > 0 && (
212+
<span className="text-amber-600 dark:text-amber-400">
213+
{q.needsHuman} need human
214+
</span>
209215
)}
210216
</div>
211217
);

0 commit comments

Comments
 (0)