Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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. Comment |
commit: |
| // Only submit inline steps if all messages in the batch are inline. | ||
| // This ensures we only write journal entries when we have all responses. | ||
| const allInline = messages.every((m) => m.inline); |
There was a problem hiding this comment.
We should submit all and run what we can inline, we have a check below for only moving forward if we have results for every step we started (we don't want to make some progress on some promises that might not be the order they were resolved before - technically a prefix would be correct I think)

TL;DR
Added inline execution support for workflow queries and mutations, allowing them to run within the same transaction as the workflow instead of being dispatched through the work pool.
What changed?
shareTransactionoption to workflow definitions that enables inline execution by default for queries and mutationsinlineoption to override the default behavior for individual function callsstartStepsthat runs queries and mutations directly within the workflow transactionworkIdoptional for inline stepsHow to test?
Run the new test suite in
example/convex/inlineTest.test.tswhich covers:Why make this change?
This change eliminates the round-trip overhead of dispatching queries and mutations through the work pool when they can safely execute within the workflow's transaction. This improves performance for workflows that primarily use queries and mutations, while maintaining the existing behavior for actions and providing flexibility through per-call overrides.