Skip to content

Conversation

@avallete
Copy link
Member

I have read the CONTRIBUTING.md file.

YES/NO

What kind of change does this PR introduce?

Bug fix, feature, docs update, ...

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

@vercel
Copy link

vercel bot commented May 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
studio-self-hosted ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2025 7:47am
studio-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2025 7:47am
5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
studio ⬜️ Ignored (Inspect) Visit Preview May 21, 2025 7:47am
design-system ⬜️ Skipped (Inspect) May 21, 2025 7:47am
docs ⬜️ Skipped (Inspect) May 21, 2025 7:47am
ui-library ⬜️ Skipped (Inspect) May 21, 2025 7:47am
zone-www-dot-com ⬜️ Skipped (Inspect) May 21, 2025 7:47am

@supabase
Copy link

supabase bot commented May 20, 2025

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@coveralls
Copy link

coveralls commented May 20, 2025

Coverage Status

coverage: 84.005%. remained the same
when pulling dde4176 on fix/add-exact-count-query-fallback
into 25903cb on master.

@vercel vercel bot temporarily deployed to Preview – ui-library May 20, 2025 14:40 Inactive
@vercel vercel bot temporarily deployed to Preview – docs May 20, 2025 14:40 Inactive
@vercel vercel bot temporarily deployed to Preview – design-system May 20, 2025 14:40 Inactive
@vercel vercel bot temporarily deployed to Preview – zone-www-dot-com May 20, 2025 14:40 Inactive
@ivasilov ivasilov marked this pull request as ready for review May 20, 2025 14:40
@ivasilov ivasilov requested a review from a team as a code owner May 20, 2025 14:40
Copy link
Member

@alaister alaister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

  • Tested with a partitioned table on preview. Note I couldn't trigger a timeout, so just testing the happy path.

One small code note:

useEffect(() => {
// If the count query encountered a timeout error with exact count
// turn off the exact count to rely on approximate
if (isError && snap.enforceExactCount && error.code === 408) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't want to include snap.enforceExactCount and error.code in the dependency array, you should wrap them in useLatest() outside the useEffect so we don't accidentally read stale values here!

Copy link
Member Author

@avallete avallete May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh ! I was wondering since snap.setPage wasn't a deps here: https://github.com/supabase/supabase/pull/35774/files#diff-357ec6b1c5b04e3a99a116ebe222a9682dc4cbb1ab1bc175202db3a6fb6193c6R124-R132

I wondered if maybe there was some case where we don't wanna mention all dependencies (methods, derived properties, ...).

But I don't mind declaring them all in the array of dependencies. Good spot.

@vercel vercel bot temporarily deployed to Preview – design-system May 21, 2025 07:41 Inactive
@vercel vercel bot temporarily deployed to Preview – ui-library May 21, 2025 07:41 Inactive
@vercel vercel bot temporarily deployed to Preview – docs May 21, 2025 07:41 Inactive
@vercel vercel bot temporarily deployed to Preview – zone-www-dot-com May 21, 2025 07:41 Inactive
@avallete avallete merged commit 23ead00 into master May 21, 2025
19 checks passed
@avallete avallete deleted the fix/add-exact-count-query-fallback branch May 21, 2025 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants