carloea2 opened a new pull request, #3752:
URL: https://github.com/apache/texera/pull/3752

   ### Summary
   This PR makes **Workflow Settings → Data Transfer Batch Size** persist 
reliably by wiring the
   form control to a debounced `valueChanges` subscription that invokes
   `confirmUpdateDataTransferBatchSize(...)`. The previous behavior updated the
   FormControl but could fail to propagate/persist unless a manual handler 
fired.
   
   - Add: `valueChanges` → `map(Number)` → `filter(valid)` → 
`distinctUntilChanged` → `debounceTime(300)` → 
`confirmUpdateDataTransferBatchSize(v)`
   - Add: `untilDestroyed(this)` to avoid leaks
   
   The current persistence policy remains the same: only persist when the user 
is logged in.
   
   ## Rationale / Problem
   Users could change the batch size but see it not persist, because nothing 
triggered
   `setWorkflowDataTransferBatchSize(...)` and 
`WorkflowPersistService.persistWorkflow(...)`
   in a consistent way.
   
   ## Behavior (Before → After)
   - **Before**: Changing the input updated the form only; persistence was 
inconsistent.
   - **After**: Changing the input updates the workflow settings and triggers 
persistence
     *once* after the user stops typing for 300ms. Reloading the workflow shows 
the saved value.
   
   ## Repro (before this patch)
   1. Open a workflow.
   2. Go to **Workflow Settings**.
   3. Change **Data Transfer Batch Size** and click Left Panel/Versions; 
   4. Reload Settings: value reverts to default.
   
   ## Verification (after this patch)
   - Change the value; Go to Versions Tab; Go back to Settings; The new value 
is persisted
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to