Skip to content

Commit 4677e43

Browse files
yewreekaonefovrth
andauthored
Merge main hotfixes into dev for 1.1.0 release (#522)
* Remove 'anonymous' terminology from UI copy - Update Quickname detail copy from 'You always start anonymous' to 'You control how you show up' - Simplify join event message to always say 'You joined as [Name]' instead of 'You joined anonymously as [Name]' * Bump build number to 2 for 1.0.6 hotfix resubmission * Raise FD soft limit to 512 for users with many conversations The default iOS soft limit of 256 file descriptors is insufficient for users with ~50 conversations, as each XMTP conversation requires database connections and sockets. Raises the soft limit to 512 at app launch before any XMTP clients are created. Also bumps build number to 3 for hotfix resubmission. * Bump version to 1.0.7 (build 1) The 1.0.6 train is closed on App Store Connect. Bumps marketing version to 1.0.7 and resets build number to 1 for the hotfix submission. * Cap pending invite inboxes, expire stale ones, and add debug view - Add maxAwakePendingInvites (default 3) to limit how many pending invite XMTP clients are active simultaneously. Previously, all pending invite inboxes were force-woken on app launch regardless of the maxAwakeInboxes limit, which could result in 50+ active clients for users who scanned many invite codes without approval. - Detect stale pending invites older than 7 days on app launch. Automatic deletion is temporarily disabled — stale invites are logged but not removed, pending validation via the debug view. - Only consider invites with <= 1 conversation member as deletable. Invites where the user has actually been added to the group (more than 1 member) are never deleted, preventing accidental data loss. Additionally, inboxes with any other conversations are preserved. - Update sleep() to allow sleeping over-cap pending invite inboxes while still protecting inboxes under the cap. - Update attemptWake() to enforce the pending invite cap when both the pending cap and overall capacity are exceeded. - Add PendingInviteDebugView accessible from Settings (temporarily visible in production) showing all pending invites with creation date, wait duration, member count, and client/inbox IDs. Expired invites (> 7 days) are highlighted in a separate section with a hold-to-delete button that fully cleans up the inbox record, keychain identity, and lifecycle manager tracking. - Inbox and keychain deletion failures are caught individually so one failure does not prevent cleanup of remaining invites. - Add PendingInviteDetail model (with memberCount) and repository methods for the debug view and stale invite queries. - Add 17 new tests: 6 for pending invite cap behavior, 4 for stale expiry detection, and 7 for deleteExpiredPendingInvites covering basic deletion, multi-member protection, other-conversations protection, recent invite preservation, lifecycle manager cleanup, partial failure resilience, and empty state. * Remove duplicate cleanupStalePendingInvites() call * Fix broken string interpolation in log message * Remove accidentally committed sqlite files --------- Co-authored-by: Quarter <1807900+onefovrth@users.noreply.github.com>
1 parent e52471e commit 4677e43

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ConvosCore/Tests/ConvosCoreTests/DeleteExpiredPendingInvitesTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,16 +203,16 @@ struct DeleteExpiredPendingInvitesTests {
203203
func testSkipsRecentInvites() async throws {
204204
let dbManager = MockDatabaseManager.makeTestDatabase()
205205
let identityStore = MockKeychainIdentityStore()
206-
let oneHourAgo = Date().addingTimeInterval(-1 * 60 * 60)
206+
let twoHoursAgo = Date().addingTimeInterval(-2 * 60 * 60)
207207

208208
try await insertInboxAndIdentity(
209209
dbManager: dbManager, identityStore: identityStore,
210-
inboxId: "inbox-1", clientId: "client-1", createdAt: oneHourAgo
210+
inboxId: "inbox-1", clientId: "client-1", createdAt: twoHoursAgo
211211
)
212212
try await dbManager.dbWriter.write { db in
213213
try makeDBConversation(
214214
id: "draft-recent", inboxId: "inbox-1", clientId: "client-1",
215-
inviteTag: "tag-1", createdAt: oneHourAgo
215+
inviteTag: "tag-1", createdAt: twoHoursAgo
216216
).insert(db)
217217
}
218218

0 commit comments

Comments
 (0)