fix(diagnostics): StateFlow distinctUntilChanged build error + AdminUser test fixtures
- 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:
+3
-1
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user