feat(ui): add compact KPI metrics in tab bar (Total, Err%, Avg, P99)
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m1s
CI / docker (push) Successful in 51s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Has been cancelled

New TabKpis component shows scope-aware metrics with trend arrows
aligned right in the content tab bar. Each metric shows current value
and an arrow indicating change vs previous period (green=good, red=bad).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-28 14:42:58 +01:00
parent 73560d761d
commit c06f0c89e5
5 changed files with 160 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
import { Tabs } from '@cameleer/design-system';
import type { TabKey } from '../hooks/useScope';
import type { TabKey, Scope } from '../hooks/useScope';
import { TabKpis } from './TabKpis';
import styles from './ContentTabs.module.css';
const TABS = [
@@ -11,9 +12,10 @@ const TABS = [
interface ContentTabsProps {
active: TabKey;
onChange: (tab: TabKey) => void;
scope: Scope;
}
export function ContentTabs({ active, onChange }: ContentTabsProps) {
export function ContentTabs({ active, onChange, scope }: ContentTabsProps) {
return (
<div className={styles.wrapper}>
<Tabs
@@ -21,6 +23,7 @@ export function ContentTabs({ active, onChange }: ContentTabsProps) {
active={active}
onChange={(v) => onChange(v as TabKey)}
/>
<TabKpis scope={scope} />
</div>
);
}