Skip to content

[SQL Lab] Tab rename uses native browser prompt() instead of modal dialog #40401

@MelikHajlawi

Description

@MelikHajlawi

Bug description

When renaming a SQL Lab tab via the tab context menu, the application uses the
browser's native prompt() dialog instead of a styled modal component consistent
with the rest of the Superset UI.

The relevant code in SqlEditorTabHeader/index.tsx even has a TODO comment
acknowledging this:
// TODO: Replace native prompt with a proper modal dialog

Steps to reproduce

  1. Open SQL Lab
  2. Click the ⋮ (three dots) menu on any query tab
  3. Click "Rename tab"
  4. Observe the native browser prompt dialog appears

Expected behavior

A styled Superset modal dialog (using the existing Modal component) should appear,
consistent with how other rename/edit operations work in the application.

Actual behavior

A native browser prompt() dialog appears. This cannot be styled, is blocked in
some environments, and breaks the visual consistency of the app.

Environment

  • Superset version: latest (master)
  • Browser: any

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

File: superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx
Function: renameTab()

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    #bug:cosmeticCosmetic/layout/design tweak neededsqllab:designRelated to the SQL Lab UI/UX

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions