Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
- web/src/home/HomePage.tsx +25 -2
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "07a58976c",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
07a58976c
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
66b8f2041c47ec87d4ff26442f04e74617722537c61ad4f9716d6bf0c2ff8e80
|
web/src/home/HomePage.tsx
CHANGED
|
@@ -88,6 +88,8 @@ import type { AutomationTile, DataHomeLocation, HomeFilter, HomeLayout, HomeFold
|
|
| 88 |
|
| 89 |
// Twin in SheetPage.tsx; this ticket's file fence keeps the timeout local to each chunk.
|
| 90 |
const FOLDER_WRITE_TIMEOUT_MS = 20000;
|
|
|
|
|
|
|
| 91 |
|
| 92 |
/** S70-T06 / R24: arithmetic stays here because this lane does not own homeModel. */
|
| 93 |
export function homePageWindow(itemCount: number, capacity: number, requestedPage: number) {
|
|
@@ -344,8 +346,29 @@ function parseHomeView(value: unknown): HomeViewTile | null {
|
|
| 344 |
}
|
| 345 |
|
| 346 |
async function readHomeViews(abort?: AbortSignal): Promise<{ views: HomeViewTile[]; unreadCount: number }> {
|
| 347 |
-
|
| 348 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 349 |
if (!response.ok) throw new Error(refusalSentence(body, "Views could not be loaded. Reload views to retry."));
|
| 350 |
if (!Array.isArray(body?.views)) throw new Error("Views could not be loaded. Reload views to retry.");
|
| 351 |
const rows = (body.views as unknown[]).map(parseHomeView).filter((row): row is HomeViewTile => row !== null);
|
|
|
|
| 88 |
|
| 89 |
// Twin in SheetPage.tsx; this ticket's file fence keeps the timeout local to each chunk.
|
| 90 |
const FOLDER_WRITE_TIMEOUT_MS = 20000;
|
| 91 |
+
// Twin of net/deadline.ts READ_DEADLINE_MS, kept local because verify_home runs this file with stubbed imports.
|
| 92 |
+
const VIEWS_READ_TIMEOUT_MS = 45000;
|
| 93 |
|
| 94 |
/** S70-T06 / R24: arithmetic stays here because this lane does not own homeModel. */
|
| 95 |
export function homePageWindow(itemCount: number, capacity: number, requestedPage: number) {
|
|
|
|
| 346 |
}
|
| 347 |
|
| 348 |
async function readHomeViews(abort?: AbortSignal): Promise<{ views: HomeViewTile[]; unreadCount: number }> {
|
| 349 |
+
// A stalled server ends in the Views error and its reload action, never a spinner.
|
| 350 |
+
// The deadline covers the body too: aborting the request also ends its body read.
|
| 351 |
+
const controller = new AbortController();
|
| 352 |
+
const forward = () => controller.abort();
|
| 353 |
+
if (abort?.aborted) controller.abort();
|
| 354 |
+
else abort?.addEventListener("abort", forward);
|
| 355 |
+
let expired = false;
|
| 356 |
+
const deadline = setTimeout(() => { expired = true; controller.abort(); }, VIEWS_READ_TIMEOUT_MS);
|
| 357 |
+
let response: Response;
|
| 358 |
+
let body;
|
| 359 |
+
try {
|
| 360 |
+
response = await fetch(`${API_V1}/nav/views`, { credentials: CREDENTIALS, signal: controller.signal });
|
| 361 |
+
body = await response.json().catch(() => {
|
| 362 |
+
if (expired) throw new Error("Views did not load in time. Reload views to retry.");
|
| 363 |
+
return null;
|
| 364 |
+
});
|
| 365 |
+
} catch (error) {
|
| 366 |
+
if (expired) throw new Error("Views did not load in time. Reload views to retry.");
|
| 367 |
+
throw error;
|
| 368 |
+
} finally {
|
| 369 |
+
clearTimeout(deadline);
|
| 370 |
+
abort?.removeEventListener("abort", forward);
|
| 371 |
+
}
|
| 372 |
if (!response.ok) throw new Error(refusalSentence(body, "Views could not be loaded. Reload views to retry."));
|
| 373 |
if (!Array.isArray(body?.views)) throw new Error("Views could not be loaded. Reload views to retry.");
|
| 374 |
const rows = (body.views as unknown[]).map(parseHomeView).filter((row): row is HomeViewTile => row !== null);
|