mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 18:35:07 +03:00
cli/ref-doc
125
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2ba2c37163 |
fix(studio): preserve deep-linked date range in Unified Logs FE-4020 (#48685)
## Problem Clicking a bar in a usage chart (e.g. the Postgres activity chart on the project dashboard) navigates to Unified Logs with the log_type filter applied correctly, but the clicked bar's time range is silently dropped: the page falls back to the default last-hour window. If the actual matching logs are outside that window, the main list shows "No results found" even though the sidebar facet count (computed from the correct deep-linked range) shows a nonzero count. Root cause: the table's initial `columnFilters` state was seeded only from the `filter` URL param, never from `date`. A debounced effect syncs `columnFilters` back into the URL shortly after mount, and for the `date` field it treats a missing `columnFilters` entry as a cleared brush, overwriting the deep-linked `date` param with null. ## Fix Added `buildDefaultColumnFilters` in `UnifiedLogs.filters.ts`, which seeds a `date` entry into the initial `columnFilters` from `search.date` when present, alongside the existing filter-param seeding. `UnifiedLogs.tsx` now uses this helper instead of building `defaultColumnFilters` inline, so a deep-linked range survives the debounced round-trip instead of getting nulled out. ## How to test - On the project dashboard, click a bar in a usage chart (e.g. Postgres activity) for a time period further back than the last hour. - Expected result: Unified Logs opens with both the log_type filter and the clicked bar's date range applied, and the row list matches the sidebar facet count instead of showing "No results found". - `UnifiedLogs.filters.test.ts` has unit tests covering the new seeding behavior. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved log filtering from URL parameters. * Preserved valid date ranges when opening deep-linked log views. * Prevented malformed or duplicate date filters from appearing in the logs table. * **Tests** * Added coverage for valid, missing, malformed, and duplicate date filter scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
50e1eb7436 |
chore(eslint): bump eslint-config-next to v16 for useEffectEvent (#48458)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Chore / build (ESLint config upgrade + lint cleanup). ## What is the current behavior? `eslint-plugin-react-hooks` v5 (pulled in transitively by `eslint-config-next` v15) doesn't recognize stable `useEffectEvent`, so every effect that calls an effect-event handler needs an `eslint-disable react-hooks/exhaustive-deps` to silence a false positive. There are 30 such dead disables across Studio. ## What is the new behavior? Bumps `eslint-config-next` to v16, which pulls in `eslint-plugin-react-hooks` v7 whose `exhaustive-deps` understands `useEffectEvent`, and removes the 30 now-dead disable directives (and their orphaned explanatory comments). Supporting changes: - **Flat-config migration**: v16 is a native flat-config array (v15 was eslintrc), so `eslint-config-supabase` now spreads it directly instead of bridging through `FlatCompat`. - **React Compiler rules off**: v16 enables react-hooks v7's `recommended`, which layers the React Compiler lint rules on top of the two classic rules. These are switched off (derived dynamically from what next enables) to keep this change scoped to the `exhaustive-deps` improvement. - **Plugin-registration fallout** (v16 scopes plugin registration to a file glob rather than registering globally like FlatCompat did): stop re-registering `@typescript-eslint` (shared) and `jsx-a11y` (studio); scope our react / react-hooks / jsx-a11y rule overrides (studio, www) to v16's plugin glob so they don't error on files outside it (e.g. `.cjs`). - **Lint surface preserved**: v16's glob newly includes `.mts`/`.cts` (v15 didn't lint them), which surfaced pre-existing errors in tooling scripts. The shared config keeps the prior surface by leaving `.mts`/`.cts` unlinted; linting them is left as a separate change. - **Ratchet**: rebaselines `@tanstack/query/exhaustive-deps` 9 → 89. v15 forced next's `@babel/eslint-parser` onto `.ts` files, hiding these deps; v16 parses `.ts` with `@typescript-eslint/parser` and correctly surfaces the intentional `connectionString`-excluded-from-`queryKey` pattern. Worth a follow-up to review whether any are real cache-correctness bugs. - Drops three now-dead devDeps from `eslint-config-supabase`: `@eslint/eslintrc`, `@eslint/js`, `@typescript-eslint/eslint-plugin`. Verified locally: `turbo run lint` → 7/7 packages pass with 0 errors; Studio `lint:ratchet` passes; Prettier clean on changed files; typecheck unaffected. ## Additional context <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Refined linting configuration and removed outdated lint suppressions across Studio. * Updated Next.js linting support and refreshed related development configuration. * Expanded lint baseline coverage for query-related code. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
8108528682 |
Fix: Update the auth user field in the Logs page (#48237)
- Fix the user filter to work with `edge_logs`. - Update the `auth_user` field to be derived from other log attributes. - Removed filtering for `postgres_logs` since it didn't really filter by user actions, only by user id mentions. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved unified logs user filtering to rely only on exact attribution identifiers from authentication and edge log sources, removing partial message-based matching. - Updated unified logs user identification by deriving `auth_user` from authentication actor IDs or edge JWT subject values. - Refined “user filter reachability” logic to consider only attributable log types (auth and edge). - **Tests** - Adjusted unified logs query tests to match the updated attribution routing and reachability outcomes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3c6ef31959 |
feat: add User Filter to the unified logs (#47879)
Offshoot from https://github.com/supabase/supabase/pull/47743. [Linear issue](https://linear.app/supabase/issue/FE-3939/add-user-logs-filter-to-the-logs-page) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a `user` filter to Unified Logs with a user picker (email or ID). * Added “View user logs” actions from the Users table to jump to Unified Logs. * **Bug Fixes** * Updated Unified Logs searching so default log-type restrictions no longer block user-attributed results. * **UI Updates** * Unified Logs filter bar and reset behavior now include clearing the user filter. * Improved empty-state messaging when the selected user filter isn’t supported. * Refreshed highlighted styling in command list items. * **Tests** * Expanded coverage for user filter configuration and query edge cases. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: kemal.earth <606977+kemaldotearth@users.noreply.github.com> Co-authored-by: kemal <hello@kemal.earth> Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
591b621567 |
fix(studio): tighten time bounds on single-log inspection query (#47978)
## Summary - The unified log inspection point-lookup (`getUnifiedLogInspection` in `apps/studio/data/logs/unified-log-inspection-query.ts`, used by `ServiceFlowPanel` when a user selects a row to view its detail panel) previously reused the whole selected search date range for its `iso_timestamp_start`/`iso_timestamp_end` bounds, even though it looks up exactly one row by `id`. With a wide search range selected (days/weeks), this scans far more of the ClickHouse-backed `logs` table than necessary. - Since the selected row's own timestamp is already known client-side, the query now bounds itself to a ±1 hour window around that timestamp instead, falling back to the previous search-range behavior when no timestamp is available. - No SQL text changes for the time bound — the `iso_timestamp_start`/`iso_timestamp_end` params are the existing mechanism by which every other query in this file (and sibling logs queries) bounds time server-side, so this follows that same convention rather than adding a redundant inline `WHERE timestamp` clause. - Also added an explicit `AND source = '...'` filter to the OTEL point-lookup SQL. The logs table's primary key is `(project, source, timestamp)`, so filtering on `source` narrows the sorted range before the timestamp bound even applies — the service flow `type` already maps 1:1 to a `source` value, so no new data was needed at the call site. ## Test plan - [ ] Typecheck (couldn't run locally in this environment — no `node_modules` installed) - [ ] Manually verify in Studio: open Logs Explorer with a wide time range (e.g. 7 days), select a log row, confirm the detail/service-flow panel still loads the correct enriched data - [ ] Confirm behavior is unchanged when `logTimestampMs` is unavailable (falls back to search range) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved unified log inspection accuracy by narrowing the inspection window to ±1 minute around the selected log event when a timestamp is available. * Updated service-flow and OTEL inspection lookups to use the selected log entry’s timestamp for tighter, more relevant results. * Preserved the prior broader time-range behavior when a timestamp isn’t available. * **Refactor** * Centralized log type → source mapping and generated the corresponding query filters from that shared mapping for consistency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ae957414b4 |
fix(studio): make unified logs sidebar banner dismissible (#47977)
## Summary - Adds a close button to the "Introducing unified logs" sidebar banner, storing the dismissal in localStorage so it stays hidden. ## Test plan - [ ] Open Logs Explorer, confirm the X dismisses the banner and it stays gone after reload. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an `X` close button to the unified logs preview banner. * Remember banner dismissal using local storage, so it stays hidden after closing. * Updated banner visibility rules to account for unified-logs preview enablement and default opt-in state. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Joshen Lim <joshenlimek@gmail.com> |
||
|
|
e218b24f96 |
fix(studio): disable unified logs on self-hosted (#47727)
## What Disable the Unified Logs feature on self-hosted Studio (`IS_PLATFORM=false`), where there is no backend to support it. Fixes [FE-3747](https://linear.app/supabase/issue/FE-3747). ## Why Unified logs is platform-only. A provider-level guard already forces the `isPlatformOnly` preview flag off on self-hosted, but two gaps let the feature still surface: 1. The logs sidebar renders `<UnifiedLogsBanner />` unconditionally, so self-hosted users saw an **"Enable preview"** button. Clicking it wrote the preview flag to local storage and routed to `/logs`, transiently rendering the unified logs UI. 2. `useUnifiedLogsPreview` derived `isDefaultOptIn` purely from the `unifiedLogsDefaultOptIn` feature flag, with no platform check. ## Changes - `UnifiedLogsBanner` returns `null` when `!IS_PLATFORM`, removing the only entry point to enable the preview on self-hosted. - `useUnifiedLogsPreview` gates both `isEnabled` and `isDefaultOptIn` on `IS_PLATFORM`, making the hook authoritative so no flag/local-storage state can enable unified logs on self-hosted. ## Tests - `FeaturePreviewContext.selfhosted.test.tsx` — the hook never reports unified logs as enabled or default-opt-in on self-hosted, even with the feature flags on. - `UnifiedLogsBanner.selfhosted.test.tsx` — the banner renders nothing on self-hosted. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Restricted Unified Logs preview and banner availability to supported platform environments. * Prevented unsupported environments from displaying the Unified Logs banner or opting in by default. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a23f80dd40 |
feat(studio): identify unified logs analytics queries (#47963)
## What Unified Logs fires several `logs.all.otel` requests on load (row list, chart, sidebar facet counts, single-facet counts) plus inspection queries, all with no identifier — indistinguishable in the network tab. Adds a leading `-- unified logs: <what>` SQL comment to each query builder so each request is identifiable at a glance: - row list - severity chart (with bucket function) - sidebar facet counts - single-facet counts (with facet name) - inspect single log by id - edge function console logs for execution ## Notes `--` comments run to end of line; queries are sent multi-line, so the comment doesn't swallow the SQL. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Diagnostics** * Added descriptive labels to generated log queries, making SQL statements easier to identify in logs and diagnostics. * Added labels for unified log listings, facet counts, sidebar counts, severity charts, individual log inspections, and related console logs. * **Bug Fixes** * No changes to filtering, grouping, query results, or log retrieval behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
8b82d5c472 |
[FE-3895] fix(studio): fit unified logs table to mobile viewport (#47930)
The unified logs table has a fixed content width of ~1400px, so on mobile it overflowed the viewport — columns were clipped and the header appeared misaligned with the rows (the underlying columns were actually aligned; the table just didn't fit). **Changed:** - Progressively hide the three widest columns on narrow viewports via responsive display classes: `method` from `sm`, `pathname` from `md`, `event message` from `lg`. - On phones only the essential columns remain (checkbox, level, date, log type, status), so the table fits with no horizontal scroll. - Desktop (≥`lg`) is unchanged — all columns render exactly as before. Full row data (method/pathname/event message) is still accessible by clicking a row to open the detail panel. ## To test - Open a project's **Logs** (Unified Logs preview) at a mobile width (~390px), with some API log rows in range. - Confirm the table fits the screen — no horizontal scroll/clipping — and the `DATE` header sits cleanly above the dates. - Widen the browser: `method` appears ~640px, `pathname` ~768px, `event message` ~1024px. - At desktop width, confirm all columns show and header/rows line up as before. - Tap a row on mobile → detail panel opens with the full log (method, pathname, event message). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Improved responsive table layouts for unified logs. * Columns now adapt visibility based on screen size, keeping key information accessible on narrow displays. * Event messages flex more naturally when visible. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
539b66f5c4 |
fix(studio): improve unified logs checkbox hit area and align icons (#47832)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Bug fix / polish ## What is the current behavior? Unified logs row selection checkboxes only respond to clicks on the checkbox itself, so it's easy to miss. Log type icons in the table also don't match the ServiceFlow panel (16px / muted vs 14px / lighter / strokeWidth 1.5). ## What is the new behavior? - Expand the select checkbox tap target with `hit-area-2`, and add a visible `hover:border-foreground-muted` affordance (matching the older logs explorer intent; the base Checkbox hover is a no-op after the colour-system token collapse). - Align log type icons with ServiceFlow: 14px, `text-foreground-lighter`, `strokeWidth={1.5}` on both the table column and ServiceFlow section headers. ## Additional context Older logs used an `absolute inset-0` wrapper for the same hit-area problem; unified logs uses the design-system `hit-area` utility instead. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Refined unified log visuals with more consistent icon sizing, stroke weight, and muted coloring. * Improved checkbox hover styling and expanded its clickable area for easier selection. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
e5df232b44 |
fix(studio): polish unified logs row alignment and success colours (#47829)
## What kind of change does this PR introduce? UI polish ## What is the current behavior? Unified logs row chrome is slightly misaligned (checkbox vs filter toggle, uneven gaps around the level dot), success grey is too dark and doesn’t match the Level key, and log-type icons read a bit heavy. ## What is the new behavior? - Aligns the row checkbox with the filter sidebar toggle and spaces the level dot evenly between checkbox and timestamp - Drops the checkbox `translate-y` nudge in favour of normal middle alignment - Introduces `--chart-success` so the chart and Level key/dots share a lighter grey - Softens log-type icon colour on each row | Before | After | | --- | --- | | <img width="1024" height="759" alt="1293" src="https://github.com/user-attachments/assets/af7ab83f-8917-41cb-99f3-1c1f92df769e" /> | <img width="1024" height="759" alt="52159" src="https://github.com/user-attachments/assets/9b859308-2101-4a02-bdc1-75e5750f84fa" /> | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Improved Unified Logs table spacing and alignment, including narrower selection and level columns. * Refined checkbox and date-cell presentation for a cleaner layout. * Updated log type icons to use muted foreground styling. * **Bug Fixes** * Success statuses and chart indicators now consistently use the dedicated success color across light and dark themes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
17ee3e6977 |
feat(studio): add Multigres log type to unified logs FE-3785 (#47560)
## Problem The Multigres log type is available in the legacy logs collections but was missing from the new unified logs, so Multigres logs could not be selected or viewed there. ## Fix Wire the `multigres_logs` source into unified logs the same way the other single-source types (Realtime, Supavisor, PgBouncer) are: a display label, a filter condition, the derived `log_type` expression, a display-casing entry, and a sidebar icon. ## How to test - Open a project with Multigres logs and go to the new unified logs view - Open the Log Type filter and confirm "Multigres" appears as an option - Select "Multigres" and confirm rows from the `multigres_logs` source are returned and labeled "Multigres" with the network icon - Expected result: Multigres logs are filterable and display correctly, matching the legacy logs behavior ## Notes Level/severity uses the shared `severity_text` fallback that all non-HTTP sources rely on. If Multigres rows come back always classified as success, the OTEL pipeline may not populate `severity_text` for this source (legacy logs read the level from a JSON `event_message`), which would need a source-specific level branch. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for the **Multigres** log type in Unified Logs (labels, icon, and derived filtering/grouping/counting). * Unified Logs now renders Multigres **event_message** by extracting the `msg` field from valid JSON, with correct capitalization. * Unified Logs row click telemetry now recognizes **Multigres**. * The **Multigres** log type option is hidden when the selected project is not high-availability. * **Tests** * Added/updated unit tests for Multigres event-message parsing and shared event-message display behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
484726a45c |
fix(studio): warning colours broken in light mode after colour migration (#47660)
## What kind of change does this PR introduce? UI bug fix ## What is the current behavior? After the colour system migration (#47288), `--warning-default` was removed in light mode in favour of the semantic `--warning` token. Several studio call sites still referenced `hsl(var(--warning-default))`, which resolves to an invalid colour in light mode. This caused warning segments in stacked bar charts (e.g. Realtime on project overview v2) to render black instead of amber, with missing tooltip swatches. The colour appeared to "fix itself" on hover because the dimmed state used `--warning-500`, which is still defined. ## What is the new behaviour? Studio consumers that referenced the removed token now point at tokens that still resolve in light mode. Chart warnings use new app-level `--chart-warning` / `--chart-warning-muted` variables (stepped scale, theme-aware) rather than the removed `--warning-default`. We only update **Studio app consumers** that were still calling the old token: - `LogsBarChart` → `--chart-warning` tokens - `apps/studio/styles/globals.css` → defines those chart tokens + fixes `--sidebar-primary-foreground` - A handful of chart/tooltip call sites in Studio (`EdgeFunctionOverview`, `UnifiedLogs`, etc.) - Table editor dirty cell text → `--warning-600` (still on the stepped scale) ## To test Use a hosted project that already has warnings on project home (e.g. Realtime with a non-zero warnings count). Switch Studio to **light mode**. 1. Open **Project home** (`newHomepageUsageDeltas` flag enabled). 2. Find a service card with warnings in **Project usage**. 3. Confirm warning bar segments are amber/orange (not black), tooltip swatches show amber, and hover does not flip them black. 4. Quick dark mode sanity check. Should look unchanged. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Standardized warning-series and highlight colors across charts, logs, countdown timers, and interface indicators using the shared theme tokens (`--chart-warning` / `--chart-warning-muted`). * Refreshed warning-related theme wiring for both light and dark modes, including sidebar foreground color. * **Bug Fixes** * Updated “dirty” table cell text color to align with the revised warning palette. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
cabe14e5ca |
chore: remove _Shadcn_ suffix from ui tabs components (#47628)
## Problem Now that we migrated all usages of the deprecated `Tabs` component, we don't need the `_Shadcn_` suffix anymore. ## Solution Remove `_Shadcn_` suffix from `ui` tabs components. That's all this PR does, no visual nor functional changes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Standardized tab components across the app so pages and dialogs now use the same consistent tab UI. * Improved tab-based views in design, docs, studio, learn, and website experiences for a more uniform interface. * **Chores** * Updated shared UI exports to expose tab components directly, simplifying future usage across the product. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
fb02182e86 |
Color system (#47288)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/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. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Refreshed theming across the UI to use modern color expressions and shared theme variables (including OKLCH-based gradients), improving consistency for charts, code blocks, overlays, icons, and decorative backgrounds. * **Bug Fixes** * Improved light/dark color and gradient consistency across axis/grid styling, reference lines, buttons/badges, sidebar accents, loaders, and other visual components. * **Documentation** * Updated styling/theming guidance to align with the revised semantic token system and the updated theme variable usage patterns. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
91d70a8c38 |
feat(studio): chart bar links open unified logs when enabled (#47502)
## What When the unified logs preview is enabled, clicking a chart bar that links to a logs view now opens **unified logs** (scoped to the service and time bucket) instead of the legacy logs explorer. Surfaces updated: - Homepage project usage charts (`ProjectUsageSectionDeltas`, `ProjectUsageSection`) - Observability overview service health table (`ObservabilityOverview`) — also fixes the API Gateway row and passes the time range via the `date` param unified logs actually reads Adds a small `buildUnifiedLogsUrl` helper so the deep-link format (`filter=log_type:eq:<type>` + `date` epoch-ms range) lives in one place. When the preview is off, behavior is unchanged (legacy logs explorer). Resolves O11Y-2133. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added unified logs navigation for project usage and observability charts. * Chart bar clicks now open the unified logs view with service-specific filtering and a computed time window. * **Bug Fixes** * Updated observability and usage charts to generate the correct unified logs URLs (including `log_type` filtering and optional date ranges). * Preserved legacy log navigation behavior when unified logs are disabled. * **Tests** * Added unit tests covering unified logs URL generation, query parameters, and date handling. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|
|
9f1ce56322 |
Add edge log type with service filters (#47493)
## Context Couple of changes to the Unified Logs logic, mainly to align unified logs filters with legacy logs behaviour ## Changes involved - Postgrest + Storage logs will no longer overlap with edge logs source - They will specifically just pull logs from their own sources only - This will match legacy logs behaviour + also the observability overview behaviour as well - Re-introduce "API Gateway" as a log type (was there in the old UI) - Added service filters for convenience <img width="271" height="233" alt="image" src="https://github.com/user-attachments/assets/6264b7c5-e3e8-4db8-a378-4d8c46af3d62" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added **API Gateway** (“Edge”) logs to Unified Logs, including new sub-filters for auth, storage, and postgrest activity. * Updated the default log selection to include API Gateway logs. * **Bug Fixes** * Improved how log types are bucketed and filtered, ensuring edge, postgrest, and storage sources display under the correct views and toggles. * Refined “connection logs” filtering so results and counts remain consistent with the selected options. * **Style** * Refined the Unified Logs filter checkbox layout and nested expand/collapse controls. * **Tests** * Updated and expanded query tests to cover the new edge filter behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b30db91d71 |
chore: cleanup UI patterns exports (#47406)
## Problem We now export components under a subpath in ui-patterns to avoid barrel files as they slow down every tools (from IDE to linters, etc.) and may also affect bundles our users have to download. ## Solution - Remove the UI patterns index file - Fix invalid impors |
||
|
|
77bf0a4ec9 |
chore: more dead code cleanup (#47312)
## Problem There's still more unused code in the repository which slows down everything: - checkouts - tooling - probably builds (not sure how good turbopack is at handling this) ## Solution - remove old unused code - remove more recent code after checking git history to ensure it's not unfinished/ongoing work <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Removed several outdated UI components and helper utilities to streamline the app. * Cleaned up unused analytics, database, and observability hooks and queries. * **Refactor** * Simplified data table, unified logs, and assistant panel internals by removing legacy display and navigation pieces. * **Bug Fixes** * Reduced the chance of showing stale or inconsistent status, chart, and metric views by eliminating obsolete display paths. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ccf84da968 |
Ensure that pathname in unified logs is solely server side filtered (#47307)
## Context Filtering on pathname in unified logs shows no data despite the network request returning some data Happening due to missing `filterFn` on pathname in `Columns.tsx` (should just return true so that the react table doesn't bother with client side filtering, since filtering is done on the server side) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Updated log table filter handling for several always-visible columns, with no change to the displayed data or user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2bac064adf |
Joshen/fe 3697 progressively default opt in to unified logs (#47296)
## Context We're progressively opting in users to use the new Unified Logs UI 🙂🙏 ## Changes involved - [ ] Removed flag for controlling visibility of unified logs feature preview - [ ] Added flag for controlling default opt in behaviour of unified logs - [ ] Small tweak to Unified Logs banner is default opted in (Just show "New" and more info CTA) - Disabling, then enabling again will thereafter show the existing "Go back to old logs CTA" <img width="290" height="166" alt="image" src="https://github.com/user-attachments/assets/a2c46ce1-63c3-490c-bc7d-fc1254982dbe" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Unified Logs preview now derives default opt-in state from a new default-opt-in flag and exposes `isDefaultOptIn`. * **Bug Fixes** * Removed eligibility-based gating so the “Beta” badge and Unified Logs banner render consistently across logs screens. * Unified Logs banner was refactored to handle enable/disable and navigation internally, while remaining shown unconditionally. * **Tests** * Updated mocks and assertions to reflect the revised preview/banner enablement and dismissal logic. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
772b3bb36e |
Adjust connection logs toggle for unified logs, flip it to true by default (#47258)
## Context For unified logs, postgres connection logs are being filtered out by default previously from this [PR](https://github.com/supabase/supabase/pull/46371) due to its noise. We're opting to show the connection logs by default instead so this PR changes that behaviour + adjusts the connection logs filter UI In particular this is timely as we're adjusting how the DB will log connections based on this [changelog](https://github.com/orgs/supabase/discussions/47197), and we'd want to make sure that users can find their connection logs easily ## Changes involved - [ ] Search parameter renamed to `show_connection_logs` so that we don't need to flip its boolean value for the checkbox - [ ] `show_connection_logs` is subsequently `true` by default - [ ] Shift connection logs filter to a nested option under Postgres log type - Makes it more visual that connection logs are related to the Postgres service - Currently its hidden all the way in the bottom under "Misc" which can be easily missed - <img width="302" height="151" alt="image" src="https://github.com/user-attachments/assets/e3e61ac7-aa16-4769-a89e-e911daacea27" /> - <img width="289" height="156" alt="image" src="https://github.com/user-attachments/assets/c70ac7c4-d2f7-4961-a6d6-6653c59d8548" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Unified Logs now supports expandable, nested “Log Type” filter options for drilling into connection-related entries. * **UI Improvements** * Connection logs are visible by default; the visibility control has been integrated into the main filter experience. * Filter panels are now streamlined, and key filters (such as “Level”, “Status”, and “Method”) have been reordered and adjusted for a cleaner default state. * **Bug Fixes** * Updated Unified Logs query/test behavior to match the new connection-log visibility logic. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
3cf5cc634b |
Joshen/fe 3661 show actual storage logs instead of api gateway logs (#47235)
## Context Includes `storage_logs` as a source for storage logs Also shifts the connection filter logic into `buildBaseWhere` - realised there's an issue with this where the facet count was showing a value but there's no logs <img width="1389" height="954" alt="image" src="https://github.com/user-attachments/assets/5c1ee60f-4729-4e0c-868b-9f8167d82c51" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Updated unified logs query logic for the `storage` log type so it now correctly includes both `storage_logs` and matching `edge_logs` entries (based on request path), improving consistency in results. * Ensured connection-lifecycle message suppression is applied uniformly across unified log views and all related count/badge calculations, keeping sidebar filters and badge counts aligned with the visible data. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
086232b207 |
Include postgrest_logs as source for Postgrest logs (#47225)
## Context For unified logs, we're currently pulling data from `edge_logs` and filtering on path like `/rest` to fill the `Postgrest logs` However, `edge_logs` are logs from the API Gateway and Postgrest logs has its own source `postgrest_logs` ## Changes involved - Update source for postgrest logs to include `postgrest_logs` - Improve labelling of log types - Improve overflow scroll container max height of `DataTableFilterCheckbox` - Previously its max height of 200px was nicely fitting the height of 6 options, so there's no visual indication that there's more to scroll. Hence adjusting to 215px to "peek" the next option as below: <img width="283" height="315" alt="image" src="https://github.com/user-attachments/assets/eb962d66-d575-4ee9-9f80-eaa2af0278ef" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Enhanced log type filter labels in the Unified Logs interface for improved readability. * Expanded PostgREST log detection and categorization. * Increased vertical space in checkbox filter dropdowns for better content visibility. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
2207d7f665 |
Unified logs add facet count to filter options if operator is eq (#47121)
## Context Changes are mainly within the `FilterBar` component in UI patterns Supports a `count` option in `filterProperties` for `FilterBar` - which will render as a filter option but only if the operator is set to `eq`(opting for this as we don't have the numbers up front for the `neq` operator) <img width="389" height="319" alt="image" src="https://github.com/user-attachments/assets/1d6e7dae-5350-4110-910b-88a5517fbb6e" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Filter options in Unified Logs now display item counts for log type, method, level, and other enum filters, providing visibility into result distribution across filter choices. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b87110b695 |
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 and filtering assertions to cover the new counting structure and facet row behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
37fcfce07c |
feat(logs): show query and details in unified PG log dashboards DEBUG-138 (#47026)
## Problem The unified log dashboards' Postgres detail panel hid the `query` and `detail` fields. They were present in the raw log message but never surfaced in the structured view, making them harder to use when debugging. ## Fix - Select `pgl_parsed.query` and `pgl_parsed.detail` in the Postgres service flow query. - Add `Query` and `Details` field configs to the Postgres primary fields, both with `wrap: true` so long values display in full instead of truncating. The parsed Postgres field is `detail` (singular); it is labeled "Details" in the UI. ## How to test - Open Studio and navigate to the unified logs dashboard for a project. - Filter to Postgres logs and select a log row to open the detail panel. - Confirm the Postgres section now shows `Query` and `Details` rows below `User`. - Expected result: rows render the parsed query and detail text, wrapping for long values, and show an em dash when empty. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * PostgreSQL service flow logs now show additional always-visible **Query** and **Details** fields, bringing parsed database query content and expanded information directly into the log view. * **Tests** * Updated log inspection coverage to ensure the new parsed fields are correctly surfaced in the flattened inspection output. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
587607d335 |
feat(unified-logs): restore card-style sidebar banners (#47028)
## Problem When [#46812](https://github.com/supabase/supabase/pull/46812) was scoped down to "sidebar visual changes only", Kemal's UI redesign of the Unified Logs sidebar banners was unintentionally reverted back to the older full-bleed strip layout. The shared `UnifiedLogsBanner` component survived, but his actual visual design did not. This PR brings back just Kemal's banner UI changes, with nothing else from that branch. ## Changes - **promo variant** (`LogsSidebarMenuV2`): bordered card with a "New" badge, an "Introducing unified logs" heading, and an "Enable preview" button + "More information" tooltip button - **utility variant** (`FilterSideBar`): bordered card for the "Go back to old logs" action with a "Switch back" tooltip button - Restore the `mx-4 mt-4` placement in both consumers Adapted to the current `Button` `variant` API (the original used the now-removed `type` prop). ## Testing - `pnpm lint --filter=studio` - Visual check of the Logs sidebar for an account eligible for Unified Logs (promo card) and one already on Unified Logs (utility card) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a "New" badge indicator to the logs interface. * **Style** * Redesigned the unified logs banner with a new card-based layout. * Updated the "Go back to old logs" option with improved visual presentation and tooltip guidance. * Adjusted spacing and alignment of the banner component for better visual hierarchy. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: kemal <hello@kemal.earth> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
96d43099bb |
chore: refactor Button API so that it can be used a standard button (#46880)
## 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> |
||
|
|
a10bc9a88a |
feat(unified-logs): compact toggle banner and ArrowDown selects first log (#46812)
Visual cleanup of the Logs sidebar (unified logs): - Restyle the "Go back to old logs" and "Try Unified Logs" banners as full-bleed bordered strips (no card), with an icon-only switch-back button and a tooltip - Add a "Beta" badge next to the "Logs" sidebar title - Rename the product from "Logs & Analytics" to "Logs" <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Unified Logs banner with “Try Unified Logs” and “More information” actions, plus a “Go back to old logs” utility layout. * Show a **“Beta”** badge for Unified Logs eligibility. * **UX Updates** * Updated the Logs experience to consistently display under the **“Logs”** product layout. * **Tests / Documentation** * Updated end-to-end checks and examples to expect the **“Logs”** heading text exactly. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: kemal <hello@kemal.earth> |
||
|
|
39ed3add2f | fix(studio): derive unified auth log severity from log_attributes[status] (#46854) | ||
|
|
9c572a56fd |
feat(logs): add realtime, supavisor, and pgbouncer to unified logs (#46786)
## Problem The unified logs view was missing three log sources that the backend already returns: Realtime (`realtime_logs`), Supavisor (`supavisor_logs`), and PgBouncer (`pgbouncer_logs`). Users had no way to filter or view logs from these services in the unified view. ## Fix - Added `realtime`, `supavisor`, and `pgbouncer` to `LOG_TYPE_PREDICATE` and `LOG_TYPE_EXPR` in the OTEL query builder so rows from these sources are matched and labeled correctly. - Added the three types to `LOG_TYPES` so filter chips appear in the UI. - Added icons (`Realtime` from the icons package, `Cable` from lucide-react for both pooler types) in `LogTypeIcon.tsx`. - Added display labels in `formatServiceTypeForDisplay` (`Realtime`, `Supavisor`, `PgBouncer`). - Fixed a pre-existing unsafe cast in `ServiceFlowPanel.tsx` where any log type not in the service flow allow-list (like the new types) would produce a truthy `serviceFlowType` and trigger a runtime error on row click. The fix checks against `SERVICE_FLOW_TYPES` before casting. Note: `pg_cron_logs` is not included because the backend otel query does not yet return that source. ## How to test 1. Open unified logs for a project that has Realtime activity. 2. In the log type filter, confirm `realtime`, `supavisor`, and `pgbouncer` chips are visible. 3. Toggle on `realtime` and confirm Realtime logs appear with the correct icon. 4. Click a realtime log row and confirm the detail panel opens on the raw JSON tab without a runtime error. 5. Toggle on `supavisor` or `pgbouncer` and confirm pooler logs appear if the project has connection pooler activity. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for three new log types — Realtime, Supavisor, and PgBouncer — in Unified Logs with display labels, icons, and filtering/viewing support. * **Bug Fixes / UI Behavior** * Service Flow “Overview” tab now only shows when the service type is recognized, preventing irrelevant overview content for unsupported log sources. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
ab93452cdf |
fix(unified-logs): apply sidebar facet filters on click (#46589)
## Problem
Clicking a checkbox in the logs filter sidebar (Log Type, Status,
Method, etc.) doesn't do anything. The box ticks, but the log list and
counts don't change. Only the search bar at the top actually filters. On
top of that, opening a URL that already has filters renders the sidebar
checkboxes unticked, so the active filters are invisible.
## Solution
The top search bar and the sidebar each store a selected filter in a
different internal format. A recent change taught the query builder
(`columnFiltersToLogsFilters`) to understand only the search bar's
wrapped `{ operator, values }` format, so anything clicked in the
sidebar (a bare `string[]`) was thrown away before it reached the query,
and nothing refetched.
- Accept the sidebar's bare format, treating it as a plain "equals"
filter (which is exactly what a checkbox means). Sidebar clicks apply
immediately again.
- Seed the sidebar checkboxes from the URL: equality filter groups are
seeded as a bare `string[]` (the shape the checkbox reads), so they
render ticked on load. Non-eq groups (neq/ilike from the top bar) stay
wrapped so their operator survives a round-trip.
- Keep the time-range picker out of the `filter` URL param so it doesn't
get swept in by mistake.
- Extracted the URL-building (`buildFilterSearchUpdate`) and URL-seeding
(`logsFiltersToColumnFilters`) into pure helpers so the click-to-query
and URL-load wiring are unit tested, not just the transform.
## How to test
Open Unified Logs and click a Log Type / Status / Method checkbox in the
left sidebar. The list and counts should update right away, without
touching the top search bar. Reload the page (or open a shared URL with
filters): the matching sidebar checkboxes should be ticked.
`UnifiedLogs.filters.test.ts` covers both filter formats, the time-range
exclusion, cleared filters, the click-to-URL wiring, and the URL-load
round-trip (including that a neq filter is not downgraded to eq).
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Tests**
* Added coverage for filter ↔ URL conversions, checkbox grouping,
operator preservation, null/cleared handling, and timerange routing.
* **Bug Fixes**
* Consistently normalize and serialize varied filter input shapes.
* Omit non-allowlisted columns from URL filters.
* Ensure timerange uses its dedicated URL key and is removed when
cleared.
* **Refactor**
* Centralized filter serialization/deserialization and simplified URL
update wiring.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|
|
2cb7f0c078 |
feat(studio): add keyboard shortcuts for unified logs (#46680)
Adds the final set of keyboard shortcuts to the Unified Logs page and converts the last hardcoded `keydown` listener (detail-panel prev/next) to the shared shortcut registry. Each action also surfaces its keybind in a registry-driven tooltip. Closes FE-3415. ## Shortcuts | Action | Shortcut | Notes | | --- | --- | --- | | Refresh logs | `Shift+R` | new | | Download logs | `Shift+E` | new — opens export dropdown | | Focus filter bar | `Shift+F` | new | | Clear filters | `F` then `C` | new | | Copy selected as JSON | `Mod+Shift+J` | new — reuses `results.copy-json` | | Copy selected as Markdown | `Mod+Shift+M` | new — reuses `results.copy-markdown` | | Previous / next log (detail panel) | `↑` / `↓` | converted from hardcoded listener | | Close details panel | `Escape` | new | Existing shared `data-table.*` shortcuts kept as-is: toggle sidebar (`Mod+B`), live mode (`Mod+J`), reset filters (`Mod+Esc`), reset columns (`Mod+U`), reset focus (`Mod+.`). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added keyboard shortcuts for Unified Logs: copy selected rows as JSON/Markdown, navigate rows, refresh, clear/reset filters, download, and focus filter — shortcuts show in the command menu and display badges/hints in menus and buttons. * **Refactor** * Shortcut handling unified across log controls; shortcuts enable/disable based on context and a new "Logs" group appears in the shortcut reference. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7e9badc6b8 |
chore(studio): migrate useStaticEffectEvent to React 19 useEffectEvent (#46415)
Studio is on `react@^19.2.6`, and `useEffectEvent` shipped stable in React 19.2 with the same signature as the userland polyfill. This drops the local hook in `apps/studio` and `apps/www` in favor of the built-in. **Removed:** - `apps/studio/hooks/useStaticEffectEvent.ts` - `apps/www/hooks/useStaticEffectEvent.ts` - `.claude/skills/use-static-effect-event/` — skill is obsolete **Changed:** - 26 call sites: dropped the `useStaticEffectEvent` import, added `useEffectEvent` to the existing `react` import, renamed call sites - `.claude/CLAUDE.md`: `apps/studio` row updated React 18 → React 19 - `.claude/skills/vercel-composition-patterns/SKILL.md`: removed stale "Studio uses React 18, skip these patterns" warning ## To test - `pnpm typecheck --filter=studio` — passes locally - `pnpm typecheck --filter=www` — passes locally - `grep -rn "useStaticEffectEvent"` returns nothing outside `node_modules` - Smoke-test areas that use the hook: schema visualizer edges (intersection check), spreadsheet import, sign-in/CLI login flows, side panels with unsaved-changes prompts **Out of scope:** pre-existing Tailwind lint warning on `DefaultEdge.tsx:141` (`outline` + `outline-1` conflict) — unrelated to this migration <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Internal event handling migrated to React’s built-in event hooks across the Studio app; no user-facing changes. * **Documentation** * Clarified React 19 compatibility and noted Studio now targets React 19. * Removed obsolete documentation for a deprecated internal hook. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46415?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com> |
||
|
|
abe7e87bba |
Remove unified logs related dead code (#46459)
## Context Just removing unified logs related dead code (Not used, not imported) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Streamlined the Service Flow view by removing legacy timeline, collapsible sections, and some detailed step UI for a cleaner visualization. * Simplified the Unified Logs surface by reducing exposed types, consolidating query logic, and removing an internal event bus. * Removed legacy list/detail and sheet UI pieces to tighten the logs interface and public API surface. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46459?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
ef613f2068 |
Joshen/debug 123 row dropdown appears outside of details panel (#46462)
## Context Addresses DEBUG-126 Making some adjustments to the service flow panel in unified logs - Row action will be via a `...` button instead of the whole row <img width="487" height="207" alt="image" src="https://github.com/user-attachments/assets/cd0f6d41-aace-41c2-872b-60071fd6b986" /> - Fields with no values will show a `-` (previously didn't show anything) <img width="501" height="130" alt="image" src="https://github.com/user-attachments/assets/3b62c44e-7fd9-497b-8261-ca5e1c975bc2" /> - Opting to close the dropdown menu when scrolling to prevent overflow of the dropdown menu content with the parent component - However, IMO this needs to be addressed at the UI component level RE how we want to handle dropdown menu content when scrolling. The content is portalled hence why its happening - (Not user facing) Clean up usage of `FieldValue` and `DataTableSheetRowAction` - Was confusing to be passing `value` as a react node when declaring `DetailRow` from `PostgresFlowDetail` and `Block` - Opting to render the UI inside `DetailRow` instead, which gives us better control on the UI <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Dropdown menus now close when the page is scrolled while open. * **Improvements** * Cleaner, more consistent log value formatting and status code display. * Loading placeholders for log fields are handled more consistently. * Dropdown content area widened for better visibility. * Row actions only appear when a value is present; copy action shown as fallback. * **UI Behavior** * Collapsible section headers receive improved layout, transition, and hover styling. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46462?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
cbdd8b9b80 |
Add skeleton loader for unified logs chart (#46460)
## Context Opting for just a loading spinner as the skeleton loader for charts <img width="1468" height="952" alt="image" src="https://github.com/user-attachments/assets/d6c291c8-9151-40c8-bfbe-f838431dd6dc" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a loading spinner to the unified logs view that displays while logs are being fetched, providing clear visual feedback during data retrieval. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46460?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b281d3fcf5 |
Joshen/fe 3475 add operator to event message filter (#46457)
## Context Original task was to support searching `!=` on `event_message`, but this PR addresses some things regarding searching on `event_message` in unified logs that I found while working on this. ### `=` and `!=` are technically inaccurate We're doing pattern matching when searching on event_message rather than a strict equality check, so a more accurate operator would be `ilike (~~*)` and `not ilike(!~~*)` - both of which would be case insensitive for easier checking. Am thus swapping to use these 2 operators when filtering on `event_message`: <img width="430" height="134" alt="image" src="https://github.com/user-attachments/assets/c8a320b6-e016-44ae-aed0-1e7b6cefbda9" /> ### Filtering on `event_message` was never server side It seems like we have been only doing client side searching on `event_message` which is inaccurate as we're only filtering against rows that are on the current page. The `event_message` filtering was never appended to the URL state as well so the changes in this PR ensures that all search including `event_message` is server side. ### Rework on unified logs filtering via URL params Because we're now supporting more than just `=` in unified logs, the current filter system is insufficient (e.g can't just be `status=x&method=y`). Am opting to use the same system as per how we do filtering in the table editor where search params follow the syntax: `{column}:{operator}:{value}` <img width="521" height="46" alt="image" src="https://github.com/user-attachments/assets/54e72eb2-1581-4c1a-910e-58d993da1766" /> ## To test - [ ] Verify that searching for logs in unified logs still works - [ ] Verify that searching against event_message in unified logs works as expected (both ilike and not ilike) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Repeatable URL-based column filters with operator support (e.g., equals, not-equals, pattern matching). * Expanded pattern-style operators for message searches (case-insensitive/contains, negation). * **Improvements** * Unified filter handling across logs list, charts, and counts for consistent results. * Range/slider filters and pagination remain supported and round-trip via URL parameters. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46457?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c595a22eb3 |
fix(studio): unified logs status color consistency DEBUG-113 (#46450)
## Problem
In the unified logs UI, the status badge for a Postgres row showed a
different color in the detail view than in the table view. The table
view colors by the row's pre-computed `level` (derived in SQL from
`severity_text`), so a Postgres ERROR row's SQL state code (e.g.
`42P01`) renders red. The detail view re-derived the level via
`getStatusLevel(value)` which only handles HTTP numeric codes.
`Number('42P01')` is `NaN`, every branch fell through, and the badge
always rendered neutral regardless of severity.
## Fix
Color the status badge in the detail view by `data.level`, the same
canonical row level the table view uses. Threaded `level` through
`FieldValue` and used `data.level` directly in `BlockField`.
`getStatusLevel` is still used by the Webhooks platform views, where
`responseCode` is always a numeric HTTP status, so those callers stay
correct.
## How to test
- Open the dashboard and navigate to a project's unified logs page.
- Filter to `log_type: postgres` and find an ERROR row.
- Confirm the status code (a SQL state like `42P01`) is colored red in
the table.
- Click the row to open the detail pane and confirm the Status field in
the Postgres block is also red.
- Repeat with a WARNING-severity Postgres row, confirming both views
render warning color.
- Sanity check a 5xx HTTP row (PostgREST or Storage) still shows red in
both views, and a 2xx row stays neutral in both.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Improved consistency in how log level context is propagated through
logging interface components, enabling more uniform formatting and
rendering behavior across the unified logs display.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46450?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|
|
5f4153d9e0 |
Adjust auth log detail pane in unified logs (#46372)
## Context Currently when opening an auth log, the log details panel is seemingly very empty Auth logs are pretty empty by their nature unlike the other logs so am opting to adjust the detail panel for them slightly ### Changes involved - Fixing passing `host` and `path` when rendering auth log details - Opting to only show "Network" + "Authentication" segments for auth (The other fields do not apply for auth logs) <img width="434" height="476" alt="image" src="https://github.com/user-attachments/assets/cf8bb128-2332-424a-a10e-a7e836acb7d5" /> - Make each section collapsible, allow users to adjust themselves how they want to consume the information <img width="421" height="474" alt="image" src="https://github.com/user-attachments/assets/e842bc79-edff-4ec6-ae38-a9249966881d" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Postgres connection and session info now appear in separate expandable sections for easier browsing * Auth-related fields (ID, status, path, referer) now extract and present richer, more accurate values * Request path and host resolution improved across service flow/network views * **Bug Fixes / Improvements** * Safer parsing of auth event messages and more robust fallbacks for missing fields * Cleaner row styling and section rendering for consistent visuals <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46372?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
28eb347032 |
feat(studio): small modification to logs drawer rows (#46396)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Removes the `└` shaped character before each property. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated detail row layout in service flow display with refined spacing and removed visual connectors for improved readability. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46396?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
67997f088d |
Reduce z index on row selection header (#46360)
## Context `RowSelectionHeader` was unnecessarily using a 99 z-index value which was conflicting with the tooltips, so reducing it down to 2 which should be all that we need ### Before <img width="558" height="280" alt="image" src="https://github.com/user-attachments/assets/362be2df-aca7-4cb9-9bfb-84e77dac06ab" /> ### After <img width="374" height="161" alt="image" src="https://github.com/user-attachments/assets/118c8411-f25c-4513-9cce-2d24dcc71759" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Updated the z-index layering of the selected-rows overlay header component. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46360?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
a7d51cdf52 |
feat(logs): brand legacy analytics SQL stack with SafeLogSqlFragment (#46351)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Refactor / type safety improvement ## What is the current behavior? The legacy log query stack (`genDefaultQuery`, `genCountQuery`, `genChartQuery`, `genWhereStatement`, `useLogsPreview`, `useSingleLog`) builds SQL from raw strings with no type-level guarantee that values are safely interpolated. Identifier helpers (`bqIdent`, `bqDottedIdent`, `clickhouseIdent`, `clickhouseDottedIdent`) are duplicated across BigQuery and ClickHouse variants, and `bqDottedIdent` wraps the entire dotted path in one backtick pair (`` `request.pathname` ``), which BigQuery treats as a literal column name rather than a UNNEST alias field — causing runtime query failures on dotted filter keys. ## What is the new behavior? - All gen functions return `SafeLogSqlFragment` and all callers route through `executeAnalyticsSql`, enforcing compile-time SQL provenance tracking across the legacy stack. - `bqIdent` / `bqDottedIdent` / `clickhouseIdent` / `clickhouseDottedIdent` are replaced by a single `quotedIdent` function that backtick-quotes each segment individually (e.g. `` `request`.`pathname` ``). ClickHouse natively accepts backticks, so one function serves both engines and the dotted-path quoting bug is fixed. - `SQL_FILTER_TEMPLATES` entries are converted to `SafeLogSqlFragment` (static via `safeSql`, dynamic via `safeSql` + `analyticsLiteral`). - `buildWhereClauses` is extracted as a private helper returning `SafeLogSqlFragment[]` so the pg_cron path can merge clauses without unsafe slice-and-cast. ## Additional context <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Logs query generation migrated to safer, engine-agnostic SQL fragments, typed filter templates, and unified identifier quoting for stronger injection protection and more consistent queries. * Logs preview and single-log retrieval now execute analytics SQL end-to-end using the unified executor. * **New Features** * Analytics SQL executor can call the backend via GET or POST and accepts method selection. * **Tests** * Updated tests to validate unified identifier quoting and safe-SQL helper behavior. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46351?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
810b395888 |
feat(studio): hide Postgres connection logs by default in unified logs (#46371)
## Problem The unified logs view shows Postgres connection lifecycle events (connection received, connection authenticated, connection authorized) alongside application logs. These messages are emitted on every database connection and make it hard to spot meaningful log entries. ## Fix Adds a SQL-level filter that excludes Postgres connection messages by default. A toggle in the filter sidebar lets users opt in to seeing them when needed. The preference is stored in the URL so it persists across navigation. **Changes:** - `SEARCH_PARAMS_PARSER` gets a new `hide_connection_logs` boolean param (default `true`) - `buildBaseWhere` in the query builder emits a `NOT (source = 'postgres_logs' AND event_message LIKE 'connection %...')` predicate when the param is true, filtering at the query level - New `ConnectionLogsToggle` component renders a labeled switch in the filter sidebar - `FilterSideBar` gains a `beforeFilters` slot so the toggle can be injected without coupling the generic component to log-specific logic ## How to test 1. Open a project in Studio and navigate to the unified logs page 2. Confirm that connection log messages (e.g. "connection received: host=...", "connection authorized: user=...") are not visible by default 3. In the left filter sidebar, find the "Connection logs" toggle near the top and switch it on 4. Confirm that connection log messages now appear in the list 5. Toggle it back off and confirm they disappear again 6. Reload the page with the toggle on (URL will contain `hide_connection_logs=false`) and confirm the setting is preserved <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a "Connection logs" toggle in the filter sidebar to hide Postgres connection lifecycle messages by default (default = hidden); changing it updates the logs view and the logs chart. * Filter sidebar now supports placing extra controls so the toggle is available alongside existing filters. * **Behavior** * Facet/count queries remain unaffected by this toggle to preserve existing counts. * **Tests** * Added tests verifying default hide behavior and explicit show behavior. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46371?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|
|
94834752b2 |
Improve unified logs formatting for auth logs (#46365)
## Context Improved formatting for auth logs in unified logs - their metadata are seemingly all hidden within "event_message" so the changes here bring them up - Fix detecting status, pathname, and method for auth logs from `event_message` - None were showing originally, status was mostly defaulting to `200` - Improve formatting of `event_message` by prioritising errors + floating up the auth action - Currently only shows "request completed" ## Before <img width="1449" height="955" alt="image" src="https://github.com/user-attachments/assets/f0c7f166-06ab-4bfc-8653-6f5638bf1ae7" /> ## After <img width="1449" height="956" alt="image" src="https://github.com/user-attachments/assets/cdf49bd8-c33a-4f40-a6b7-8783dc38d174" /> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * More robust parsing of auth log messages to extract error/status/method/path values and fall back to the original text when parsing fails. * Fixed cases where displayed status/method/pathname could be incorrect for auth logs. * **Improvements** * Normalized auth error text (underscores → spaces) and optional auth-action prefixes for clearer messages. * Conditional sentence-capitalization for auth event messages. * **New Features** * Centralized log metadata extraction for unified log display. * **Tests** * Added tests covering auth and non-auth log parsing and metadata extraction. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46365?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1d2817da9b |
feat(logs): brand ServiceFlow.sql.ts with SafeLogSqlFragment (#46336)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Refactor / security hardening (part 3 of stacked analytics safe-SQL series; stacks on top of PR 2: "feat(logs): route unified-logs hooks through executeAnalyticsSql") ## What is the current behavior? `ServiceFlow.sql.ts` interpolates `logId` and `serviceType` as raw template-literal strings directly into SQL (e.g. `` `WHERE el.id = '${logId}'` ``). The legacy BigQuery branch of `unified-log-inspection-query.ts` calls `post()` directly with a plain `string`-typed SQL value, bypassing the `executeAnalyticsSql` wire-boundary. ## What is the new behavior? - Add `SAFE_SERVICE_LITERAL: Record<EdgeServiceType, SafeLogSqlFragment>` — pre-branded SQL string literals for each service type, built with `analyticsLiteral`. - Rewrite `getBaseEdgeServiceFlowQuery`, `getEdgeFunctionServiceFlowQuery`, and `getPostgresServiceFlowQuery` to use `safeSql` template tag with `analyticsLiteral(logId)` and `SAFE_SERVICE_LITERAL[serviceType]`. Return types changed to `SafeLogSqlFragment`. - Update the four thin wrappers (`getPostgrestServiceFlowQuery`, `getAuthServiceFlowQuery`, `getStorageServiceFlowQuery`) to return `SafeLogSqlFragment`. - Replace `let sql = ''` + direct `post()` call in `unified-log-inspection-query.ts`'s legacy BigQuery branch with `let sql: SafeLogSqlFragment` + `executeAnalyticsSql`, eliminating the last direct `post()` call to the analytics endpoint in this file. `pnpm typecheck` passes cleanly. ## Additional context <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Secured analytics and log inspection queries through parameterized SQL execution, preventing potential SQL injection vulnerabilities. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46336?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
c8e1eb1836 |
Support click drag to highlight time range in timeline chart unified logs (#46149)
## Context As per PR title - supports click drag to highlight a specific time range in the TimelineChart of unified logs as such: Also adjusts the chart highlight behaviour which affects the database report charts to clear the highlighted area when clicking outside of it <img width="445" height="171" alt="image" src="https://github.com/user-attachments/assets/2a510fe1-2f86-4961-8f38-9dd5efcc80ec" /> ### Demo https://github.com/user-attachments/assets/5084fc04-49a7-4b41-94be-b4edb1bef3ce <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Escape key support to dismiss chart highlights * **Improvements** * Clear chart selections when clicking outside the menu while preserving chart interactions * Time-range filters now apply to the intended column for more accurate zooms * Tooltip and highlight rendering refined; reference highlight styling adapts to dark mode * Unified chart highlight interactions for more consistent selection and zoom behavior <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46149?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
69b22d37cd |
fix(studio): parse auth log event_message JSON for human-readable display DEBUG-111 (#46147)
## Problem
Auth log entries store metadata as a stringified JSON object in the
`event_message` field (e.g. `{"msg":"user signed
in","level":"info","status":200,"path":"/auth/v1/token"}`). The
dashboard was rendering this raw JSON string in the event message column
instead of a human-readable message.
## Fix
Added `parseAuthLogEventMessage` utility to `UnifiedLogs.utils.ts` that
JSON-parses the `event_message` value and extracts the `msg` field,
falling back to the `error` field, then the original raw string. The raw
string fallback ensures self-hosted versions with different log formats
continue to render without breaking between releases.
Applied in two places:
- `UnifiedLogs/components/Columns.tsx`: event_message column for
`log_type === 'auth'` rows
- `Settings/Logs/LogColumnRenderers/AuthColumnRenderer.tsx`:
event_message fallback when `metadata.msg` is absent
## How to test
1. Open the Supabase dashboard and navigate to Logs > Auth Logs
2. Verify that log entries show a plain message (e.g. "login attempt",
"invalid password") in the event message column instead of a raw JSON
string
3. Navigate to the unified logs view and filter to auth logs only
4. Verify the event message column shows the same human-readable
messages
5. Confirm that non-auth log types (edge, postgres, etc.) are unaffected
6. Expected result: auth log entries show readable messages; all other
log sources are unchanged
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Auth log messages now display in a more readable, human-friendly
format by intelligently parsing message data.
* **Refactor**
* Removed tooltip functionality from the pathname column in logs view
for streamlined display.
<!-- review_stack_entry_start -->
[](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46147?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack)
<!-- review_stack_entry_end -->
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
|
||
|
|
e8af602d2d |
Joshen/debug 110 default unified logs search to event message (#46134)
## Context Adjusts the filter bar component to accept a `freeformDefaultProperty`, in which entering any text in the filter bar will opt to search against that property by default. (Property must be defined within the `filterProperties` prop too) Applies to unified logs, which for e.g "Event message" is a valid filter: <img width="428" height="250" alt="image" src="https://github.com/user-attachments/assets/a08c015c-c9aa-4985-9e15-6429f455ccf0" /> I've set `freeformDefaultProperty` to be `event_message`, and hence typing free text will opt the default action to just filtering against that property <img width="437" height="135" alt="image" src="https://github.com/user-attachments/assets/ccf6944a-1c5d-4944-acfa-ac82dc20bb10" /> ### Demo: https://github.com/user-attachments/assets/287ee22d-f957-48e5-89b0-1fed159cd86a ### Other changes - Opt to deprecate `truncateText` util from unified logs -> preference for tailwind instead - Event message is added as a filter field, but hidden in the side nav (wouldn't make sense since the content is very dynamic, unlike something similar like pathname) - Fixes some console errors in unified logs because we were using `.getColumn` in `DataTableSheetRowAction` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added an "Event message" filter (hidden by default) and set it as the default target for freeform searches. * **UI Improvements** * Filter sidebar resize constraints tightened. * Timeline chart spacing and x-axis tick behavior improved. * Action labels and command list items no longer truncate long input values. * **Bug Fixes** * More reliable resolution of target columns for row actions, improving available filter options. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/46134?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> |