Merge PR #1300: tailscale Windows fix, quota pagination, SSE abort handling

- fix(tunnel): cross-platform tailscale probes without shell redirection
- feat(usage): paginate provider limits with page size controls
- feat(providers): stop control for one-by-one connection testing
- fix(sse): close stream gracefully on abort/disconnect instead of pipe errors
- ui(quota): simplify header, always show pagination in one row

Co-authored-by: philau2512 <dplau25122002@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
decolua
2026-05-21 12:15:07 +07:00
parent e84ab7857a
commit 6b0dc09239
8 changed files with 1183 additions and 295 deletions

View File

@@ -113,10 +113,22 @@ export function createDisconnectAwareStream(transformStream, streamController) {
}
controller.enqueue(value);
} catch (error) {
const wasConnected = streamController.isConnected();
streamController.handleError(error);
reader.cancel().catch(() => {});
writer.abort().catch(() => {});
controller.error(error);
if (!wasConnected || error.name === "AbortError" || error.message?.includes("aborted")) {
try {
controller.close();
} catch (e) {
// Stream might already be closed or cancelled
}
} else {
try {
controller.error(error);
} catch (e) { /* already closed */ }
}
}
},