• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase / 27969664588
73%

Build:
DEFAULT BRANCH: master
Ran 22 Jun 2026 05:01PM UTC
Jobs 1
Files 99
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Jun 2026 04:57PM UTC coverage: 72.905%. Remained the same
27969664588

push

github

web-flow
fix(studio): strip one-shot content param from SQL editor URL (#47140)

## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

When you open the SQL editor with prefilled SQL via
`/sql/new?content=<sql>`, the editor seeds its contents from the
`content` query param, then navigates to the newly created snippet with
`router.push`.

That leaves the (often very long) `/sql/new?content=...` URL in the
browser history. Pressing Back returns to that URL instead of the page
you came from. It is a wasted step, and it re-seeds and recreates a
fresh snippet.

This affects every entry point that opens the SQL editor with prefilled
SQL, such as the table definition "Open in SQL Editor" button, create
index, and the SQL command menu.

## What is the new behavior?

When the editor is seeded from a `content` deep link, the navigation to
the new snippet uses `router.replace` instead of `router.push`. This
collapses the one-shot `/sql/new?content=...` URL out of the history.

Back now returns straight to the page you came from, with no wasted step
and no duplicate snippet. Normal new query creation (no `content` param)
is unchanged.

## To test

1. Open any table in the Table Editor, switch to the Definition view,
and click "Open in SQL Editor". Any deep link with prefilled SQL works.
You can also visit `/project/<ref>/sql/new?content=SELECT%201` directly.
2. Confirm the SQL editor opens with the SQL prefilled, and the URL no
longer contains `?content=`.
3. Press the browser Back button.
4. You return straight to the previous page in a single Back.

Before this fix, the first Back landed on `/sql/new?content=...` and
recreated a snippet, and only a second Back reached the page you came
from.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Improved navigation behavior in SQL Editor when creating snippets from
imported content, resulting in more efficient routing.... (continued)

1023 of 1419 branches covered (72.09%)

Branch coverage included in aggregate %.

1552 of 2113 relevant lines covered (73.45%)

248.48 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 27969664588.1 22 Jun 2026 05:01PM UTC 99
72.9
GitHub Action Run
Source Files on build 27969664588
  • Tree
  • List 99
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27969664588
  • 7ff3264b on github
  • Prev Build on master (#27965852889)
  • Next Build on master (#27983150434)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc