fix: SSE auth via query param, null-safe stages access

- Append auth token as query parameter to EventSource URLs
  (EventSource API doesn't support custom headers)
- Add null guards for stages arrays from API responses
- Hide sidebar on login page
This commit is contained in:
2026-03-28 13:43:15 +03:00
parent 316d1b4bcc
commit a8fcde87b5
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -21,8 +21,9 @@
const detailPromises = projects.map(async (p) => {
try {
const detail = await api.getProject(p.id);
const stages = detail.stages ?? [];
const stageInstances = await Promise.all(
detail.stages.map((s) => api.listInstances(p.id, s.id))
stages.map((s) => api.listInstances(p.id, s.id))
);
return { projectId: p.id, instances: stageInstances.flat() };
} catch {
+1 -1
View File
@@ -35,7 +35,7 @@
try {
const detail = await api.getProject(projectId);
project = detail.project;
stages = detail.stages;
stages = detail.stages ?? [];
const instanceResults = await Promise.all(
stages.map(async (s) => {