Skip to content

Download page: show only the modules in the selected Prebid.js version - #6843

Closed
patmmccann wants to merge 3 commits into
prebid:masterfrom
patmmccann:agent-download-filter-modules-by-version
Closed

patmmccann wants to merge 3 commits into
prebid:masterfrom
patmmccann:agent-download-filter-modules-by-version

Conversation

@patmmccann

@patmmccann patmmccann commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

The download page's module checklist showed every documented module, whatever version was selected. About 90 of the ~800 entries aren't in 11.43.0: mostly long-removed adapters (aol, districtm, spotx, ...), plus modules removed in 11.0. Selecting one only produced a build without it. This makes the checklist show only the modules in the selected Prebid.js version.

How it works

  • When the version list loads, and whenever the selected version changes (including from an uploaded config), the page fetches that version's file list from jsDelivr (data.jsdelivr.com/v1/packages/npm/prebid.js@<version>?structure=flat). Module names are taken from modules/<name>.(js|ts) and modules/<name>/index.(js|ts). Checklist entries whose moduleCode isn't in the list are hidden.
  • A status line above the bidder list says how many modules are shown, e.g. "Showing the 718 modules available in Prebid.js 11.43.0".
  • Checked boxes are kept. A hidden module stays checked, so switching back to a version that has it restores it. Hidden modules are left out of the download and listed in the existing "removed from your download" alert, alongside the min_js_version check.
  • Pending state: while the selected version's list is loading, the download button is disabled, so a build can't be generated with the previous version's filter applied.
  • Fallback: if the listing can't be loaded, all modules are shown, as before, and the status line says so. Failed lookups aren't cached, so the next selection retries.
  • Cost: published versions are immutable, so each listing is fetched at most once per page view and cached by the browser for a year (jsDelivr sends max-age=31536000). It's about 440 KB compressed per selected version.

Docs naming fixes

15 pages had a download moduleCode that didn't match any module file. Those modules were silently missing from builds, and with this change they'd be hidden. Their front matter is corrected:

  • Analytics modulecode: browsi, byData, datawrkz, im, liveIntent, nexx360, AsteriobidPbm.
  • Module module_code: dynamicAdBoostRtdProvider, humansecurityRtdProvider, humansecurityMalvDefenseRtdProvider, agenticAudienceRtdProvider.
  • User ID useridmodule: adriverIdSystem, jixieIdSystem.
  • Bidder pages SMB and synapsehx get a filename: override (smbBidAdapter, synapsehxBidAdapter); their biddercode is unchanged.

Touching those analytics pages also meant fixing their existing markdownlint errors (heading levels, one code fence language).

Testing

Tested in headless Chrome against the live download page, with this download.js swapped in, the status line injected, and the versions service mocked (it's currently down, see #6839). Requests to jsDelivr were real:

Status line rubiconBidAdapter aolBidAdapter (removed long ago) paapi (removed in 11.0)
11.43.0 selected "Showing the 718 modules available in Prebid.js 11.43.0." shown hidden hidden
10.29.2 selected "Showing the 666 modules available in Prebid.js 10.29.2." shown hidden shown
jsDelivr response delayed 3s "Checking which modules…", download button disabled until it loads (initial load and version switch)
jsDelivr unreachable "Couldn't check which modules are available…, so all modules are shown." shown shown shown

This edits assets/js/download.js in different places from #6842, so the two shouldn't conflict.

🤖 Generated with Claude Code

patmmccann and others added 2 commits October 22, 2026 12:18
Fetch the selected version's file list from jsDelivr and hide checklist
entries for modules that aren't in it (falling back to showing everything if
the list can't be loaded). Hidden but checked modules are left out of the
download and reported. Also fix module names on 15 docs pages whose download
checkbox didn't match any module file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@netlify

netlify Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for prebid-docs-preview ready!

Name Link
🔨 Latest commit 92f03cf
🔍 Latest deploy log https://app.netlify.com/projects/prebid-docs-preview/deploys/6ada3988dac2c707b6f86739
😎 Deploy Preview https://deploy-preview-6843--prebid-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T16:25:06.232843Z 12143e5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 12143e582f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread assets/js/download.js Resolved
Comment thread assets/js/download.js Resolved
…st loads

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@patmmccann

patmmccann commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

🤖 This comment was written by an AI agent (Claude Code) on behalf of @patmmccann.

Combined into #6842, together with the download page error handling, request timeouts and v8 cleanup. The commits are cherry-picked unchanged on top of #6844.

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