Skip to content

fix(ui): stop invalid-URL crash in the description embed-link form - #30943

Merged
Rohit0301 merged 7 commits into
mainfrom
fix/embed-link-invalid-url-crash
Aug 5, 2026
Merged

Rohit0301 merged 7 commits into
mainfrom
fix/embed-link-invalid-url-crash

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #30942
Entering an invalid URL in the BlockEditor embed-link popover crashed the whole editor: "Invalid slot 'errorMessage'. Valid slot names are 'description'".

EmbedLinkElement rendered the react-hook-form validation error as a standalone , which resolves to react-aria slot="errorMessage". Placed as a sibling of , it landed in a TextField slot context that only registers the "description" slot, so react-aria threw and the error boundary replaced the editor.

Pass the message through the Input's own hint prop instead. Input renders its HintText inside its own AriaTextField, where the errorMessage slot is valid, so the "Invalid URL" text shows inline and the editor keeps working. Removed the now unused HintText import.

Regression from #29842 (introduced EmbedLinkElement in this form); reproduces on main, not yet in a released build.

Verification: eslint 0 errors, tsc 0 errors, 6 EmbedLinkElement tests pass (including the invalid-URL validation case).

Screen.Recording.2026-08-04.at.5.33.16.PM.mov

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Entering an invalid URL in the BlockEditor embed-link popover crashed the whole
editor: "Invalid slot 'errorMessage'. Valid slot names are 'description'".

EmbedLinkElement rendered the react-hook-form validation error as a standalone
<HintText isInvalid>, which resolves to react-aria slot="errorMessage". Placed as
a sibling of <Input>, it landed in a TextField slot context that only registers
the "description" slot, so react-aria threw and the error boundary replaced the
editor.

Pass the message through the Input's own `hint` prop instead. Input renders its
HintText inside its own AriaTextField, where the errorMessage slot is valid, so
the "Invalid URL" text shows inline and the editor keeps working. Removed the now
unused HintText import.

Regression from #29964 (introduced EmbedLinkElement in this form); reproduces on
main, not yet in a released build.

Verification: eslint 0 errors, tsc 0 errors, 6 EmbedLinkElement tests pass
(including the invalid-URL validation case).

Fixes #30942
@harsh-vador harsh-vador self-assigned this Aug 4, 2026
@harsh-vador
harsh-vador requested a review from a team as a code owner August 4, 2026 11:58
@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This 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 skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
66.01% (77625/117595) 49.97% (46839/93728) 51.14% (14079/27526)

@github-actions

github-actions Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit c90e536df6b8cac794265c8646842380b7755fdf in Playwright run 30936303454, attempt 1.

✅ 551 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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) 57m 59s

⏱️ Max setup 3m 8s · max shard execution 19m 37s · max shard-job elapsed before upload 23m 42s · reporting 4s

🌐 203.21 requests/attempt · 2.83 app boots/UI scenario · 19.80% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 19.8% (convergence target: at most 15%).
  • Browser traffic was 203.21 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.83 per UI scenario (1619 boots / 572 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 138 0 0 0 0 0
✅ Shard chromium-02 127 0 0 0 0 0
✅ Shard chromium-03 135 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Rohit0301
Rohit0301 previously approved these changes Aug 4, 2026
…crash (#30942)

Adds BlockEditorEmbedLink.spec.ts — opens the description editor on a table
entity page, inserts an Image block via slash command, submits an invalid URL,
and asserts the "Invalid URL" validation message is visible and the editor is
still alive (not replaced by an error boundary).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Rohit0301 and others added 5 commits August 4, 2026 23:16
Required by the Playwright handbook so tag-filtered CI runs include this spec.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — ESLint report could not be read — see the job log.

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

No machine-readable report was produced.


Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@Rohit0301
Rohit0301 added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit 8be90eb Aug 5, 2026
84 of 86 checks passed
@Rohit0301
Rohit0301 deleted the fix/embed-link-invalid-url-crash branch August 5, 2026 11:42
@gitar-bot

gitar-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Fixes an editor crash caused by invalid URLs in the description embed-link form by passing validation error messages through the Input component's hint prop. Includes a new Playwright regression test.

✅ 1 resolved
✅ Quality: Missing domain tag on test.describe block

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/BlockEditorEmbedLink.spec.ts:57
The Playwright handbook requires a domain tag on describe blocks (e.g. @Discovery for table/data-asset flows). This spec's test.describe('BlockEditor embed-link form', ...) has none, so it won't be selected by tag-filtered CI runs. Add { tag: ['@Discovery'] } to the describe call.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

Rohit0301 added a commit that referenced this pull request Aug 5, 2026
…30943)

* fix(ui): stop invalid-URL crash in the description embed-link form

Entering an invalid URL in the BlockEditor embed-link popover crashed the whole
editor: "Invalid slot 'errorMessage'. Valid slot names are 'description'".

EmbedLinkElement rendered the react-hook-form validation error as a standalone
<HintText isInvalid>, which resolves to react-aria slot="errorMessage". Placed as
a sibling of <Input>, it landed in a TextField slot context that only registers
the "description" slot, so react-aria threw and the error boundary replaced the
editor.

Pass the message through the Input's own `hint` prop instead. Input renders its
HintText inside its own AriaTextField, where the errorMessage slot is valid, so
the "Invalid URL" text shows inline and the editor keeps working. Removed the now
unused HintText import.

Regression from #29964 (introduced EmbedLinkElement in this form); reproduces on
main, not yet in a released build.

Verification: eslint 0 errors, tsc 0 errors, 6 EmbedLinkElement tests pass
(including the invalid-URL validation case).

Fixes #30942

* test(e2e): add Playwright regression test for embed-link invalid-URL crash (#30942)

Adds BlockEditorEmbedLink.spec.ts — opens the description editor on a table
entity page, inserts an Image block via slash command, submits an invalid URL,
and asserts the "Invalid URL" validation message is visible and the editor is
still alive (not replaced by an error boundary).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* lint fix

* test(e2e): add @discovery tag to BlockEditorEmbedLink describe block

Required by the Playwright handbook so tag-filtered CI runs include this spec.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* test(e2e): move BlockEditorEmbedLink spec from Pages/ to Features/

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* test(e2e): refine BlockEditorEmbedLink spec — click add-image-container to open embed form

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* lint fix

---------

Co-authored-by: Rohit0301 <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…pen-metadata#30943)

* fix(ui): stop invalid-URL crash in the description embed-link form

Entering an invalid URL in the BlockEditor embed-link popover crashed the whole
editor: "Invalid slot 'errorMessage'. Valid slot names are 'description'".

EmbedLinkElement rendered the react-hook-form validation error as a standalone
<HintText isInvalid>, which resolves to react-aria slot="errorMessage". Placed as
a sibling of <Input>, it landed in a TextField slot context that only registers
the "description" slot, so react-aria threw and the error boundary replaced the
editor.

Pass the message through the Input's own `hint` prop instead. Input renders its
HintText inside its own AriaTextField, where the errorMessage slot is valid, so
the "Invalid URL" text shows inline and the editor keeps working. Removed the now
unused HintText import.

Regression from open-metadata#29964 (introduced EmbedLinkElement in this form); reproduces on
main, not yet in a released build.

Verification: eslint 0 errors, tsc 0 errors, 6 EmbedLinkElement tests pass
(including the invalid-URL validation case).

Fixes open-metadata#30942

* test(e2e): add Playwright regression test for embed-link invalid-URL crash (open-metadata#30942)

Adds BlockEditorEmbedLink.spec.ts — opens the description editor on a table
entity page, inserts an Image block via slash command, submits an invalid URL,
and asserts the "Invalid URL" validation message is visible and the editor is
still alive (not replaced by an error boundary).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* lint fix

* test(e2e): add @discovery tag to BlockEditorEmbedLink describe block

Required by the Playwright handbook so tag-filtered CI runs include this spec.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* test(e2e): move BlockEditorEmbedLink spec from Pages/ to Features/

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* test(e2e): refine BlockEditorEmbedLink spec — click add-image-container to open embed form

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* lint fix

---------

Co-authored-by: Rohit0301 <[email protected]>
Co-authored-by: Claude Sonnet 4.6 <[email protected]>

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(ui): invalid URL in description embed-link form crashes the editor ("Invalid slot 'errorMessage'")

3 participants