From c26c2bde10456072bcc590556f3b61351633ca6c Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 24 May 2026 23:04:12 -0400 Subject: [PATCH] =?UTF-8?q?fix(android):=20detekt=20=E2=80=94=20suppress?= =?UTF-8?q?=20SwallowedException=20+=20rename=20LikesWire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LikesRepository.kt: the catch around best-effort like REST is intentional swallow (the queue replays later). Added `@Suppress("SwallowedException")` alongside the existing `TooGenericExceptionCaught`, plus a comment explaining the choice so the next reader doesn't "fix" it. - models/wire/LikesWire.kt → LikedIdsWire.kt: file held a single top-level declaration (LikedIdsWire); detekt's MatchingDeclarationName rule wants the filename to match. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../com/fabledsword/minstrel/likes/data/LikesRepository.kt | 6 +++++- .../minstrel/models/wire/{LikesWire.kt => LikedIdsWire.kt} | 0 2 files changed, 5 insertions(+), 1 deletion(-) rename android/app/src/main/java/com/fabledsword/minstrel/models/wire/{LikesWire.kt => LikedIdsWire.kt} (100%) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/likes/data/LikesRepository.kt b/android/app/src/main/java/com/fabledsword/minstrel/likes/data/LikesRepository.kt index 8297f583..d54832e1 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/likes/data/LikesRepository.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/likes/data/LikesRepository.kt @@ -94,8 +94,12 @@ class LikesRepository @Inject constructor( if (desiredState) api.like(kindPath, entityId) else api.unlike(kindPath, entityId) true } catch ( - @Suppress("TooGenericExceptionCaught") e: Throwable, + @Suppress("TooGenericExceptionCaught", "SwallowedException") e: Throwable, ) { + // Intentional swallow: the queue replays this later; surfacing + // the network error here would force callers (UI) to handle it + // even though it's already been buffered. The replayer logs + // per-attempt diagnostics when it lands in Phase 12.2. mutationQueue.enqueueLikeToggle(entityType, entityId, desiredState) false } diff --git a/android/app/src/main/java/com/fabledsword/minstrel/models/wire/LikesWire.kt b/android/app/src/main/java/com/fabledsword/minstrel/models/wire/LikedIdsWire.kt similarity index 100% rename from android/app/src/main/java/com/fabledsword/minstrel/models/wire/LikesWire.kt rename to android/app/src/main/java/com/fabledsword/minstrel/models/wire/LikedIdsWire.kt