Skip to content

feat(package-vulnerability-scanner): batch package/vuln loading in the content list - #459

Draft
amylin1249 wants to merge 5 commits into
pvs-06-vulns-perffrom
pvs-07-content-list-ui
Draft

feat(package-vulnerability-scanner): batch package/vuln loading in the content list#459
amylin1249 wants to merge 5 commits into
pvs-06-vulns-perffrom
pvs-07-content-list-ui

Conversation

@amylin1249

@amylin1249 amylin1249 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Split out of #428 into small, reviewable PRs (tracking issue #415). Stacked 7/10 — stacked on #458, merge bottom-up.

ContentList.vue now fetches packages for the visible content in one batched request instead of hand-rolled batches of 3, and keeps the package cache across the all-content toggle. Also fixes a sort bug where the "With Vulnerabilities" tab mutated the store's cached array in place, and reworks scanner.ts to track the selected item by guid (live) instead of a stored snapshot.

Two toggle bugs the caching introduced, both covered by tests in ContentList.test.ts:

  • After a failed all-content scan, switching back to your own content left nothing new to fetch, so the failure was never retired: the error banner stayed up, the vulnerability total stayed hidden, and every card read "Not scanned" over data that had loaded fine.
  • Toggling twice quickly let the abandoned view's request finish last and report over the newer one, leaving a failure on a view whose content loaded fine. Refreshes now run one at a time.

Also drops store state nothing reads: the packages store's own isLoading was never assigned, and lastFetchTime was written on every fetch but never read, in both the packages and vulns stores. Both predate this work. The per-item isLoading stays — scanner.ts reads it.

@github-actions

Copy link
Copy Markdown
Contributor

Extension release summary

😴 Changed but won't release

The following extensions have code changes but the manifest version hasn't been incremented:

  • package-vulnerability-scanner: manifest version 3.0.6 ≤ released version 3.0.6

If you intended to release these changes, update the version field in each extension's manifest.json.

See the contributing guide for details.

@amylin1249
amylin1249 marked this pull request as draft July 31, 2026 15:43
@amylin1249
amylin1249 force-pushed the pvs-07-content-list-ui branch from f2cec20 to 5c03531 Compare August 1, 2026 01:30
@amylin1249
amylin1249 force-pushed the pvs-07-content-list-ui branch from 5c03531 to 341debd Compare August 1, 2026 01:50
@amylin1249
amylin1249 force-pushed the pvs-07-content-list-ui branch from 341debd to bc692cc Compare August 1, 2026 03:46
@amylin1249
amylin1249 force-pushed the pvs-07-content-list-ui branch from bc692cc to 037c69e Compare August 1, 2026 04:58
@amylin1249
amylin1249 force-pushed the pvs-07-content-list-ui branch from 2986ff1 to f129666 Compare August 1, 2026 05:46
amylin1249 and others added 3 commits August 1, 2026 08:38
…e content list

ContentList.vue now fetches packages for the visible content in one batched
request (packagesStore.fetchPackages) instead of hand-rolled batches of 3,
and no longer clears the package cache on the all-content toggle, so
re-viewing already-scanned content makes no new requests. Content that never
finished deploying is flagged directly instead of attempting a fetch.

Also fixes a sort bug: the "With Vulnerabilities" tab sorted
scannerStore.contentWithVulnerabilities in place, mutating the store's
cached computed array; now sorts a copy.

scanner.ts's currentContent becomes a computed lookup by guid
(currentContentGuid) instead of a stored snapshot, so the detail view
tracks live package/vulnerability updates instead of what was true at
click time. This also lets the store report why a scan failed
(scanFailed/scanError), which the content-list empty/error state now uses.
ContentCard.vue and VulnerabilityChecker.vue get the one-line update to set
currentContentGuid instead of currentContent; their other pending changes
are a separate PR.
…g back to a loaded view

After an all-content scan failed, toggling back to your own content left
nothing new to fetch, so the store-level failure was never retired: the error
banner stayed up, the vulnerability total stayed hidden, and every card read
"Not scanned" over data that had loaded fine.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
amylin1249 and others added 2 commits August 1, 2026 09:33
…stale one can't report last

Toggling twice quickly let the abandoned view's package read finish after the
newer one, leaving its failure on a view whose content had loaded fine.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The packages store's own isLoading was never assigned, and lastFetchTime was
written on every fetch but never read, in both the packages and vulns stores.
Both predate this work. The per-item isLoading stays: scanner.ts reads it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@amylin1249
amylin1249 force-pushed the pvs-07-content-list-ui branch from e747806 to 20b3b86 Compare August 1, 2026 16: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.

1 participant