With the unified logs preview on, an edge function's Logs tab renders
the unified logs view scoped to that function (#50954), with its
invocations and runtime output in one list. That replaces the separate
Invocations and Logs tabs.
- `UnifiedLogs` takes a `scope` plus view props: `hasFilterSideBar`,
`offeredFilters` and `columnPreferencesKey`. The function Logs tab turns
the sidebar off, which also drops the filters-toggle shortcut, and saves
its columns and panel layout separately from the Logs page.
- `getEdgeFunctionLogsScope` and `EDGE_FUNCTION_LOGS_VIEW` are the edge
function preset: the scope's fixed filters, the filters the tab offers
and its saved-columns key. It offers date, log type, level and message,
so no user filter, since no function row has a user.
- The Invocations tab and its shortcut are hidden. Old Invocations links
redirect to Logs, converting `its`/`ite`/`log` to `date`/`id`.
- `getEdgeFunctionLogsUrl` builds links into the scoped tab with the
shared params serializer from #50953, and clicking a bar on the
invocations chart uses it.
With the preview off, both tabs work as on master.
### How to test
1. Turn on the unified logs preview and open an edge function's Logs
tab. You should see only that function's invocations and runtime logs,
with the filter bar limited to date, log type, level and message.
2. Filter to Edge Function runtime, then to errors, and check counts and
the chart follow.
3. Open an old `/functions/<slug>/invocations?its=…&ite=…&log=…` link.
It lands on Logs with the same range and log selected.
4. Click a bar on the Overview invocations chart. The Logs tab opens on
that bucket.
### Validation
- URL helper, offered filter and preset tests, plus the scoped query
tests from #50954.
- Studio typecheck, lint ratchet, Prettier and knip pass on this layer.
### Stack
Merge in order:
1. #50953 — reusable logs table building blocks
2. #50954 — function-scoped unified logs queries
3. #50955 — slimmer function detail layout, header on Overview
4. #50957 — Invocations merged into a function-scoped Logs tab
5. #50958 — Overview errors in the shared logs table
6. #52281 — remove the legacy Overview
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
The edge function detail layout is now breadcrumbs plus tabs
(`PageNav`), without the page header, so tabs like Logs and Code get the
full height below the tabs. The function name, invoke URL and last
deploy details move into a header on the Overview tab, which also holds
the chart period selector. Both the new and legacy Overview render it,
and both now default to a 1 hour period instead of 15 minutes.
The Overview sections (invocations, errors, performance and usage) now
sit in one default-width `PageContainer` instead of each nesting a
full-width one, and the invocations chart moves into a chart card.
Invocations has no section heading, since it's the headline metric right
below the page header.
Both overview versions use the same chart periods. Sparse chart data is
filled only between returned API buckets, avoiding synthetic zeros
outside the reported range. Chart navigation uses the full rolling
period, including a full day for the 1 day option.
The selector shows a checkmark for the selected period, and the header
announces loaded details. Self-hosted Studio retains a Copy URL action
in the detail toolbar because it has no Overview tab.
This layer doesn't depend on the logs changes below it.
**Heads-up:** the header now only appears on Overview. Code, Details,
Invocations and Logs show breadcrumbs and tabs only. This change isn't
behind a flag.
### How to test
1. Open an edge function's Overview. The header shows the name, URL
(with copy) and last deploy hover card, and the period selector sits in
the header with 1 hour selected.
2. Switch through the other tabs. Breadcrumbs and tabs stay sticky, and
there's no header.
3. With the `edgeFunctionsOverview` flag off, the legacy Overview
renders with the same header.
### Validation
- 104 focused tests pass with retries disabled and shuffled order (seed
50968). New tests cover both overview versions, period changes, empty
results, header loading and copying, and self-hosted URL copying. Test
names describe observable behavior.
- 12 targeted regression mutations were detected and restored; the
selected-indicator mutation was repeated after the visual alignment fix.
- Browser QA on the staging preview for `3d055c0dc4` covers the header
and deploy details, copied URL, period changes, all detail tabs, sticky
navigation, the legacy overview, and empty results. Temporary local flag
overrides were removed. The final test-only commit `5af6a2896b` has
identical production code; its matching preview also passed header,
URL-copy, period-switching, and Settings smoke checks.
- Independent code review and changed-file formatting checks pass. All
40 executed CI checks pass on `5af6a2896b`, including TypeScript/lint,
unit tests, Next.js and TanStack E2E tests, and builds. All six review
threads are resolved.
### Stack
Merge in order:
1. #50953 — reusable logs table building blocks
2. #50954 — function-scoped unified logs queries
3. #50955 — slimmer function detail layout, header on Overview
4. #50957 — Invocations merged into a function-scoped Logs tab
5. #50958 — Overview errors in the shared logs table
6. #52281 — remove the legacy Overview
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
## Problem
Clicking an invocation bar on the Edge Function overview did not
preserve the selected chart segment, so the destination could not open a
focused investigation window.
## Fix
Forward the clicked bar timestamp and navigate to Logs or Invocations
with an encoded, focused time range. Share the existing chart range
calculation and add real Recharts interaction coverage.
## How to test
- Open an Edge Function Overview page with invocation data.
- Click a populated bar in the Total Invocations chart.
- Expected result: Logs or Invocations opens with its and ite query
parameters centered on the clicked bar.
- Repeat with unified logs enabled and disabled to verify both
destinations.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Clicking a bar in the Edge Function invocations chart now opens the
relevant logs or invocations view.
- The destination is focused on a time window surrounding the selected
invocation, making investigation faster.
- Chart bars now provide a pointer cursor to indicate they are
interactive.
- **Bug Fixes**
- Chart clicks without valid invocation data no longer trigger incorrect
navigation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## Problem
Knip reports many duplicate exports (both named and default). Besides,
we're moving away from default exports and even have an eslint rule to
enforce it on new code.
## Solution
- Cleanup those exports
- Update imports when necessary
No functional changes. If it builds, it's fine
## Problem
Our `<Button>` component breaks the default `button` contract by
redefining the `type` prop to set its variant (`primary`, `default`,
etc) instead of the button type (`submit`, `button`, etc).
This is confusing and forces to write more code when using it with
shadcn components that expect/inject the standard button props.
## Solution
- rename the `type` prop to `variant`
- rename the `htmlType` prop to `type`
- propagate the changes where necessary
- format code
## How to test
As this is just prop renaming, if it builds it's ok
---------
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
This PR migrates the whole monorepo to use Tailwind v4:
- Removed `@tailwindcss/container-queries` plugin since it's included by
default in v4,
- Bump all instances of Tailwind to v4. Made minimal changes to the
shared config to remove non-supported features (`alpha` mentions),
- Migrate all apps to be compatible with v4 configs,
- Fix the `typography.css` import in 3 apps,
- Add missing rules which were included by default in v3,
- Run `pnpm dlx @tailwindcss/upgrade` on all apps, which renames a lot
of classes
- Rename all misnamed classes according to
https://tailwindcss.com/docs/upgrade-guide#renamed-utilities in all
apps.
---------
Co-authored-by: Jordi Enric <jordi.err@gmail.com>
<img width="1575" height="1134" alt="image"
src="https://github.com/user-attachments/assets/994b1113-717f-44a2-89a4-13bc0182db20"
/>
Attempts to improve our edge function overview pages to provide stronger
insights into the health of a function, including reliability (error
rates), performance (execution times) and usage (cpu and memory).
As part of this work it refactors existing charts to use our new chart
components.
main consideration is the collective performance of error queries
https://github.com/supabase/supabase/pull/44009/changes#diff-2a79cf61c5397a8ef363c333229fa7729a2efc90a4d8e0806e49c212d5aa97e7
## To test:
1. Create an edge function that errors out randomly across requests. You
can use cron to poll this function every second.
2. View the edge function and on the overview page confirm that errors
are showing and grouped correctly in recent failed invocations sections.
---------
Co-authored-by: Ali Waseem <waseema393@gmail.com>