From 43d01dff58d53ee0e317361baa4bc2040ce469cc Mon Sep 17 00:00:00 2001 From: RaymondVerhoef Date: Sun, 17 May 2026 16:03:48 +0200 Subject: [PATCH] docs: document global disablement of PocketBase auto-cancellation in AI_AGENT.md --- AI_AGENT.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AI_AGENT.md b/AI_AGENT.md index d3366ab..d1b7798 100644 --- a/AI_AGENT.md +++ b/AI_AGENT.md @@ -35,6 +35,8 @@ All persistent data lives in **PocketBase**. The data access layer is in `src/li **Important:** All `db.js` functions are `async`. Always `await` them — omitting `await` will silently pass a Promise where data is expected. +**Auto-Cancellation:** The PocketBase JS SDK has auto-cancellation enabled by default. This causes concurrent identical requests (like `db.getTopics()` during React StrictMode renders or concurrent Promise.all) to abort with `ClientResponseError 0`. This feature is **globally disabled** in `src/lib/pb.js` via `pb.autoCancellation(false)` to prevent UI crashes during concurrent fetching. + ## 3. The AI Integration (Anthropic) The application calls the Anthropic API via a proxy to avoid CORS issues. * **Location:** `src/lib/api.js`.