2310 UI cleanup work #2676
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!2676
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2676/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: #2314
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2314
Original created: 2026-01-15T05:26:16Z
Original updated: 2026-01-15T05:34:45Z
Original head: carverauto/serviceradar:2310-ui-cleanup-work
Original base: staging
Original merged: 2026-01-15T05:34:43Z 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
Enhancement, Bug fix
Description
Reorganize Settings navigation: rename "Networks" to "Network", create "Agents" section, add sub-navigation tabs
Fix layout issues on SNMP and Sysmon settings pages by wrapping with Layouts.app
Add dynamic credential forms for integration sources (Armis, SNMP, Netbox) with conditional field display
Enhance device pagination with total count display, page indicators, and improved navigation controls
Add device management features: "Add Device" modal, CSV import with preview, and device detail editing with RBAC
Fix form input handling: transform comma-separated ports/paths to arrays for proper validation
Create new Agent Deploy page with deployment instructions and package management links
Diagram Walkthrough
File Walkthrough
7 files
Reorganize settings navigation with sub-tabs for Network and AgentsEnhance pagination with total count and page number controlsAdd dynamic credential forms and replace nmap with NetboxAdd device management modals and CSV import functionalityAdd device edit mode with RBAC-protected editing capabilityCreate new Agent Deploy page with deployment instructionsAdd route for new Agent Deploy page3 files
Fix form input handling for comma-separated ports fieldFix layout by wrapping with Layouts.app and add network sub-navFix form input handling and add agents sub-navigation3 files
Document settings UI cleanup proposal and implementation statusDefine requirements for settings navigation and device managementTrack implementation tasks and related issue resolutionsImported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2314#issuecomment-3752959365
Original created: 2026-01-15T05:27:04Z
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.🎫 #2310
and stored).
option / native discovery).
inputs).
to SNMP settings.
and improve Deploy Agent page guidance.
page.
blacklist shown conditionally.
Codebase context is not defined
Follow the guide to enable codebase context checks.
Generic: Meaningful Naming and Self-Documenting Code
Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting
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: Secure Error Handling
Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.
Status: 🏷️
Internal error exposed: The CSV parsing rescue path returns
inspect(e)andinspect(err)into user-visible errorstrings, which can leak internal exception details to end users.
Referred Code
Generic: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status: 🏷️
Missing audit logging: New device-management actions (CSV preview/import and add/save device flows) do not record
any audit log events with user context, so it is unclear whether critical actions will be
auditable once backend persistence is implemented.
Referred Code
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status: 🏷️
CSV parsing edge cases: The new CSV parsing implementation is intentionally simplistic and may mis-handle common
CSV edge cases (e.g., quoted values containing commas), so correctness and graceful
degradation for real-world inputs cannot be confirmed from the diff alone.
Referred Code
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities
Status: 🏷️
Input validation unclear: New device/CSV inputs are accepted and transformed (e.g.,
parse_csv_file/1,parse_device_row/2) without clear validation of fields like IP formats or tag constraints,and the diff does not show downstream persistence/validation paths to confirm security
controls.
Referred Code
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/2314#issuecomment-3752961826
Original created: 2026-01-15T05:28:28Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Implement backend for new UI
The PR adds new UI for device management (add, import, edit) but the backend
logic is missing, with
TODOcomments and "coming soon" messages instead ofactual implementation. This functionality should be completed to provide a
working feature.
Examples:
web-ng/lib/serviceradar_web_ng_web/live/device_live/index.ex [215-223]
web-ng/lib/serviceradar_web_ng_web/live/device_live/show.ex [198-205]
Solution Walkthrough:
Before:
After:
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies that major new UI features for device management (add, import, edit) are functionally incomplete, as their backend logic is stubbed with
TODOcomments, which should be implemented before merging.Fix invalid HEx conditional syntax
Fix invalid HEx syntax by replacing the raw
{if ...}interpolation with a proper<%= if ... do %>...<% end %>block to ensure the template compiles and renderscorrectly.
web-ng/lib/serviceradar_web_ng_web/live/admin/integration_live/index.ex [1662-1664]
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies invalid HEx syntax (
{if ...}) that would cause a compilation error and provides the correct<%= if ... %>syntax, which is a critical fix.Improve CSV parsing for robustness
Improve the CSV parsing logic by using a regular expression to correctly handle
commas within quoted fields, preventing incorrect splitting.
web-ng/lib/serviceradar_web_ng_web/live/device_live/index.ex [1868-1874]
Suggestion importance[1-10]: 7
__
Why: The suggestion correctly identifies a bug in the new CSV parsing feature where commas inside quoted fields are not handled, and it provides a robust regex-based solution to fix it.
Bind credential inputs to form
Bind the dynamic credential input fields to the
@formassign by adding thevalueattribute to display existing values and validation errors.
web-ng/lib/serviceradar_web_ng_web/live/admin/integration_live/index.ex [1548-1553]
Suggestion importance[1-10]: 8
__
Why: The suggestion correctly identifies that the new dynamic credential fields are not bound to the form, which is a bug preventing validation feedback and value persistence. Applying this fix is crucial for the form's functionality.
Improve case-insensitive column lookup logic
Improve the case-insensitive column lookup by normalizing CSV headers to a
consistent case during initial parsing, making the logic more reliable.
web-ng/lib/serviceradar_web_ng_web/live/device_live/index.ex [1894-1902]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly points out that the case-sensitive lookup for CSV headers is not robust and proposes a better approach of normalizing headers, which makes the import feature more reliable.
Reduce duplicate code in function
Refactor the
shows_network_blacklist?/1function to eliminate duplicate clausesfor atom and string types by converting the input to an atom first.
web-ng/lib/serviceradar_web_ng_web/live/admin/integration_live/index.ex [1459-1467]
Suggestion importance[1-10]: 5
__
Why: The suggestion correctly identifies code duplication in the
shows_network_blacklist?/1function and proposes a clean solution to refactor it, improving maintainability.Use safer UUID comparison logic
Use
Ecto.UUID.dump!/1for a more robust and type-safe comparison of tenant UUIDsinstead of relying on
to_string/1.web-ng/lib/serviceradar_web_ng_web/live/device_live/show.ex [2259-2264]
Suggestion importance[1-10]: 4
__
Why: The suggestion offers a more explicit and robust way to compare UUIDs using
Ecto.UUID.dump!, which is a good practice, although the existingto_string/1implementation for UUIDs is likely correct.