Skip to content

feat: summarize scan output to favor web report, removing list and table views #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jun 13, 2025

Conversation

rlmestre
Copy link
Contributor

@rlmestre rlmestre requested a review from a team as a code owner June 12, 2025 17:12
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes legacy list/table views in favor of a concise summary output, adds support for tracking NES remediation availability, and updates all related tests and docs.

  • Introduces countComponentsByStatus and updates displayResults to show package counts instead of detailed tables.
  • Adds a new NES_AVAILABLE status to indicate remediations available and propagates it through types, services, and UI.
  • Cleans up/remove outdated UI utilities (eol.ui.ts, date.ui.ts), flags, and tests for table/list rendering.

Reviewed Changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/commands/scan/eol.ts Reworked CLI display to summary counts; removed table logic; added guidance lines
src/commands/scan/eol.ts Added countComponentsByStatus function
src/ui/shared.ui.ts Added NES_AVAILABLE color/indicator; removed unused constants
src/service/nes/nes.svc.ts Set nesAvailable in scan result info
src/api/types/nes.types.ts Extended component info with nesAvailable & remediation; updated statuses
src/api/queries/nes/sbom.ts Included remediation { id } in GraphQL query
src/api/types/hd-cli.types.ts Adjusted ScanResult components map type
package.json Added terminal-link dependency; removed @oclif/table
.envrc.example Updated EOL_REPORT_URL domain suffix
.cursorrules Removed obsolete service-no-cli-table rule
README.md Removed --table flag docs
test/ui/eol.ui.test.ts Deleted legacy UI tests for list/table views
test/ui/date.ui.test.ts Deleted obsolete date UI tests
test/service/eol.svc.test.ts Deleted old purl name resolver tests
e2e/scan/eol.test.ts Updated end-to-end tests to expect summary output
Comments suppressed due to low confidence (2)

src/commands/scan/eol.ts:169

  • The new countComponentsByStatus function and updated summary display in displayResults lack unit tests. Consider adding tests to cover scenarios for different status counts and remediation availability.
export function countComponentsByStatus(components: InsightsEolScanComponent[]): Record<ComponentStatus, number> {

src/api/types/nes.types.ts:64

  • [nitpick] Adding NES_AVAILABLE to ComponentStatus blends remediation availability with component lifecycle statuses. Consider separating remediation availability into its own field or category instead of treating it as a status.
export const VALID_STATUSES = ['UNKNOWN', 'OK', 'EOL', 'SUPPORTED', 'NES_AVAILABLE'] as const;

@KLongmuirHD
Copy link
Contributor

Pull Request Overview

Good bot 🤖

Copy link
Contributor

@edezekiel edezekiel left a comment

Choose a reason for hiding this comment

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

LGTM - left a few comments about e2e specs though

@rlmestre rlmestre merged commit 72b8c71 into main Jun 13, 2025
12 checks passed
@rlmestre rlmestre deleted the feat/scan-summary-and-remediations branch June 13, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants