arose26 opened a new pull request, #71710:
URL: https://github.com/apache/airflow/pull/71710

   
   `FieldObject` renders the JSON editor for params whose declared type is 
`object` — `FieldSelector` routes arrays to `FieldStringArray`, 
`FieldAdvancedArray` and `FieldMultiSelect`, so an array never reaches it. It 
nonetheless falls back to an empty **array** when the param has no value:
   
   ```tsx
   value={JSON.stringify(param.value ?? [], undefined, 2)}
   ```
   
   So a param declared as an object but left unset opens the trigger form's 
editor showing `[]`, and anyone editing it starts from the wrong JSON literal 
for the field's declared type.
   
   The submitted `conf` is built from `param.value` rather than the editor 
text, so an untouched field still submits `null` — this is about what the user 
is shown and edits from, not about the value sent when the field is left alone.
   
   related: #55213
   
   ### Tests
   
   Adds `FieldObject.test.tsx` covering both branches of the fallback — a param 
with no value, and one with an existing value. The first fails before this 
change (`Expected {} / Received []`) and passes after.
   
   `pnpm lint` (eslint + tsc) is clean and the full `ui` suite passes — 935 
tests across 121 files.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 5)
   
   Generated-by: Claude Code (Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


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