2290 bug devices page crashing #2667
No reviewers
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar!2667
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2667/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub pull request.
Original GitHub pull request: #2296
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2296
Original created: 2026-01-14T08:46:46Z
Original updated: 2026-01-14T08:51:48Z
Original head: carverauto/serviceradar:2290-bug-devices-page-crashing
Original base: staging
Original merged: 2026-01-14T08:51:37Z by @mfreeman451
User description
IMPORTANT: Please sign the Developer Certificate of Origin
Thank you for your contribution to ServiceRadar. Please note, when contributing, the developer must include
a DCO sign-off statement indicating the DCO acceptance in one commit message. Here
is an example DCO Signed-off-by line in a commit message:
Describe your changes
Issue ticket number and link
Code checklist before requesting a review
PR Type
Bug fix, Tests
Description
Fix devices page crash when sysmon profile data missing or malformed
Add nil-safe handling for profile name extraction with fallback labels
Display "Unassigned" label instead of rendering nothing or crashing
Add regression test for devices with missing sysmon data
Diagram Walkthrough
File Walkthrough
index.ex
Add nil-safe sysmon profile extraction with fallback labelsweb-ng/lib/serviceradar_web_ng_web/live/device_live/index.ex
sysmon_profile_label/1helper function with nil-safe handling
is_directflag with semantic:direct,:default,:missingsource atomsprofile data is missing
was nil
device_live_test.exs
Add regression test for missing sysmon dataweb-ng/test/serviceradar_web_ng_web/live/device_live_test.exs
proposal.md
Document sysmon badge crash fix proposalopenspec/changes/fix-devices-page-sysmon-badge/proposal.md
malformed
spec.md
Add spec requirement for missing sysmon data handlingopenspec/changes/fix-devices-page-sysmon-badge/specs/build-web-ui/spec.md
data
fallback
absent
states
tasks.md
Track implementation task completion statusopenspec/changes/fix-devices-page-sysmon-badge/tasks.md
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2296#issuecomment-3748455627
Original created: 2026-01-14T08:47:29Z
PR Compliance Guide 🔍
Below is a summary of compliance checks for this PR:
No security concerns identified
No security vulnerabilities detected by AI analysis. Human verification advised for critical code.🎫 #2290
/devices/page so it no longer crashes with an Internal Server Error whenrendering the devices list.
profile data is missing or malformed.
staging) when sysmon profile data is missing or malformed.
Codebase context is not defined
Follow the guide to enable codebase context checks.
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status: Passed
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting
Status: Passed
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status: Passed
Generic: Secure Error Handling
Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.
Status: Passed
Generic: Secure Logging Practices
Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.
Status: Passed
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities
Status: Passed
Compliance status legend
🟢 - Fully Compliant🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2296#issuecomment-3748459345
Original created: 2026-01-14T08:48:38Z
PR Code Suggestions ✨
Explore these optional code suggestions:
✅
Add test ID for label spanSuggestion Impact:
The sysmon profile label was updated to include data-testid="sysmon-profile-label", matching the suggestion. (Additional unrelated refactor to sysmon_profile_label/1 was also included.)code diff:
Add a
data-testidattribute to the sysmon profile label'sspanelement to createa stable selector for automated tests.
web-ng/lib/serviceradar_web_ng_web/live/device_live/index.ex [893-898]
[Suggestion processed]Suggestion importance[1-10]: 6
__
Why: The suggestion improves testability by adding a
data-testidattribute, which allows for more robust and less brittle UI test selectors.✅
Refactor helper function for claritySuggestion Impact:
The sysmon_profile_label/1 helper was refactored from a case/if structure to the suggested with-based validation flow, returning nil via else when validation fails.code diff:
Refactor the
sysmon_profile_label/1function to use awithstatement forimproved clarity and idiomatic style when handling multi-step validation.
web-ng/lib/serviceradar_web_ng_web/live/device_live/index.ex [910-919]
[Suggestion processed]Suggestion importance[1-10]: 5
__
Why: The suggestion correctly proposes using an idiomatic Elixir
withstatement to refactor the function, which improves code readability and maintainability.