diff --git a/AGENTS.md b/AGENTS.md index a9a7d1e8..e1418493 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -44,3 +44,4 @@ Damus is an iOS client built around a local relay model ([damus-io/damus#3204](h 7. Review and follow `pull_request_template.md` when creating PRs for iOS Damus. 8. Ensure nevernesting: favor early returns and guard clauses over deeply nested conditionals; simplify control flow by exiting early instead of wrapping logic in multiple layers of `if` statements. 9. Before proposing changes, please **review and analyze if a change or upgrade to nostrdb** is beneficial to the change at hand. +10. **Never block the main thread**: All network requests, database queries, and expensive computations must run on background threads/queues. Use `Task { }`, `DispatchQueue.global()`, or Swift concurrency (`async/await`) appropriately. UI updates must dispatch back to `@MainActor`. Test for hangs and freezes before submitting.