Skip to content

fix(website): collapse long affected range event lists - #6102

Merged
michaelkedar merged 3 commits into
google:masterfrom
ZedingZhang:fix/6064-collapse-range-events
Nov 26, 2026
Merged

michaelkedar merged 3 commits into
google:masterfrom
ZedingZhang:fix/6064-collapse-range-events

Conversation

@ZedingZhang

@ZedingZhang ZedingZhang commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Affected range event lists can dominate vulnerability pages when a record contains hundreds of events. Show the first six events by default and provide an independent expand/collapse control for the rest of each range.

Fixes #6064.

Details

  • Share the event renderer between the tabbed and grouped package layouts.
  • Use native details/summary controls with the remaining event count, a collapse label, and a visible keyboard focus indicator. The control requires no JavaScript.
  • Preserve all event values, order, commit links, and unknown-introduced tooltips. Lists of six or fewer events remain fully visible.

Screenshots

The same package in ROOT-APP-MAVEN-CVE-2026-5795, rendered by the local Go development server with current OSV data:

Collapsed (first 6 events) Expanded (all 11 events)
Collapsed event list with Show 5 more events Expanded event list with Show fewer events

Testing

  • go test ./internal/website passed, including new full-template rendering cases for 0, 1, 6, 7, and 20 events in both package layouts, multiple ranges, commit links, and tooltips.
  • golangci-lint run --new-from-rev=HEAD ./internal/website passed with 0 issues before committing. A full package lint reported existing formatting issues in unchanged files.
  • pnpm run build and pnpm run build:prod passed (Sass deprecation warnings; production build also reports bundle-size warnings).
  • Checked all three examples from the issue using the local Go development server and current OSV records. Verified Enter/Space expand/collapse, independent ranges, complete expanded contents, and a 390px viewport on the Discourse example.

ZedingZhang and others added 2 commits September 30, 2026 14:22
The previous workflow runs expired while awaiting maintainer approval. Recreate the pull request checks without changing the source tree.
@ZedingZhang

Copy link
Copy Markdown
Contributor Author

Could a maintainer review this PR for #6064, approve the pending GitHub Actions workflows, and post /gcbrun to start the Cloud Build Go tests?

I reran go test ./internal/website and pnpm run build:prod on 3596b8e. Both passed. The website tests also passed with the patch applied to master at 5c27e94, including the event-count boundary cases in both package layouts.

Thanks!

@cuixq
cuixq requested review from a team and michaelkedar November 25, 2026 21:57
@cuixq

cuixq commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

@ZedingZhang sorry for the late reply I have added the team as reviewer for this PR.

@ZedingZhang

Copy link
Copy Markdown
Contributor Author

Thanks @cuixq , no worries. I appreciate you adding the team as reviewers!

I checked the CI failure. The OSV-Scanner rerun is using an older PR merge snapshot, and the flagged dependencies have since been updated on master. I’ll update this branch with the latest master and rerun the website tests and frontend build.

@michaelkedar

Copy link
Copy Markdown
Member

/gcbrun

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.15%. Comparing base (5c27e94) to head (ee04159).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6102      +/-   ##
==========================================
+ Coverage   55.83%   56.15%   +0.32%     
==========================================
  Files         223      223              
  Lines       23001    23001              
==========================================
+ Hits        12842    12917      +75     
+ Misses      10156    10081      -75     
  Partials        3        3              
Flag Coverage Δ
go 60.03% <ø> (+0.47%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@michaelkedar michaelkedar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks fine to me. Happy to merge.
Sorry again for dropping this

@michaelkedar
michaelkedar merged commit d60b14d into google:master Nov 26, 2026
30 checks passed
@ZedingZhang
ZedingZhang deleted the fix/6064-collapse-range-events branch November 26, 2026 05:38
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.

Affected range events in vulnerability pages render unbounded with no collapse or truncation

4 participants