Repository navigation
Conversation
📝 WalkthroughWalkthroughThe health endpoint now returns a structured local summary for build metadata, database, OIDC, MCP, AI, nodes, notifications, and webhooks. The diagnostics page displays these domains with status-aware values and colors. ChangesHealth summary
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant DiagnosticsPage
participant HealthEndpoint
participant Database
participant MCPManager
Operator->>DiagnosticsPage: Open diagnostics
DiagnosticsPage->>HealthEndpoint: Request /api/setup/health
HealthEndpoint->>Database: Read local health summaries
HealthEndpoint->>MCPManager: Read MCP runtime state
HealthEndpoint-->>DiagnosticsPage: Return structured health JSON
DiagnosticsPage-->>Operator: Display health rows
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
web/src/pages/DiagnosticsPage.tsx (1)
116-122: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
statusColorreceivesrow.valueinstead ofrow.status. Most rows render red text under a green check.
healthRowsreturns astatusfield for exactly this purpose. Line 117 uses it. Lines 120 and 122 do not. They passrow.value, which is now a descriptive string.Trace a healthy MCP row.
valueis'enabled / running'andstatusis'ok'. Line 117 setsok = true, so the greenCheckCirclerenders. Line 122 callsstatusColor('enabled / running'), which matches no branch and returns'#FF4444'. The operator sees a green check beside red text reading "ENABLED / RUNNING".The same contradiction hits SERVER, AI PROVIDER, NODES, NOTIFICATIONS, and WEBHOOKS whenever those rows are healthy. DATABASE and OIDC escape only because their
valueandstatushappen to be identical strings.The
'warning'branch you added at line 41 is unreachable. Norow.valueever equals the literal'warning'. The amber colour never renders.'ready'at line 39 is unreachable for the same reason.🎨 Proposed fix
{healthRows(health).map(row => { const ok = row.status === 'ok' return ( <div key={row.label} style={{ display: 'flex', alignItems: 'center', gap: 8, fontSize: '12px', fontFamily: 'JetBrains Mono, Fira Code, Cascadia Code, ui-monospace, monospace' }}> - {ok ? <CheckCircle size={12} style={{ color: 'var(--success)' }} /> : <XCircle size={12} style={{ color: statusColor(row.value) }} />} + {ok ? <CheckCircle size={12} style={{ color: 'var(--success)' }} /> : <XCircle size={12} style={{ color: statusColor(row.status) }} />} <span style={{ color: 'var(--muted)', width: 100 }}>{row.label}</span> - <span style={{ color: statusColor(row.value) }}>{row.value.toUpperCase()}</span> + <span style={{ color: statusColor(row.status) }}>{row.value.toUpperCase()}</span> </div> ) })}One more thought. An
XCircleis a harsh icon for adisabledorunconfiguredrow. Those states are normal, not failures. Consider a neutral icon whenrow.statusis'disabled'or'unconfigured'.Diagnostics that contradict themselves are worse than no diagnostics, Chief. Wire the status through.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/src/pages/DiagnosticsPage.tsx` around lines 116 - 122, Update the healthRows rendering in DiagnosticsPage so both statusColor calls use row.status rather than row.value, ensuring text color matches the ok/warning/error state. Keep row.value only for the displayed text, and adjust the failure icon selection if needed so disabled or unconfigured statuses use a neutral icon instead of XCircle.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@server/docs/openapi.yaml`:
- Around line 450-457: Add a "503" response entry to the responses block for the
documented endpoint, aligned with the existing "200" response and using the same
application/json schema. Document that this response represents a failed
database probe, with database set to error and the remaining sections at their
zero values.
In `@server/internal/handlers/health_test.go`:
- Around line 179-193: Update the health test seed data used by getAISettings to
include ai_mode, and assert the response AI.Mode equals the expected value.
Replace the strings.Contains-based probe URI assertion with assert.NotContains,
then remove the now-unused strings import.
In `@server/internal/handlers/setup.go`:
- Around line 177-216: Consolidate webhookHealthSummary and configHealthSummary
by extending configHealthSummary to accept an optional filter or query
condition, then move the shared row definition, SELECT, error handling, and
summary mapping there. Update webhookHealthSummary to pass its webhook
scope/type filter through the helper while preserving the existing model and
notification summary behavior.
In `@server/main.go`:
- Line 195: Restrict the detailed HealthCheckWithBuildInfo response to
authenticated admins by moving its registration from /api/setup/health into the
existing admin route group as /api/admin/health. Keep /api/setup/health as a
minimal unauthenticated liveness endpoint for the container probe, and update
the Diagnostics page to request the authenticated admin route.
In `@web/src/api/client.ts`:
- Line 19: Update the `oidc` status union in `web/src/api/client.ts` to include
the server-supported `"error"` value, preserving the existing `"ok"`,
`"unavailable"`, and `"disabled"` members.
In `@web/src/pages/DiagnosticsPage.tsx`:
- Around line 60-66: Update the status mappings in the DiagnosticsPage
component: make configured but non-testable AI providers use warning rather than
error, and make nodeStatus use warning whenever either offline or stale nodes
are present while preserving ok when both counts are zero. Ensure the existing
row.status rendering receives these updated values.
---
Outside diff comments:
In `@web/src/pages/DiagnosticsPage.tsx`:
- Around line 116-122: Update the healthRows rendering in DiagnosticsPage so
both statusColor calls use row.status rather than row.value, ensuring text color
matches the ok/warning/error state. Keep row.value only for the displayed text,
and adjust the failure icon selection if needed so disabled or unconfigured
statuses use a neutral icon instead of XCircle.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c88a594e-cf77-47ce-96cb-4cc7ee18e12a
📒 Files selected for processing (6)
server/docs/openapi.yamlserver/internal/handlers/health_test.goserver/internal/handlers/setup.goserver/main.goweb/src/api/client.tsweb/src/pages/DiagnosticsPage.tsx
| responses: | ||
| "200": | ||
| description: OK | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| required: [database, oidc, oidc_enabled] | ||
| required: [version, commit, database, oidc, oidc_enabled, mcp, ai, nodes, notifications, webhooks] |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
Document the 503 response.
The responses block lists only "200". The handler returns 503 when the database probe fails. See server/internal/handlers/setup.go line 105. Generated clients and the container health check both depend on that path.
The 503 body uses the same schema, with database set to error and the remaining sections at zero values.
📝 Proposed addition
enabled:
type: integer
+ "503":
+ description: Database unavailable. The body uses the 200 schema with `database` set to `error`; the remaining sections contain zero values.
+ content:
+ application/json:
+ schema:
+ type: objectPlace it after line 532, aligned with the "200" key.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@server/docs/openapi.yaml` around lines 450 - 457, Add a "503" response entry
to the responses block for the documented endpoint, aligned with the existing
"200" response and using the same application/json schema. Document that this
response represents a failed database probe, with database set to error and the
remaining sections at their zero values.
| assert.Equal(t, "openai_compat", resp.AI.Provider) | ||
| assert.True(t, resp.AI.Configured) | ||
| assert.True(t, resp.AI.Testable) | ||
| assert.True(t, resp.AI.APIKeyConfigured) | ||
| assert.Equal(t, int64(3), resp.Nodes.Total) | ||
| assert.Equal(t, int64(1), resp.Nodes.Online) | ||
| assert.Equal(t, int64(2), resp.Nodes.Offline) | ||
| assert.Equal(t, int64(1), resp.Nodes.Stale) | ||
| assert.True(t, resp.Notifications.Configured) | ||
| assert.Equal(t, int64(1), resp.Notifications.Total) | ||
| assert.Equal(t, int64(1), resp.Notifications.Enabled) | ||
| assert.True(t, resp.Webhooks.Configured) | ||
| assert.Equal(t, int64(2), resp.Webhooks.Total) | ||
| assert.Equal(t, int64(1), resp.Webhooks.Enabled) | ||
| assert.False(t, strings.Contains(body, "127.0.0.1:1")) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm the default value of mode returned by getAISettings.
rg -nP --type=go -C12 'func getAISettings'
# Confirm nodeOfflineAfter, which the stale-node assertion at line 186 depends on.
rg -nP --type=go -C2 '\bnodeOfflineAfter\b\s*='Repository: maxjb-xyz/blackbox
Length of output: 156
🏁 Script executed:
#!/bin/bash
set -u
printf 'Tracked files matching health_test.go:\n'
git ls-files | rg '(^|/)health_test\.go$' || true
printf '\nSearch for getAISettings:\n'
rg -n --type=go 'getAISettings|nodeOfflineAfter|ai_mode|mode' . || true
printf '\nLocate files around likely paths:\n'
fd -a 'setup\.go|handlers|health' . | sed 's#^\./##' | head -80Repository: maxjb-xyz/blackbox
Length of output: 50375
🏁 Script executed:
#!/bin/bash
set -u
printf 'health_test.go relevant lines:\n'
sed -n '1,220p' server/internal/handlers/health_test.go
printf '\nsetup.go relevant lines:\n'
sed -n '130,165p' server/internal/handlers/setup.go
printf '\nadmin_config.go relevant lines:\n'
sed -n '420,545p' server/internal/handlers/admin_config.go
printf '\nimports in health_test.go:\n'
sed -n '1,20p' server/internal/handlers/health_test.goRepository: maxjb-xyz/blackbox
Length of output: 12787
Assert ai.mode and use assert.NotContains for the probe URI check.
AI.Mode comes from getAISettings, which defaults to "analysis", so include ai_mode in the seed and one assertion. Use assert.NotContains(t, body, "127.0.0.1:1") instead of assert.False(t, strings.Contains(...)); then strings is no longer needed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@server/internal/handlers/health_test.go` around lines 179 - 193, Update the
health test seed data used by getAISettings to include ai_mode, and assert the
response AI.Mode equals the expected value. Replace the strings.Contains-based
probe URI assertion with assert.NotContains, then remove the now-unused strings
import.
| func notificationHealthSummary(database *gorm.DB) healthConfigSummary { | ||
| return configHealthSummary(database, &models.NotificationDest{}) | ||
| } | ||
|
|
||
| func webhookHealthSummary(database *gorm.DB) healthConfigSummary { | ||
| var summary healthConfigSummary | ||
| var row struct { | ||
| Total int64 `gorm:"column:total"` | ||
| Enabled int64 `gorm:"column:enabled"` | ||
| } | ||
| if err := database.Model(&models.DataSourceInstance{}). | ||
| Where("scope = ? AND type LIKE ?", models.ScopeServer, "webhook_%"). | ||
| Select("COUNT(*) AS total, COALESCE(SUM(CASE WHEN enabled = ? THEN 1 ELSE 0 END), 0) AS enabled", true). | ||
| Scan(&row).Error; err != nil { | ||
| log.Printf("health: webhook summary query failed: %v", err) | ||
| return summary | ||
| } | ||
| summary.Total = row.Total | ||
| summary.Enabled = row.Enabled | ||
| summary.Configured = row.Total > 0 | ||
| return summary | ||
| } | ||
|
|
||
| func configHealthSummary(database *gorm.DB, model interface{}) healthConfigSummary { | ||
| var summary healthConfigSummary | ||
| var row struct { | ||
| Total int64 `gorm:"column:total"` | ||
| Enabled int64 `gorm:"column:enabled"` | ||
| } | ||
| if err := database.Model(model). | ||
| Select("COUNT(*) AS total, COALESCE(SUM(CASE WHEN enabled = ? THEN 1 ELSE 0 END), 0) AS enabled", true). | ||
| Scan(&row).Error; err != nil { | ||
| log.Printf("health: configuration summary query failed: %v", err) | ||
| return summary | ||
| } | ||
| summary.Total = row.Total | ||
| summary.Enabled = row.Enabled | ||
| summary.Configured = row.Total > 0 | ||
| return summary | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win
Consolidate the duplicated summary query.
webhookHealthSummary and configHealthSummary carry the same row struct, the same SELECT, and the same mapping. Only the model and the scope filter differ. Two copies means two places to update when the shape changes.
Pass the filter into the shared helper.
♻️ Proposed consolidation
func notificationHealthSummary(database *gorm.DB) healthConfigSummary {
- return configHealthSummary(database, &models.NotificationDest{})
+ return configHealthSummary(database, &models.NotificationDest{}, nil)
}
func webhookHealthSummary(database *gorm.DB) healthConfigSummary {
- var summary healthConfigSummary
- var row struct {
- Total int64 `gorm:"column:total"`
- Enabled int64 `gorm:"column:enabled"`
- }
- if err := database.Model(&models.DataSourceInstance{}).
- Where("scope = ? AND type LIKE ?", models.ScopeServer, "webhook_%").
- Select("COUNT(*) AS total, COALESCE(SUM(CASE WHEN enabled = ? THEN 1 ELSE 0 END), 0) AS enabled", true).
- Scan(&row).Error; err != nil {
- log.Printf("health: webhook summary query failed: %v", err)
- return summary
- }
- summary.Total = row.Total
- summary.Enabled = row.Enabled
- summary.Configured = row.Total > 0
- return summary
+ return configHealthSummary(database, &models.DataSourceInstance{}, func(q *gorm.DB) *gorm.DB {
+ return q.Where("scope = ? AND type LIKE ?", models.ScopeServer, "webhook_%")
+ })
}
-func configHealthSummary(database *gorm.DB, model interface{}) healthConfigSummary {
+func configHealthSummary(database *gorm.DB, model interface{}, scope func(*gorm.DB) *gorm.DB) healthConfigSummary {
var summary healthConfigSummary
var row struct {
Total int64 `gorm:"column:total"`
Enabled int64 `gorm:"column:enabled"`
}
- if err := database.Model(model).
+ query := database.Model(model)
+ if scope != nil {
+ query = scope(query)
+ }
+ if err := query.
Select("COUNT(*) AS total, COALESCE(SUM(CASE WHEN enabled = ? THEN 1 ELSE 0 END), 0) AS enabled", true).
Scan(&row).Error; err != nil {
log.Printf("health: configuration summary query failed: %v", err)
return summary
}Cleaner code, cleaner telemetry. I like tidy systems.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| func notificationHealthSummary(database *gorm.DB) healthConfigSummary { | |
| return configHealthSummary(database, &models.NotificationDest{}) | |
| } | |
| func webhookHealthSummary(database *gorm.DB) healthConfigSummary { | |
| var summary healthConfigSummary | |
| var row struct { | |
| Total int64 `gorm:"column:total"` | |
| Enabled int64 `gorm:"column:enabled"` | |
| } | |
| if err := database.Model(&models.DataSourceInstance{}). | |
| Where("scope = ? AND type LIKE ?", models.ScopeServer, "webhook_%"). | |
| Select("COUNT(*) AS total, COALESCE(SUM(CASE WHEN enabled = ? THEN 1 ELSE 0 END), 0) AS enabled", true). | |
| Scan(&row).Error; err != nil { | |
| log.Printf("health: webhook summary query failed: %v", err) | |
| return summary | |
| } | |
| summary.Total = row.Total | |
| summary.Enabled = row.Enabled | |
| summary.Configured = row.Total > 0 | |
| return summary | |
| } | |
| func configHealthSummary(database *gorm.DB, model interface{}) healthConfigSummary { | |
| var summary healthConfigSummary | |
| var row struct { | |
| Total int64 `gorm:"column:total"` | |
| Enabled int64 `gorm:"column:enabled"` | |
| } | |
| if err := database.Model(model). | |
| Select("COUNT(*) AS total, COALESCE(SUM(CASE WHEN enabled = ? THEN 1 ELSE 0 END), 0) AS enabled", true). | |
| Scan(&row).Error; err != nil { | |
| log.Printf("health: configuration summary query failed: %v", err) | |
| return summary | |
| } | |
| summary.Total = row.Total | |
| summary.Enabled = row.Enabled | |
| summary.Configured = row.Total > 0 | |
| return summary | |
| } | |
| func notificationHealthSummary(database *gorm.DB) healthConfigSummary { | |
| return configHealthSummary(database, &models.NotificationDest{}, nil) | |
| } | |
| func webhookHealthSummary(database *gorm.DB) healthConfigSummary { | |
| return configHealthSummary(database, &models.DataSourceInstance{}, func(q *gorm.DB) *gorm.DB { | |
| return q.Where("scope = ? AND type LIKE ?", models.ScopeServer, "webhook_%") | |
| }) | |
| } | |
| func configHealthSummary(database *gorm.DB, model interface{}, scope func(*gorm.DB) *gorm.DB) healthConfigSummary { | |
| var summary healthConfigSummary | |
| var row struct { | |
| Total int64 `gorm:"column:total"` | |
| Enabled int64 `gorm:"column:enabled"` | |
| } | |
| query := database.Model(model) | |
| if scope != nil { | |
| query = scope(query) | |
| } | |
| if err := query. | |
| Select("COUNT(*) AS total, COALESCE(SUM(CASE WHEN enabled = ? THEN 1 ELSE 0 END), 0) AS enabled", true). | |
| Scan(&row).Error; err != nil { | |
| log.Printf("health: configuration summary query failed: %v", err) | |
| return summary | |
| } | |
| summary.Total = row.Total | |
| summary.Enabled = row.Enabled | |
| summary.Configured = row.Total > 0 | |
| return summary | |
| } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@server/internal/handlers/setup.go` around lines 177 - 216, Consolidate
webhookHealthSummary and configHealthSummary by extending configHealthSummary to
accept an optional filter or query condition, then move the shared row
definition, SELECT, error handling, and summary mapping there. Update
webhookHealthSummary to pass its webhook scope/type filter through the helper
while preserving the existing model and notification summary behavior.
|
|
||
| r.Get("/api/setup/status", handlers.SetupStatus(database)) | ||
| r.Get("/api/setup/health", handlers.HealthCheck(database, registry)) | ||
| r.Get("/api/setup/health", handlers.HealthCheckWithBuildInfo(database, registry, mcpMgr, Version, Commit)) |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
The expanded health payload is served without authentication.
/api/setup/health is registered outside every auth group. Compare it with the admin routes at lines 235-276. Before this change the response held two status strings. It now returns the build version, the commit, node inventory counts, and the configuration posture for OIDC, MCP, AI, notifications, and webhooks.
No secrets leak. The test at server/internal/handlers/health_test.go lines 138-140 confirms that. The concern is reconnaissance value: an unauthenticated caller learns the exact build to match against CVEs, the fleet size, and which integrations are unconfigured.
The container health check at lines 45-53 needs only the HTTP status code. Consider one of these options:
- Serve the detailed payload only to authenticated admins, and keep a minimal public shape for the liveness probe.
- Gate the detail behind a separate authenticated route, and point the Diagnostics page at that route.
I have run the numbers on this one. The exposure is small, but it is free intelligence for anyone who asks.
🔒 Option: split liveness from diagnostics
- r.Get("/api/setup/health", handlers.HealthCheckWithBuildInfo(database, registry, mcpMgr, Version, Commit))
+ r.Get("/api/setup/health", handlers.HealthCheck(database, registry))Then register the detailed handler inside the admin group at lines 235-276:
r.Get("/api/admin/health", handlers.HealthCheckWithBuildInfo(database, registry, mcpMgr, Version, Commit))The Diagnostics page then calls /api/admin/health.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@server/main.go` at line 195, Restrict the detailed HealthCheckWithBuildInfo
response to authenticated admins by moving its registration from
/api/setup/health into the existing admin route group as /api/admin/health. Keep
/api/setup/health as a minimal unauthenticated liveness endpoint for the
container probe, and update the Diagnostics page to request the authenticated
admin route.
| version: string | ||
| commit: string | ||
| database: 'ok' | 'error' | ||
| oidc: 'ok' | 'unavailable' | 'disabled' |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
The oidc union omits the error value the server can return.
The handler sets oidcStatus = "error" when the OIDC provider query fails. See server/internal/handlers/setup.go lines 113-115. The OpenAPI enum at server/docs/openapi.yaml line 470 lists error. This union does not.
Nothing breaks today, because DiagnosticsPage renders unknown values through a fallback. The risk is future: an exhaustive switch over health.oidc will compile while missing a reachable case.
🔧 Proposed fix
- oidc: 'ok' | 'unavailable' | 'disabled'
+ oidc: 'ok' | 'unavailable' | 'disabled' | 'error'Three sources describe this field. Two of them agree. Let us make it three.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| oidc: 'ok' | 'unavailable' | 'disabled' | |
| oidc: 'ok' | 'unavailable' | 'disabled' | 'error' |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/src/api/client.ts` at line 19, Update the `oidc` status union in
`web/src/api/client.ts` to include the server-supported `"error"` value,
preserving the existing `"ok"`, `"unavailable"`, and `"disabled"` members.
| const aiStatus = !current.ai.configured ? 'unconfigured' : current.ai.testable ? 'ok' : 'error' | ||
| const aiValue = !current.ai.configured | ||
| ? 'unconfigured' | ||
| : current.ai.testable | ||
| ? `${current.ai.provider} / configured (no probe)` | ||
| : `${current.ai.provider} / not testable` | ||
| const nodeStatus = current.nodes.offline > 0 ? 'warning' : 'ok' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Two status mappings send the wrong signal.
Line 60: a configured provider outside the testable allow-list gets 'error'. That is not an error. The provider works; it simply has no local test path. The row renders as a failure. Use 'warning' instead.
Line 66: nodeStatus ignores stale. A fleet with zero offline nodes and three stale nodes reports 'ok' in green, while nodeValue on line 67 prints "3 stale" in the same row. The colour and the text disagree.
🔧 Proposed fix
- const aiStatus = !current.ai.configured ? 'unconfigured' : current.ai.testable ? 'ok' : 'error'
+ const aiStatus = !current.ai.configured ? 'unconfigured' : current.ai.testable ? 'ok' : 'warning'- const nodeStatus = current.nodes.offline > 0 ? 'warning' : 'ok'
+ const nodeStatus = current.nodes.offline > 0 || current.nodes.stale > 0 ? 'warning' : 'ok'Note that the amber colour only appears once lines 120 and 122 pass row.status. See my comment on that range.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const aiStatus = !current.ai.configured ? 'unconfigured' : current.ai.testable ? 'ok' : 'error' | |
| const aiValue = !current.ai.configured | |
| ? 'unconfigured' | |
| : current.ai.testable | |
| ? `${current.ai.provider} / configured (no probe)` | |
| : `${current.ai.provider} / not testable` | |
| const nodeStatus = current.nodes.offline > 0 ? 'warning' : 'ok' | |
| const aiStatus = !current.ai.configured ? 'unconfigured' : current.ai.testable ? 'ok' : 'warning' | |
| const aiValue = !current.ai.configured | |
| ? 'unconfigured' | |
| : current.ai.testable | |
| ? `${current.ai.provider} / configured (no probe)` | |
| : `${current.ai.provider} / not testable` | |
| const nodeStatus = current.nodes.offline > 0 || current.nodes.stale > 0 ? 'warning' : 'ok' |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/src/pages/DiagnosticsPage.tsx` around lines 60 - 66, Update the status
mappings in the DiagnosticsPage component: make configured but non-testable AI
providers use warning rather than error, and make nodeStatus use warning
whenever either offline or stale nodes are present while preserving ok when both
counts are zero. Ensure the existing row.status rendering receives these updated
values.
|
Closed in favor of #88, which keeps the same changes on the atlas-maxjb fork branch with the correct commit attribution. |
|
Superseded by #88, which has the same changes from the atlas-maxjb fork branch with corrected commit attribution. |
Summary
Verification
git diff --checkpassesgoandtscare not installedSummary by CodeRabbit
New Features
Bug Fixes