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

supabase / supabase / 27774004034
73%

Build:
DEFAULT BRANCH: master
Ran 18 Jun 2026 04:30PM UTC
Jobs 1
Files 98
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

18 Jun 2026 04:27PM UTC coverage: 72.967%. Remained the same
27774004034

push

github

web-flow
perf(studio): single-scan unified logs facet count query (#47088)

## Problem

The facet counts in the unified logs sidebar were slow to load. The
query scanned the logs table about 14 times, once for each group of
counts (the total, each log type, each level, and method, status, and
pathname).

## Fix

Count the facets that have few distinct values (total, log type, level,
method, status) in a single scan instead of one scan each. Pathname
stays on its own scan because it has too many distinct values to count
that way.

A facet you are filtering on still gets its own scan, so it can keep
showing counts for its other values while the rest of the sidebar
reflects the filter.

This takes the common case from about 14 scans down to 3. The result
shape is unchanged, so nothing else needed updating.

Note: facet values with a count of zero are no longer returned. Only
values that actually appear show up.

## How to test

- Open Unified Logs for a project with the otelUnifiedLogs flag on.
- Check that the sidebar counts (log type, level, method, status,
pathname) and the total badge match what they showed before, and load
faster.
- Filter by a facet (e.g. log type) and confirm that facet still lists
counts for its other values, while the other facets update to match the
filter.
- Run the unit tests in apps/studio for UnifiedLogs.queries.


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

## Summary by CodeRabbit

* **Refactor**
* Updated unified log counting to a more efficient single-pass SQL
approach for facet and per-dimension counts.
* Standardized log-type filtering behavior across unified queries and
facet/count generation.
* **Bug Fixes**
* Improved “total/all” counts to correctly respect active filters,
including correct source handling and default log-type exclusion.
* **Refactor**
* Limited facet displays to the top 20 values per facet; facet totals
are now calculated from the retained rows.
* **Tests**
* Expanded SQL an... (continued)

1023 of 1419 branches covered (72.09%)

Branch coverage included in aggregate %.

1552 of 2110 relevant lines covered (73.55%)

248.65 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 27774004034.1 18 Jun 2026 04:30PM UTC 98
72.97
GitHub Action Run
Source Files on build 27774004034
  • Tree
  • List 98
  • 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 #27774004034
  • b87110b6 on github
  • Prev Build on master (#27767570175)
  • Next Build on master (#27775193050)
  • 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