# Cursor catalog latency reproduction

Use a separate checkout for each commit, dependencies installed, and an empty checkout-local T3 home. Do not seed from a live database.

1. Set EVIDENCE_DIR to a scratch directory and run `node catalog-delay-proxy.mjs`. It listens on 127.0.0.1:19839 and forwards to the real Cursor API. It replaces account labels with synthetic values for privacy. It logs request path, delay, HTTP status, and duration; never credentials or catalog bodies.
2. Write the following to `.t3/userdata/settings.json` before starting the server:
   ```json
   {"providerInstances":{"cursor":{"driver":"cursor","enabled":true,"config":{"enabled":true}}},"providerHealthRefreshInterval":60000}
   ```
3. With CURSOR_API_KEY available, start `T3CODE_DEV_SEED=0 CURSOR_BACKEND_URL=http://127.0.0.1:19839 vp run dev`, pair the browser, and open Settings > Providers. Confirm Cursor authenticates.
4. Stop that dev process by its captured session. Create an empty file named `delay` in EVIDENCE_DIR. Start a browser recording and restart the same dev command. Restarting clears the in-memory 30-minute catalog cache. The next GET /v1/models waits 20 seconds; subsequent requests pass through immediately.
5. Observe the first completed health check, before the next 60-second periodic check. Select Cursor to inspect its status. Base shows Unavailable with the 15000ms timeout; head retries and shows authenticated.
6. Repeat on the other commit with the same browser viewport (1280x800), light theme, settings and proxy. Capture at device scale 2. Crop captures to pixel rectangle x=670,y=340,width=1700,height=600 to exclude private labels, paths and model catalogs. Capture two stills at least 500ms apart and verify equality before keeping a still.

Observed: delayed real API responses completed in approximately 20.8 seconds. Base reported error after 15 seconds; head reported ready after its retry. Base recovered on a later normal health check. Captures are the real web client, with no replacement of provider status or error messages. The recording spans server restart and the resulting health check; the still shows the selected Cursor detail.

AI-assisted; verified with the tests and tools listed above.
