feat(pipeline): tabbed render queue with paged exports
Deploy / deploy (push) Successful in 3m32s

The queue page loaded up to 200 exports in one table with the Blender
renders appended underneath, so a Blender job sat below the whole export
history. Exports and Blender renders are now separate tabs; the Blender tab
label shows how many are active or failed so a render stays visible from
the exports tab.

Exports page 25 at a time. The summary cards now come from a server-side
count per status (listExports.statusCounts) instead of counting the loaded
rows, which was already wrong past 200, and clicking a card filters to it.
The project filter moves to the header since it applies to both tabs, and
the duplicated Deliveries button is gone.

Adds .claude/launch.json for running the dev server from the preview pane.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
twotalesanimation
2026-09-18 05:04:41 +02:00
parent 708e8a0d8f
commit 532ebd82d7
3 changed files with 307 additions and 190 deletions
+12 -3
View File
@@ -515,14 +515,20 @@ export interface ListExportsFilter {
export async function listExports(filter: ListExportsFilter) {
const page = Math.max(1, filter.page ?? 1);
const limit = Math.min(200, Math.max(1, filter.limit ?? 50));
const where: Prisma.ExportWhereInput = {
const scope: Prisma.ExportWhereInput = {
...(filter.projectId ? { projectId: filter.projectId } : {}),
...(filter.status ? { status: filter.status } : {}),
...(filter.shotId ? { shotId: filter.shotId } : {}),
...(filter.episode ? { shot: { episode: filter.episode } } : {}),
};
const [total, rows] = await Promise.all([
const where: Prisma.ExportWhereInput = {
...scope,
...(filter.status ? { status: filter.status } : {}),
};
const [total, byStatus, rows] = await Promise.all([
db.export.count({ where }),
// Counted across the whole scope, ignoring the status filter and paging:
// summary figures taken from the loaded page would count only that page.
db.export.groupBy({ by: ["status"], where: scope, _count: { _all: true } }),
db.export.findMany({
where,
orderBy: { createdAt: "desc" },
@@ -540,6 +546,9 @@ export async function listExports(filter: ListExportsFilter) {
]);
return {
pagination: { page, limit, total, pages: Math.ceil(total / limit) },
statusCounts: Object.fromEntries(byStatus.map((g) => [g.status, g._count._all])) as Partial<
Record<ExportStatus, number>
>,
exports: rows.map((e) => ({
id: e.id,
shotCode: e.shot.shotCode,