-
Notifications
You must be signed in to change notification settings - Fork 122
Normalize Workbenches #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4398b5f
Normalize Workbenches
pranaygp 35bc72c
Add claude demo command
pranaygp b7e4c38
fix: normalize workbench tests (#292)
adriandlam 12ad858
refactor: add top level resolve symlinks script
adriandlam e28cfa9
fix: cleanup builder directories (#319)
adriandlam a7979da
refactor(nitro): use suppressUndefinedRejections
adriandlam eb0931e
revert: sveltekit builder
adriandlam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@workflow/nitro": patch | ||
| --- | ||
|
|
||
| Add Vite middleware to handle 404s in workflow routes from Nitro and silence undefined unhandled rejections |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@workflow/sveltekit": patch | ||
| --- | ||
|
|
||
| Fix SvelteKit plugin reading deleted files on HMR |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| description: Run the 7_full demo workflow | ||
| allowed-tools: Bash(curl:*), Bash(npx workflow:*), Bash(pnpm dev) | ||
| --- | ||
|
|
||
|
|
||
| Start the $ARUGMENTS workbench (default to the nextjs turboback workbench available in the workbenches directory). Run it in dev mode, and also start the workflow web UI (run `npx workflow web` inside the appropriate workbench directory). | ||
|
|
||
| Then trigger the 7_full.ts workflow example. you can see how to trigger a specific example by looking at the trigger API route for the workbench - it is probably just a POST request using bash (maybe curl) to this endpoint: <http://localhost:3000/api/trigger\?workflowFile\=workflows/7_full.ts\&workflowFn\=handleUserSignup>> |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
hotUpdatehook in the Nitro Vite plugin callsbuilder.build()without error handling when a workflow file changes. This can cause unhandled promise rejections that crash the dev server.View Details
📝 Patch Details
Analysis
Unhandled builder.build() errors in Nitro Vite plugin hotUpdate hook
What fails: The Nitro Vite plugin's
hotUpdatehandler at lines 80 and 104 callsawait builder.build()without error handling. Whenbuilder.build()throws an error (e.g., from esbuild compilation failures during file modifications), this causes an unhandled promise rejection that can crash or destabilize the Vite dev server.How to reproduce:
'use workflow')hotUpdatehook triggers builder.build()Result: Dev server crashes or becomes unstable with unhandled promise rejection. Server logs show rejection from builder.build() without proper error handling.
Expected: Errors from builder.build() should be caught, logged, and gracefully handled without crashing the dev server. A page reload should still be triggered to allow developers to fix the error and recover.
Evidence: The SvelteKit plugin in the same codebase (packages/sveltekit/src/plugin.ts, lines 141-148 and 149-159) implements identical logic with proper try-catch error handling around both
builder.build()calls. These were added in commit b2c6e3b ("fix: normalize workbench tests #292") along with comments noting "Build might fail if files are being deleted during test cleanup". The Nitro plugin was not updated in that commit despite having the same vulnerability pattern. Per Vite issue #20835 and PR #18713, unhandled errors in plugin hooks can cause issues - Vite itself fixed similar unhandled rejection bugs in its full reload handler.