- Page {page} of {pages.toLocaleString('en-US')}
+ Page {page.toLocaleString('en-US')} of {pages.toLocaleString('en-US')}
+ {capped ? ' (count capped by the platform at 10,000)' : ''}
setPage(page - 1)} label="Previous page">
diff --git a/src/screens/LakehouseScreen.tsx b/src/screens/LakehouseScreen.tsx
new file mode 100644
index 0000000..4b5eb4a
--- /dev/null
+++ b/src/screens/LakehouseScreen.tsx
@@ -0,0 +1,161 @@
+import { Link, useParams } from 'react-router-dom';
+import { ArrowLeft, ArrowRight, Database } from 'lucide-react';
+import { useQuery, useZino } from '../api/provider';
+import { LAKEHOUSE } from '../api/config';
+import type { Row } from '../api/types';
+import { ErrorNote, Spinner } from '../components/core';
+import { money, num, pct, shortDate, str } from '../format';
+
+/**
+ * Everything Ava reads, in one place.
+ *
+ * The overview is the `lakehouse_tables` stats view: one card per table with
+ * its row count and date span, straight from Databricks. `claims` opens the
+ * claims explorer; the four reference tables open a plain table view of every
+ * row (they are small — 4 to 24 rows).
+ */
+
+const TABLES: Record = {
+ claims: { rv: 'dni-rv-claims', title: 'Claims', blurb: 'One row per submitted insurance claim. The table Ava sweeps every morning.' },
+ payers: { rv: 'dni-rv-payers', title: 'Insurers', blurb: 'Plan type, appeal window and the Northlake contract manager for each insurer.' },
+ departments: { rv: 'dni-rv-departments', title: 'Departments', blurb: 'Department × site directory with each director.' },
+ payer_policy_updates: { rv: 'dni-rv-policy-updates', title: 'Insurer bulletins', blurb: 'Policy changes insurers announced, with effective dates — where Ava looks for the cause of a spike.' },
+ finance_monthly_summary: { rv: 'dni-rv-finance-monthly', title: 'Finance monthly summary', blurb: 'What finance reports each month. Ava reconciles the claims table against it before analysing anything.' },
+};
+const ORDER = ['claims', 'payers', 'departments', 'payer_policy_updates', 'finance_monthly_summary'];
+
+export function LakehouseScreen() {
+ const { client } = useZino();
+ const stats = useQuery(() => client.rows('dni-rv-lakehouse-tables', { limit: 20 }), []);
+ const byName = new Map((stats.data ?? []).map((r) => [str(r.table_name), r]));
+
+ return (
+
+
+
Lakehouse
+
+
+ {LAKEHOUSE.platform} · {LAKEHOUSE.catalog}.{LAKEHOUSE.schema} · read-only. The tables Ava reads, exactly as she reads them.
+