Skip to content

Conversation

@jsalinasnttdata
Copy link
Contributor

@jsalinasnttdata jsalinasnttdata commented Dec 19, 2025

🗣 Description

This PR updates the Domains table in the Findings Library to temporarily hide the Domain Name column until Web Application Scanning (WAS) data source integration provides actual domain name resolution:

  • Hides Domain Name column for all users using MUI DataGrid's columnVisibilityModel (clean, semantic approach)
  • Maintains IP Address column visibility so users can still identify domains by their IP addresses
  • Preserves Organization column logic - continues to hide for standard users, visible for admin users (globalAdmin, regionalAdmin, globalView)
  • Adds comprehensive test coverage for column visibility across all user types and scenarios
  • Includes TODO comment and follow-up ticket planning for re-enabling the column once WAS data is available

Technical Implementation: Uses MUI DataGrid's built-in column visibility management instead of array filtering, providing cleaner code and better maintainability.

💭 Motivation and context

This change addresses CRASM-3585 based on design team feedback that the Domain Name column should be hidden until the WAS (Web Application Scanning) datasource integration is complete, as the current data only provides IP addresses without corresponding domain name resolution.

Implementation Approach:

  • Requirement: Hide Domain Name column entirely while keeping IP Address column visible
  • Rationale: Avoid showing misleading domain names when only IP data is available
  • Solution: Temporary column hiding with clear restoration path

This solution maintains user experience while awaiting backend data integration, with a clear path forward for restoration once WAS data becomes available.

🧪 Testing

  • Column visibility tests for all user types (standard, globalAdmin, globalView, regionalAdmin)
  • Domain Name column hiding verification across all user scenarios
  • Organization column visibility rules maintained (hidden for standard users)
  • Content rendering validation - confirms IP addresses display correctly when Domain Name column is hidden

/inventory/domains

Before:
Screenshot 2025-12-19 at 8 22 02 AM

After:

Standard users:
Screenshot 2025-12-23 at 9 04 39 AM
Screenshot 2025-12-23 at 10 13 11 AM
Screenshot 2025-12-23 at 10 13 04 AM

All other users:
Screenshot 2025-12-23 at 9 03 24 AM
Screenshot 2025-12-23 at 10 14 45 AM
Screenshot 2025-12-23 at 10 14 38 AM

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.
  • Bump major, minor, patch, pre-release, and/or build versions as appropriate via the bump_version script if this repository is versioned and the changes in this PR warrant a version bump.
  • Create a pre-release (necessary if and only if the pre-release version was bumped).

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release (necessary if and only if the version was bumped).

- Display IP addresses instead of domain names in first column
- Hide Organizations column for standard users only
- Remove redundant IP column
- Update accessibility labels for IP-focused interface
…anges

- Change test expectations from domain names to IP addresses
- Update regex patterns to match IP format instead of domain names
- Fix failing assertions after Domains table column structure changes
@coveralls
Copy link

coveralls commented Dec 22, 2025

Coverage Status

coverage: 31.809% (+0.06%) from 31.748%
when pulling 3beedd0 on jsalinas-findings-library-datagrid-column-removals-CRASM-3585
into 67effea on develop.

…ess column

- Revert Domain Name column to display domain names instead of IP addresses
- Add separate IP Address column positioned next to Domain Name column
- Update aria-labels to reference domain names for improved accessibility
- Fix test assertions to expect domain names instead of IP addresses
…olumn management

- Replace array filtering with proper columnVisibilityModel approach
- Hide Domain Name column by default until WAS data is available (with TODO)
- Conditionally hide Organization column for standard users via visibility model
…ility

- Update existing loading state test to expect IP addresses instead of domain names
- Improve test coverage for columnVisibilityModel implementation
- Fix CodeQL security warning "Missing regular expression anchor"
- Change /example\.com|test\.com|sample\.org/ to /^(example\.com|test\.com|sample\.org)$/
- Prevents potential substring matching vulnerabilities
…r standard users

- Remove Organization column from columns definition for standard users instead of hiding via columnVisibilityModel
- Completely hides Organization option from column chooser menu for standard users
- Simplify columnVisibilityModel logic since Organization filtering now handled at column definition level
- Update test description to reflect that column is completely removed, not just hidden
- Filter out Domain Name column from columns array for all users (pending WAS data integration)
- Prevents Domain Name column from appearing in Filters > Columns menu while disabled
- Simplify columnVisibilityModel since Domain Name now filtered at column definition level
- Update TODO comments to reflect new filtering approach for future WAS data restoration
- Update test description to reflect complete column removal vs visibility hiding
- Remove complex userColumnVisibility state and useMemo logic
- Use direct columnVisibilityModel state for cleaner implementation
- Maintain column filtering logic in domCols useMemo for Domain Name and Organization columns
- Simplify onColumnVisibilityModelChange handler
Copy link
Contributor

@ameliav ameliav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cduhn17 cduhn17 merged commit 6d9222e into develop Dec 29, 2025
18 checks passed
@cduhn17 cduhn17 deleted the jsalinas-findings-library-datagrid-column-removals-CRASM-3585 branch December 29, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants