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

   ### What changes were proposed in this PR?
   
   Every operator gets an optional **description**: a short markdown note 
explaining what the step is for. Teammates read it in the property panel, and 
the AI agent reads it as context.
   
   <!-- IMAGE: before / after property panel (comparison/before-after.png) -->
   _[Screenshot placeholder: before / after]_
   
   | | |
   |---|---|
   | **Where it lives** | New optional `description` field on the operator, 
saved with the workflow. Export, import and versions include it. |
   | **Editing** | Below the operator name. Markdown, max 4000 chars, 
live-synced to co-editors (Yjs text, so concurrent edits merge). A banner warns 
if someone else changed it while you were editing. |
   | **Execution** | Never sent to the engine. |
   | **Older Texera** | Loads fine. Older versions ignore the field and keep it 
on save. |
   | **Agent** | Can set it on add / modify. Reads it fenced with `\|`, capped 
per operator and per context, and is told it is a note, never instructions. |
   | **Safety** | Raw HTML is shown as text. Only http, https and mailto links. 
|
   
   ```
   User / agent ──writes──▶ operator.description ──saved in──▶ workflow content
                                    │
                ┌───────────────────┼────────────────────┐
                ▼                   ▼                    ▼
          property panel      agent context         logical plan
          (sanitized md)    (fenced, capped)        (excluded)
   ```
   
   Also fixes an existing gap: `addOperator` now respects the agent's allowed 
operator types.
   
   ### Any related issues, documentation, discussions?
   
   Closes #9340
   
   ### How was this PR tested?
   
   **Unit tests** (frontend `yarn test:ci`, agent-service `bun test`):
   - Graph / shared model: set, clear, undo/redo, remote edit from a second 
Y.Doc, concurrent merge, non-string values.
   - Editor component: save, cancel, keyboard shortcuts, conflict banner, 
locked mode, switching operators mid-edit.
   - Export → import round trip; legacy JSON without the field; logical plan 
excludes it.
   - Agent: fencing against forged headings, line-ending normalization, 
truncation (incl. emoji), total budget, tool schema limits, allowlist.
   
   **Manual compatibility check** (Chrome):
   1. On this branch, add descriptions and **Export**.
   2. **Upload** into upstream `main`; move an operator and change Limit 100 → 
50; **Export**.
   3. **Upload** back into this branch: descriptions are intact and `main`'s 
edits are kept.
   
   <!-- IMAGE: compatibility round trip (comparison/compat-round-trip.png) -->
   _[Screenshot placeholder: compatibility round trip]_
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5.5)
   


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

  • [PR] feat(frontend, age... sshiv012 (via GitHub) via notifications

Reply via email to