Files
supabase/apps/studio/tests/components/interfaces/App/AppBannerWrapper.utils.test.ts
Mert YEREKAPAN 65033221fb feat(studio): add logs.all deprecation banner (#49059)
Informational banner for the `logs.all` Management API removal on Sept
23, in the Logs and Observability sections.

* Untargeted. Whether a project calls the endpoint is behaviour that no
API response carries, so precise targeting needs a mgmt-api change (we
aimed for speed and less complexity here). Copy is informational rather
than "action required" since most viewers won't be affected.
* Uses `BannerStack` (bottom-right card) rather than the top header
banner, at priority 4 so it renders as the front card. Note this pushes
`database-connections-banner` (p2) and `index-advisor-banner` (p3) into
peek slivers on Observability.
* Short Notice card: title, one line of copy with `logs.all` inline, and
a Learn more link to the changelog.
* Waits for localStorage before showing, and BannerStack ignores stale
dismiss timers when a banner is revived (avoids flash-then-disappear on
refresh).
* Dismiss is browser-level; self-expires Sept 24 via
`LogsAllDeprecationExpiry`.
* Cleanup tracked in GROWTH-1104.
* Tested in staging.

Check in:

- /project/_/logs (unified logs)
- /project/_/logs/explorer
- /project/_/observability

| After |
| --- |
| <img width="626" height="528" alt="CleanShot 2026-08-20 at 12 29
49@2x"
src="https://github.com/user-attachments/assets/2044966d-bc83-4f88-ac75-1b8ff80be08d"
/> | <img width="622" height="440" alt="CleanShot 2026-08-20 at 12 28
33@2x"
src="https://github.com/user-attachments/assets/1dc768cd-837c-4a5a-a3fa-7b6986fe5876"
/> |

Resolves GROWTH-1093.

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

## New Features
* Added a dismissible notice about the `logs.all` endpoint retirement on
September 23, 2026.
* The notice appears on relevant Logs and Observability pages with
streamlined migration guidance.
* Clarified that dashboard logs remain unchanged.
* Dismissal preferences are saved, and notices remain visible or are
removed reliably during navigation.

## Telemetry
* Added tracking for notice display and dismissal interactions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Danny White <dnywh@users.noreply.github.com>
2026-08-20 14:17:20 +00:00

29 lines
776 B
TypeScript

import { describe, expect, test } from 'vitest'
import { isLogsOrObservabilityPath } from '@/components/interfaces/App/AppBannerWrapper.utils'
describe('isLogsOrObservabilityPath', () => {
test.each([
'/project/abc/logs',
'/project/abc/logs/',
'/project/abc/logs/explorer',
'/project/abc/observability',
'/project/abc/observability/query-performance',
])('matches %s', (pathname) => {
expect(isLogsOrObservabilityPath(pathname)).toBe(true)
})
test.each([
undefined,
null,
'',
'/project/abc',
'/project/abc/editor',
'/project/abc/logs-explorer',
'/project/abc/functions/my-fn/logs',
'/org/abc/logs',
])('does not match %s', (pathname) => {
expect(isLogsOrObservabilityPath(pathname)).toBe(false)
})
})