chore: eliminate all Kotlin compiler warnings in main source (#877)

* chore: eliminate all Kotlin compiler warnings in main source

* test(chat): fix cross-class coroutine leaks poisoning the unit suite

- ChatUpdateCommandTest: inject FakeSlashUsageStore — the real DataStore
  store inits on real IO threads with a relaxed-mock app (cacheDir NPE)
  and leaks an uncaught exception into the next runTest class.
- ChatUpdateCommandTest + SlashCommandDispatchRpcTest: mock
  ProfileSwitchCoordinator.switched (ChatViewModelTest pattern) — VMs
  otherwise park collectors on the singleton flow that crash later
  classes (ProfileSwitchCoordinatorTest) on stale-Main resumption.

Full suite: 944 tests, 0 failures (was 2 flaky per run).

---------

Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
M57andM57 authored and GitHub committed 2026-08-10 22:56:16 +03:00
1 parent b05cffa9c4
commit 1e6e248891
14 files changed
+88 -38

No files matched your search

@@ -135,7 +135,7 @@ private fun BillingContent(
shape = RoundedCornerShape(12.dp),
) {
Text(
text = state.errorMessage ?: "",
text = state.errorMessage,
modifier = Modifier.padding(12.dp),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onErrorContainer,
@@ -152,7 +152,7 @@ private fun BillingContent(
shape = RoundedCornerShape(12.dp),
) {
Text(
text = state.actionMessage ?: "",
text = state.actionMessage,
modifier = Modifier.padding(12.dp),
style = MaterialTheme.typography.bodyMedium,
)
@@ -207,7 +207,7 @@ private fun PlanCard(subscription: SubscriptionCurrent) {
}
if (subscription.pending_downgrade_display != null) {
Text(
text = subscription.pending_downgrade_display ?: "",
text = subscription.pending_downgrade_display,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(top = 4.dp),