Skip to content

Load bundled hub-pi extension#75

Merged
ricardoraposo merged 2 commits into
mainfrom
rick-arvore/-/optimize-pi-extension-startup
Jul 20, 2026
Merged

Load bundled hub-pi extension#75
ricardoraposo merged 2 commits into
mainfrom
rick-arvore/-/optimize-pi-extension-startup

Conversation

@ricardoraposo

@ricardoraposo ricardoraposo commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • load @arvoretech/hub-pi from its bundled dist/index.js instead of raw TypeScript sources
  • publish only the built dist artifacts and build automatically during packing
  • add a manifest regression test for the published Pi extension entry

Why

Profiling showed raw source loading costs about 80 ms per Pi startup. Loading the existing bundle reduced that cost to about 19 ms in isolation and saved about 82 ms in the complete extension stack.

Validation

  • pnpm --filter @arvoretech/hub-pi lint
  • pnpm --filter @arvoretech/hub-core build
  • pnpm --filter @arvoretech/hub-pi build
  • pnpm --filter @arvoretech/hub-pi test (8 tests)
  • pnpm pack tarball inspection
  • clean temporary install and fresh Pi RPC load from the manifest-declared dist/index.js

Summary by CodeRabbit

  • Bug Fixes
    • Improved package publishing to include only the built distribution files.
    • Updated the runtime extension path to reference the packaged build output.
  • Chores
    • Added an automatic build step before packaging to keep published artifacts up to date.
    • Added automated checks to validate package metadata (publishing files, extension path, and packaging scripts).

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4db27a9c-781a-43f8-8b49-eccd8ed7bb95

📥 Commits

Reviewing files that changed from the base of the PR and between 3984c79 and 5abc7f9.

📒 Files selected for processing (1)
  • packages/pi/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/pi/package.json

📝 Walkthrough

Walkthrough

The pi package manifest now restricts publication to dist, points the extension entry to the built output, bumps the version, and runs the build before packing. A Vitest test verifies these manifest fields and scripts.

Changes

pi package publication

Layer / File(s) Summary
Manifest publication settings and validation
packages/pi/package.json, packages/pi/src/package-manifest.test.ts
The package version is updated to 1.5.5, publication targets dist, the extension references ./dist/index.js, prepack runs pnpm build, and tests verify these settings alongside the existing build script.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: loading the hub-pi extension from the bundled build output.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rick-arvore/-/optimize-pi-extension-startup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
rhm-website Ready Ready Preview, Comment Jul 20, 2026 12:05pm

Request Review

@ricardoraposo
ricardoraposo merged commit 58a57d8 into main Jul 20, 2026
6 checks passed
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