59876 refactor(template): migrate template edit form to Formik#246
Open
aicarma-artyom-maslov wants to merge 41 commits into
Open
59876 refactor(template): migrate template edit form to Formik#246aicarma-artyom-maslov wants to merge 41 commits into
aicarma-artyom-maslov wants to merge 41 commits into
Conversation
…ize persist Wire task form sections through useTaskForm so fields read and write Formik state, and persist template changes from a single onChange path in TaskFormPersistProvider. Co-authored-by: Cursor <cursoragent@cursor.com>
…dateTask batching
… failed activation
…ive (#253) Co-authored-by: macroscopeapp[bot] <170038800+macroscopeapp[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 25aed62. Configure here.
…f github-work:pneumaticapp/pneumaticworkflow into frontend/template/59876__migrate_edit_form_to_formik
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
High Risk
Large behavioral change to template save, activation, and draft/discard semantics across kickoff, tasks, and settings; incorrect baseline or reinitialize merging could lose edits or double-save.
Overview
Moves the Edit Template page off Redux-as-source-of-truth for field edits onto a root Formik
ITemplatestate wrapped byTemplateForm,useTemplateForm, andTemplateFormPersistProvider. User edits go throughuseTemplateField/useTaskForm(withTaskFormScopeProvider); the persist provider diffs against a baseline, deferspatchTemplate, mirrors saga isActive deactivation immediately, runs reference cleanup on kickoff/task changes, and supports consume / confirm / revert / abandon for activation and discard flows.Refactors the page shell:
TemplateEditdelegates init touseTemplateEditInit, task list CRUD touseTemplateEditTasks, and layout toTemplateEditLayout;TaskFormsplits into header/sections hooks and reads kickoff/tasks/variables from Formik so conditions and return-to stay fresh before debounced Redux sync. Kickoff, TemplateSettings, TemplateControlls, and KickoffShareForm drop directpatchTemplate/ template props in favor of form context; activation merges pending edits viaconsumePendingChanges. Autosave dispatches carry arequestIdso stale responses after discard or superseding edits are ignored in the saga.Tests cover persist, reinitialize, nested task paths, save retry, and
useTaskForm;TaskRenderExtraFieldsInforeturns null when there are no output fields.Reviewed by Cursor Bugbot for commit f0e60d9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Migrate template edit form state management from Redux to Formik
TemplateEditwith a Formik-backed form managed byuseTemplateForm,TemplateForm, andTemplateFormPersistProvider, centralizing template field updates and autosave.useTemplateField/useTaskFormcontext hooks instead of Redux props orpatchTemplatedispatches.TemplateFormPersistProvider, which diffs changes, debounces patches, de-duplicates in-flight saves by request ID, and supports confirm/revert flows for explicit saves.persistRequest.tsand skipped in the saga when superseded; late create responses still attach IDs and redirect.WorkflowLogTaskCompletewhencurrentTask.outputis undefined.template.idor a session key;KickoffReduxContainerno longer receives asetKickoffprop.Macroscope summarized f0e60d9.