-
Notifications
You must be signed in to change notification settings - Fork 9
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
Conversation
There was a problem hiding this 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 updatesdisplayResults
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 indisplayResults
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
toComponentStatus
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;
Good bot 🤖 |
There was a problem hiding this 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
See individual commits.
Closes https://github.com/neverendingsupport/data-and-integrations/issues/71
Closes https://github.com/neverendingsupport/data-and-integrations/issues/72
Closes https://github.com/neverendingsupport/data-and-integrations/issues/114