fix(render+admin): render queue shows ALL users' jobs
Build backend images / build content-svc (push) Failing after 53s
Build backend images / build file-svc (push) Failing after 55s
Build backend images / build gateway (push) Failing after 58s
Build backend images / build identity-svc (push) Failing after 1m0s
Build backend images / build notification-svc (push) Failing after 49s
Build backend images / build render-svc (push) Failing after 56s
Build backend images / build studio-svc (push) Failing after 59s

The admin render queue called the user-scoped /v1/renders (so it only showed the
admin's own jobs) and parsed items/total instead of data/meta (→ always empty).
- render-svc: GET /v1/admin-renders (admin) → ListAllJobs across users, optional
  ?status= filter; gateway-wired
- admin renders page now fetches /v1/admin-renders and reads data/meta correctly

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-03 07:35:17 +03:30
parent 4253d2fad5
commit ebf0e11f22
5 changed files with 90 additions and 6 deletions
+7 -6
View File
@@ -23,8 +23,8 @@ export type V2RenderJob = {
};
interface V2RenderList {
items: V2RenderJob[];
total: number;
data: V2RenderJob[];
meta?: { total?: number };
}
export default async function AdminRendersPage({
@@ -33,10 +33,11 @@ export default async function AdminRendersPage({
searchParams: { step?: string };
}) {
const step = searchParams.step ?? "";
const qs = step ? `?step=${step}&pageSize=50` : "?pageSize=50";
const data = await adminGet<V2RenderList>(`/v1/renders${qs}`);
const jobs = data?.items ?? [];
const total = data?.total ?? 0;
// Admin endpoint → all users' jobs (not just the caller's).
const qs = step ? `?status=${step}&page_size=50` : "?page_size=50";
const data = await adminGet<V2RenderList>(`/v1/admin-renders${qs}`);
const jobs = data?.data ?? [];
const total = data?.meta?.total ?? 0;
const t = await getTranslations("auto.appAdminRendersPage");
const steps = ["Queued", "Preparing", "Rendering", "Uploading", "Done", "Failed", "Cancelled"];