Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore: Fix show all recordings button (#70129)

Jordan Mryyanef6f89535b80
diff --git a/frontend/src/scenes/session-recordings/playlist/Playlist.test.tsx b/frontend/src/scenes/session-recordings/playlist/Playlist.test.tsx
index ae3db275351e..b3f83717d1fa 100644
--- a/frontend/src/scenes/session-recordings/playlist/Playlist.test.tsx
+++ b/frontend/src/scenes/session-recordings/playlist/Playlist.test.tsx
@@ -63,30 +63,29 @@ describe('Playlist', () => {
)
}
- it('does not show the selected sessions banner when no session_ids filter is set', () => {
+ it('does not show the selected sessions notice when no session_ids filter is set', () => {
renderPlaylist()
- expect(screen.queryByText(/Only showing/)).not.toBeInTheDocument()
- expect(screen.queryByText('Show all recordings')).not.toBeInTheDocument()
+ expect(screen.queryByText(/selected recording/)).not.toBeInTheDocument()
+ expect(screen.queryByText('Show all')).not.toBeInTheDocument()
})
- it('shows the selected sessions banner and clears session_ids via "Show all recordings"', async () => {
+ it('shows the selected sessions notice and clears session_ids via "Show all"', async () => {
logic.actions.setFilters({ session_ids: ['s1', 's2'] })
renderPlaylist()
- expect(screen.getByText('Only showing 2 selected recordings')).toBeInTheDocument()
+ expect(screen.getByText('Showing 2 selected recordings')).toBeInTheDocument()
await waitFor(() => {
expect(logic.values.sessionRecordingsResponseLoading).toBe(false)
})
- // LemonBanner renders the action twice (wide and narrow responsive variants)
- userEvent.click(screen.getAllByText('Show all recordings')[0])
+ userEvent.click(screen.getByText('Show all'))
await waitFor(() => {
expect(logic.values.filters.session_ids).toBeUndefined()
})
- expect(screen.queryByText(/Only showing/)).not.toBeInTheDocument()
+ expect(screen.queryByText(/selected recording/)).not.toBeInTheDocument()
})
})
diff --git a/frontend/src/scenes/session-recordings/playlist/Playlist.tsx b/frontend/src/scenes/session-recordings/playlist/Playlist.tsx
index 9bd78c638c1d..2a615e714a9b 100644
--- a/frontend/src/scenes/session-recordings/playlist/Playlist.tsx
+++ b/frontend/src/scenes/session-recordings/playlist/Playlist.tsx
@@ -261,17 +261,20 @@ export function Playlist({
</div>
)}
{!!filters?.session_ids?.length && (
- <LemonBanner
- type="info"
- className="mb-2"
- action={{
- children: 'Show all recordings',
- onClick: () => setFilters({ session_ids: undefined }),
- loading: !!sessionRecordingsResponseLoading,
- }}
- >
- Only showing {pluralize(filters.session_ids.length, 'selected recording')}
- </LemonBanner>
+ <div className="mb-2 flex items-center justify-between gap-2 rounded border bg-fill-primary px-2 py-1">
+ <span className="min-w-0 truncate text-xs text-secondary">
+ Showing {pluralize(filters.session_ids.length, 'selected recording')}
+ </span>
+ <LemonButton
+ className="shrink-0"
+ size="xsmall"
+ type="tertiary"
+ onClick={() => setFilters({ session_ids: undefined })}
+ loading={!!sessionRecordingsResponseLoading}
+ >
+ Show all
+ </LemonButton>
+ </div>
)}
<div
ref={playlistRef}