studio
studio copied to clipboard
[feature request] Re-run query on browser tab change
Bug description
When switching within Prisma studio, the query on that tab is re-run. When the browser tab Prisma studio is in is switched to, the query does not re-run despite this being a usually desired behavior.
How to reproduce
- Have a tab open to a model
- Update this model using a program outside of Prisma studio, or an instance in another browser tab
- Switch back to the browser tab with Prisma studio
- The data does not refresh
- Switch Prisma studio tabs within the browser tab
- The data does refresh
Expected behavior
In both cases, the data should refresh.
This can be done using the Page Visibility API to trigger a re-run of the query.
Prisma information
v4.9.0
Environment & setup
- OS: MacOS 13.1
- Browser: Safari 16.2
- Database: PostgreSQL
Prisma logs
No response