+
+ Executing as{" "}
+
+ {user ?? ""}
+
+ . OBO entries scope cache keys per user — different users see different
+ rows, even with identical args.
+
+ {loading && (
+
+ Loading customer metrics…
+
+ )}
+ {error && (
+
+
+ Could not load customer metrics.
+
+
+ The dev workspace does not host the demo metric view at{" "}
+
+ appkit_demo.public.customer_metrics
+
+ . When wired to a real OBO-lane metric view, this panel would show
+ row-level scoping driven by{" "}
+
+ x-forwarded-access-token
+
+ .
+
+
{error}
+
+ )}
+ {data && data.length > 0 && (
+
+
+
+ |
+ {formatLabel("segment", metadata?.dimensions.segment)}
+ |
+
+ {formatLabel(
+ "active_accounts",
+ metadata?.measures.active_accounts,
+ )}
+ |
+
+ {formatLabel("churn_rate", metadata?.measures.churn_rate)}
+ |
+
+
+
+ {(
+ data as Array<{
+ segment: string;
+ active_accounts: number;
+ churn_rate: number;
+ }>
+ ).map((row) => (
+
+ | {row.segment} |
+
+ {formatValue(
+ row.active_accounts,
+ metadata?.measures.active_accounts?.format,
+ )}
+ |
+
+ {formatValue(
+ row.churn_rate,
+ metadata?.measures.churn_rate?.format,
+ )}
+ |
+
+ ))}
+
+
+ )}
+
+ );
+}
+
+function MetricsRoute() {
+ const { user } = useWhoami();
+
+ return (
+