59876 frontend [ templates ] migrate template edit form to Formik#246
Open
aicarma-artyom-maslov wants to merge 49 commits into
Open
59876 frontend [ templates ] migrate template edit form to Formik#246aicarma-artyom-maslov wants to merge 49 commits into
aicarma-artyom-maslov wants to merge 49 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>
…f github-work:pneumaticapp/pneumaticworkflow into frontend/template/59876__migrate_edit_form_to_formik
pneumojoseph
previously approved these changes
Jul 7, 2026
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 8ccc55d. Configure here.
| if (key === 'Enter' || key === ' ') { | ||
| toogleFormIsShared(); | ||
| } | ||
| }} |
There was a problem hiding this comment.
Keyboard toggles share twice
Medium Severity
The share wrapper’s onKeyDown handler calls toogleFormIsShared on Enter/Space without preventDefault, while the same element also has onClick={toogleFormIsShared}. For a focusable role="button", the browser often fires a click after key activation, so one keypress can run the toggle twice and leave sharing unchanged.
Reviewed by Cursor Bugbot for commit 8ccc55d. Configure here.
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 refactor of template editing data flow and save/activate behavior; incorrect Formik vs Redux timing could cause stale UI, lost edits, or wrong autosave on enable.
Overview
This change finishes wiring the template edit surface to the Formik stack: kickoff, task sections, settings, and sidebar controls read and write through
useTemplateField/useTaskForminstead of Reduxconnect,patchTemplate, or per-field debouncedsetTemplatedispatches.TemplateEditis slimmed intoTemplateFormplusTemplateEditLayout, with task CRUD moved intouseTemplateEditTasksand page bootstrapping intouseTemplateEditInit.TaskFormis split into header/sections hooks (TaskFormHeader,TaskFormSections,useTaskFormParts); task fields update viatasks[index]paths so autosave stays in one place.KickoffReduxandKickoffShareFormuse the same pattern (share UI split intoKickoffLabels,SharedFormTab,EmbeddedFormTab).TemplateControllsusesuseTemplatePersistfor enable/save flows and is broken into navigation/settings subcomponents.Redux
connectcontainers for kickoff, task form, and controls are replaced with direct exports. Tests gainact-wrapped interactions, aTaskFormHarnessfor scoped task form tests, and new coverage foruseTaskFormanduseTemplateEditTasks(including merging delay edits onto live Formik state).Reviewed by Cursor Bugbot for commit 8ccc55d. 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.Changes since #246 opened
TaskFormHarnesscomponent andrenderTaskPerformersutility function that provideTemplateFieldContextandTaskFormScopeProviderdirectly without mounting a Formik form [a94700c]requireCompletionByAllcheckbox, andskipForStartercheckbox to userenderTaskPerformershelper and removed asynchronousflushPersistwaits [a94700c]jest.mockfor../../../../utils/createIdto spread actual module exports while overriding onlycreatePerformerApiName, and updated import paths forTaskFormScopeProviderandTemplateFieldContextto../../useTemplateForm/contexts[a94700c]TemplateFormPersistProvidercomponent to use scoped autosave persist requests [586fde2]useTemplateFormtests to use scoped autosave persist request helpers [586fde2]createOrUpdateTemplategenerator to accept an optionalrequestIdparameter and skip error handling, logging, and user notifications when the autosave persist request is no longer current by checkingisAutosavePersistRequestCurrent(requestId)in the catch block and returning null early, and updatedfetchSaveTemplategenerator to pass therequestIdwhen invokingcreateOrUpdateTemplate[df0af6a]createOrUpdateTemplatecompletes without error logging or user notifications when an autosave request becomes superseded mid-saga [df0af6a]TemplateFormPersistProviderrevert logic to restore consumed dirty state after failed explicit saves [d63a157]TemplateFormPersistProvidercomponent into a newuseTemplatePersistContextValuehook [b3978a0]connect()HOCs and migrated components to use React hooks for state management [b3978a0]TemplateControllscomponent into separate feature components [b3978a0]KickoffShareFormcomponent and extracted tab rendering into separate components [b3978a0]types.tsmodules [b3978a0]KickoffShareFormandKickoffLabels[b3978a0]getIsTeamInvitesModalOpenselector to team selectors module [b3978a0]TaskFormcomponent [b3978a0]CreateUserModaltest suite with Reactact[8ccc55d]collectTypesandfindNodeDeeptest utilities inCopyAttachmentPlugintests to functional style and wrapped editor read operation in Reactact[8ccc55d]📊 Macroscope summarized 817b2f9. 6 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.