Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

feat(bottom-strip): show the page count on the left for noz, alerts and home (#12963)

Aditya Singhfd21f8b7609f
diff --git a/frontend/src/container/AllError/__tests__/useExceptionsStripInfo.test.tsx b/frontend/src/container/AllError/__tests__/useExceptionsStripInfo.test.tsx
new file mode 100644
index 0000000000..235c20970b
--- /dev/null
+++ b/frontend/src/container/AllError/__tests__/useExceptionsStripInfo.test.tsx
@@ -0,0 +1,53 @@
+import { renderHook } from '@testing-library/react';
+import { useBottomStripStore } from 'container/BottomStrip/store/useBottomStripStore';
+import { StripItemKind } from 'container/BottomStrip/types';
+
+import { useExceptionsStripInfo } from '../useExceptionsStripInfo';
+
+describe('useExceptionsStripInfo', () => {
+ beforeEach(() => {
+ useBottomStripStore.setState({ left: null, ownerId: null });
+ });
+
+ it('shows the rows on the page against the total', () => {
+ renderHook(() => useExceptionsStripInfo({ shownCount: 25, totalCount: 500 }));
+
+ expect(useBottomStripStore.getState().left).toMatchObject([
+ { kind: StripItemKind.Text, text: '25 of 500 exceptions' },
+ ]);
+ });
+
+ it('still says n of m when the whole list fits on one page', () => {
+ renderHook(() => useExceptionsStripInfo({ shownCount: 42, totalCount: 42 }));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '42 of 42 exceptions',
+ });
+ });
+
+ it('says exception, not exceptions, when there is one', () => {
+ renderHook(() => useExceptionsStripInfo({ shownCount: 1, totalCount: 1 }));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '1 of 1 exception',
+ });
+ });
+
+ it('shows zero before the counts land', () => {
+ renderHook(() => useExceptionsStripInfo({ shownCount: 0, totalCount: 0 }));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '0 of 0 exceptions',
+ });
+ });
+
+ it('clears the strip when the page unmounts', () => {
+ const { unmount } = renderHook(() =>
+ useExceptionsStripInfo({ shownCount: 25, totalCount: 500 }),
+ );
+
+ unmount();
+
+ expect(useBottomStripStore.getState().left).toBeNull();
+ });
+});
diff --git a/frontend/src/container/AllError/index.tsx b/frontend/src/container/AllError/index.tsx
index 544bad648e..40d4f9f170 100644
--- a/frontend/src/container/AllError/index.tsx
+++ b/frontend/src/container/AllError/index.tsx
@@ -38,6 +38,7 @@ import { Exception, PayloadProps } from 'types/api/errors/getAll';
import { GlobalReducer } from 'types/reducer/globalTime';
import { FilterDropdownExtendsProps } from './types';
+import { useExceptionsStripInfo } from './useExceptionsStripInfo';
import {
extractFilterValues,
getDefaultFilterValue,
@@ -160,6 +161,11 @@ function AllErrors(): JSX.Element {
},
]);
+ useExceptionsStripInfo({
+ shownCount: data?.payload?.length ?? 0,
+ totalCount: errorCountResponse.data?.payload ?? 0,
+ });
+
const isFetching = isErrorsFetching || errorCountResponse.isFetching;
useEffect(() => {
setIsFetching(isFetching);
diff --git a/frontend/src/container/AllError/useExceptionsStripInfo.ts b/frontend/src/container/AllError/useExceptionsStripInfo.ts
new file mode 100644
index 0000000000..6def26a574
--- /dev/null
+++ b/frontend/src/container/AllError/useExceptionsStripInfo.ts
@@ -0,0 +1,26 @@
+import { useMemo } from 'react';
+import { useBottomStrip } from 'container/BottomStrip/useBottomStrip';
+import { type StripItem, StripItemKind } from 'container/BottomStrip/types';
+import { pluralize } from 'utils/pluralize';
+
+interface UseExceptionsStripInfoArgs {
+ shownCount: number;
+ totalCount: number;
+}
+
+export function useExceptionsStripInfo({
+ shownCount,
+ totalCount,
+}: UseExceptionsStripInfoArgs): void {
+ const items = useMemo<StripItem[]>(
+ () => [
+ {
+ kind: StripItemKind.Text,
+ text: `${shownCount} of ${pluralize(totalCount, 'exception')}`,
+ },
+ ],
+ [shownCount, totalCount],
+ );
+
+ useBottomStrip(items);
+}
diff --git a/frontend/src/container/AppLayout/index.tsx b/frontend/src/container/AppLayout/index.tsx
index d29e8dd8fd..997a5238a2 100644
--- a/frontend/src/container/AppLayout/index.tsx
+++ b/frontend/src/container/AppLayout/index.tsx
@@ -854,7 +854,9 @@ function AppLayout(props: AppLayoutProps): JSX.Element {
<ChangelogModal changelog={changelog} onClose={toggleChangelogModal} />
)}
- <Toaster />
+ <Toaster
+ offset={{ bottom: 'calc(var(--bottom-strip-height, 0px) + 24px)' }}
+ />
</Layout>
</TooltipProvider>
);
diff --git a/frontend/src/container/Home/Home.tsx b/frontend/src/container/Home/Home.tsx
index ddfa2a85dc..bc4abc8306 100644
--- a/frontend/src/container/Home/Home.tsx
+++ b/frontend/src/container/Home/Home.tsx
@@ -26,6 +26,7 @@ import { initialQueriesMap, PANEL_TYPES } from 'constants/queryBuilder';
import { REACT_QUERY_KEY } from 'constants/reactQueryKeys';
import ROUTES from 'constants/routes';
import { DEFAULT_TIME_RANGE } from 'container/TopNav/DateTimeSelectionV2/constants';
+import { useHomeStripInfo } from 'container/Home/useHomeStripInfo';
import { useGetQueryRange } from 'hooks/queryBuilder/useGetQueryRange';
import { useIsDarkMode } from 'hooks/useDarkMode';
import { useSafeNavigate } from 'hooks/useSafeNavigate';
@@ -64,6 +65,8 @@ const homeInterval = 30 * 60 * 1000;
// eslint-disable-next-line sonarjs/cognitive-complexity
export default function Home(): JSX.Element {
+ useHomeStripInfo();
+
const { user } = useAppContext();
const { safeNavigate } = useSafeNavigate();
const isDarkMode = useIsDarkMode();
diff --git a/frontend/src/container/Home/__tests__/useHomeStripInfo.test.tsx b/frontend/src/container/Home/__tests__/useHomeStripInfo.test.tsx
new file mode 100644
index 0000000000..86c823fa6f
--- /dev/null
+++ b/frontend/src/container/Home/__tests__/useHomeStripInfo.test.tsx
@@ -0,0 +1,58 @@
+import { renderHook } from '@testing-library/react';
+import { useGetAlerts } from 'api/generated/services/alerts';
+import { useBottomStripStore } from 'container/BottomStrip/store/useBottomStripStore';
+import { StripItemKind } from 'container/BottomStrip/types';
+
+import { useHomeStripInfo } from '../useHomeStripInfo';
+
+jest.mock('api/generated/services/alerts', () => ({
+ useGetAlerts: jest.fn(),
+}));
+
+const mockUseGetAlerts = useGetAlerts as jest.Mock;
+
+describe('useHomeStripInfo', () => {
+ beforeEach(() => {
+ useBottomStripStore.setState({ left: null, ownerId: null });
+ });
+
+ it('counts the firing alert instances', () => {
+ mockUseGetAlerts.mockReturnValue({ data: { data: [{}, {}, {}] } });
+
+ renderHook(() => useHomeStripInfo());
+
+ expect(useBottomStripStore.getState().left).toMatchObject([
+ { kind: StripItemKind.Text, text: '3 alerts firing' },
+ ]);
+ });
+
+ it('says alert, not alerts, when only one is firing', () => {
+ mockUseGetAlerts.mockReturnValue({ data: { data: [{}] } });
+
+ renderHook(() => useHomeStripInfo());
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '1 alert firing',
+ });
+ });
+
+ it('shows zero before the response lands', () => {
+ mockUseGetAlerts.mockReturnValue({ data: undefined });
+
+ renderHook(() => useHomeStripInfo());
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '0 alerts firing',
+ });
+ });
+
+ it('clears the strip when the page unmounts', () => {
+ mockUseGetAlerts.mockReturnValue({ data: { data: [{}, {}, {}] } });
+
+ const { unmount } = renderHook(() => useHomeStripInfo());
+
+ unmount();
+
+ expect(useBottomStripStore.getState().left).toBeNull();
+ });
+});
diff --git a/frontend/src/container/Home/useHomeStripInfo.ts b/frontend/src/container/Home/useHomeStripInfo.ts
new file mode 100644
index 0000000000..08bbefd3be
--- /dev/null
+++ b/frontend/src/container/Home/useHomeStripInfo.ts
@@ -0,0 +1,21 @@
+import { useMemo } from 'react';
+import { useGetAlerts } from 'api/generated/services/alerts';
+import { useBottomStrip } from 'container/BottomStrip/useBottomStrip';
+import { type StripItem, StripItemKind } from 'container/BottomStrip/types';
+import { pluralize } from 'utils/pluralize';
+
+export function useHomeStripInfo(): void {
+ // Firing instances, not rules, matching the triggered alerts page.
+ const { data } = useGetAlerts();
+
+ const count = data?.data?.length ?? 0;
+
+ const items = useMemo<StripItem[]>(
+ () => [
+ { kind: StripItemKind.Text, text: `${pluralize(count, 'alert')} firing` },
+ ],
+ [count],
+ );
+
+ useBottomStrip(items);
+}
diff --git a/frontend/src/container/ListAlertRules/__tests__/useAlertRulesStripInfo.test.tsx b/frontend/src/container/ListAlertRules/__tests__/useAlertRulesStripInfo.test.tsx
new file mode 100644
index 0000000000..3029fefbe0
--- /dev/null
+++ b/frontend/src/container/ListAlertRules/__tests__/useAlertRulesStripInfo.test.tsx
@@ -0,0 +1,53 @@
+import { renderHook } from '@testing-library/react';
+import { useBottomStripStore } from 'container/BottomStrip/store/useBottomStripStore';
+import { StripItemKind } from 'container/BottomStrip/types';
+
+import { useAlertRulesStripInfo } from '../useAlertRulesStripInfo';
+
+describe('useAlertRulesStripInfo', () => {
+ beforeEach(() => {
+ useBottomStripStore.setState({ left: null, ownerId: null });
+ });
+
+ it('shows the rows on the page against the total', () => {
+ renderHook(() => useAlertRulesStripInfo({ shownCount: 15, totalCount: 17 }));
+
+ expect(useBottomStripStore.getState().left).toMatchObject([
+ { kind: StripItemKind.Text, text: '15 of 17 rules' },
+ ]);
+ });
+
+ it('still says n of m when the whole list fits on one page', () => {
+ renderHook(() => useAlertRulesStripInfo({ shownCount: 17, totalCount: 17 }));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '17 of 17 rules',
+ });
+ });
+
+ it('says rule, not rules, when there is only one', () => {
+ renderHook(() => useAlertRulesStripInfo({ shownCount: 1, totalCount: 1 }));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '1 of 1 rule',
+ });
+ });
+
+ it('shows zero when nothing matched', () => {
+ renderHook(() => useAlertRulesStripInfo({ shownCount: 0, totalCount: 12 }));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '0 of 12 rules',
+ });
+ });
+
+ it('clears the strip when the page unmounts', () => {
+ const { unmount } = renderHook(() =>
+ useAlertRulesStripInfo({ shownCount: 15, totalCount: 17 }),
+ );
+
+ unmount();
+
+ expect(useBottomStripStore.getState().left).toBeNull();
+ });
+});
diff --git a/frontend/src/container/ListAlertRules/index.tsx b/frontend/src/container/ListAlertRules/index.tsx
index b880dabd0b..d9787f6fdd 100644
--- a/frontend/src/container/ListAlertRules/index.tsx
+++ b/frontend/src/container/ListAlertRules/index.tsx
@@ -20,6 +20,7 @@ import { ALERT_RULES_PARAMS, useAlertRulesFilters } from './hooks';
import styles from './ListAlertRules.module.scss';
import { getAlertRuleColumns } from './table.config';
import type { AlertRule } from './types';
+import { useAlertRulesStripInfo } from './useAlertRulesStripInfo';
import { useAlertRulesData } from './useAlertRulesData';
import { useAlertRulesHandlers } from './useAlertRulesHandlers';
@@ -87,6 +88,11 @@ function ListAlertRules(): JSX.Element {
return filteredRules.slice(start, start + limit);
}, [filteredRules, page, limit]);
+ useAlertRulesStripInfo({
+ shownCount: paginatedRules.length,
+ totalCount: filteredRules.length,
+ });
+
const columnsWithActions = useMemo(() => {
if (!action) {
return columns;
diff --git a/frontend/src/container/ListAlertRules/useAlertRulesStripInfo.ts b/frontend/src/container/ListAlertRules/useAlertRulesStripInfo.ts
new file mode 100644
index 0000000000..846ee159e4
--- /dev/null
+++ b/frontend/src/container/ListAlertRules/useAlertRulesStripInfo.ts
@@ -0,0 +1,27 @@
+import { useMemo } from 'react';
+import { useBottomStrip } from 'container/BottomStrip/useBottomStrip';
+import { type StripItem, StripItemKind } from 'container/BottomStrip/types';
+import { pluralize } from 'utils/pluralize';
+
+interface UseAlertRulesStripInfoArgs {
+ /** Rows on the current page, matching the table's own footer. */
+ shownCount: number;
+ totalCount: number;
+}
+
+export function useAlertRulesStripInfo({
+ shownCount,
+ totalCount,
+}: UseAlertRulesStripInfoArgs): void {
+ const items = useMemo<StripItem[]>(
+ () => [
+ {
+ kind: StripItemKind.Text,
+ text: `${shownCount} of ${pluralize(totalCount, 'rule')}`,
+ },
+ ],
+ [shownCount, totalCount],
+ );
+
+ useBottomStrip(items);
+}
diff --git a/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetricTable.tsx b/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetricTable.tsx
index 58b3fc1426..fc2786d5ad 100644
--- a/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetricTable.tsx
+++ b/frontend/src/container/ServiceApplication/ServiceMetrics/ServiceMetricTable.tsx
@@ -21,6 +21,7 @@ import { getTotalRPS } from 'utils/services';
import { getColumns } from '../Columns/ServiceColumn';
import { ServiceMetricsTableProps } from '../types';
+import { useServicesStripInfo } from '../useServicesStripInfo';
import { getServiceListFromQuery } from '../utils';
function ServiceMetricTable({
@@ -67,6 +68,8 @@ function ServiceMetricTable({
[isLoading, queries, topLevelOperations],
);
+ useServicesStripInfo(services.length);
+
const { search } = useLocation();
const tableColumns = useMemo(() => getColumns(search, true), [search]);
const [RPS, setRPS] = useState(0);
diff --git a/frontend/src/container/ServiceApplication/ServiceTraces/index.tsx b/frontend/src/container/ServiceApplication/ServiceTraces/index.tsx
index 4a772b472c..deb1ace6c0 100644
--- a/frontend/src/container/ServiceApplication/ServiceTraces/index.tsx
+++ b/frontend/src/container/ServiceApplication/ServiceTraces/index.tsx
@@ -18,6 +18,7 @@ import { GlobalReducer } from 'types/reducer/globalTime';
import { Tags } from 'hooks/useResourceAttribute/types';
import SkipOnBoardingModal from '../SkipOnBoardModal';
+import { useServicesStripInfo } from '../useServicesStripInfo';
import ServiceTraceTable from './ServiceTracesTable';
function ServiceTraces(): JSX.Element {
@@ -42,6 +43,8 @@ function ServiceTraces(): JSX.Element {
const services = data || [];
+ useServicesStripInfo(services.length);
+
const [skipOnboarding, setSkipOnboarding] = useState(
localStorageGet(SKIP_ONBOARDING) === 'true',
);
diff --git a/frontend/src/container/ServiceApplication/__tests__/useServicesStripInfo.test.tsx b/frontend/src/container/ServiceApplication/__tests__/useServicesStripInfo.test.tsx
new file mode 100644
index 0000000000..555bad02f2
--- /dev/null
+++ b/frontend/src/container/ServiceApplication/__tests__/useServicesStripInfo.test.tsx
@@ -0,0 +1,43 @@
+import { renderHook } from '@testing-library/react';
+import { useBottomStripStore } from 'container/BottomStrip/store/useBottomStripStore';
+import { StripItemKind } from 'container/BottomStrip/types';
+
+import { useServicesStripInfo } from '../useServicesStripInfo';
+
+describe('useServicesStripInfo', () => {
+ beforeEach(() => {
+ useBottomStripStore.setState({ left: null, ownerId: null });
+ });
+
+ it('shows how many services are listed', () => {
+ renderHook(() => useServicesStripInfo(18));
+
+ expect(useBottomStripStore.getState().left).toMatchObject([
+ { kind: StripItemKind.Text, text: '18 services' },
+ ]);
+ });
+
+ it('says service, not services, when there is one', () => {
+ renderHook(() => useServicesStripInfo(1));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '1 service',
+ });
+ });
+
+ it('shows zero when there are none', () => {
+ renderHook(() => useServicesStripInfo(0));
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '0 services',
+ });
+ });
+
+ it('clears the strip when the page unmounts', () => {
+ const { unmount } = renderHook(() => useServicesStripInfo(18));
+
+ unmount();
+
+ expect(useBottomStripStore.getState().left).toBeNull();
+ });
+});
diff --git a/frontend/src/container/ServiceApplication/useServicesStripInfo.ts b/frontend/src/container/ServiceApplication/useServicesStripInfo.ts
new file mode 100644
index 0000000000..f3ab15b7fc
--- /dev/null
+++ b/frontend/src/container/ServiceApplication/useServicesStripInfo.ts
@@ -0,0 +1,13 @@
+import { useMemo } from 'react';
+import { useBottomStrip } from 'container/BottomStrip/useBottomStrip';
+import { type StripItem, StripItemKind } from 'container/BottomStrip/types';
+import { pluralize } from 'utils/pluralize';
+
+export function useServicesStripInfo(count: number): void {
+ const items = useMemo<StripItem[]>(
+ () => [{ kind: StripItemKind.Text, text: pluralize(count, 'service') }],
+ [count],
+ );
+
+ useBottomStrip(items);
+}
diff --git a/frontend/src/pages/AIAssistantPage/AIAssistantPage.tsx b/frontend/src/pages/AIAssistantPage/AIAssistantPage.tsx
index 7f8511b360..595897a3f4 100644
--- a/frontend/src/pages/AIAssistantPage/AIAssistantPage.tsx
+++ b/frontend/src/pages/AIAssistantPage/AIAssistantPage.tsx
@@ -11,6 +11,8 @@ import { useAIAssistantStore } from 'container/AIAssistant/store/useAIAssistantS
import { VariantContext } from 'container/AIAssistant/VariantContext';
import Noz from 'components/Noz/Noz';
+import { useAIAssistantStripInfo } from './useAIAssistantStripInfo';
+
import styles from './AIAssistantPage.module.scss';
import ConversationsList from 'container/AIAssistant/components/ConversationsList';
@@ -41,6 +43,8 @@ export default function AIAssistantPage(): JSX.Element {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
+ useAIAssistantStripInfo();
+
const conversations = useAIAssistantStore((s) => s.conversations);
const activeConversationId = useAIAssistantStore(
(s) => s.activeConversationId,
diff --git a/frontend/src/pages/AIAssistantPage/__tests__/useAIAssistantStripInfo.test.tsx b/frontend/src/pages/AIAssistantPage/__tests__/useAIAssistantStripInfo.test.tsx
new file mode 100644
index 0000000000..932bde5d5d
--- /dev/null
+++ b/frontend/src/pages/AIAssistantPage/__tests__/useAIAssistantStripInfo.test.tsx
@@ -0,0 +1,60 @@
+import { renderHook } from '@testing-library/react';
+import { useAIAssistantStore } from 'container/AIAssistant/store/useAIAssistantStore';
+import { useBottomStripStore } from 'container/BottomStrip/store/useBottomStripStore';
+import { StripItemKind } from 'container/BottomStrip/types';
+
+import { useAIAssistantStripInfo } from '../useAIAssistantStripInfo';
+
+function seed(conversations: Record<string, unknown>): void {
+ useAIAssistantStore.setState({ conversations } as never);
+}
+
+describe('useAIAssistantStripInfo', () => {
+ beforeEach(() => {
+ useBottomStripStore.setState({ left: null, ownerId: null });
+ });
+
+ it('counts only the conversations that are not archived', () => {
+ seed({
+ a: { id: 'a' },
+ b: { id: 'b' },
+ c: { id: 'c', archived: true },
+ });
+
+ renderHook(() => useAIAssistantStripInfo());
+
+ expect(useBottomStripStore.getState().left).toMatchObject([
+ { kind: StripItemKind.Text, text: '2 conversations' },
+ ]);
+ });
+
+ it('says one conversation, not 1 conversations', () => {
+ seed({ a: { id: 'a' } });
+
+ renderHook(() => useAIAssistantStripInfo());
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '1 conversation',
+ });
+ });
+
+ it('shows zero when there are none', () => {
+ seed({});
+
+ renderHook(() => useAIAssistantStripInfo());
+
+ expect(useBottomStripStore.getState().left?.[0]).toMatchObject({
+ text: '0 conversations',
+ });
+ });
+
+ it('clears the strip when the page unmounts', () => {
+ seed({ a: { id: 'a' } });
+
+ const { unmount } = renderHook(() => useAIAssistantStripInfo());
+
+ unmount();
+
+ expect(useBottomStripStore.getState().left).toBeNull();
+ });
+});
diff --git a/frontend/src/pages/AIAssistantPage/stories/AIAssistantPage.stories.tsx b/frontend/src/pages/AIAssistantPage/stories/AIAssistantPage.stories.tsx
index 9a82581e28..78917f3146 100644
--- a/frontend/src/pages/AIAssistantPage/stories/AIAssistantPage.stories.tsx
+++ b/frontend/src/pages/AIAssistantPage/stories/AIAssistantPage.stories.tsx
@@ -243,3 +243,11 @@ export const TooltipsInApprovalDiff: Story = {
args: { tooltipsOpen: true, agent: 'awaiting-approval', contents: BRIEF },
play: openApprovalDiff,
};
+
+/**
+ * The conversation count in the bottom strip, in place of the build version.
+ * Archived threads are left out of it.
+ */
+export const BottomStrip: Story = {
+ args: { bottomStrip: true },
+};
diff --git a/frontend/src/pages/AIAssistantPage/useAIAssistantStripInfo.ts b/frontend/src/pages/AIAssistantPage/useAIAssistantStripInfo.ts
new file mode 100644
index 0000000000..31575eb1b8
--- /dev/null
+++ b/frontend/src/pages/AIAssistantPage/useAIAssistantStripInfo.ts
@@ -0,0 +1,20 @@
+import { useMemo } from 'react';
+import { useAIAssistantStore } from 'container/AIAssistant/store/useAIAssistantStore';
+import { useBottomStrip } from 'container/BottomStrip/useBottomStrip';
+import { type StripItem, StripItemKind } from 'container/BottomStrip/types';
+import { pluralize } from 'utils/pluralize';
+
+export function useAIAssistantStripInfo(): void {
+ const conversations = useAIAssistantStore((state) => state.conversations);
+
+ const count = Object.values(conversations).filter(
+ (conversation) => !conversation.archived,
+ ).length;
+
+ const items = useMemo<StripItem[]>(
+ () => [{ kind: StripItemKind.Text, text: pluralize(count, 'conversation') }],
+ [count],
+ );
+
+ useBottomStrip(items);
+}
diff --git a/frontend/src/pages/AlertList/AlertRules/stories/AlertRules.stories.tsx b/frontend/src/pages/AlertList/AlertRules/stories/AlertRules.stories.tsx
index 65d4b0d7b8..8896716249 100644
--- a/frontend/src/pages/AlertList/AlertRules/stories/AlertRules.stories.tsx
+++ b/frontend/src/pages/AlertList/AlertRules/stories/AlertRules.stories.tsx
@@ -133,3 +133,19 @@ export const ColumnPicker: Story = {
export const Tooltips: Story = {
args: { tooltipsOpen: true },
};
+
+/**
+ * The rule count in the bottom strip, in place of the build version: the rows on
+ * the page against the total, the same pair the table's own footer prints.
+ */
+export const BottomStrip: Story = {
+ args: { bottomStrip: true },
+};
+
+/** The same count on a second page, where the two numbers come apart. */
+export const BottomStripPaginated: Story = {
+ args: { bottomStrip: true, rules: RULE_MAX },
+ parameters: {
+ signoz: { route: '/alerts?tab=AlertRules&page=2&limit=10' },
+ },
+};
diff --git a/frontend/src/pages/AllErrors/stories/AllErrors.stories.tsx b/frontend/src/pages/AllErrors/stories/AllErrors.stories.tsx
index a43d2fb9bc..45a96277a3 100644
--- a/frontend/src/pages/AllErrors/stories/AllErrors.stories.tsx
+++ b/frontend/src/pages/AllErrors/stories/AllErrors.stories.tsx
@@ -125,3 +125,11 @@ export const QuickFiltersSettingsWithBanner: Story = {
args: { banner: 'trial-expiry' },
play: dirtyQuickFiltersSettings,
};
+
+/**
+ * The exception count in the bottom strip, in place of the build version: the
+ * rows on the page against the total the count query returns.
+ */
+export const BottomStrip: Story = {
+ args: { bottomStrip: true },
+};
diff --git a/frontend/src/pages/HomePage/stories/HomePage.stories.tsx b/frontend/src/pages/HomePage/stories/HomePage.stories.tsx
index 046777d601..080d2e43a3 100644
--- a/frontend/src/pages/HomePage/stories/HomePage.stories.tsx
+++ b/frontend/src/pages/HomePage/stories/HomePage.stories.tsx
@@ -97,3 +97,11 @@ export const NavSettingsMenu: Story = {
await screen.findByRole('menu');
},
};
+
+/**
+ * The firing alert count in the bottom strip, in place of the build version. It
+ * counts firing instances, so it does not match the alert rules widget above.
+ */
+export const BottomStrip: Story = {
+ args: { bottomStrip: true },
+};
diff --git a/frontend/src/pages/Services/stories/Services.stories.tsx b/frontend/src/pages/Services/stories/Services.stories.tsx
index a148107183..a44f2aebfa 100644
--- a/frontend/src/pages/Services/stories/Services.stories.tsx
+++ b/frontend/src/pages/Services/stories/Services.stories.tsx
@@ -61,3 +61,13 @@ export const Pagination: Story = {
export const OverTrialLimit: Story = {
args: { traffic: 'over-trial-limit', banner: 'trial-expiry' },
};
+
+/** The service count in the bottom strip, in place of the build version. */
+export const BottomStrip: Story = {
+ args: { bottomStrip: true },
+};
+
+/** The same count on the span metrics table, which is the page's other path. */
+export const BottomStripSpanMetrics: Story = {
+ args: { bottomStrip: true, mode: 'span-metrics' },
+};
diff --git a/frontend/src/storybook/foundations/BottomStrip.stories.tsx b/frontend/src/storybook/foundations/BottomStrip.stories.tsx
index 240d6f1037..4f6a49180a 100644
--- a/frontend/src/storybook/foundations/BottomStrip.stories.tsx
+++ b/frontend/src/storybook/foundations/BottomStrip.stories.tsx
@@ -1,5 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react-vite';
import ROUTES from 'constants/routes';
+import { toast } from '@signozhq/ui/sonner';
import { screen, userEvent, waitFor } from 'storybook/test';
import type { GlobalMockArgs } from '../globals';
@@ -108,3 +109,24 @@ export const WithoutStripAddCardModal: Story = {
});
},
};
+
+/** Raises a toast and waits for it, so the shot is taken with it on screen. */
+const raiseToast: NonNullable<Story['play']> = async () => {
+ toast.success('Service account deleted');
+ await screen.findByText('Service account deleted', undefined, untilLoaded);
+};
+
+/**
+ * A toast with the strip on. Sonner pins itself to the foot of the viewport, so
+ * without an offset it lands on top of Ask Noz and Support.
+ */
+export const WithToast: Story = {
+ args: { noz: true, support: 'pylon' },
+ play: raiseToast,
+};
+
+/** The same toast with the flag off, back at sonner's own inset from the viewport. */
+export const WithoutStripToast: Story = {
+ args: { bottomStrip: false, noz: true, support: 'pylon' },
+ play: raiseToast,
+};