Standardise AbortController cancellation in setup and server health hooks

Add abortable API signals for setup status and server health/log fetches, document hook cancellation patterns, and cover stale refresh cancellation with tests.
This commit is contained in:
2026-04-21 17:38:35 +02:00
parent cf5a000bf5
commit e683108965
7 changed files with 203 additions and 12 deletions

View File

@@ -18,8 +18,8 @@ import type {
*
* @returns Setup status response with a `completed` boolean.
*/
export async function getSetupStatus(): Promise<SetupStatusResponse> {
return api.get<SetupStatusResponse>(ENDPOINTS.setup);
export async function getSetupStatus(signal?: AbortSignal): Promise<SetupStatusResponse> {
return api.get<SetupStatusResponse>(ENDPOINTS.setup, signal);
}
/**