Skip to content

fix(ui): open BlockEditor mention links with noopener - #38086

Merged
harsh-vador merged 1 commit into
mainfrom
fix/mention-link-noopener
Nov 18, 2026
Merged

harsh-vador merged 1 commit into
mainfrom
fix/mention-link-noopener

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #38085

Clicking a mention or hashtag link in the BlockEditor opened it with window.open(href, target), so the new tab kept a window.opener reference to OpenMetadata. It now passes 'noopener,noreferrer', the same as every other window.open call in the UI that opens a new tab.

  • EditorSlots.tsx: openMentionLink passes 'noopener,noreferrer' as the third argument to window.open. The settings-modal case (getSettingsHashForHref) is unchanged.

Type of change:

  • Bug fix

High-level design:

N/A, one-line change.

Tests:

Use cases covered

  • Clicking a mention link opens it in a new tab with no opener reference.

Unit tests

  • Added EditorSlots mention links to EditorSlots.test.tsx: a click on a data-type="mention" anchor calls window.open(href, '_blank', 'noopener,noreferrer').
  • jest src/components/BlockEditor/EditorSlots.test.tsx: 6 tests pass.
  • Negative control: with only EditorSlots.tsx reverted to main, the new test fails.
  • eslint and prettier are clean on the changed files.

Backend integration tests

  • Not applicable (no backend API changes).

Playwright (UI) tests

Not run locally. make playwright_affected selects 21 specs and reports impact-map gaps for EditorSlots.tsx. They run in this PR's CI.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

This PR isolates tabs opened from BlockEditor mentions and hashtags while preserving settings-modal links.

  • Mention and hashtag links open without an opener reference.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "fix(ui): open BlockEditor mention links ..." · Reviewed by Greptile

@harsh-vador
harsh-vador requested a review from a team as a code owner November 18, 2026 07:10
@harsh-vador harsh-vador added safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch labels Nov 18, 2026
@harsh-vador harsh-vador self-assigned this Nov 18, 2026
@github-actions

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.

@gitar-bot

gitar-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Adding noopener,noreferrer removes opener access for BlockEditor mention-link tabs, which may affect flows relying on that reference.

Adds 'noopener,noreferrer' to the window.open call for BlockEditor mention and hashtag links in EditorSlots.tsx, so opened tabs no longer hold a window.opener reference to OpenMetadata. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

Compact
gitar display:verbose         

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

@harsh-vador
harsh-vador enabled auto-merge (squash) November 18, 2026 07:14
@harsh-vador
harsh-vador merged commit 5fd9b6c into main Nov 18, 2026
50 of 52 checks passed
@harsh-vador
harsh-vador deleted the fix/mention-link-noopener branch November 18, 2026 07:25
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.0 opened as #38089. Claude resolved a cherry-pick conflict to build it. It merges itself once the checks pass, so read the diff now if this change is a sensitive one.

harsh-vador added a commit that referenced this pull request Nov 18, 2026
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 To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BlockEditor mention links should open with noopener

2 participants