fix(ui): trim input values and add deploy-success toast key - #31508
Conversation
- render-field-element: trim onChange values for input, textarea, password and search fields so trailing/leading whitespace can't leak into names, emails, URLs, or other identifiers. - Add `server.deploy-entity-success` locale key + translations for all 20 locales; used downstream by the Collate automation wizard to signal that a create/edit auto-deploy succeeded. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
✅ Playwright Results — workflow succeededValidated commit ✅ 160 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 51m 47s ⏱️ Max setup 3m 29s · max shard execution 12m 35s · max shard-job elapsed before upload 18m 34s · reporting 5s 🌐 207.12 requests/attempt · 2.03 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…nal onChange Addresses PR #31508 review: the previous change trimmed only the external `onChange?.(value.trim())` callback, but `field.onChange(value)` still stored the untrimmed value into react-hook-form's state. Since form submission reads RHF state (not the external prop), whitespace was still leaking into the submitted names, emails, connection URLs, etc — the stated goal wasn't achieved for the form path. Now: on blur, if the current field value has surrounding whitespace, write the trimmed value back to RHF state (and mirror it to the external onChange). Trimming on blur (not on every keystroke) so the user can type internal spaces mid-word without the input eating a trailing space between typed tokens. Applied uniformly to the four field types the prior commit touched: Input (text), Password, Number, and Textarea (also covers Description). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Code Review ✅ Approved 1 resolved / 1 findingsTrims input values on blur to ensure the React Hook Form state receives cleaned data and adds the missing deploy-success i18n key across all locales, addressing the external onChange trimming finding. No remaining issues found. ✅ 1 resolved✅ Bug: Trim applied to external onChange only, not submitted form value
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |



Summary
Two small fixes that unblock the Collate AI Automation follow-up PR (open-metadata/openmetadata-collate
fix/ai-automations-suite):renderFieldElement— trim onChange values. Input, textarea, password, and search variants now callonChange?.(value.trim())so leading/trailing whitespace can't leak into names, emails, connection URLs, or other identifiers. Four call sites, one line each.server.deploy-entity-success.{{entity}} deployed successfully.The Collate wizard's auto-deploy path renders it as a success toast; without the key the toast would show the raw key on every create/edit save. All 20 locales updated (English + 19 translations, not English-fallback placeholders).Test plan
yarn i18nis idempotent after the edits (no new pushes)en-uslocale has a real translation (checked:grep "deployed successfully" src/locale/languages/*.jsonreturns zero non-English hits)" admin "into a form field, blur, confirm the trimmed value is what the form submits🤖 Generated with Claude Code