Skip to content

[backport] tarballs: redesign preview tarballs index page (#1911)#1926

Merged
pranaygp merged 1 commit into
stablefrom
pgp/backport-tarball
May 5, 2026
Merged

[backport] tarballs: redesign preview tarballs index page (#1911)#1926
pranaygp merged 1 commit into
stablefrom
pgp/backport-tarball

Conversation

@pranaygp
Copy link
Copy Markdown
Contributor

@pranaygp pranaygp commented May 5, 2026

Manual backport of #1911 to stable.

The auto-backport action (run) cherry-picked cleanly but couldn't push directly because stable requires PRs / signed commits / status checks.

Summary

  • Cherry-picked the squashed merge commit b883ea0d (tarballs: redesign preview tarballs index page #1911) onto stable.
  • Only conflict was pnpm-lock.yaml; resolved by re-running pnpm install (same approach the backport action uses).
  • No changeset needed — tarballs is private (not published).

Test plan

  • CI green (tarballs build + smoke check)
  • Tarballs preview deploys and renders the new Vite + Preact SPA

* tarballs: redesign preview tarballs index page

Rebuild the static index page produced by `tarballs/scripts/pack.ts`:

- Featured `workflow` package up top with prominent install command,
  copy button, and direct tarball download
- Top-of-page metadata chips: short SHA (linked to commit), branch,
  PR number, build timestamp, package count + total size
- Collapsible "What is this?" explainer
- Package-manager tab toggle (pnpm / npm / yarn / bun) that swaps the
  install command for every row in place
- Live filter input over the rest of the package list (with `/` shortcut)
- Per-row install command, copy button, and direct download
- Modern dark/light theme with system preference, Geist-inspired styling

Also captures tarball size during pack and renders human-readable byte counts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* tarballs: fix client-side interactivity broken by HTML-encoded JSON

`escapeHtml(JSON.stringify(catalog))` was HTML-encoding every quote in
the embedded catalog JSON to `&quot;`, so `JSON.parse(textContent)` threw
on the first character and the IIFE bailed before attaching any event
listeners — package-manager toggle, search filter, copy buttons, and the
`/` shortcut were all dead UI on the deployed page.

`<script type="application/json">` content is treated as text by the HTML
parser; the only sequence that can break out is `</script>` (or `</`
in legacy parsers). Replace `<` with the JSON `<` escape, which is
legal per the JSON spec and prevents the breakout without needing entity
encoding.

Also switch `formatBytes` from `KB`/`MB` to `KiB`/`MiB` since the
divisor is 1024.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* tarballs: rewrite as Vite + Preact SPA with file breakdown, fix bundling

Address TooTallNate's review feedback by replacing the hand-rolled HTML-
in-template-literal approach with a small Vite + Preact SPA. The old
~600 lines of inlined HTML/CSS/JS in `pack.ts` is now `~80 lines of TSX`,
fully type-checked.

Layout:
- `tarballs/index.html`, `vite.config.ts`, `tsconfig.json` at the root
- `src/main.tsx` mounts the Preact app and fetches `/catalog.json`
- `src/app.tsx` is the page (Header, FeaturedCard, PackageRow, etc.)
- `src/catalog.ts` is the shared types + helpers (`buildInstallCommand`,
  `formatBytes`)
- `src/icons.tsx`, `src/styles.css`
- `scripts/pack.ts` is now data-only — it scans packages, packs
  tarballs, and writes `public/catalog.json`

The eliminates several smells the reviewer called out:
- The interactive script is now TypeScript with strict mode and JSX
  type checking instead of an inline `<script>` block
- The `escapeHtml`-around-JSON-blob hack that broke client-side JS in
  the prior commit is gone; the SPA fetches `catalog.json` and parses
  it natively
- Pack-time logic and presentation logic no longer share a file

While verifying real tarball sizes I noticed `workflow-serde.tgz` was
only 828 bytes — it had `package.json`, `LICENSE.md`, `README.md` and
*nothing* else, because each package's `files: ["dist"]` excludes
sources but `dist/` hadn't been built. The Vercel build was running
`pnpm --filter tarballs build`, which only builds the `tarballs`
package itself — its workspace dependencies were never built.

Switch `vercel.json#buildCommand` to `pnpm turbo run build
--filter=tarballs`, which transitively builds dependencies first via
the `dependsOn: ["^build"]` rule already in the root `turbo.json`. With
the fix:

  workflow:        241 KiB  →  252 KiB tarball, 916 KiB unpacked, 205 files
  @workflow/core:   59 KiB  →  493 KiB tarball, 1.70 MiB unpacked, 236 files
  @workflow/serde: 828 B    →  1.4 KiB tarball, 4.6 KiB unpacked, 7 files

Add a smoke check that the `workflow` package has at least 5 files in
its tarball — catches the regression directly.

`pack.ts` now also runs `tar -tvzf` on each tarball and records the
file list with sizes. The SPA renders this as an expandable
"What's inside?" disclosure per package, grouped by top-level
directory (e.g. `dist/`, `docs/`) with proportional bars showing
each group's share of the unpacked size, and the largest files
listed below.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* tarballs: replace tar shell-out with in-process tar reader

The smoke check broke in CI: `'workflow' tarball only has 0 files`.
Root cause is that `tar -tvzf` emits a different verbose layout on GNU
tar (Linux, what CI runs) vs BSD tar (macOS, where I tested locally) —
the parser only matched the BSD column ordering, so on Linux every line
was rejected and `fileCount` came out as 0.

Replace the shell-out with a small in-process tar reader using
`zlib.gunzipSync` + manual 512-byte block walk. ustar headers are
trivially structured (name at offset 0, octal size at 124, typeflag at
156, ustar prefix at 345). We emit regular files only (`typeflag` `0`
or NUL) and consume but skip pax extended headers (`x`/`g`) and GNU
long-name entries (`L`). Result is identical on every platform.

Verified locally: 206 files / 998413 bytes for `workflow.tgz` matches
`tar -tvzf` exactly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* tarballs: redesign per-package details with packagephobia-style stats

The previous "What's inside?" view crammed nested directory groups,
proportional bars, and per-group file lists into a `<details>` inside
an already-narrow row. It was hard to read and harder to compare.

Replace it with the layout packagephobia uses on its result page:

- Two large headline metric tiles (Publish size / Unpacked size)
  with a big bold value, smaller unit, and small uppercase label.
  Modeled directly on packagephobia's `Stats` component but using
  our existing CSS variables so it tracks light/dark theme.
- A single sortable file table beneath. Default is size-descending so
  the contributors to package size are immediately visible. Click a
  header to flip direction or switch sort key. Sticky header keeps
  the columns visible inside the scrollable region.

Drop the `groupByTopLevel`, `ContentsGroup`, and bar-chart styles —
they were the source of the "hard to use" feedback and don't add
information that the flat sortable table doesn't already convey.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* tarballs: address Copilot review feedback (a11y, dev script, caching)

- main.tsx: drop `cache: 'no-store'` from the catalog fetch. Each
  tarballs deployment is immutable per commit, so HTTP caching is
  appropriate; forcing no-store made every visit re-download the full
  catalog (which now includes per-package file lists).
- app.tsx (search input): add `aria-label="Filter packages"`. The
  visible label only contained an icon and placeholder, so screen
  readers had no name for the control.
- app.tsx (PmTabs): replace `role="tablist"` / `role="tab"` /
  `aria-selected` with plain buttons that use `aria-pressed`. The
  ARIA tab pattern requires arrow-key roving focus we never wired
  up; toggle buttons are the honest representation. Each button
  also gets an explicit `aria-label`.
- app.tsx (row buttons): include the package name in the accessible
  label of every per-row copy/download button (and on the featured
  card too), so the screen reader buttons/links list distinguishes
  them. Added an `accessibleName` prop to `CopyButton`.
- app.tsx (CopyButton): only flip to the "Copied" state when the
  write actually succeeded. Both the modern `navigator.clipboard`
  path and the `execCommand` fallback can fail; the new
  `writeToClipboard` helper returns success and the button shows a
  short "Failed" state if both paths fail.

The previous `dev: vite` couldn't actually serve the page because
`/catalog.json` 404s and the SPA boots into the error fallback.

Restructure the build layout to vite's conventional shape:
- `public/` is now a true vite public dir — pack writes tarballs and
  catalog.json there. In dev, vite serves these at the root.
- `dist/` is the production build output (vite copies public/ into it
  and adds index.html + assets/).
- `vercel.json#outputDirectory` switches from `public` → `dist`.
- `turbo.json` outputs updated to match.
- `dev` chains pack before vite so the catalog exists when the dev
  server starts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 01:44
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment May 5, 2026 1:48am
example-nextjs-workflow-webpack Ready Ready Preview, Comment May 5, 2026 1:48am
example-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-astro-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-express-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-fastify-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-hono-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-nitro-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-nuxt-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-sveltekit-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-tanstack-start-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workbench-vite-workflow Ready Ready Preview, Comment May 5, 2026 1:48am
workflow-swc-playground Ready Ready Preview, Comment May 5, 2026 1:48am
workflow-tarballs Ready Ready Preview, Comment May 5, 2026 1:48am
workflow-web Ready Ready Preview, Comment May 5, 2026 1:48am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
workflow-docs Skipped Skipped May 5, 2026 1:48am

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 5, 2026

⚠️ No Changeset found

Latest commit: ec8138f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel vercel Bot temporarily deployed to Preview – workflow-docs May 5, 2026 01:44 Inactive
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 901 0 67 968
✅ 💻 Local Development 970 0 86 1056
✅ 📦 Local Production 970 0 86 1056
✅ 🐘 Local Postgres 970 0 86 1056
✅ 🪟 Windows 88 0 0 88
❌ 🌍 Community Worlds 139 83 0 222
✅ 📋 Other 492 0 36 528
Total 4530 83 361 4974

❌ Failed Tests

🌍 Community Worlds (83 failed)

mongodb (11 failed):

  • readableStreamWorkflow | wrun_01KQTX0N7V3DVWH9SJWDH81JAM
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQTX1ASAHSAX43KH50N1AKK9
  • webhookWorkflow | wrun_01KQTX1JV2EWPV0GM423BRSGNH
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KQTX4SQ8DSHDH6F9GM3300H5
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KQTX9PCNB0WG85WHSM4B93P8
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQTXGGNJJYPVGQW0SWTQG9S2

redis (7 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQTX1ASAHSAX43KH50N1AKK9
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KQTX9PCNB0WG85WHSM4B93P8
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQTXGGNJJYPVGQW0SWTQG9S2

turso (65 failed):

  • addTenWorkflow | wrun_01KQTX045MHAGNFQ53E9CJ4JE9
  • addTenWorkflow | wrun_01KQTX045MHAGNFQ53E9CJ4JE9
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KQTX2DTFD0GGEFD49REXJ7B0
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KQTX0BK88AW5ZX35P7E69J72
  • promiseRaceWorkflow | wrun_01KQTX0GC7Q2YKR3KRDSHWS7G0
  • promiseAnyWorkflow | wrun_01KQTX0JXVE3MJ2GXJ3MCBMTT0
  • importedStepOnlyWorkflow | wrun_01KQTX2T3S18XPZRW93NZ7ACZK
  • readableStreamWorkflow | wrun_01KQTX0N7V3DVWH9SJWDH81JAM
  • hookWorkflow | wrun_01KQTX0Z286Y6VEQ9HPTHFHPZC
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KQTX1ASAHSAX43KH50N1AKK9
  • webhookWorkflow | wrun_01KQTX1JV2EWPV0GM423BRSGNH
  • sleepingWorkflow | wrun_01KQTX1SFEK8FN9ACBP4J67Y8T
  • parallelSleepWorkflow | wrun_01KQTX2654JFQWX726W07RQANE
  • nullByteWorkflow | wrun_01KQTX29SQ4H5K5YEV2PWATQ7C
  • workflowAndStepMetadataWorkflow | wrun_01KQTX2DEJH9H5N3ENMB5H488H
  • outputStreamWorkflow no startIndex (reads all chunks)
  • outputStreamWorkflow positive startIndex (skips first chunk)
  • outputStreamWorkflow negative startIndex (reads from end)
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns correct index after stream completes
  • outputStreamWorkflow - getTailIndex and getStreamChunks getTailIndex returns -1 before any chunks are written
  • outputStreamWorkflow - getTailIndex and getStreamChunks getStreamChunks returns same content as reading the stream
  • outputStreamInsideStepWorkflow - getWritable() called inside step functions | wrun_01KQTX4SQ8DSHDH6F9GM3300H5
  • fetchWorkflow | wrun_01KQTX57ETH5EPEEZ01MT5D6D5
  • promiseRaceStressTestWorkflow | wrun_01KQTX59ZASNNQ7H84H40N6ZAK
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KQTX91FA762529T9QQNC7SGA
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KQTX9PCNB0WG85WHSM4B93P8
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KQTXABYJVKCBMR9FAJPZYNP6
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KQTXB11BR7RYF17XBJJ5RF6X
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KQTXBAK9N6MSXP9VTFP7PANH
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KQTXBJ42KGD3KJMZ1R9H1PGK
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KQTXBMG41QVS7QJSDSSYTDJX
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KQTXC5FF6FKZGRQ3ZVMNB6CY
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KQTXCBV0PY6G3DFG6TPC40EP
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KQTXCNDHJYFSV68NQW2VAYR2
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KQTXCVP4N35XC6HS0CJ4HGJA
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KQTXD2XXD73H46AZ24NX7B0W
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KQTXDA5E82QVTS78XKKYZ16F
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KQTXDH2E41Q97H0EBQGBP8A6
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KQTXDW7WAQH1JZ1CFWT4N96M
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KQTXE613P1YQ5R7TV1YZH23Q
  • cancelRun - cancelling a running workflow | wrun_01KQTXED8GAWEMGWB3MJAQHN67
  • cancelRun via CLI - cancelling a running workflow | wrun_01KQTXEQ0RC33MV4YKSJTB052F
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KQTXF3QZTPBQ5PSFYFH0G0BH
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KQTXFSQ4ZSESTN1X7DMRVP9X
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KQTXG4M1PMFRXNH5JBNSHQXF
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KQTXGBYPMZDNXYYQ0ZQEF81W
  • metadataFromHelperWorkflow - getWorkflowMetadata/getStepMetadata work from module-level helper (#1577) | wrun_01KQTXGE9VKW1VPYMC8K5SK90Y
  • resilient start: addTenWorkflow completes when run_created returns 500 | wrun_01KQTXGGNJJYPVGQW0SWTQG9S2

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 81 0 7
✅ example 81 0 7
✅ express 81 0 7
✅ fastify 81 0 7
✅ hono 81 0 7
✅ nextjs-turbopack 86 0 2
✅ nextjs-webpack 86 0 2
✅ nitro 81 0 7
✅ nuxt 81 0 7
✅ sveltekit 81 0 7
✅ vite 81 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 82 0 6
✅ express-stable 82 0 6
✅ fastify-stable 82 0 6
✅ hono-stable 82 0 6
✅ nextjs-turbopack-canary 69 0 19
✅ nextjs-turbopack-stable 88 0 0
✅ nextjs-webpack-canary 69 0 19
✅ nextjs-webpack-stable 88 0 0
✅ nitro-stable 82 0 6
✅ nuxt-stable 82 0 6
✅ sveltekit-stable 82 0 6
✅ vite-stable 82 0 6
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 82 0 6
✅ express-stable 82 0 6
✅ fastify-stable 82 0 6
✅ hono-stable 82 0 6
✅ nextjs-turbopack-canary 69 0 19
✅ nextjs-turbopack-stable 88 0 0
✅ nextjs-webpack-canary 69 0 19
✅ nextjs-webpack-stable 88 0 0
✅ nitro-stable 82 0 6
✅ nuxt-stable 82 0 6
✅ sveltekit-stable 82 0 6
✅ vite-stable 82 0 6
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 82 0 6
✅ express-stable 82 0 6
✅ fastify-stable 82 0 6
✅ hono-stable 82 0 6
✅ nextjs-turbopack-canary 69 0 19
✅ nextjs-turbopack-stable 88 0 0
✅ nextjs-webpack-canary 69 0 19
✅ nextjs-webpack-stable 88 0 0
✅ nitro-stable 82 0 6
✅ nuxt-stable 82 0 6
✅ sveltekit-stable 82 0 6
✅ vite-stable 82 0 6
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 88 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 5 0 0
❌ mongodb 58 11 0
✅ redis-dev 5 0 0
❌ redis 62 7 0
✅ turso-dev 5 0 0
❌ turso 4 65 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 82 0 6
✅ e2e-local-dev-tanstack-start-stable 82 0 6
✅ e2e-local-postgres-nest-stable 82 0 6
✅ e2e-local-postgres-tanstack-start-stable 82 0 6
✅ e2e-local-prod-nest-stable 82 0 6
✅ e2e-local-prod-tanstack-start-stable 82 0 6

📋 View full workflow run

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​preact/​preset-vite@​2.10.59910010090100
Addednpm/​preact@​10.29.110010010094100

View full report

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Backports the tarballs preview site redesign to stable, moving from a generated static public/index.html to a Vite + Preact SPA that reads a generated public/catalog.json and renders a richer tarball catalog (featured package, metadata chips, filtering, per-package install/copy/download, and contents breakdown).

Changes:

  • Generate public/catalog.json with tarball sizes + file listings during scripts/pack.ts, and build a SPA UI to render it.
  • Switch the Vercel build output from public/ to dist/ (Vite build output) while still copying tarballs + catalog.json through public/.
  • Extend tarballs smoke checks to validate catalog.json in addition to HTML + .tgz responses.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tarballs/vite.config.ts Adds Vite config for building the SPA into dist/.
tarballs/vercel.json Updates Vercel outputDirectory to serve dist/.
tarballs/turbo.json Updates Turbo cache outputs to include dist/** and public/catalog.json.
tarballs/tsconfig.json Adds TS config for the SPA + scripts.
tarballs/src/styles.css Adds new Geist-inspired styling, light/dark support, layout/components.
tarballs/src/main.tsx Bootstraps the app and loads /catalog.json.
tarballs/src/icons.tsx Adds inline SVG icons used by the UI.
tarballs/src/catalog.ts Defines catalog types + helpers for install commands and byte formatting.
tarballs/src/app.tsx Implements the SPA UI (featured workflow, metadata chips, filtering, copy/download, contents table).
tarballs/scripts/pack.ts Extends pack step to compute tarball sizes + file lists and emit catalog.json.
tarballs/scripts/check-tarballs-smoke.mjs Adds a smoke check validating /catalog.json content.
tarballs/package.json Updates scripts to run vite build after packing; adds Preact/Vite/TS dev deps.
tarballs/index.html Adds SPA entry HTML with #app root and module entrypoint.
tarballs/.gitignore Updates ignores for public/catalog.json and dist/.
pnpm-lock.yaml Lockfile updates for the new tarballs dev dependencies.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tarballs/scripts/pack.ts
Comment on lines 96 to +100
const packageNames = new Set(packages.map((p) => p.name));
const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: '';
const packed: PackedPackage[] = [];
Comment thread tarballs/scripts/pack.ts
await fs.mkdir(outDir, { recursive: true });

// Scan the packages directory for all packages
const packageDirs = await fs.readdir(packagesDir);
Comment thread tarballs/src/app.tsx
Comment on lines +112 to +116
{build.commitUrl ? (
<a class="chip" href={build.commitUrl} target="_blank" rel="noopener">
<CommitIcon />
<code>{build.shortSha}</code>
</a>
Comment thread tarballs/src/app.tsx
Comment on lines +125 to +130
<a
class="chip"
href={build.branchUrl}
target="_blank"
rel="noopener"
>
Comment thread tarballs/src/app.tsx
Comment on lines +139 to +141
<a class="chip" href={build.prUrl} target="_blank" rel="noopener">
<PrIcon /> PR #{build.pr}
</a>
Comment thread tarballs/src/app.tsx
<footer class="page">
Built from{' '}
{build.commitUrl ? (
<a href={build.commitUrl} target="_blank" rel="noopener">
@pranaygp pranaygp enabled auto-merge (squash) May 5, 2026 02:13
@pranaygp pranaygp merged commit 18fa7f4 into stable May 5, 2026
185 of 191 checks passed
@pranaygp pranaygp deleted the pgp/backport-tarball branch May 5, 2026 03:03
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.

3 participants