Skip to content

LWLP-16,LWLP-17: add coverage analyzer page - #1166

Merged
katarinazaprazna merged 4 commits into
content-services:mainfrom
katarinazaprazna:coverage-ui-skeleton
Aug 20, 2026
Merged

katarinazaprazna merged 4 commits into
content-services:mainfrom
katarinazaprazna:coverage-ui-skeleton

Conversation

@katarinazaprazna

@katarinazaprazna katarinazaprazna commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the Lightwell Lens page (/lightwell/lens) that lets users upload SBOM or package manifest files to check package coverage against the Lightwell Validated catalog
  • Add coverage result cards: donut chart (coverage summary) and stacked bar chart (ecosystem breakdown)
  • Gate Beacon and Lens pages behind the lightwellbeaconandlens feature flag so they are only registered when enabled. Navigating to /lens or /beacon with the flag off no longer shows an infinite spinner, unknown URLs like /lightwell/anything now render a proper 404 page instead of a stuck loader, and multi-segment unmatched paths are caught by a * fallback route
Screenshot From 2026-08-18 13-07-56 Screenshot From 2026-08-18 13-09-53 Screenshot From 2026-08-18 13-10-24

Error states

Screenshot From 2026-08-20 14-25-57 Screenshot From 2026-08-18 02-41-30 Screenshot From 2026-08-18 02-30-06

Notes

  • Before merging, the UI should be hidden behind a feature flag
  • Define the scope of frontend file validation. If we only check extensions, we can drop the file reading step
  • Make charts responsive using ResizeObserver in v2

Testing steps

  • Navigate to /lightwell/lens, page loads with file upload card
  • Upload an unsupported file, inline error appears under the FileUpload
  • Clear the file and upload a valid file, loading spinner appears
  • Simulate server failure, error state renders with error message and "Reupload file" button
  • On successful analysis, coverage summary chart, ecosystem breakdown chart, and footer text all render with correct data
  • If coverage >= 80%, the "Schedule a Conversation" button appears
  • Clicking "Analyze another file" returns to file select state

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.86%. Comparing base (0ef0d30) to head (f299568).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1166      +/-   ##
==========================================
- Coverage   64.05%   63.86%   -0.19%     
==========================================
  Files         143      143              
  Lines        5416     5416              
  Branches     1052     1052              
==========================================
- Hits         3469     3459      -10     
- Misses       1664     1673       +9     
- Partials      283      284       +1     
Flag Coverage Δ
e2e 63.86% <ø> (-0.19%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/services/Features/FeatureApi.ts 100.00% <ø> (ø)
src/services/Features/FeatureQueries.ts 93.33% <ø> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@katarinazaprazna
katarinazaprazna force-pushed the coverage-ui-skeleton branch 5 times, most recently from 4499e7d to 771e305 Compare August 18, 2026 21:55
@katarinazaprazna
katarinazaprazna marked this pull request as ready for review August 18, 2026 21:56
@katarinazaprazna
katarinazaprazna requested a review from a team as a code owner August 18, 2026 21:56

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • In CoverageSummaryCard, the threshold prop is currently unused; either wire it into the UI behavior (e.g., to drive highlighting or CTA visibility) or remove the prop to keep the component API minimal.
  • validateManifestFile accepts any .json, .xml, .spdx, .rdf, or .csv filename, which may be broader than intended (e.g., arbitrary config files); consider tightening this logic or aligning it explicitly with the backend’s accepted formats to avoid avoidable upload failures.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `CoverageSummaryCard`, the `threshold` prop is currently unused; either wire it into the UI behavior (e.g., to drive highlighting or CTA visibility) or remove the prop to keep the component API minimal.
- `validateManifestFile` accepts any `.json`, `.xml`, `.spdx`, `.rdf`, or `.csv` filename, which may be broader than intended (e.g., arbitrary config files); consider tightening this logic or aligning it explicitly with the backend’s accepted formats to avoid avoidable upload failures.

## Individual Comments

### Comment 1
<location path="src/Pages/Lightwell/Coverage/components/ManifestUploadCard.tsx" line_range="27" />
<code_context>
+  fileError?: string;
+  processError?: string;
+  validated: FileUploadStatus;
+  onFileInputChange: (event: DropEvent, file: File) => void;
+  onClearClick: MouseEventHandler<HTMLButtonElement>;
+  onRetry: () => void;
</code_context>
<issue_to_address>
**issue (bug_risk):** The `onFileInputChange` callback assumes a non-undefined `File`, which may not match the PatternFly `FileUpload` contract.

PatternFly’s `FileUpload` can pass `File | undefined` to `onFileInputChange` (e.g., on clear or some error paths), but this prop and `useCoverageAnalysis.handleFileSelected` both assume a definite `File`. If `undefined` is passed, `validateManifestFile` will fail when accessing `selectedFile.name`. Please update the type to `File | undefined` and guard/early-return when the file is absent.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/Pages/Lightwell/Coverage/components/ManifestUploadCard.tsx Outdated
@katarinazaprazna
katarinazaprazna force-pushed the coverage-ui-skeleton branch 2 times, most recently from f508e30 to 1a968d7 Compare August 18, 2026 22:06
@xbhouse xbhouse self-assigned this Aug 19, 2026
Comment thread src/Pages/Lightwell/Coverage/CoverageAnalyzer.tsx Outdated
Comment thread src/Pages/Lightwell/Coverage/components/EcosystemBreakdownCard.tsx
Comment thread src/Pages/Lightwell/Coverage/hooks/useCoverageAnalysis.ts Outdated
Comment thread src/Pages/Lightwell/Coverage/hooks/useCoverageAnalysis.ts Outdated
@katarinazaprazna
katarinazaprazna force-pushed the coverage-ui-skeleton branch 3 times, most recently from f311a54 to 3b348f7 Compare August 19, 2026 13:44
Comment thread src/LightwellApp.tsx Outdated
@katarinazaprazna
katarinazaprazna force-pushed the coverage-ui-skeleton branch 2 times, most recently from f22ffab to 292fd54 Compare August 20, 2026 13:14

@xbhouse xbhouse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!!

@katarinazaprazna
katarinazaprazna merged commit 7c0db12 into content-services:main Aug 20, 2026
19 of 20 checks passed
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.

2 participants