feat: add auto submit for recipes that have been accepted#6325
feat: add auto submit for recipes that have been accepted#6325zanesq merged 9 commits intoblock:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds auto-submit functionality for recipes that have been accepted, allowing recipe prompts to be automatically submitted when a session is opened with a recipe but no existing messages.
Key changes:
- Added autoSubmit prop that flows from Pair.tsx through BaseChat.tsx to ChatInput.tsx
- Implemented logic to determine when auto-submission should occur based on recipe presence and conversation state
- Added useEffect in ChatInput to trigger submission when autoSubmit is true
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| ui/desktop/src/components/Pair.tsx | Added useChatStream hook and logic to calculate shouldAutoSubmit based on recipe and message state |
| ui/desktop/src/components/BaseChat.tsx | Added autoSubmit prop to component signature and passed it to ChatInput; moved recipe variable declaration earlier |
| ui/desktop/src/components/ChatInput.tsx | Added autoSubmit prop and useEffect to automatically submit initialValue when autoSubmit is true |
| ui/desktop/src/components/Hub.tsx | Explicitly set autoSubmit={false} to maintain existing Hub behavior |
50db9c4 to
67a815d
Compare
|
Thank you for working on this and the other PRs! Tagging @block/goose-maintainers @block/goose-core-maintainers for each to have a look ❤️ |
ae791fa to
d906c78
Compare
zanesq
left a comment
There was a problem hiding this comment.
Question about the logic: should this only auto submit if there is an initial prompt in the recipe?
Took it for a spin and noticed a couple usability issues:
- The recipe starts running behind the scenes before the param form is filled in, it shouldn't auto submit until the parameters are filled in if there are parameters in the recipe. Note the recipe is running in the screenshot below behind the param form.
- I noticed its flashing the accept recipe notice for recipes that have already been accepted and its not happening on main with the same recipe (see attached video, also attached the recipe file)
Kapture.2026-01-12.at.08.36.52.mp4
|
@Abhijay007 appreciate you taking this on.. after looking at this more the current approach feels overcomplex and brittle. I think we might want to rewrite this rather than tacking on more logic. Do you have any ideas to make this better keeping in mind that auto submit from hub is also brittle? It's ok if we decide to punt on this for now and we can come back to it later when we do an upcoming rewrite. |
I will look into that and share how we can improve this |
|
hi @Abhijay007 checking if you still want to work on this or should we close it? |
|
Hi @zanesq I will push changes soon am just got occupied I bit I will try to resolve few of my PRs tomorrow |
|
also this @Abhijay007 - if it is too much everything, just let us know and we can find a hand-off appreciate all the work |
9da4f72 to
9d69703
Compare
DOsinga
left a comment
There was a problem hiding this comment.
I don't think this is the right approach. we now have 4 scenario's for useAutoSubmit? and it has two extra parameters derived from the recipe state but then does an extra recipe substitution? we need to rethink this instead of making this more complicated
Hi @DOsinga I tried to simplify the auto-submit implementation based on your feedback. Instead of adding a 4th scenario with extra parameters, I made also added a parameter check to Scenario 1 to prevent auto-submit before params are filled. This removes all the complexity that you mentioned, while still addressing all three issues: only auto-submits if recipe has a prompt, waits for parameters to be filled, and no flashing accept modal. |
| setView('pair', { | ||
| disableAnimation: true, | ||
| resumeSessionId: session.id, | ||
| initialMessage: recipe.prompt ? { msg: recipe.prompt, images: [] } : undefined, |
There was a problem hiding this comment.
Passing the recipe prompt as initialMessage so it auto-submits using the existing Scenario 1 logic (same pattern as Hub) for ref see ui/desktop/src/components/Hub.tsx:63-67 where Hub does the same thing
There was a problem hiding this comment.
yes, I understand. ?:undefined === ?? is what I meant
| hasAutoSubmittedRef.current = true; | ||
| handleSubmit({ msg: '', images: [] }); | ||
| } | ||
| return; |
There was a problem hiding this comment.
this code is duplicated and I think it belongs in the caller
There was a problem hiding this comment.
yea, I will extract the parameter checking logic into a hasUnfilledParameters helper function to remove duplication between Scenario 1 and 3
There was a problem hiding this comment.
Wait, did you mean removing scenario 3?
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
…rameters Signed-off-by: Abhijay007 <[email protected]>
ec39cf5 to
69a79aa
Compare
Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]> Signed-off-by: Oleg Levchenko <[email protected]>
Update the 'Use Recipe' Desktop instructions to reflect the auto-submit change from PR #6325. Recipes now automatically submit and begin execution after acceptance, removing the need for users to manually click an activity bubble or send the prompt.
Update the 'Use Recipe' Desktop instructions to reflect the auto-submit change from PR #6325. Recipes now automatically submit and begin execution after acceptance, removing the need for users to manually click an activity bubble or send the prompt.
closes #6087
PR description
This PR adds auto-submit functionality for recipes that have been accepted, allowing recipe prompts to be automatically submitted when a session is opened with a recipe but no existing messages.
Type of Change
AI Assistance
Testing
Tested in the desktop UI on Windows with recipes that have a prompt
Screenshots/Demos (for UX changes)
Before:

After: