updated to tailwind css v4 / fixing glob security issue #2519
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!2519
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/2519/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: #2075
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/2075
Original created: 2025-12-08T03:30:56Z
Original updated: 2025-12-08T04:02:56Z
Original head: carverauto/serviceradar:chore/update_web_glob_lib
Original base: main
Original merged: 2025-12-08T04:02:53Z 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
Description
Upgraded Tailwind CSS from v3 to v4 with comprehensive codebase migration
Migrated
globals.cssto Tailwind v4 syntax using@importand@plugindirectives with custom theme configurationUpdated PostCSS configuration to use
@tailwindcss/postcssplugin for v4 compatibilityRemoved legacy
tailwind.config.tsfile (replaced by inline configuration inglobals.css)Systematically updated utility class names across 40+ components:
shadow→shadow-sm,shadow-sm→shadow-xsfor refined shadow hierarchyfocus:outline-none→focus:outline-hiddenfor improved focus state semanticsflex-shrink-0→shrink-0for shortened class namesbreak-words→wrap-break-wordfor text wrapping utilitiesbackdrop-blur-sm→backdrop-blur-xsfor blur effect consistencymin-h-[2.25rem]→min-h-9for standardized spacingUpdated
package.jsondependencies: upgradedtailwindcssto v4.1.17, movedtailwindcss-animateto devDependencies, added@tailwindcss/postcssUpdated
pnpm-lock.yamlwith new build tooling includinglightningcssv1.30.2 for CSS processingDiagram Walkthrough
File Walkthrough
40 files
globals.css
Tailwind CSS v4 migration with theme configurationweb/src/app/globals.css
@tailwindbase/components/utilities) to v4 syntax with@importand@pluginspacing, and animations
page.tsx
Shadow and focus outline utility updates for Tailwind v4web/src/app/admin/edge-packages/page.tsx
shadow-smwithshadow-xsacross multiple button and cardelements
focus:outline-nonetofocus:outline-hiddenfor focus statestyling
elements
SightingsDashboard.tsx
Shadow and focus outline utility updates for Tailwind v4web/src/components/Identity/SightingsDashboard.tsx
shadow-smwithshadow-xson multiple card and containerelements
focus:outline-nonetofocus:outline-hiddenon input fieldsmetric-components.jsx
Shadow utility updates for metric componentsweb/src/components/Metrics/metric-components.jsx
shadowwithshadow-smon chart and metric card containersmetric components
LANDiscoveryDashboard.tsx
Shadow utility updates for LAN discovery dashboardweb/src/components/Network/LANDiscoveryDashboard.tsx
shadowwithshadow-smon dashboard cards, stat cards, andcontainer elements
display sections
SNMPDashboard.tsx
Shadow and focus outline utility updates for SNMP dashboardweb/src/components/Network/SNMPDashboard.tsx
shadowwithshadow-smon SNMP metric cards and chartcontainers
peer-focus:outline-nonetopeer-focus:outline-hiddenon toggleswitch
DeviceBasedDiscoveryDashboard.tsx
Shadow and focus outline utility updates for device discoveryweb/src/components/Network/DeviceBasedDiscoveryDashboard.tsx
shadowwithshadow-smon dashboard cards and containerelements
focus:outline-nonetofocus:outline-hiddenon stat cardbuttons
SysmonOsxDetails.tsx
Shadow utility updates for sysmon-osx details componentweb/src/components/Service/SysmonOsxDetails.tsx
shadowwithshadow-smon metric cards and detail sectionsdisplays
RPerfDashboard.tsx
Shadow utility updates for rperf dashboardweb/src/components/Network/RPerfDashboard.tsx
shadowwithshadow-smon metric cards and chart containersshadow-smtoshadow-xson active time range buttonDashboard.tsx
Shadow utility updates for service dashboardweb/src/components/Service/Dashboard.tsx
shadowwithshadow-smon service dashboard cards andcontainers
state displays
DeviceDetail.tsx
Focus outline and text wrapping utility updatesweb/src/components/Devices/DeviceDetail.tsx
focus:outline-nonetofocus:outline-hiddenon metric typeselector
focus:ringtofocus:ring-3for focus ring stylingbreak-wordswithwrap-break-wordon text elementspage.tsx
Shadow utility updates for identity config pageweb/src/app/identity/config/page.tsx
shadow-smwithshadow-xson configuration section cardsfingerprinting, reaper, and drift protection sections
NetworkSweepView.jsx
Shadow utility updates for network sweep viewweb/src/components/Network/NetworkSweepView.jsx
shadowwithshadow-smon host details and ICMP statscontainers
CorrelationDashboard.tsx
Shadow utility updates for correlation dashboardweb/src/components/Observability/CorrelationDashboard.tsx
shadowwithshadow-smon stats cards displaying logs, spans,and metrics found
ObservabilityWidget.tsx
Flex shrink utility updates for observability widgetweb/src/components/Analytics/ObservabilityWidget.tsx
flex-shrink-0withshrink-0on header and metric sectionsCriticalLogsWidget.tsx
Flex shrink utility updates for critical logs widgetweb/src/components/Analytics/CriticalLogsWidget.tsx
flex-shrink-0withshrink-0on header, icon, and actionelements
error-components.jsx
Shadow and flex shrink utility updates for error componentsweb/src/components/Metrics/error-components.jsx
shadowwithshadow-smon error message and empty statecontainers
flex-shrink-0toshrink-0on alert iconHeader.tsx
Flex shrink and focus outline utility updates for headerweb/src/components/Header.tsx
flex-shrink-0toshrink-0on header elementfocus:outline-nonewithfocus:outline-hiddenon search inputand submit button
DuskDashboard.jsx
Shadow utility updates for dusk dashboardweb/src/components/Checkers/DuskDashboard.jsx
shadowwithshadow-smon poller status, current height, andlatest hash cards
WatcherTelemetryPanel.tsx
Shadow and focus outline utility updates for watcher telemetryweb/src/components/Admin/WatcherTelemetryPanel.tsx
shadow-smwithshadow-xson telemetry panel sectionfocus:outline-nonetofocus:outline-hiddenon KV storeselector
page.tsx
Shadow and focus outline utility updates for login pageweb/src/app/login/page.tsx
shadow-smwithshadow-xson username input fieldfocus:outline-nonetofocus:outline-hiddenon password inputand submit button
page.tsx
Focus outline and backdrop blur utility updates for admin pageweb/src/app/admin/page.tsx
focus:outline-nonetofocus:outline-hiddenon edge onboardinglink
backdrop-blur-smwithbackdrop-blur-xson modal overlayCriticalEventsWidget.tsx
Flex shrink utility updates for critical events widgetweb/src/components/Analytics/CriticalEventsWidget.tsx
flex-shrink-0withshrink-0on severity icon and action iconelements
ServiceRegistryPanel.tsx
Shadow utility updates for service registry panelweb/src/components/Devices/ServiceRegistryPanel.tsx
shadowwithshadow-smon service registry panel containersPollerConfigForm.tsx
Flex shrink utility updates for poller config formweb/src/components/Admin/ConfigForms/PollerConfigForm.tsx
flex-shrink-0withshrink-0on section actions and navigationlinks
NetworkStatus.jsx
Shadow utility updates for network status componentweb/src/components/Network/NetworkStatus.jsx
shadowwithshadow-smon ICMP summary and network sweep ICMPstatus containers
Dashboard.tsx
Focus outline utility updates for device dashboardweb/src/components/Devices/Dashboard.tsx
focus:outline-nonetofocus:outline-hiddenon stat cardbuttons
Sidebar.tsx
Flex shrink utility updates for sidebarweb/src/components/Sidebar.tsx
flex-shrink-0withshrink-0on sidebar containerServicesTreeNavigation.tsx
Shadow utility updates for services tree navigationweb/src/components/Admin/ServicesTreeNavigation.tsx
shadowwithshadow-smon add service menu dropdownICMPSparkline.tsx
Shadow utility updates for ICMP sparklineweb/src/components/Devices/ICMPSparkline.tsx
shadowwithshadow-smon tooltip elementEventTable.tsx
Text wrapping utility updates for event tableweb/src/components/Events/EventTable.tsx
break-wordswithwrap-break-wordon alias summary card textMultiSysmonMetrics.tsx
Shadow utility updates for multi-sysmon metricsweb/src/components/Metrics/MultiSysmonMetrics.tsx
shadowwithshadow-smon service selector containerAPIQueryClient.tsx
Shadow and flex shrink utility updates for API query clientweb/src/components/Query/APIQueryClient.tsx
shadowwithshadow-smon error message containerflex-shrink-0toshrink-0on alert iconDeleteDeviceButton.tsx
Flex shrink utility updates for delete device buttonweb/src/components/Devices/DeleteDeviceButton.tsx
flex-shrink-0withshrink-0on alert iconshared-components.jsx
Shadow utility updates for shared metric componentsweb/src/components/Metrics/shared-components.jsx
shadowwithshadow-smon metric card containerRBACEditor.tsx
Minimum height utility updates for RBAC editorweb/src/components/Admin/RBACEditor.tsx
min-h-[2.25rem]withmin-h-9on chip list containerDeviceGraphCanvas.tsx
Shadow utility updates for device graph canvasweb/src/components/Devices/DeviceGraphCanvas.tsx
shadow-smwithshadow-xson SVG canvas containerCoreConfigForm.tsx
Update Tailwind CSS class for v4 compatibilityweb/src/components/Admin/ConfigForms/CoreConfigForm.tsx
flex-shrink-0class toshrink-0(Tailwind v4 class nameupdate)
system-metrics.jsx
Adjust shadow styling in system metrics componentweb/src/components/Metrics/system-metrics.jsx
shadowclass toshadow-smfor a more subtle shadow effectHighUtilizationWidget.tsx
Update Tailwind CSS class for v4 compatibilityweb/src/components/Analytics/HighUtilizationWidget.tsx
flex-shrink-0class toshrink-0(Tailwind v4 class nameupdate)
2 files
package.json
Tailwind CSS v4 upgrade and dependency reorganizationweb/package.json
tailwindcssfrom v3.4.1 to v4.1.17tailwindcss-animatefrom dependencies to devDependencies@tailwindcss/postcssv4.1.17 as new devDependencypnpm-lock.yaml
Tailwind CSS v4 upgrade with new build toolingweb/pnpm-lock.yaml
tailwindcssfrom v3.4.17 to v4.1.17 with new oxide andpostcss packages
tailwindcss-animatedependency location (moved fromdependencies to devDependencies)
jitifrom v2.4.2 to v2.6.1 across multiple packageslightningcssv1.30.2 as a new dependency for CSS processingpostcss-import, postcss-nested, etc.)
1 files
postcss.config.mjs
Update PostCSS configuration for Tailwind v4web/postcss.config.mjs
@tailwindcss/postcssplugininstead of
tailwindcss1 files
Imported GitHub PR comment.
Original author: @qodo-code-review[bot]
Original URL: https://github.com/carverauto/serviceradar/pull/2075#issuecomment-3624479978
Original created: 2025-12-08T03:31:54Z
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.🎫 No ticket provided
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 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: Comprehensive Audit Trails
Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.
Status:
Audit coverage: The PR primarily updates styling and Tailwind v4 classes without adding or modifying
logging of critical actions, so it is unclear whether audit trails exist for actions like
reconcile, promotion/dismiss, or downloads.
Referred Code
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation
Status:
Error handling: Components render error and empty states but newly added code does not show validation or
try/catch around user inputs or actions, so robustness cannot be confirmed from these
styling-only changes.
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: Multiple new input and select fields were styled but no additional client-side validation
or sanitization logic was introduced in this diff, leaving validation posture unclear.
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/2075#issuecomment-3624483038
Original created: 2025-12-08T03:33:32Z
PR Code Suggestions ✨
Explore these optional code suggestions:
Use the correct defined border color
Replace the undefined CSS variable
--color-gray-200with the defined--color-borderto correctly implement the Tailwind v3 border colorcompatibility.
web/src/app/globals.css [79-87]
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a bug where an undefined CSS variable (
--color-gray-200) is used, making the compatibility layer ineffective and failing to achieve its stated purpose.Use correct Tailwind CSS class
Replace the invalid Tailwind CSS class
wrap-break-wordwith the correct v4 classbreak-wordto prevent text overflow issues.web/src/components/Devices/DeviceDetail.tsx [1686-1688]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies that
wrap-break-wordis not a valid Tailwind CSS class and was likely a typo during the migration frombreak-wordstobreak-wordfor v4, fixing a potential UI overflow issue.Fix non-existent focus ring class
Replace the invalid Tailwind CSS class
focus:ring-3with the correctfocus:ringto ensure the focus ring is visible for accessibility.
web/src/components/Devices/DeviceDetail.tsx [1604-1608]
Suggestion importance[1-10]: 6
__
Why: The suggestion correctly identifies that
focus:ring-3is not a valid Tailwind CSS class, and fixing it tofocus:ringrestores the intended focus indicator, which is important for accessibility.Correct a confusing UI text
Revert the UI text from "shadow-sm mode" back to "shadow mode" to avoid user
confusion, as this was likely an accidental replacement.
web/src/components/Identity/SightingsDashboard.tsx [344]
Suggestion importance[1-10]: 4
__
Why: The suggestion correctly identifies a likely unintentional change in a UI string from "shadow mode" to "shadow-sm mode" due to a broad search-and-replace, improving UI clarity for the user.