@@ -104,7 +104,7 @@ fun AlertsScreen(
104104 contentPadding = PaddingValues(16.dp),
105105 verticalArrangement = Arrangement.spacedBy(8.dp),
106106 ) {
107− itemsIndexed(state.alerts, key = { index, alert -> alert.id ?: alert.name ?: "alert_$index" }) { _, alert ->
107+ itemsIndexed(state.alerts, key = { index, alert -> alert.id ?: "alert_$index" }) { _, alert ->
108108 AlertCard(
109109 alert = alert,
110110 onDelete = if (alert.id != null) {
@@ -124,7 +124,7 @@ fun AlertsScreen(
124124 onDismissRequest = viewModel::cancelDelete,
125125 title = { Text("Delete Alert") },
126126 text = {
127− Text("Are you sure you want to delete \"${alert.name ?: "this alert"}\"? This action cannot be undone.")
127+ Text("Are you sure you want to delete \"${alert.displayName}\"? This action cannot be undone.")
128128 },
129129 confirmButton = {
130130 TextButton(
@@ -165,10 +165,10 @@ private fun AlertCard(alert: Alert, onDelete: (() -> Unit)?) {
165165 modifier = Modifier.weight(1f),
166166 ) {
167167 Icon(
168− if (alert.enabled == true) Icons.Filled.NotificationsActive
168+ if (alert.isEnabled) Icons.Filled.NotificationsActive
169169 else Icons.Filled.NotificationsOff,
170− contentDescription = if (alert.enabled == true) "Alert enabled" else "Alert disabled",
171− tint = if (alert.enabled == true) {
170+ contentDescription = if (alert.isEnabled) "Alert enabled" else "Alert disabled",
171+ tint = if (alert.isEnabled) {
172172 MaterialTheme.colorScheme.primary
173173 } else {
174174 MaterialTheme.colorScheme.onSurfaceVariant
@@ -177,17 +177,20 @@ private fun AlertCard(alert: Alert, onDelete: (() -> Unit)?) {
177177 )
178178 Spacer(modifier = Modifier.width(8.dp))
179179 Text(
180− text = alert.name ?: "Unnamed Alert",
180+ text = alert.displayName,
181181 style = MaterialTheme.typography.titleMedium,
182182 fontWeight = FontWeight.SemiBold,
183183 )
184184 }
185185 Row(verticalAlignment = Alignment.CenterVertically) {
186− if (alert.enabled != null) {
186+ val stateLabel = alert.state ?: if (alert.enabled != null) {
187+ if (alert.enabled) "Enabled" else "Disabled"
188+ } else null
189+ if (stateLabel != null) {
187190 Text(
188− text = if (alert.enabled) "Enabled" else "Disabled",
191+ text = stateLabel,
189192 style = MaterialTheme.typography.labelSmall,
190− color = if (alert.enabled) {
193+ color = if (alert.isEnabled) {
191194 MaterialTheme.colorScheme.primary
192195 } else {
193196 MaterialTheme.colorScheme.onSurfaceVariant
@@ -220,10 +223,20 @@ private fun AlertCard(alert: Alert, onDelete: (() -> Unit)?) {
220223 )
221224 }
222225
223− if (alert.stream != null) {
226+ val streamText = alert.streamDisplay
227+ if (streamText != null) {
224228 Spacer(modifier = Modifier.height(4.dp))
225229 Text(
226− text = "Stream: ${alert.stream}",
230+ text = "Stream: $streamText",
231+ style = MaterialTheme.typography.labelMedium,
232+ color = MaterialTheme.colorScheme.onSurfaceVariant,
233+ )
234+ }
235+
236+ if (alert.severity != null) {
237+ Spacer(modifier = Modifier.height(4.dp))
238+ Text(
239+ text = "Severity: ${alert.severity}",
227240 style = MaterialTheme.typography.labelMedium,
228241 color = MaterialTheme.colorScheme.onSurfaceVariant,
229242 )
@@ -234,7 +247,16 @@ private fun AlertCard(alert: Alert, onDelete: (() -> Unit)?) {
234247 HorizontalDivider()
235248 Spacer(modifier = Modifier.height(8.dp))
236249
250+ if (alert.alertType != null) {
251+ Text(
252+ text = "Type: ${alert.alertType}",
253+ style = MaterialTheme.typography.bodySmall,
254+ color = MaterialTheme.colorScheme.onSurfaceVariant,
255+ )
256+ }
257+
237258 if (alert.rule != null) {
259+ Spacer(modifier = Modifier.height(4.dp))
238260 Text(
239261 text = "Rule:",
240262 style = MaterialTheme.typography.labelMedium,