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

   
   ### What changes were proposed in this PR?
   
   Give the frontend (and agent-service) the shared types and 
collaborative-graph hooks so a Form View loads into the same live collaborative 
workflow graph the canvas uses — filling the form is the same edit as changing 
the workflow, not editing a copy. No form UI here; that builds on this.
   
   - **Types** (`common/type/workflow.ts`): `FormFieldBinding` (one exposed 
input, bound to an operator property), `FormFieldOverride` (per-sub-field 
hide/rename), `FormBindingConfig` (instruction + fields + result operators), 
`getDefaultFormBinding()`. `WorkflowContent.formBinding` rides in `content`, so 
it is saved/cloned/versioned/published with the workflow for free. `isFormView` 
added to the workflow metadata.
   - **Collab model** (`WorkflowActionService`, `shared-model.ts`): 
form-binding state (`get`/`set`/`hydrateFormBinding` + `formBindingChanged$`), 
hydrated on load and serialized into content; a coeditor cursor now starts 
inactive until the mouse enters a canvas (a stray dot otherwise lingered on the 
Form View, which has no canvas to move over).
   - **Client** (`WorkflowPersistService.setFormView`): PUTs to the 
enable/disable-form-view endpoints from #8014.
   - **agent-service**: carries `formBinding` through opaquely, so an agent 
save can't drop it (which would leave `is_form_view = true` on a workflow whose 
form has no fields).
   
   ### Any related issues, documentation, discussions?
   
   Closes #8015. Part of the Form View parent issue #8011; builds on #8014.
   
   ### How was this PR tested?
   
   Frontend vitest (`workflow-action.service`, `shared-model`, 
`workflow-persist`) and agent-service `bun test` (`workflow-state`); full 
frontend suite green.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Co-authored with Claude Code.


-- 
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