yangzhang75 opened a new pull request, #8351: URL: https://github.com/apache/texera/pull/8351
### What changes were proposed in this PR? `workflowSettings` and the Form View definition (`formBinding`) were held as per-client private fields on `WorkflowActionService`, outside the Yjs shared document. Because autosave persists the whole workflow content, a co-editor whose private copy was stale would overwrite another editor's change on their next canvas edit -- a lost update (#8315). This moves both into the shared model: * A shared `contentMetaMap` (`Y.Map`, keyed `"settings"` / `"formBinding"`) is added to `SharedModel`, alongside the graph maps, so it syncs live and every autosave writes the current value rather than a stale copy. It is deliberately kept out of the undo manager, matching the previous (non-undoable) behavior of these values. * `getWorkflowSettings` / `setWorkflowSettings` / `getFormBinding` / `setFormBinding` / `hydrateFormBinding` / `getWorkflowContent` now read and write the shared map. * An observer republishes a `formBinding` change -- from a local edit or a co-editor -- on `formBindingChanged$`, so the Form View re-renders and the existing autosave picks it up. The observer skips the reload seed (gated on the reloading flag), so opening a workflow is not announced as an edit, the same way the graph seed is handled. Whole-value last-writer-wins is accepted for now; field-level Y-types are a possible future refinement. ### Any related issues, documentation, discussions? Closes #8315. ### How was this PR tested? Unit tests (vitest): `workflow-action.service.spec` and `shared-model.spec` pass (79 tests). Rewrote the "opening a workflow stays silent" test to drive the real reload path, and added a test that a co-editor's write to the shared map reaches `formBindingChanged$`. 100% coverage of the lines this PR adds. ### Was this PR authored or co-authored using generative AI tooling? Yes. Co-authored with Claude (Anthropic), reviewed line by line by the author before submission. -- 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]
