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

supabase / supabase / 26899049462
74%

Build:
DEFAULT BRANCH: master
Ran 03 Jun 2026 04:43PM UTC
Jobs 1
Files 96
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

03 Jun 2026 04:39PM UTC coverage: 72.47%. Remained the same
26899049462

push

github

web-flow
fix(studio): prevent SQL editor TreeView crash when an expanded folder leaves the tree (#46595)

## Problem

Sentry [SUPABASE-APP-J7C](https://supabase.sentry.io/issues/7492405004)
— `Error: Node with id=new-folder doesn't exist in the tree.` (328
events / 280 users). Crashes the SQL editor.

## Root cause

`react-accessible-treeview` throws when an id is dropped from the
controlled `expandedIds` prop in the same render its node leaves the
tree data — its collapse effect calls `getTreeNode(data, id)` on a node
that's already gone. The prior fix (`8bcb878a01`) reactively filtered
`expandedIds` against the live tree, which is exactly what produces that
simultaneous drop when a `new-folder` placeholder (or any expanded
folder) is removed.

## Fix

- Guard additions: only expand folder ids that exist in the tree.
- Tolerate stale ids: pass `expandedFolderIds` as-is instead of the
reactively filtered list, so we never create a "removed" delta for a
node that's already gone. Stale ids are harmless — the library only
inspects the add/remove delta.

## Reproduction (to verify the fix)

1. Open the SQL Editor for a project.
2. Create a folder and add a snippet into it.
3. **Expand** the folder.
4. Right-click the folder → **Delete folder** (confirm).
5. Before: the editor crashes with `Node with id=... doesn't exist in
the tree.` After: no crash.

Fixes SUPABASE-APP-J7C

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

## Summary by CodeRabbit

* **Bug Fixes**
* Improved stability of private snippet folder expansion in the SQL
editor: auto-expansion now respects the current snippet tree state to
avoid unexpected collapses or visual glitches in the folder tree.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

989 of 1386 branches covered (71.36%)

Branch coverage included in aggregate %.

1525 of 2083 relevant lines covered (73.21%)

247.13 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 26899049462.1 03 Jun 2026 04:43PM UTC 96
72.47
GitHub Action Run
Source Files on build 26899049462
  • Tree
  • List 96
  • 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 #26899049462
  • be56096e on github
  • Prev Build on master (#26891670394)
  • Next Build on master (#26917707544)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc