Skip to content

feat: ability to manage sub recipes in desktop ui#6360

Merged
jh-block merged 15 commits intoblock:mainfrom
Abhijay007:feat/subrecipeDesktop
Mar 23, 2026
Merged

feat: ability to manage sub recipes in desktop ui#6360
jh-block merged 15 commits intoblock:mainfrom
Abhijay007:feat/subrecipeDesktop

Conversation

@Abhijay007
Copy link
Copy Markdown
Collaborator

@Abhijay007 Abhijay007 commented Jan 6, 2026

closes #6083

PR Description

This PR adds the ability to manage sub-recipes in the desktop UI. Sub-recipes are recipes that can be called as tools during recipe execution, enabling multi-step workflows and reusable components.

Changes Made:

  • Added schema definition for sub-recipes with validation
  • Created modal and editor components for managing sub-recipes, both updating and adding by browsing
  • Integrated sub-recipe management into the recipe creation/editing workflow

Type of Change

  • Feature

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Copilot AI review requested due to automatic review settings January 6, 2026 18:27
@Abhijay007 Abhijay007 marked this pull request as draft January 6, 2026 18:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the ability to manage sub-recipes in the desktop UI, addressing issue #6083. Sub-recipes are recipes that can be called as tools during recipe execution, enabling multi-step workflows and reusable components.

Key changes:

  • Added schema definition for sub-recipes with validation
  • Created modal and editor components for managing sub-recipes
  • Integrated sub-recipe management into the recipe creation/editing workflow

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/desktop/src/components/recipes/shared/recipeFormSchema.ts Added Zod schema for SubRecipe type with validation rules matching the API
ui/desktop/src/components/recipes/shared/SubRecipeModal.tsx New modal component for adding/editing individual sub-recipes with form fields
ui/desktop/src/components/recipes/shared/SubRecipeEditor.tsx New editor component for managing the list of sub-recipes in a recipe
ui/desktop/src/components/recipes/shared/RecipeFormFields.tsx Integrated SubRecipeEditor into the main recipe form
ui/desktop/src/components/recipes/CreateEditRecipeModal.tsx Added sub-recipe handling when creating/editing recipes
ui/desktop/src/components/recipes/CreateRecipeFromSessionModal.tsx Initialized empty sub-recipes array in form data
ui/desktop/src/components/recipes/shared/__tests__/recipeFormSchema.test.ts Updated test data to include empty subRecipes array
ui/desktop/src/components/recipes/shared/__tests__/RecipeFormFields.test.tsx Updated test data across multiple test cases to include subRecipes field
ui/desktop/package-lock.json Dependency tree reorganization from npm install
Files not reviewed (1)
  • ui/desktop/package-lock.json: Language not supported

@zanesq
Copy link
Copy Markdown
Contributor

zanesq commented Jan 7, 2026

Tested it out looks great!

@zanesq
Copy link
Copy Markdown
Contributor

zanesq commented Jan 7, 2026

Only feedback is it would be nice for the user to be able to define the entire subrecipe on the fly also rather than have it predefined and a path etc.. or if they could at least browse for the file that would help for now and we can come back to the subrecipe creation ui later.

@lifeizhou-ap
Copy link
Copy Markdown
Collaborator

lifeizhou-ap commented Jan 7, 2026

@Abhijay007 Abhijay007 Thanks for your contributions! It looks great!

I have 2 small feedback on the UI.

1. "Edit Subrecipe" Screen

Screenshot 2026-01-08 at 8 51 08 am

The title Edit Subrecipe and the button label Update Subrecipe might be confusing to the users as this screen only modifies the sub recipe configuration in the recipe instead of the subrecipe. Maybe we could change to Configure Subrecipe as title and Apply as the button label?

2. Recipe without subrecipe
Screenshot 2026-01-08 at 8 57 15 am

The section No subrecipes configured with the "Add Your First Subrecipe" button" looks like that we can drag and drop the file into this section but actually not. Maybe we can remove this section as we already have the Add Subrecipe button?

WDYT?

cc: @zanesq

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

@Abhijay007 Abhijay007 marked this pull request as ready for review January 19, 2026 15:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

@lifeizhou-ap
Copy link
Copy Markdown
Collaborator

lifeizhou-ap commented Jan 28, 2026

Hi @Abhijay007,

Thank you so much for your contribution! The PR looks good!

I checked this PR out and did some testing, and found 2 bugs:

  1. The value section for sub recipe are not persisted. This happens for both Add existing subrecipe and Create new subrecipe

  2. When I create a new subrecipe, the subreicpe does appear in the recipe list. but in the main recipe, the path seems to be recipe id (3aff786da32b03de.yaml):

- name: my another recipe
  path: 3aff786da32b03de.yaml
  values: null
  sequential_when_repeated: false
  description: my another recipe  description

It took me a while to connect this with the new sub recipe, and it seems does not work when I start a new session to run the subrecipe. I feel we need to fix this so that user won't be confused.

  1. Minor UI polish (not a bug). Since you have added the subrecipe configuration, it would be great if we add "subrecip" here to let users' know this new feature.
Screenshot 2026-01-28 at 6 40 55 pm

@Abhijay007
Copy link
Copy Markdown
Collaborator Author

Hi @Abhijay007,

Thank you so much for your contribution! The PR looks good!

I checked this PR out and did some testing, and found 2 bugs:

  1. The value section for sub recipe are not persisted. This happens for both Add existing subrecipe and Create new subrecipe
  2. When I create a new subrecipe, the subreicpe does appear in the recipe list. but in the main recipe, the path seems to be recipe id (3aff786da32b03de.yaml):
- name: my another recipe
  path: 3aff786da32b03de.yaml
  values: null
  sequential_when_repeated: false
  description: my another recipe  description

It took me a while to connect this with the new sub recipe, and it seems does not work when I start a new session to run the subrecipe. I feel we need to fix this so that user won't be confused.

  1. Minor UI polish (not a bug). Since you have added the subrecipe configuration, it would be great if we add "subrecip" here to let users' know this new feature.
Screenshot 2026-01-28 at 6 40 55 pm

Thanks @lifeizhou-ap for the review I will surely fix it today

@Abhijay007 Abhijay007 force-pushed the feat/subrecipeDesktop branch from d8c32bd to a3bc0a4 Compare February 2, 2026 12:01
Copilot AI review requested due to automatic review settings February 2, 2026 12:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

@katzdave
Copy link
Copy Markdown
Contributor

katzdave commented Feb 5, 2026

@lifeizhou-ap can you take another look?

@Abhijay007 Abhijay007 force-pushed the feat/subrecipeDesktop branch from 9353280 to 1cb2d0b Compare February 23, 2026 08:17
Copilot AI review requested due to automatic review settings February 23, 2026 08:23
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9884262df3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@jh-block
Copy link
Copy Markdown
Collaborator

Thanks @Abhijay007 this looks good to me, the two Codex review comments above look like genuine issues to resolve though.

Signed-off-by: Abhijay007 <[email protected]>
Signed-off-by: Abhijay007 <[email protected]>
@Abhijay007 Abhijay007 force-pushed the feat/subrecipeDesktop branch from 9884262 to 96fedd6 Compare March 20, 2026 10:15
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 96fedd65ff

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d67eeeb856

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +284 to +288
disabled={
!name.trim() ||
!form.state.values.title.trim() ||
!form.state.values.description.trim() ||
!form.state.values.instructions.trim() ||
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Subscribe form state before gating subrecipe save button

The create button is disabled from form.state.values even though this component never subscribes to the form store, so these reads are not guaranteed to re-render with field edits. In practice, if the user enters name first and then fills title/description/instructions, the button can remain disabled until an unrelated local-state change happens, blocking the normal top-to-bottom flow. Drive this disabled state from form.Subscribe (or mirrored component state) so it updates whenever those form fields change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

@Abhijay007 Abhijay007 Mar 20, 2026

Choose a reason for hiding this comment

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

Minor regression can be done under small ui patch

@DOsinga DOsinga added needs_human label to set when a robot looks at a PR and can't handle it labels Mar 20, 2026
@jh-block jh-block added this pull request to the merge queue Mar 23, 2026
Merged via the queue into block:main with commit 79f539f Mar 23, 2026
21 checks passed
wpfleger96 added a commit that referenced this pull request Mar 23, 2026
* origin/main:
  fix: handle reasoning content blocks in OpenAI-compat streaming parser (#8078)
  chore(acp): build native packages on latest mac (#8075)
  Display delegate sub agents logs in UI (#7519)
  Update tar version to avoid CVE-2026-33056 (#8073)
  refactor: consolidate duplicated dependencies into workspace (#8041)
  tui: set up for publishing via github actions (#8020)
  feat: feature-gate local inference dependencies (#7976)
  feat: ability to manage sub recipes in desktop ui (#6360)
lifeizhou-ap added a commit that referenced this pull request Mar 24, 2026
* main: (37 commits)
  fix: handle reasoning content blocks in OpenAI-compat streaming parser (#8078)
  chore(acp): build native packages on latest mac (#8075)
  Display delegate sub agents logs in UI (#7519)
  Update tar version to avoid CVE-2026-33056 (#8073)
  refactor: consolidate duplicated dependencies into workspace (#8041)
  tui: set up for publishing via github actions (#8020)
  feat: feature-gate local inference dependencies (#7976)
  feat: ability to manage sub recipes in desktop ui (#6360)
  Tweak the release process: no more merge to main (#7994)
  fix: gemini models via databricks (#8042)
  feat(apps): Pass toolInfo to MCP Apps via hostContext (#7506)
  fix: remove configured marker when deleting oauth provider configuration (#7887)
  docs: add vmware-aiops MCP extension documentation (#8055)
  Show setup instructions for ACP providers in settings modal (#8065)
  deps: replace sigstore-verification with sigstore-verify to kill vulns (#8064)
  feat(acp): add session/set_config and stabilize list, delete and close (#7984)
  docs: Correct `gosoe` typo to `goose` (#8062)
  fix: use default provider and model when provider in session no longer exists (#8035)
  feat: add GOOSE_SHELL env var to configure preferred shell (#7909)
  fix(desktop): fullscreen header bar + always-visible close controls (#8033)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs_human label to set when a robot looks at a PR and can't handle it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ability to manage sub recipes in desktop ui

8 participants