Skip to content

fix: exclude extensions from release build#1947

Merged
yujonglee merged 1 commit intomainfrom
devin/1764230245-fix-extensions-build
Nov 27, 2025
Merged

fix: exclude extensions from release build#1947
yujonglee merged 1 commit intomainfrom
devin/1764230245-fix-extensions-build

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Nov 27, 2025

Summary

Fixes the release build failure caused by Rollup trying to resolve @hypr/ui/components/ui/button from the extensions folder. The extensions/ folder contains example extensions that are meant to be loaded at runtime, not bundled at build time.

This PR removes:

  • The @extensions alias from vite.config.ts
  • The @extensions/* path mapping from tsconfig.json
  • The import.meta.glob that was bundling extension UI components

The bundledExtensionComponents export is preserved as an empty object to maintain API compatibility. Extensions should be loaded at runtime via the extensions plugin.

Review & Testing Checklist for Human

  • Verify the release build passes - This was the original issue; confirm the build no longer fails with the @hypr/ui resolution error
  • Confirm runtime extension loading is the intended architecture - The dynamicExtensionComponents object exists but isn't populated yet; verify this aligns with the planned extension system
  • Check if any features depend on bundled extensions - The hello-world extension will no longer be available unless loaded at runtime

Test plan: Run pnpm -F desktop tauri build and verify it completes without the Rollup resolution error.

Notes

Extensions are meant to be loaded at runtime, not bundled at build time.
This removes the @extensions alias and glob import that was causing the
release build to fail when trying to resolve @hypr/ui imports from the
extensions folder.

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 2d300fb
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/6928057c58a4100008b8acf2
😎 Deploy Preview https://deploy-preview-1947--hyprnote-storybook.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.

@netlify
Copy link

netlify bot commented Nov 27, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 2d300fb
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6928057cc17dce00087df412
😎 Deploy Preview https://deploy-preview-1947--hyprnote.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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 27, 2025

📝 Walkthrough

Walkthrough

Extension loading transitions from build-time bundling to runtime loading. Build-time eager loading of bundled extension modules is removed from the registry initialization. The "@extensions" path alias is removed from both TypeScript and Vite configurations to support this runtime-based approach.

Changes

Cohort / File(s) Change Summary
Build-time extension bundling removal
apps/desktop/src/components/main/body/extensions/registry.ts, apps/desktop/tsconfig.json, apps/desktop/vite.config.ts
Removed eager global loading of bundled extension UI modules at build time (bundledExtensionModules import.meta.glob). Removed "@extensions" path alias mappings from TypeScript and Vite configurations. The exported bundledExtensionComponents constant remains but is now initialized as an empty record, with extensions loading at runtime via the extensions plugin instead. Public API signatures unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that runtime extension loading mechanisms in the extensions plugin are properly implemented to replace build-time bundling
  • Confirm that removing the "@extensions" alias doesn't break any unreviewed runtime imports elsewhere in the codebase
  • Ensure bundledExtensionComponents being empty doesn't cause downstream errors in components expecting pre-bundled extension data

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: exclude extensions from release build' directly describes the main change: removing extension-related configurations to fix the release build failure.
Description check ✅ Passed The description is well-related to the changeset, explaining why the changes were made (Rollup resolution error), what was removed, and how it impacts the system.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1764230245-fix-extensions-build

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d86970 and 2d300fb.

📒 Files selected for processing (3)
  • apps/desktop/src/components/main/body/extensions/registry.ts (1 hunks)
  • apps/desktop/tsconfig.json (1 hunks)
  • apps/desktop/vite.config.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • apps/desktop/vite.config.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Agent implementations should use TypeScript and follow the established architectural patterns defined in the agent framework
Agent communication should use defined message protocols and interfaces

Files:

  • apps/desktop/src/components/main/body/extensions/registry.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/desktop/src/components/main/body/extensions/registry.ts
🧠 Learnings (1)
📚 Learning: 2025-11-24T16:32:13.593Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: packages/nango/.cursor/rules/nango.mdc:0-0
Timestamp: 2025-11-24T16:32:13.593Z
Learning: Applies to packages/nango/**/models.ts : Do NOT edit the models.ts file - it is automatically generated at compilation time

Applied to files:

  • apps/desktop/tsconfig.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: ci (linux, depot-ubuntu-24.04-8)
  • GitHub Check: ci (macos, depot-macos-14)
  • GitHub Check: ci (linux, depot-ubuntu-22.04-8)
  • GitHub Check: fmt
🔇 Additional comments (2)
apps/desktop/src/components/main/body/extensions/registry.ts (1)

7-12: Comments clearly document the new runtime-only extensions behavior

The added comments make the architectural change explicit while keeping bundledExtensionComponents for API compatibility. This aligns well with excluding extensions from the release build.

apps/desktop/tsconfig.json (1)

23-25: No remaining @extensions/* imports found — concern is unwarranted

The codebase contains no usages of the removed @extensions/* alias, so the path alias removal will not cause compilation failures. The migration to runtime loading has already been completed throughout the codebase.


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

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