Skip to content

Conversation

@NathanFlurry
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member Author

NathanFlurry commented Feb 10, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Feb 10, 2026

PR Review: Clean up vite hacks

Summary

This PR removes Vite-specific workarounds for fdb-tuple module resolution and simplifies the ActorDefinition.instantiate() method. The changes include:

  • Removing fdb-tuple-shim.mjs files from sandbox examples
  • Removing Vite alias configuration
  • Simplifying instantiate() from async with dynamic imports to synchronous direct import

✅ Positive Aspects

  1. Code Simplification: The changes significantly reduce complexity by removing workarounds that are no longer needed.

  2. Bundle Size Impact: Converting to a direct import at the module level means the server-side dependencies will be included in browser bundles if the ActorDefinition class is used in browser code. However, this appears intentional and suggests the underlying issue has been resolved.

  3. Cleaner Architecture: Removing the tsx/cjs fallback logic makes the code more maintainable.


🔍 Concerns & Questions

1. Breaking Change in Import Style (rivetkit-typescript/packages/rivetkit/src/actor/definition.ts:4)

The import changed from:

import type { ActorInstance } from "./instance/mod";

to:

import { ActorInstance } from "./instance/mod";

Issue: This is a non-type import, meaning ActorInstance and all its dependencies will be bundled even in browser builds that only use the type.

Recommendation: Consider keeping this as a type-only import and restoring the dynamic import pattern, OR ensure tree-shaking is configured properly to eliminate server-only code from browser bundles.

2. Synchronous vs Asynchronous API Change (rivetkit-typescript/packages/rivetkit/src/actor/definition.ts:35-37)

The method signature changed from:

async instantiate(): Promise<ActorInstance<...>>

to:

instantiate(): ActorInstance<...>

Potential Breaking Change: Any code calling await definition.instantiate() will still work, but this is technically a breaking API change. Code that relies on the Promise return type could break.

Recommendation:

  • Document this as a breaking change in the PR description
  • Search the codebase for all call sites and verify they handle the synchronous return correctly
  • Consider adding a deprecation notice if maintaining backwards compatibility is important

3. Missing Context in PR Description

The PR body uses the default template without explaining:

  • Why these hacks were originally needed
  • What changed to make them unnecessary
  • Whether this relates to a Vite version upgrade or fix in fdb-tuple
  • Testing performed to verify browser bundles don't include server-only code

Recommendation: Update the PR description with proper context about what issue these hacks were solving and why they're no longer needed.

4. Vercel Example Generation

Per CLAUDE.md guidelines, changes to examples should trigger Vercel example regeneration.

Recommendation: Run ./scripts/vercel-examples/generate-vercel-examples.ts to ensure sandbox-vercel is properly updated.


🧪 Testing Recommendations

  1. Bundle Analysis: Verify that browser bundles don't include fdb-tuple, traces, or other server-only dependencies when using ActorDefinition in client code.

  2. Example Testing:

    • Test the sandbox example in both local and Vercel environments
    • Verify no module resolution errors occur
  3. Instantiation Testing:

    • Run tests that call instantiate() to ensure the synchronous change doesn't break anything
    • Check if any code depends on the Promise behavior
  4. Type Checking: Verify no type errors were introduced by changing the import style.


📋 Action Items

  • Update PR description with proper context
  • Document the breaking change in instantiate() signature
  • Verify all call sites of instantiate() handle synchronous return
  • Run bundle analysis on browser builds
  • Confirm Vercel examples are regenerated if needed
  • Add a test to prevent regression (ensure server deps don't leak to browser)

Conclusion

The changes are a positive cleanup that removes technical debt, but the PR needs:

  1. Better documentation about the context
  2. Verification that browser bundles don't include server-only code
  3. Acknowledgment of the breaking API change

The code quality is good and follows the repository's patterns. Once the concerns above are addressed, this should be safe to merge.

Overall Assessment: ⚠️ Approve with comments - please address the bundle size and breaking change concerns.

@NathanFlurry NathanFlurry marked this pull request as ready for review February 10, 2026 08:39
@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 10, 2026

Merge activity

  • Feb 10, 8:45 AM UTC: NathanFlurry added this pull request to the Graphite merge queue.
  • Feb 10, 8:46 AM UTC: CI is running for this pull request on a draft pull request (#4166) due to your merge queue CI optimization settings.
  • Feb 10, 8:47 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #4081.
  • Feb 10, 8:48 AM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #4081.
  • Feb 10, 7:35 PM UTC: NathanFlurry added this pull request to the Graphite merge queue.
  • Feb 10, 7:36 PM UTC: CI is running for this pull request on a draft pull request (#4167) due to your merge queue CI optimization settings.
  • Feb 10, 7:36 PM UTC: Merged by the Graphite merge queue via draft PR: #4167.

graphite-app bot pushed a commit that referenced this pull request Feb 10, 2026
# Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
@NathanFlurry NathanFlurry force-pushed the 02-09-fix_clean_up_vite_hacks branch from c1ea946 to e554d7e Compare February 10, 2026 19:25
@NathanFlurry NathanFlurry force-pushed the 02-07-feat_workflow_connect_workflow_visualizer_with_live_data branch from c8b012a to cef229d Compare February 10, 2026 19:25
graphite-app bot pushed a commit that referenced this pull request Feb 10, 2026
# Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
@graphite-app graphite-app bot closed this Feb 10, 2026
@graphite-app graphite-app bot deleted the 02-09-fix_clean_up_vite_hacks branch February 10, 2026 19:36
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