{{ message }}
Repository navigation
feat: expose the extension package size per target platform - #2168
Merged
Merged
Conversation
netomi
force-pushed
the
feat/extension-download-size
branch
from
September 5, 2026 11:47
9df36d8 to
a98d4b1
Compare
netomi
marked this pull request as draft
September 5, 2026 12:33
netomi
force-pushed
the
feat/extension-download-size
branch
from
September 5, 2026 12:39
a98d4b1 to
bdc14f9
Compare
netomi
force-pushed
the
feat/extension-download-size
branch
from
October 12, 2026 13:06
bdc14f9 to
460313c
Compare
file_resource.size has been recorded since V1_73 but reached no API response and no page. Issue #367 asks to display it. Add ExtensionJson.downloadSizes, a map of target platform to the size in bytes of the package behind the matching entry of downloads, and show the size next to each platform in the web UI's Target Platforms line. The size differs per platform, so a single value cannot describe a version that ships for several. The size is read from the download resource rather than summed over the version's files, which would count readme, icon, changelog and license twice. A platform whose size is unknown (published before the column existed and not yet backfilled) is left out of the map rather than sent as zero. This is the download size; the install size the issue mentions is not stored and would need its own column and a backfill job. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
netomi
force-pushed
the
feat/extension-download-size
branch
from
October 12, 2026 13:34
460313c to
9b6daca
Compare
The concatenated Target Platforms line wrapped mid-entry once sizes were added. Render one row per platform, name beside size. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Cache invalidation, database-mapping coverage, and the install-size scope discrepancy remain unresolved.
3 open findings
What changed in this PR
Exposes per-platform VSIX download sizes through the extension API and displays them in the extension detail UI.
Changes:
- Adds
downloadSizesto extension API responses. - Displays formatted sizes beside target platforms.
- Adds server and web UI coverage and updates affected mocks.
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The registry stores only the package size; the installed extension is larger by its compression ratio. Say so beside the per-platform sizes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Replace the always-visible caption under the platform list with an info icon beside the Target Platforms heading. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The API tests mock the repository, so nothing exercised reading file_resource.size through jOOQ. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
netomi
added a commit
that referenced
this pull request
Oct 12, 2026
The server change from #2168 had no entry in server/CHANGELOG.md. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Closes #367.
Context
The issue asks for the extension size to be displayed, packagephobia-style. Half of what that needs already exists:
file_resource.sizehas been recorded sinceV1_73__File_Resource_Size.sql(#2089, #2095), set on publish inPublishExtensionVersionServiceandStorageUtilService, and backfilled for older rows byFileResourceSizeJobRequestHandler. Nothing ever read it back out, though — it reached no API response and no page.Change
ExtensionJson.downloadSizes— map of target platform to the size in bytes of the package behind the matching entry ofdownloads. It is set wheredownloadsis, i.e. on/api/{ns}/{ext}and its versioned variants.Linux x64 12.30 MB, and an info icon beside the heading explains that these are download sizes. Rendered with the existingformatFileSizehelper.Decisions worth calling out:
Per platform, not one number. A version can ship for several target platforms and each package has its own size, so a single size would describe whichever platform the page happened to load. The Download button and its platform menu are unchanged.
It reads the
downloadresource, not aSUMover the version's files. Readme, icon, changelog and license are stored as rows of their own but hold content that is already inside the.vsix, so summing counts it twice.Unknown is omitted, not zero. A package published before the column existed that the backfill hasn't reached has
size = null. That platform is left out ofdownloadSizesand the UI shows its name alone. A client has no way to tell a zero-byte file from an unknown one, so it gets neither.Download size, not install size
The issue asks about install size — the reporter's example is a ~110MB
.vsixthat's over 200MB on disk — and this is the download size. The two differ by the package's compression ratio.Install size isn't stored and isn't cheaply derivable. Backfilling it means re-reading every existing
.vsixout of storage — a much larger job than V1_73's was. That seems worth its own issue and its own decision, rather than holding up the number we already have.One query, not two
StorageUtilService.getFilesreturns the resources andgetFileUrlsis a shorthand over it, unchanged for its other callers.setDownloadstakes the URL and the size from onegetFilescall, and the detail builder uses thetoFilesJsonmapping the other two builders already share, which also removes the duplicated public-key-alongside-signature handling it had grown.Testing
RegistryAPITest.testExtensionDownloadSizes/testExtensionDownloadSizesUnknown— the per-platform value reaches the JSON; a null size leaves that platform out.extension-detail-overview.spec.tsx(new) — each platform is its own row with its size, a platform without a size is listed by name only, nothing size-like renders when none is known, and the info tooltip appears only when a size is shown.FileResourceJooqRepositoryTest(new, Postgres) —findByTypeandfindAllreturn the stored size, and an unknown size comes back null rather than 0.tsc --noEmitandyarn lintclean. Server: full suite green (1823 tests, including the Testcontainers ones).getFileUrlsfor the detail path and now stubgetFiles.🤖 Generated with Claude Code