fix(diagnostics): StateFlow distinctUntilChanged build error + AdminUser test fixtures
test-web / test (push) Failing after 33s
android / Build + lint + test (push) Successful in 3m29s

- DiagnosticsReporter.collectServerHealth: drop distinctUntilChanged() on
  networkStatus.state (StateFlow is already distinct; the deprecation
  warning is a hard error under allWarningsAsErrors).
- web users.test.ts: add debug_mode_enabled to the alice/bob AdminUser
  fixtures now that the field is required on the type.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K55iTxn95BtshocgdE1shW
This commit is contained in:
2026-06-29 19:05:50 -04:00
parent 8a58f07237
commit bffa5b28bd
2 changed files with 5 additions and 1 deletions
@@ -127,7 +127,9 @@ class DiagnosticsReporter @Inject constructor(
}
private suspend fun collectServerHealth() {
networkStatus.state.distinctUntilChanged().collect { s ->
// state is a StateFlow — already conflated/distinct, so no
// distinctUntilChanged (it's a deprecation warning = build error).
networkStatus.state.collect { s ->
record("connectivity", buildJsonObject {
put("event", "server_health")
put("state", s.name)
+2
View File
@@ -38,6 +38,7 @@ const alice: AdminUser = {
display_name: null,
is_admin: true,
auto_approve_requests: false,
debug_mode_enabled: false,
created_at: '2026-05-01T00:00:00Z'
};
@@ -47,6 +48,7 @@ const bob: AdminUser = {
display_name: 'Bob B',
is_admin: false,
auto_approve_requests: false,
debug_mode_enabled: false,
created_at: '2026-05-02T00:00:00Z'
};