Improve website events query performance and fix activity search persistence

This commit is contained in:
Francis Cao committed 2026-08-03 16:30:19 -07:00
1 parent b6b500ea4f
commit 079cfdde84
7 files changed
+95 -54

No files matched your search

@@ -7,6 +7,10 @@ export function WebsiteTabs() {
const website = useWebsite();
const { pathname, renderUrl } = useNavigation();
const { t, labels } = useMessages();
const resetParams = {
search: undefined,
page: undefined,
};
const links = [
{
@@ -49,7 +53,7 @@ export function WebsiteTabs() {
<TabList>
{links.map(({ id, label, icon, path }) => {
return (
<Tab key={id} id={id} href={renderUrl(`/websites/${website.id}${path}`)}>
<Tab key={id} id={id} href={renderUrl(`/websites/${website.id}${path}`, resetParams)}>
<Row alignItems="center" gap>
<Icon>{icon}</Icon>
<Text>{label}</Text>
@@ -1,5 +1,6 @@
import {
Button,
Column,
DataColumn,
DataTable,
type DataTableProps,
@@ -43,7 +44,7 @@ export function EventsTable(props: DataTableProps) {
<DataColumn id="event" label={t(labels.event)} width="2fr">
{(row: any) => {
return (
<Row alignItems="center" wrap="wrap" gap>
<Column gap="2">
<Row>
<IconLabel
icon={row.eventName ? <Lightning /> : <Eye />}
@@ -51,16 +52,18 @@ export function EventsTable(props: DataTableProps) {
labelProps={{ wrap: 'nowrap' }}
/>
</Row>
<Text
weight="bold"
style={{ maxWidth: '300px' }}
title={row.eventName || row.urlPath}
truncate
>
{row.eventName || renderLink(row.urlPath, row.hostname)}
</Text>
{row.hasData > 0 && <PropertiesButton websiteId={row.websiteId} eventId={row.id} />}
</Row>
<Row alignItems="center" gap>
<Text
weight="bold"
style={{ maxWidth: '300px' }}
title={row.eventName || row.urlPath}
truncate
>
{row.eventName || renderLink(row.urlPath, row.hostname)}
</Text>
{row.hasData > 0 && <PropertiesButton websiteId={row.websiteId} eventId={row.id} />}
</Row>
</Column>
);
}}
</DataColumn>