xuang7 opened a new issue, #7517:
URL: https://github.com/apache/texera/issues/7517

   ### Feature Summary
   
   Texera has ~160 operators, but most of them currently do not have demo 
videos. Recording and maintaining a separate demo manually for every operator 
does not scale.
   
   This proposal introduces a Playwright-based tool that automatically 
generates a short demo video for each operator, showing how the operator is 
added to a workflow, what values to enter in its form, and what output or 
behavior to expect.
   
   Operator authors need to maintain the sample field values for their 
operators. Everything after that would be generated deterministically by shared 
automation maintained in one central place. The videos would be regenerated as 
part of each major release and hosted online.
   
   As an additional benefit, the generation process exercises the full operator 
workflow end to end: logging in, creating a workflow, dragging an operator onto 
the canvas, filling in its properties, running the workflow, and viewing the 
results. This also provides end-to-end coverage for common operator 
interactions.
   
   ### Proposed Solution or Design
   
   A Playwright-based generator that produces one short demo video per 
operator, driven by agent-generated sample values that are reviewed by the 
operator author.
   
   1. Agent-generated sample values, reviewed by the author.
   Each operator has an entry in `operator-field-values.json` describing the 
values to populate in its form. These values are generated by an agent using 
the operator schema together with the sample dataset, so fields that depend on 
dataset columns can be populated with valid examples. The operator author 
reviews the generated values before they are committed. A validator checks each 
entry against the operator's actual schema and the sample dataset so that 
unknown fields, invalid value types, and references to non-existent columns 
fail early.
   
   2. Deterministic script generation.
   `OperatorScriptGenerator` reads the operator metadata and reviewed sample 
values, selects the appropriate workflow template and wiring strategy based on 
the operator group and port topology (for example, source, single-input, or 
multi-input), and emits a per-operator script. The same inputs always produce 
the same script, and no LLM is involved at this stage.
   
   3. Recorded execution.
   Shared controllers drive a real browser through the demo flow: opening the 
prepared workflow, dragging the operator onto the canvas, filling in its 
properties, running the workflow, and opening the result panel. Recording 
begins after the sample workflow is imported.
   
   4. Publishing.
   Generated videos are written locally. A maintainer publishes them 
externally, for example to YouTube. Regeneration is performed as part of each 
major release.
   
   Architecture diagram:
   
   <img width="623" height="533" alt="architecture" 
src="https://github.com/user-attachments/assets/36b91763-8273-48f4-9f3c-40f0f9a7475b";
 />
   
   Sample video:
   
   
[line-chart_demo.webm](https://github.com/user-attachments/assets/4e184a50-0f68-4beb-a5bb-25f63e7b7681)
   
   
   This proposal adds a new `Docs` sbt module with a Playwright dependency. No 
LLM code or API keys are included in the repository. The agent is only used 
during the offline sample-value generation step, while the reviewed 
configuration is the only generated input committed to the repository.
   
   #### Future improvements
   A possible future extension is to use an LLM-assisted repair loop when 
generation or execution fails, especially since the current implementation 
relies heavily on UI interactions. For example, the agent could inspect 
validation errors or failed Playwright runs and suggest or automatically 
generate corrected sample values or interaction steps. This would remain 
separate from the deterministic generation path described above and could be 
explored once the initial workflow is stable.
   
   Discussion: #6871
   
   ### Affected Area
   
   _No response_


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