Skip to content

Commit f4a2a37

Browse files
chore: add a bugbot rule regarding network requests (#5289)
1 parent ef24ff3 commit f4a2a37

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.cursor/BUGBOT.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Network Requests
2+
3+
- No startup I/O: The SDK must not issue network requests during module import, SDK init, or initial page load. Defer all calls until a clear user action (e.g., opening the connect modal or pressing “Connect”).
4+
- Single intent-bound fetch: On first user action, perform one consolidated request for data required to render the current screen. Prefer batching and cache results for the session to prevent duplicate calls.
5+
- No redundant/parallel calls: Disallow duplicate requests for the same resource within a short window or without cache-busting intent. Initialization must be idempotent.
6+
- Scope & size discipline: Only fetch what is needed for the current UI state. Use pagination/filters; avoid fetching full lists “just in case.” No background polling unless explicitly documented and justified.
7+
- Graceful UI: If data influences first paint, render skeleton/placeholders while the single deferred request resolves.

0 commit comments

Comments
 (0)