Skip to content

Fix promptfiddle build #2168

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 15 commits into from
Jul 19, 2025
Merged

Fix promptfiddle build #2168

merged 15 commits into from
Jul 19, 2025

Conversation

aaronvg
Copy link
Contributor

@aaronvg aaronvg commented Jul 18, 2025

Important

Fixes build process and enhances SSR compatibility by updating dependencies and adding window checks across multiple files.

  • Build Process:
    • turbo.json: Simplified generate task dependencies to only include @boundaryml/baml#build.
    • vercel-build.sh: Updated build script to navigate to engine/baml-schema-wasm/web before building.
  • SSR Compatibility:
    • Added typeof window !== 'undefined' checks in PostHogPageView.tsx, TopNavbar.tsx, PosthogProvider.tsx, clientwrapper.tsx, command-s.tsx, JotaiProvider.tsx, Jotai.tsx, test-panel/index.tsx, sidebar.tsx, use-hide-on-scroll.tsx, and use-mobile.tsx to prevent execution of browser-specific code during SSR.
  • UI and Styling:
    • ProjectView.tsx: Changed layout to use flex-col and added overflow-y-auto for better scrolling.
    • globals.css: Adjusted --border and --input opacity values for better UI consistency.

This description was created by Ellipsis for 71529b0. You can customize this summary. It will automatically update as commits are pushed.

Copy link

vercel bot commented Jul 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baml ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2025 6:50pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to a15a336 in 1 minute and 11 seconds. Click for details.
  • Reviewed 147 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. turbo.json:60
  • Draft comment:
    Reduced 'generate' dependencies to only '@boundaryml/baml#build'. Ensure no essential build dependency was inadvertently removed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. typescript/apps/fiddle-web-app/app/[project_id]/_components/ProjectView.tsx:67
  • Draft comment:
    Changed main container layout from 'flex-row' to 'flex-col' with 'overflow-y-auto'. Verify this layout change is intended for all viewports.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. typescript/apps/fiddle-web-app/app/[project_id]/_components/ProjectView.tsx:149
  • Draft comment:
    Added 'overflow-y-auto' to the playground container. This helps manage vertical overflow in that section.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. typescript/apps/fiddle-web-app/vercel-build.sh:81
  • Draft comment:
    Added 'pnpm build' in the baml-schema-wasm directory to build the WASM component. Confirm this additional build step is needed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. typescript/packages/ui/src/styles/globals.css:70
  • Draft comment:
    Adjusted dark theme '--border' opacity from 22% to 10% and '--input' from 20% to 15%. Ensure these new values match the design specifications.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. typescript/packages/ui/src/styles/globals.css:207
  • Draft comment:
    Reformatted '--vscode-button-hover-background' and related properties into a multi-line format. No functional changes expected.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. typescript/apps/fiddle-web-app/app/[project_id]/_components/ProjectView.tsx:66
  • Draft comment:
    Typographical note: In the comment, "firefox wont apply the background color for some reason..." should use an apostrophe for "won't". Consider changing it to "Firefox won't apply the background color..." for proper spelling.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative and focuses on a typographical error in a comment, which does not affect the functionality or logic of the code. It does not provide a suggestion for code improvement or address any potential issues with the code itself.

Workflow ID: wflow_gMllJp8UL68omUZX

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed a6d94c4 in 30 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/vercel-build.sh:79
  • Draft comment:
    Changed directory to 'engine/baml-schema-wasm/web'. Please confirm that this relative path exists in all target environments.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_1OeoOG4GMfwFKxNf

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed bd749c2 in 1 minute and 19 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/vercel-build.sh:83
  • Draft comment:
    Changed 'cd ../../' to 'cd ../../../' to properly navigate back to the project root. Consider using pushd/popd or absolute paths for more robust directory navigation.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_ocZUUc3bMHcHxzO1

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 135ee5b in 34 seconds. Click for details.
  • Reviewed 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/package.json:19
  • Draft comment:
    New dependency '@gloo-ai/baml-schema-wasm-web' added. Ensure it’s required for the promptfiddle build and available in the workspace.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_54KUGl8mkHnpbVmt

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Skipped PR review on fcd89ea because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 6bc7164 in 37 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/vercel-build.sh:34
  • Draft comment:
    Cosmetic change: added a period to the comment for consistency.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_pWq9mmodNttDwSlt

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

codecov bot commented Jul 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Skipped PR review on 7f3964d because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed a556a6b in 35 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/vercel-build.sh:31
  • Draft comment:
    Minor style update: removed period from the comment for consistency. Ensure all comments follow the same punctuation style across the script.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_MpgwboXojNFhFyxS

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed 05054c3 in 1 minute and 36 seconds. Click for details.
  • Reviewed 79 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/app/page.tsx:1
  • Draft comment:
    Remove unused import if BAMLProject is not used.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The import is clearly added in the diff and does appear to be unused in the visible code. However, we need to consider that: 1) TypeScript would catch this automatically if it were truly unused 2) The type might be used implicitly through type inference 3) The loadProject or ProjectView components might require this type internally. I might be missing implicit type usage, and TypeScript's compiler would catch truly unused imports anyway. Since TypeScript already handles unused imports and this is a purely type-level import, this comment isn't providing valuable feedback that the build system wouldn't already catch. Delete the comment since it's pointing out something that would be caught by TypeScript's compiler anyway.
2. typescript/apps/fiddle-web-app/app/page.tsx:22
  • Draft comment:
    Avoid wrapping 'params' with Promise.resolve; it's already a Promise.
  • Reason this comment was not posted:
    Comment was on unchanged code.
3. typescript/apps/fiddle-web-app/app/page.tsx:4
  • Draft comment:
    Ensure that ProjectView works with SSR; if it relies on client-only hooks, ssr: false might be needed.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 50% <= threshold 50% The comment is asking the author to ensure that a component works with SSR, which is a form of asking for confirmation or verification. This violates the rule against asking the author to ensure behavior is intended or tested. However, it does provide a specific suggestion about using 'ssr: false', which could be useful.

Workflow ID: wflow_SCLvQRXuqDfbSrIG

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.


// We don't need this since it's already part of layout.tsx
// export const metadata: Metadata = {
// title: 'Prompt Fiddle',
// description: '...',
// }

export default function Home({
export default async function Home({
searchParams,
Copy link
Contributor

Choose a reason for hiding this comment

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

The 'searchParams' parameter is not used; consider removing it if unnecessary.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed ec1ed12 in 40 seconds. Click for details.
  • Reviewed 48 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/packages/playground-common/src/baml_wasm_web/JotaiProvider.tsx:54
  • Draft comment:
    Extract the SSR fallback object into a utility to avoid duplication with sessionStore.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. typescript/packages/playground-common/src/baml_wasm_web/JotaiProvider.tsx:91
  • Draft comment:
    Consider refactoring the SSR fallback for sessionStore into a shared helper to reduce code duplication.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_OlmJSC8TQxPJQxqx

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 56806cb in 1 minute and 17 seconds. Click for details.
  • Reviewed 147 lines of code in 10 files
  • Skipped 0 files when reviewing.
  • Skipped posting 10 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/app/PostHogPageView.tsx:14
  • Draft comment:
    Good: Added a 'typeof window !== "undefined"' check in the useEffect. This guards against SSR issues.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. typescript/apps/fiddle-web-app/app/[project_id]/_components/TopNavbar.tsx:47
  • Draft comment:
    Check: Early return on 'typeof window === "undefined"' ensures client-only code. Confirm that the finally block resets loading properly.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. typescript/apps/fiddle-web-app/app/_components/PosthogProvider.tsx:22
  • Draft comment:
    Good: The window check in the RB2BElement's effect prevents execution on the server side.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. typescript/apps/fiddle-web-app/app/embed/clientwrapper.tsx:51
  • Draft comment:
    Good: The onReset callback now safely checks if window exists before calling window.location.reload().
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. typescript/apps/fiddle-web-app/hooks/command-s.tsx:7
  • Draft comment:
    Good: The useEffect now returns early if window is undefined, preventing keybinding code on the server.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
6. typescript/packages/playground-common/src/shared/baml-project-panel/Jotai.tsx:20
  • Draft comment:
    Good: The fallback storage object prevents errors when window is undefined. This safely simulates localStorage in SSR.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. typescript/packages/playground-common/src/shared/baml-project-panel/playground-panel/prompt-preview/test-panel/index.tsx:25
  • Draft comment:
    Suggestion: For consistency, consider also adding a window check in the second onReset callback (used for rendering view) similar to the first one.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
8. typescript/packages/ui/src/components/sidebar.tsx:97
  • Draft comment:
    Good: The keyboard shortcut listener in SidebarProvider is wrapped with a window check to ensure client-only execution.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
9. typescript/packages/ui/src/hooks/use-hide-on-scroll.tsx:15
  • Draft comment:
    Good: The event listener for scroll is safely registered only when window exists.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
10. typescript/packages/ui/src/hooks/use-mobile.tsx:11
  • Draft comment:
    Good: Properly guards against SSR by checking if window is defined before using matchMedia.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_TPgtotU9W5I9324P

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed a118e3f in 39 seconds. Click for details.
  • Reviewed 25 lines of code in 2 files
  • Skipped 1 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. engine/baml-schema-wasm/web/package.json:10
  • Draft comment:
    Switching to '--release' is good, but update the inline comment if needed.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. typescript/apps/fiddle-web-app/package.json:19
  • Draft comment:
    Removed dependency '@gloo-ai/baml-schema-wasm-web'. Confirm this removal is intentional.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_uPca7fwNhHRnhxri

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Skipped PR review on 364c2f7 because no changed files had a supported extension. If you think this was in error, please contact us and we'll fix it right away.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 71529b0 in 1 minute and 8 seconds. Click for details.
  • Reviewed 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. typescript/apps/fiddle-web-app/app/page.tsx:11
  • Draft comment:
    The inserted empty comment (//) appears redundant. Remove if not needed.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While the suggestion is technically correct - the empty comment line is redundant and serves no purpose - this is an extremely minor issue. The comment is about a changed line, but it's so trivial that it doesn't warrant a PR comment. This falls under the "Do NOT make comments that are obvious or unimportant" rule. The empty comment line could potentially be serving as visual spacing between code blocks, which might have some minor aesthetic value. Even if it's for spacing, using an empty comment instead of a blank line is poor practice and unnecessary. However, this is still too trivial to warrant a PR comment. Delete this comment. While technically correct, it's too trivial of an issue to warrant a PR comment.

Workflow ID: wflow_jArWU1nu1hAuvtbq

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@aaronvg aaronvg added this pull request to the merge queue Jul 19, 2025
Merged via the queue into canary with commit f133efd Jul 19, 2025
22 of 23 checks passed
@aaronvg aaronvg deleted the fix-prompt-fiddle branch July 19, 2025 18:27
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