@burdenoff/microfe-subscriberbot 2026.1103.1 → 2026.1105.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/stories/Accessibility.stories.d.ts +13 -0
  3. package/dist/stories/Accessibility.stories.d.ts.map +1 -0
  4. package/dist/stories/pages/AgentDetailPage.stories.d.ts.map +1 -1
  5. package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
  6. package/dist/stories/pages/AgentsListPage.stories.d.ts.map +1 -1
  7. package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
  8. package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
  9. package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
  10. package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
  11. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
  12. package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
  13. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
  15. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
  16. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  17. package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
  18. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
  19. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  20. package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
  21. package/dist/subscriberbot/components/Modal.js +43 -33
  22. package/dist/subscriberbot/components/Modal.js.map +1 -1
  23. package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
  24. package/dist/subscriberbot/components/PostureOptions.js +10 -10
  25. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  26. package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
  27. package/dist/subscriberbot/components/StateViews.js +45 -37
  28. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  29. package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
  30. package/dist/subscriberbot/components/StatusBadge.js +6 -6
  31. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  32. package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
  33. package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
  34. package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
  35. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  36. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
  37. package/dist/subscriberbot/components/mobile/MobileDashboard.js +127 -127
  38. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  39. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
  40. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
  41. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  42. package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -1
  43. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  44. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
  45. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
  46. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
  47. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  48. package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
  49. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
  50. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  51. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
  52. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
  53. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  54. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
  55. package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
  56. package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
  57. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  58. package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
  59. package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
  60. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  61. package/dist/subscriberbot/components/viz.d.ts +1 -0
  62. package/dist/subscriberbot/components/viz.d.ts.map +1 -1
  63. package/dist/subscriberbot/components/viz.js +100 -101
  64. package/dist/subscriberbot/components/viz.js.map +1 -1
  65. package/dist/subscriberbot/hooks/index.js +1 -1
  66. package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
  67. package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
  68. package/dist/subscriberbot/hooks/useFormError.js +28 -0
  69. package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
  70. package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
  71. package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
  72. package/dist/subscriberbot/hooks/useFormatters.js +13 -0
  73. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
  74. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
  75. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
  76. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  77. package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
  78. package/dist/subscriberbot/hooks/useTr.js +1 -1
  79. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  80. package/dist/subscriberbot/index.js +1 -1
  81. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
  82. package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
  83. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  84. package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
  85. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  86. package/dist/subscriberbot/pages/DashboardPage.js +107 -98
  87. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  88. package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
  89. package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
  90. package/dist/subscriberbot/pages/InboxPage.js +421 -402
  91. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  92. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
  93. package/dist/subscriberbot/pages/InsightsPage.js +130 -121
  94. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  95. package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
  96. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
  97. package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
  98. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  99. package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
  100. package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
  101. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  102. package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
  103. package/dist/subscriberbot/pages/SavingsPage.js +57 -57
  104. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  105. package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
  106. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
  107. package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
  108. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  109. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
  110. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  111. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
  112. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  113. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
  114. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
  116. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
  118. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  119. package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
  120. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  121. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
  122. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
  123. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +267 -260
  124. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  125. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
  126. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
  127. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
  128. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  129. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
  130. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
  131. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
  132. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  133. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
  134. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
  135. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
  136. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  137. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
  138. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
  139. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
  140. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  141. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
  142. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
  143. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
  144. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  145. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
  146. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
  147. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
  148. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  149. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
  150. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
  151. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
  152. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  153. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
  154. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
  155. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
  156. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  157. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
  158. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
  159. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
  160. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  161. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
  162. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  163. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
  164. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  165. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
  166. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
  167. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
  168. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  169. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
  170. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
  171. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
  172. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  173. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
  174. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  175. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
  176. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  177. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
  178. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
  179. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +104 -90
  180. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  181. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
  182. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  183. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
  184. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  185. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
  186. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
  187. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  188. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
  189. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
  190. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
  191. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  192. package/dist/subscriberbot/utils/formatters.d.ts +16 -5
  193. package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
  194. package/dist/subscriberbot/utils/formatters.js +57 -25
  195. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  196. package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
  197. package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
  198. package/dist/subscriberbot/utils/plaidLink.js +21 -21
  199. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  200. package/package.json +1 -1
@@ -1,38 +1,38 @@
1
1
  import { useSubscriberBot as e } from "../context/SubscriberBotContext.js";
2
- import { PageLayout as t } from "../components/PageLayout.js";
3
- import { MetricsCard as n } from "../components/MetricsCard.js";
4
- import { formatCurrency as r, formatEnumLabel as i, formatRelativeTime as a } from "../utils/formatters.js";
5
- import { StatusBadge as o } from "../components/StatusBadge.js";
6
- import { EmptyState as s } from "../components/EmptyState.js";
7
- import { useTr as c } from "../hooks/useTr.js";
8
- import { ErrorView as l, LoadingView as u, Section as d } from "../components/StateViews.js";
9
- import { Donut as f, Legend as p, Timeline as m } from "../components/viz.js";
2
+ import { useTr as t } from "../hooks/useTr.js";
3
+ import { useFormatters as n } from "../hooks/useFormatters.js";
4
+ import { PageLayout as r } from "../components/PageLayout.js";
5
+ import { MetricsCard as i } from "../components/MetricsCard.js";
6
+ import { StatusBadge as a } from "../components/StatusBadge.js";
7
+ import { EmptyState as o } from "../components/EmptyState.js";
8
+ import { ErrorView as ee, LoadingView as te, Section as s } from "../components/StateViews.js";
9
+ import { Donut as c, Legend as l, Timeline as u } from "../components/viz.js";
10
10
  import "../components/index.js";
11
- import { useDecisions as h, useInboxMessages as g, useInvoices as _, useRelationships as v, useRenewalEvents as y } from "../hooks/useSubscriberBotApi.js";
12
- import { buildUpcomingRenewals as ee, recurringSpend as te } from "../utils/portfolio.js";
13
- import { useCompactViewport as ne } from "../hooks/useCompactViewport.js";
11
+ import { useDecisions as d, useInboxMessages as f, useInvoices as p, useRelationships as m, useRenewalEvents as h } from "../hooks/useSubscriberBotApi.js";
12
+ import { buildUpcomingRenewals as ne, recurringSpend as g } from "../utils/portfolio.js";
13
+ import { useCompactViewport as _ } from "../hooks/useCompactViewport.js";
14
14
  import { MobileDashboard as re } from "../components/mobile/MobileDashboard.js";
15
15
  import "../components/mobile/index.js";
16
- import { useMemo as b } from "react";
17
- import { AlertTriangle as x, ArrowRight as S, ArrowUpRight as C, Bot as w, CalendarClock as T, Inbox as E, Repeat2 as D, ShieldCheck as ie, Sparkles as O, Wallet as k } from "lucide-react";
18
- import { jsx as A, jsxs as j } from "react/jsx-runtime";
19
- import { GlassCard as M, PagePurpose as N } from "@burdenoff/fe-libs/ui";
16
+ import { useMemo as v } from "react";
17
+ import { AlertTriangle as y, ArrowRight as b, ArrowUpRight as x, Bot as S, CalendarClock as C, Inbox as w, Repeat2 as T, ShieldCheck as E, Sparkles as ie, Wallet as ae } from "lucide-react";
18
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
19
+ import { GlassCard as k, PagePurpose as A } from "@burdenoff/fe-libs/ui";
20
20
  //#region src/subscriberbot/pages/DashboardPage.tsx
21
- function P() {
22
- let { navigateTo: P, currentUser: F } = e(), I = c(), L = v({ pagination: {
21
+ function j() {
22
+ let { formatCurrency: j, formatEnumLabel: M, formatRelativeTime: N } = n(), { navigateTo: P, currentUser: F } = e(), I = t(), L = m({ pagination: {
23
23
  limit: 100,
24
24
  offset: 0
25
- } }), R = _({ pagination: {
25
+ } }), R = p({ pagination: {
26
26
  limit: 50,
27
27
  offset: 0
28
- } }), z = g({ pagination: {
28
+ } }), z = f({ pagination: {
29
29
  limit: 50,
30
30
  offset: 0
31
- } }), B = y({ upcomingOnly: !0 }), V = ne(), H = h({ status: "PROPOSED" }, { enabled: V }), U = b(() => L.data?.items ?? [], [L.data]), W = b(() => R.data?.items ?? [], [R.data]), G = b(() => z.data?.items ?? [], [z.data]), K = b(() => B.data ?? [], [B.data]), q = b(() => {
31
+ } }), B = h({ upcomingOnly: !0 }), V = _(), H = d({ status: "PROPOSED" }, { enabled: V }), U = v(() => L.data?.items ?? [], [L.data]), W = v(() => R.data?.items ?? [], [R.data]), G = v(() => z.data?.items ?? [], [z.data]), K = v(() => B.data ?? [], [B.data]), q = v(() => {
32
32
  let e = /* @__PURE__ */ new Map();
33
33
  return U.forEach((t) => e.set(t.id, t)), e;
34
- }, [U]), J = b(() => {
35
- let e = te(U), t = G.filter((e) => e.actionRequired).length, n = W.filter((e) => e.status === "ISSUED" || e.status === "OVERDUE" || e.status === "FAILED"), r = n.reduce((e, t) => e + t.total, 0), i = U.filter((e) => e.status === "PAST_DUE" || e.status === "LAPSED").length;
34
+ }, [U]), J = v(() => {
35
+ let e = g(U), t = G.filter((e) => e.actionRequired).length, n = W.filter((e) => e.status === "ISSUED" || e.status === "OVERDUE" || e.status === "FAILED"), r = n.reduce((e, t) => e + t.total, 0), i = U.filter((e) => e.status === "PAST_DUE" || e.status === "LAPSED").length;
36
36
  return {
37
37
  activeCount: e.activeCount,
38
38
  totalCount: U.length,
@@ -47,27 +47,36 @@ function P() {
47
47
  U,
48
48
  G,
49
49
  W
50
- ]), Y = b(() => {
50
+ ]), Y = v(() => {
51
51
  let e = /* @__PURE__ */ new Map();
52
52
  return U.forEach((t) => e.set(t.status, (e.get(t.status) ?? 0) + 1)), Array.from(e.entries()).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
53
- label: i(e),
53
+ label: M(e),
54
54
  value: t
55
55
  }));
56
- }, [U]), X = b(() => ee(U, K, (e) => i(e)), [U, K]), Z = b(() => X.slice(0, 6).map((e) => ({
56
+ }, [U, M]), X = v(() => ne(U, K, (e) => M(e)), [
57
+ U,
58
+ K,
59
+ M
60
+ ]), Z = v(() => X.slice(0, 6).map((e) => ({
57
61
  title: e.title,
58
- sub: a(e.when),
62
+ sub: N(e.when),
59
63
  tone: e.soon ? "warning" : "default",
60
- meta: e.amount == null ? void 0 : r(e.amount, e.currency ?? J.primaryCurrency, { maximumFractionDigits: 0 })
61
- })), [X, J.primaryCurrency]), Q = b(() => G.filter((e) => e.actionRequired), [G]), ae = L.isLoading || R.isLoading || z.isLoading || B.isLoading, oe = L.isError && R.isError && z.isError && B.isError;
62
- if (ae) return /* @__PURE__ */ A(t, {
64
+ meta: e.amount == null ? void 0 : j(e.amount, e.currency ?? J.primaryCurrency, { maximumFractionDigits: 0 })
65
+ })), [
66
+ X,
67
+ J.primaryCurrency,
68
+ j,
69
+ N
70
+ ]), Q = v(() => G.filter((e) => e.actionRequired), [G]), oe = L.isLoading || R.isLoading || z.isLoading || B.isLoading, se = L.isError && R.isError && z.isError && B.isError;
71
+ if (oe) return /* @__PURE__ */ D(r, {
63
72
  title: I("dashboard.title", "Overview"),
64
73
  description: I("dashboard.description", "Your recurring digital relationships at a glance"),
65
- children: /* @__PURE__ */ A(u, { label: I("dashboard.loading", "Loading your subscription portfolio…") })
74
+ children: /* @__PURE__ */ D(te, { label: I("dashboard.loading", "Loading your subscription portfolio…") })
66
75
  });
67
- if (oe) return /* @__PURE__ */ A(t, {
76
+ if (se) return /* @__PURE__ */ D(r, {
68
77
  title: I("dashboard.title", "Overview"),
69
78
  description: I("dashboard.description", "Your recurring digital relationships at a glance"),
70
- children: /* @__PURE__ */ A(l, {
79
+ children: /* @__PURE__ */ D(ee, {
71
80
  message: I("dashboard.error", "We couldn't reach the Subscriber Bot service. Please try again."),
72
81
  onRetry: () => {
73
82
  L.refetch(), R.refetch(), z.refetch(), B.refetch();
@@ -75,7 +84,7 @@ function P() {
75
84
  })
76
85
  });
77
86
  let $ = F?.firstName || F?.name?.split(" ")[0];
78
- if (V) return /* @__PURE__ */ A(re, {
87
+ if (V) return /* @__PURE__ */ D(re, {
79
88
  greetingName: $ || void 0,
80
89
  spend: {
81
90
  monthly: J.monthlySpend,
@@ -90,13 +99,13 @@ function P() {
90
99
  openInvoiceTotal: J.openInvoiceTotal,
91
100
  navigateTo: P
92
101
  });
93
- let se = [
102
+ let ce = [
94
103
  {
95
104
  labelKey: "dashboard.quickActions.addRelationship.label",
96
105
  descriptionKey: "dashboard.quickActions.addRelationship.description",
97
106
  fallbackLabel: "Add a relationship",
98
107
  fallbackDescription: "Track a new subscription",
99
- icon: /* @__PURE__ */ A(D, { className: "h-5 w-5" }),
108
+ icon: /* @__PURE__ */ D(T, { className: "h-5 w-5" }),
100
109
  path: "/relationships/new"
101
110
  },
102
111
  {
@@ -104,7 +113,7 @@ function P() {
104
113
  descriptionKey: "dashboard.quickActions.discoverProviders.description",
105
114
  fallbackLabel: "Discover providers",
106
115
  fallbackDescription: "Browse the registry",
107
- icon: /* @__PURE__ */ A(O, { className: "h-5 w-5" }),
116
+ icon: /* @__PURE__ */ D(ie, { className: "h-5 w-5" }),
108
117
  path: "/providers"
109
118
  },
110
119
  {
@@ -112,7 +121,7 @@ function P() {
112
121
  descriptionKey: "dashboard.quickActions.openInbox.description",
113
122
  fallbackLabel: "Open inbox",
114
123
  fallbackDescription: "Merged communications",
115
- icon: /* @__PURE__ */ A(E, { className: "h-5 w-5" }),
124
+ icon: /* @__PURE__ */ D(w, { className: "h-5 w-5" }),
116
125
  path: "/inbox"
117
126
  },
118
127
  {
@@ -120,151 +129,151 @@ function P() {
120
129
  descriptionKey: "dashboard.quickActions.configureAgents.description",
121
130
  fallbackLabel: "Configure agents",
122
131
  fallbackDescription: "Automate your portfolio",
123
- icon: /* @__PURE__ */ A(w, { className: "h-5 w-5" }),
132
+ icon: /* @__PURE__ */ D(S, { className: "h-5 w-5" }),
124
133
  path: "/agents"
125
134
  }
126
135
  ];
127
- return /* @__PURE__ */ j(t, {
136
+ return /* @__PURE__ */ O(r, {
128
137
  title: $ ? I("dashboard.welcomeBack", "Welcome back, {{name}}", { name: $ }) : I("dashboard.title", "Overview"),
129
138
  description: I("dashboard.description", "Everything you pay for on repeat — in one intelligent console."),
130
139
  children: [
131
- /* @__PURE__ */ A(N, {
140
+ /* @__PURE__ */ D(A, {
132
141
  className: "mb-6",
133
142
  children: I("dashboard.purpose", "Subscriber Bot is your system of record for every recurring digital relationship. See total recurring spend, what renews next, what needs action, and what to optimize — all from real data across your providers.")
134
143
  }),
135
- /* @__PURE__ */ j("div", {
144
+ /* @__PURE__ */ O("div", {
136
145
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
137
146
  children: [
138
- /* @__PURE__ */ A(n, {
147
+ /* @__PURE__ */ D(i, {
139
148
  featured: !0,
140
- icon: /* @__PURE__ */ A(k, {}),
141
- value: r(J.monthlySpend, J.primaryCurrency, { maximumFractionDigits: 0 }),
149
+ icon: /* @__PURE__ */ D(ae, {}),
150
+ value: j(J.monthlySpend, J.primaryCurrency, { maximumFractionDigits: 0 }),
142
151
  label: I("dashboard.metrics.recurringSpend", "Recurring spend / month")
143
152
  }),
144
- /* @__PURE__ */ A(n, {
145
- icon: /* @__PURE__ */ A(D, {}),
153
+ /* @__PURE__ */ D(i, {
154
+ icon: /* @__PURE__ */ D(T, {}),
146
155
  value: J.activeCount,
147
156
  label: I("dashboard.metrics.activeRelationships", "Active relationships")
148
157
  }),
149
- /* @__PURE__ */ A(n, {
150
- icon: /* @__PURE__ */ A(T, {}),
158
+ /* @__PURE__ */ D(i, {
159
+ icon: /* @__PURE__ */ D(C, {}),
151
160
  value: X.length,
152
161
  label: I("dashboard.metrics.upcomingRenewals", "Upcoming renewals")
153
162
  }),
154
- /* @__PURE__ */ A(n, {
155
- icon: /* @__PURE__ */ A(x, {}),
163
+ /* @__PURE__ */ D(i, {
164
+ icon: /* @__PURE__ */ D(y, {}),
156
165
  value: J.actionRequired,
157
166
  label: I("dashboard.metrics.needsAction", "Need your action"),
158
167
  trend: J.actionRequired > 0 ? "down" : void 0
159
168
  })
160
169
  ]
161
170
  }),
162
- /* @__PURE__ */ j("div", {
171
+ /* @__PURE__ */ O("div", {
163
172
  className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3",
164
- children: [/* @__PURE__ */ A("div", {
173
+ children: [/* @__PURE__ */ D("div", {
165
174
  className: "lg:col-span-2",
166
- children: /* @__PURE__ */ A(d, {
175
+ children: /* @__PURE__ */ D(s, {
167
176
  title: I("dashboard.renewals.title", "Upcoming renewals"),
168
177
  description: I("dashboard.renewals.description", "What's charging next across your portfolio"),
169
178
  className: "mt-0",
170
- action: /* @__PURE__ */ j("button", {
179
+ action: /* @__PURE__ */ O("button", {
171
180
  type: "button",
172
181
  onClick: () => P("/relationships"),
173
182
  className: "inline-flex items-center gap-1 text-sm font-medium text-text-link hover:underline",
174
183
  children: [
175
184
  I("common.viewAll", "View all"),
176
185
  " ",
177
- /* @__PURE__ */ A(C, { className: "h-3.5 w-3.5" })
186
+ /* @__PURE__ */ D(x, { className: "h-3.5 w-3.5" })
178
187
  ]
179
188
  }),
180
- children: /* @__PURE__ */ A(M, {
189
+ children: /* @__PURE__ */ D(k, {
181
190
  treatment: "plain",
182
191
  className: "p-5",
183
- children: Z.length === 0 ? /* @__PURE__ */ A(s, {
192
+ children: Z.length === 0 ? /* @__PURE__ */ D(o, {
184
193
  illustration: "empty-calendar",
185
194
  title: I("dashboard.renewals.emptyTitle", "No upcoming renewals"),
186
195
  description: I("dashboard.renewals.emptyDescription", "Renewals you track will appear here ahead of time.")
187
- }) : /* @__PURE__ */ A(m, { items: Z })
196
+ }) : /* @__PURE__ */ D(u, { items: Z })
188
197
  })
189
198
  })
190
- }), /* @__PURE__ */ j("div", {
199
+ }), /* @__PURE__ */ O("div", {
191
200
  className: "flex flex-col gap-6",
192
- children: [/* @__PURE__ */ A(d, {
201
+ children: [/* @__PURE__ */ D(s, {
193
202
  title: I("dashboard.portfolio.title", "Portfolio by status"),
194
203
  description: I("dashboard.portfolio.description", "Where your relationships stand"),
195
204
  className: "mt-0",
196
- children: /* @__PURE__ */ A(M, {
205
+ children: /* @__PURE__ */ D(k, {
197
206
  treatment: "glass",
198
207
  className: "p-5",
199
- children: Y.length === 0 ? /* @__PURE__ */ A(s, {
208
+ children: Y.length === 0 ? /* @__PURE__ */ D(o, {
200
209
  illustration: "empty-data",
201
210
  title: I("dashboard.portfolio.emptyTitle", "No relationships yet"),
202
211
  description: I("dashboard.portfolio.emptyDescription", "Add your first subscription to see the breakdown."),
203
- action: /* @__PURE__ */ A("button", {
212
+ action: /* @__PURE__ */ D("button", {
204
213
  type: "button",
205
214
  onClick: () => P("/relationships/new"),
206
215
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90",
207
216
  children: I("dashboard.portfolio.addRelationship", "Add relationship")
208
217
  })
209
- }) : /* @__PURE__ */ j("div", {
218
+ }) : /* @__PURE__ */ O("div", {
210
219
  className: "flex flex-col items-center gap-5 sm:flex-row sm:items-center lg:flex-col xl:flex-row",
211
- children: [/* @__PURE__ */ A(f, {
220
+ children: [/* @__PURE__ */ D(c, {
212
221
  data: Y,
213
222
  size: 148,
214
223
  thickness: 20,
215
224
  centerLabel: String(J.totalCount),
216
225
  centerSub: I(J.totalCount === 1 ? "dashboard.portfolio.relationshipSingular" : "dashboard.portfolio.relationshipPlural", J.totalCount === 1 ? "relationship" : "relationships"),
217
226
  className: "shrink-0"
218
- }), /* @__PURE__ */ A(p, {
227
+ }), /* @__PURE__ */ D(l, {
219
228
  data: Y,
220
229
  className: "w-full min-w-0 flex-1"
221
230
  })]
222
231
  })
223
232
  })
224
- }), /* @__PURE__ */ A(d, {
233
+ }), /* @__PURE__ */ D(s, {
225
234
  title: I("dashboard.needsAttention.title", "Needs attention"),
226
235
  description: I("dashboard.needsAttention.description", "Required actions from the Universal Inbox"),
227
236
  className: "mt-0",
228
- action: /* @__PURE__ */ A("button", {
237
+ action: /* @__PURE__ */ D("button", {
229
238
  type: "button",
230
239
  onClick: () => P("/inbox"),
231
240
  className: "text-sm font-medium text-text-link hover:underline",
232
241
  children: I("dashboard.needsAttention.openInbox", "Open inbox")
233
242
  }),
234
- children: /* @__PURE__ */ A(M, {
243
+ children: /* @__PURE__ */ D(k, {
235
244
  treatment: "plain",
236
245
  className: "p-3",
237
- children: Q.length === 0 ? /* @__PURE__ */ j("div", {
246
+ children: Q.length === 0 ? /* @__PURE__ */ O("div", {
238
247
  className: "flex items-center gap-3 px-2 py-4",
239
- children: [/* @__PURE__ */ A("span", {
248
+ children: [/* @__PURE__ */ D("span", {
240
249
  className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-status-success-bg-subtle text-status-success-text",
241
- children: /* @__PURE__ */ A(ie, { className: "h-5 w-5" })
242
- }), /* @__PURE__ */ j("div", {
250
+ children: /* @__PURE__ */ D(E, { className: "h-5 w-5" })
251
+ }), /* @__PURE__ */ O("div", {
243
252
  className: "min-w-0",
244
- children: [/* @__PURE__ */ A("p", {
253
+ children: [/* @__PURE__ */ D("p", {
245
254
  className: "text-sm font-medium text-text-primary",
246
255
  children: I("dashboard.needsAttention.allCaughtUp", "You're all caught up")
247
- }), /* @__PURE__ */ A("p", {
256
+ }), /* @__PURE__ */ D("p", {
248
257
  className: "text-xs text-text-secondary",
249
258
  children: I("dashboard.needsAttention.allCaughtUpDescription", "Required actions across your channels will surface here.")
250
259
  })]
251
260
  })]
252
- }) : /* @__PURE__ */ A("ul", {
261
+ }) : /* @__PURE__ */ D("ul", {
253
262
  className: "space-y-1",
254
- children: Q.slice(0, 5).map((e) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j("button", {
263
+ children: Q.slice(0, 5).map((e) => /* @__PURE__ */ D("li", { children: /* @__PURE__ */ O("button", {
255
264
  type: "button",
256
265
  onClick: () => P("/inbox"),
257
- className: "flex w-full items-center gap-3 rounded-lg border-l-2 border-status-warning-text/60 bg-status-warning-bg-subtle/50 p-3 text-left transition-colors hover:bg-status-warning-bg-subtle",
258
- children: [/* @__PURE__ */ j("div", {
266
+ className: "flex w-full items-center gap-3 rounded-lg border-l-2 border-status-warning-text/60 bg-status-warning-bg-subtle/50 p-3 text-start transition-colors hover:bg-status-warning-bg-subtle",
267
+ children: [/* @__PURE__ */ O("div", {
259
268
  className: "min-w-0 flex-1",
260
- children: [/* @__PURE__ */ A("p", {
269
+ children: [/* @__PURE__ */ D("p", {
261
270
  className: "truncate text-sm font-medium text-text-primary",
262
271
  children: e.subject || I("dashboard.needsAttention.noSubject", "(no subject)")
263
- }), e.preview && /* @__PURE__ */ A("p", {
272
+ }), e.preview && /* @__PURE__ */ D("p", {
264
273
  className: "truncate text-xs text-text-secondary",
265
274
  children: e.preview
266
275
  })]
267
- }), /* @__PURE__ */ A(o, {
276
+ }), /* @__PURE__ */ D(a, {
268
277
  status: e.category,
269
278
  className: "shrink-0"
270
279
  })]
@@ -274,46 +283,46 @@ function P() {
274
283
  })]
275
284
  })]
276
285
  }),
277
- J.openInvoiceCount > 0 && /* @__PURE__ */ j("button", {
286
+ J.openInvoiceCount > 0 && /* @__PURE__ */ O("button", {
278
287
  type: "button",
279
288
  onClick: () => P("/invoices"),
280
- className: "mt-6 flex w-full items-center justify-between gap-3 rounded-xl border border-status-warning-text/30 bg-status-warning-bg-subtle px-5 py-4 text-left transition-shadow hover:shadow-md",
281
- children: [/* @__PURE__ */ j("div", {
289
+ className: "mt-6 flex w-full items-center justify-between gap-3 rounded-xl border border-status-warning-text/30 bg-status-warning-bg-subtle px-5 py-4 text-start transition-shadow hover:shadow-md",
290
+ children: [/* @__PURE__ */ O("div", {
282
291
  className: "flex items-center gap-3",
283
- children: [/* @__PURE__ */ A(x, { className: "h-5 w-5 shrink-0 text-status-warning-text" }), /* @__PURE__ */ A("span", {
292
+ children: [/* @__PURE__ */ D(y, { className: "h-5 w-5 shrink-0 text-status-warning-text" }), /* @__PURE__ */ D("span", {
284
293
  className: "text-sm font-medium text-status-warning-text",
285
294
  children: I("dashboard.openInvoices.label", "{{count}} open invoice · {{amount}} outstanding", {
286
295
  count: J.openInvoiceCount,
287
- amount: r(J.openInvoiceTotal, J.primaryCurrency)
296
+ amount: j(J.openInvoiceTotal, J.primaryCurrency)
288
297
  })
289
298
  })]
290
- }), /* @__PURE__ */ A(S, { className: "h-4 w-4 shrink-0 text-status-warning-text" })]
299
+ }), /* @__PURE__ */ D(b, { className: "rtl:rotate-180 h-4 w-4 shrink-0 text-status-warning-text" })]
291
300
  }),
292
- /* @__PURE__ */ A(d, {
301
+ /* @__PURE__ */ D(s, {
293
302
  title: I("dashboard.quickActions.title", "Quick actions"),
294
303
  description: I("dashboard.quickActions.description", "Jump straight into your workflow"),
295
- children: /* @__PURE__ */ A("div", {
304
+ children: /* @__PURE__ */ D("div", {
296
305
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4",
297
- children: se.map((e) => /* @__PURE__ */ j("button", {
306
+ children: ce.map((e) => /* @__PURE__ */ O("button", {
298
307
  type: "button",
299
308
  onClick: () => P(e.path),
300
- className: "group flex items-center gap-3 rounded-xl border border-border-subtle bg-bg-surface p-4 text-left transition-all hover:-translate-y-0.5 hover:border-border-seam hover:shadow-md",
309
+ className: "group flex items-center gap-3 rounded-xl border border-border-subtle bg-bg-surface p-4 text-start transition-all hover:-translate-y-0.5 hover:border-border-seam hover:shadow-md",
301
310
  children: [
302
- /* @__PURE__ */ A("span", {
311
+ /* @__PURE__ */ D("span", {
303
312
  className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
304
313
  children: e.icon
305
314
  }),
306
- /* @__PURE__ */ j("span", {
315
+ /* @__PURE__ */ O("span", {
307
316
  className: "min-w-0 flex-1",
308
- children: [/* @__PURE__ */ A("span", {
317
+ children: [/* @__PURE__ */ D("span", {
309
318
  className: "block text-sm font-medium text-text-primary",
310
319
  children: I(e.labelKey, e.fallbackLabel)
311
- }), /* @__PURE__ */ A("span", {
320
+ }), /* @__PURE__ */ D("span", {
312
321
  className: "block text-xs text-text-secondary",
313
322
  children: I(e.descriptionKey, e.fallbackDescription)
314
323
  })]
315
324
  }),
316
- /* @__PURE__ */ A(S, { className: "h-4 w-4 shrink-0 text-text-secondary transition-transform group-hover:translate-x-0.5" })
325
+ /* @__PURE__ */ D(b, { className: "rtl:rotate-180 h-4 w-4 shrink-0 text-text-secondary transition-transform group-hover:translate-x-0.5" })
317
326
  ]
318
327
  }, e.path))
319
328
  })
@@ -322,6 +331,6 @@ function P() {
322
331
  });
323
332
  }
324
333
  //#endregion
325
- export { P as DashboardPage };
334
+ export { j as DashboardPage };
326
335
 
327
336
  //# sourceMappingURL=DashboardPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardPage.js","names":[],"sources":["../../../src/subscriberbot/pages/DashboardPage.tsx"],"sourcesContent":["/**\n * Dashboard / Overview\n * @module subscriberbot/pages\n *\n * The Subscriber Bot landing page: a premium fintech console over every\n * recurring digital relationship — total recurring spend, portfolio-by-status,\n * upcoming renewals, the action-required inbox, and outstanding invoices. Every\n * number and chart is COMPUTED from real data returned by\n * `wspace-subscriberbot-svc` — nothing is mocked.\n */\n\nimport { useMemo } from 'react';\nimport {\n Repeat2,\n Wallet,\n CalendarClock,\n Inbox,\n AlertTriangle,\n ArrowRight,\n ArrowUpRight,\n Sparkles,\n Bot,\n ShieldCheck,\n} from 'lucide-react';\nimport { PagePurpose, GlassCard } from '@burdenoff/fe-libs/ui';\nimport {\n PageLayout,\n MetricsCard,\n StatusBadge,\n EmptyState,\n LoadingView,\n ErrorView,\n Section,\n Donut,\n Legend,\n Timeline,\n type Segment,\n type TimelineItem,\n} from '../components';\nimport { useSubscriberBot } from '../context/SubscriberBotContext';\nimport {\n useRelationships,\n useInvoices,\n useInboxMessages,\n useRenewalEvents,\n useDecisions,\n} from '../hooks/useSubscriberBotApi';\nimport { useTr } from '../hooks/useTr';\nimport { formatCurrency, formatRelativeTime, formatEnumLabel } from '../utils/formatters';\nimport { buildUpcomingRenewals, recurringSpend } from '../utils/portfolio';\nimport { useCompactViewport } from '../hooks/useCompactViewport';\nimport { MobileDashboard } from '../components/mobile';\nimport type { SubRelationship } from '../types';\n\nexport function DashboardPage() {\n const { navigateTo, currentUser } = useSubscriberBot();\n const tr = useTr();\n\n const relationshipsQ = useRelationships({ pagination: { limit: 100, offset: 0 } });\n const invoicesQ = useInvoices({ pagination: { limit: 50, offset: 0 } });\n const inboxQ = useInboxMessages({ pagination: { limit: 50, offset: 0 } });\n const renewalsQ = useRenewalEvents({ upcomingOnly: true });\n // Phone layout (BOFF-4010) also surfaces open AI recommendations; the\n // desktop console keeps them on the dedicated decisions page, so only\n // fetch them when the mobile overview will render them.\n const compact = useCompactViewport();\n const decisionsQ = useDecisions({ status: 'PROPOSED' }, { enabled: compact });\n\n const relationships = useMemo(() => relationshipsQ.data?.items ?? [], [relationshipsQ.data]);\n const invoices = useMemo(() => invoicesQ.data?.items ?? [], [invoicesQ.data]);\n const messages = useMemo(() => inboxQ.data?.items ?? [], [inboxQ.data]);\n const renewals = useMemo(() => renewalsQ.data ?? [], [renewalsQ.data]);\n\n // Fast label lookup so mobile AI-recommendation rows can name their relationship.\n const relationshipById = useMemo(() => {\n const map = new Map<string, SubRelationship>();\n relationships.forEach((r) => map.set(r.id, r));\n return map;\n }, [relationships]);\n\n const stats = useMemo(() => {\n const spend = recurringSpend(relationships);\n // BOFF-8660 — KPI must match the Universal Inbox \"need action\" counter\n // and the on-page Needs-attention list, both of which count by\n // `actionRequired` alone (read state is irrelevant). The previous\n // `&& !m.isRead` clause made the tile show 0 the moment the user read\n // the only action-required message, contradicting the surfaces below.\n const actionRequired = messages.filter((m) => m.actionRequired).length;\n const openInvoices = invoices.filter(\n (i) => i.status === 'ISSUED' || i.status === 'OVERDUE' || i.status === 'FAILED'\n );\n const openInvoiceTotal = openInvoices.reduce((sum, i) => sum + i.total, 0);\n const atRisk = relationships.filter(\n (r) => r.status === 'PAST_DUE' || r.status === 'LAPSED'\n ).length;\n\n return {\n activeCount: spend.activeCount,\n totalCount: relationships.length,\n monthlySpend: spend.monthly,\n primaryCurrency: spend.currency,\n actionRequired,\n openInvoiceCount: openInvoices.length,\n openInvoiceTotal,\n atRisk,\n };\n }, [relationships, messages, invoices]);\n\n // Portfolio-by-status → donut segments (grouped from real relationships).\n const statusSegments = useMemo<Segment[]>(() => {\n const counts = new Map<string, number>();\n relationships.forEach((r) => counts.set(r.status, (counts.get(r.status) ?? 0) + 1));\n return Array.from(counts.entries())\n .sort((a, b) => b[1] - a[1])\n .map(([status, value]) => ({ label: formatEnumLabel(status), value }));\n }, [relationships]);\n\n // Upcoming renewals, soonest first: real renewal events when present,\n // otherwise each relationship's own future `renewsAt` (shared with mobile).\n const upcoming = useMemo(\n () => buildUpcomingRenewals(relationships, renewals, (eventType) => formatEnumLabel(eventType)),\n [relationships, renewals]\n );\n\n const timelineItems = useMemo<TimelineItem[]>(\n () =>\n upcoming.slice(0, 6).map((u) => ({\n title: u.title,\n sub: formatRelativeTime(u.when),\n tone: u.soon ? 'warning' : 'default',\n meta:\n u.amount != null\n ? formatCurrency(u.amount, u.currency ?? stats.primaryCurrency, {\n maximumFractionDigits: 0,\n })\n : undefined,\n })),\n [upcoming, stats.primaryCurrency]\n );\n\n const actionMessages = useMemo(() => messages.filter((m) => m.actionRequired), [messages]);\n\n const isLoading =\n relationshipsQ.isLoading || invoicesQ.isLoading || inboxQ.isLoading || renewalsQ.isLoading;\n const isError =\n relationshipsQ.isError && invoicesQ.isError && inboxQ.isError && renewalsQ.isError;\n\n if (isLoading) {\n return (\n <PageLayout\n title={tr('dashboard.title', 'Overview')}\n description={tr(\n 'dashboard.description',\n 'Your recurring digital relationships at a glance'\n )}\n >\n <LoadingView label={tr('dashboard.loading', 'Loading your subscription portfolio…')} />\n </PageLayout>\n );\n }\n\n if (isError) {\n return (\n <PageLayout\n title={tr('dashboard.title', 'Overview')}\n description={tr(\n 'dashboard.description',\n 'Your recurring digital relationships at a glance'\n )}\n >\n <ErrorView\n message={tr(\n 'dashboard.error',\n \"We couldn't reach the Subscriber Bot service. Please try again.\"\n )}\n onRetry={() => {\n void relationshipsQ.refetch();\n void invoicesQ.refetch();\n void inboxQ.refetch();\n void renewalsQ.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n const greetingName = currentUser?.firstName || currentUser?.name?.split(' ')[0];\n\n if (compact) {\n return (\n <MobileDashboard\n greetingName={greetingName || undefined}\n spend={{\n monthly: stats.monthlySpend,\n currency: stats.primaryCurrency,\n activeCount: stats.activeCount,\n }}\n upcoming={upcoming}\n actionMessages={actionMessages}\n decisions={decisionsQ.data?.items ?? []}\n relationshipLabel={(id) => relationshipById.get(id)?.label}\n openInvoiceCount={stats.openInvoiceCount}\n openInvoiceTotal={stats.openInvoiceTotal}\n navigateTo={navigateTo}\n />\n );\n }\n\n const quickActions = [\n {\n labelKey: 'dashboard.quickActions.addRelationship.label',\n descriptionKey: 'dashboard.quickActions.addRelationship.description',\n fallbackLabel: 'Add a relationship',\n fallbackDescription: 'Track a new subscription',\n icon: <Repeat2 className=\"h-5 w-5\" />,\n path: '/relationships/new',\n },\n {\n labelKey: 'dashboard.quickActions.discoverProviders.label',\n descriptionKey: 'dashboard.quickActions.discoverProviders.description',\n fallbackLabel: 'Discover providers',\n fallbackDescription: 'Browse the registry',\n icon: <Sparkles className=\"h-5 w-5\" />,\n path: '/providers',\n },\n {\n labelKey: 'dashboard.quickActions.openInbox.label',\n descriptionKey: 'dashboard.quickActions.openInbox.description',\n fallbackLabel: 'Open inbox',\n fallbackDescription: 'Merged communications',\n icon: <Inbox className=\"h-5 w-5\" />,\n path: '/inbox',\n },\n {\n labelKey: 'dashboard.quickActions.configureAgents.label',\n descriptionKey: 'dashboard.quickActions.configureAgents.description',\n fallbackLabel: 'Configure agents',\n fallbackDescription: 'Automate your portfolio',\n icon: <Bot className=\"h-5 w-5\" />,\n path: '/agents',\n },\n ];\n\n return (\n <PageLayout\n title={\n greetingName\n ? tr('dashboard.welcomeBack', 'Welcome back, {{name}}', { name: greetingName })\n : tr('dashboard.title', 'Overview')\n }\n description={tr(\n 'dashboard.description',\n 'Everything you pay for on repeat — in one intelligent console.'\n )}\n >\n <PagePurpose className=\"mb-6\">\n {tr(\n 'dashboard.purpose',\n 'Subscriber Bot is your system of record for every recurring digital relationship. See total recurring spend, what renews next, what needs action, and what to optimize — all from real data across your providers.'\n )}\n </PagePurpose>\n\n {/* KPI tiles */}\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <MetricsCard\n featured\n icon={<Wallet />}\n value={formatCurrency(stats.monthlySpend, stats.primaryCurrency, {\n maximumFractionDigits: 0,\n })}\n label={tr('dashboard.metrics.recurringSpend', 'Recurring spend / month')}\n />\n <MetricsCard\n icon={<Repeat2 />}\n value={stats.activeCount}\n label={tr('dashboard.metrics.activeRelationships', 'Active relationships')}\n />\n <MetricsCard\n icon={<CalendarClock />}\n value={upcoming.length}\n label={tr('dashboard.metrics.upcomingRenewals', 'Upcoming renewals')}\n />\n <MetricsCard\n icon={<AlertTriangle />}\n value={stats.actionRequired}\n label={tr('dashboard.metrics.needsAction', 'Need your action')}\n trend={stats.actionRequired > 0 ? 'down' : undefined}\n />\n </div>\n\n {/* Main console: renewals (left) + portfolio donut & needs-attention (right) */}\n <div className=\"mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Upcoming renewals timeline — spans two columns on desktop */}\n <div className=\"lg:col-span-2\">\n <Section\n title={tr('dashboard.renewals.title', 'Upcoming renewals')}\n description={tr(\n 'dashboard.renewals.description',\n \"What's charging next across your portfolio\"\n )}\n className=\"mt-0\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"inline-flex items-center gap-1 text-sm font-medium text-text-link hover:underline\"\n >\n {tr('common.viewAll', 'View all')} <ArrowUpRight className=\"h-3.5 w-3.5\" />\n </button>\n }\n >\n <GlassCard treatment=\"plain\" className=\"p-5\">\n {timelineItems.length === 0 ? (\n <EmptyState\n illustration=\"empty-calendar\"\n title={tr('dashboard.renewals.emptyTitle', 'No upcoming renewals')}\n description={tr(\n 'dashboard.renewals.emptyDescription',\n 'Renewals you track will appear here ahead of time.'\n )}\n />\n ) : (\n <Timeline items={timelineItems} />\n )}\n </GlassCard>\n </Section>\n </div>\n\n {/* Right rail: portfolio-by-status donut + needs-attention panel */}\n <div className=\"flex flex-col gap-6\">\n <Section\n title={tr('dashboard.portfolio.title', 'Portfolio by status')}\n description={tr('dashboard.portfolio.description', 'Where your relationships stand')}\n className=\"mt-0\"\n >\n <GlassCard treatment=\"glass\" className=\"p-5\">\n {statusSegments.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n title={tr('dashboard.portfolio.emptyTitle', 'No relationships yet')}\n description={tr(\n 'dashboard.portfolio.emptyDescription',\n 'Add your first subscription to see the breakdown.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships/new')}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90\"\n >\n {tr('dashboard.portfolio.addRelationship', 'Add relationship')}\n </button>\n }\n />\n ) : (\n <div className=\"flex flex-col items-center gap-5 sm:flex-row sm:items-center lg:flex-col xl:flex-row\">\n <Donut\n data={statusSegments}\n size={148}\n thickness={20}\n centerLabel={String(stats.totalCount)}\n centerSub={tr(\n stats.totalCount === 1\n ? 'dashboard.portfolio.relationshipSingular'\n : 'dashboard.portfolio.relationshipPlural',\n stats.totalCount === 1 ? 'relationship' : 'relationships'\n )}\n className=\"shrink-0\"\n />\n <Legend data={statusSegments} className=\"w-full min-w-0 flex-1\" />\n </div>\n )}\n </GlassCard>\n </Section>\n\n <Section\n title={tr('dashboard.needsAttention.title', 'Needs attention')}\n description={tr(\n 'dashboard.needsAttention.description',\n 'Required actions from the Universal Inbox'\n )}\n className=\"mt-0\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/inbox')}\n className=\"text-sm font-medium text-text-link hover:underline\"\n >\n {tr('dashboard.needsAttention.openInbox', 'Open inbox')}\n </button>\n }\n >\n <GlassCard treatment=\"plain\" className=\"p-3\">\n {actionMessages.length === 0 ? (\n <div className=\"flex items-center gap-3 px-2 py-4\">\n <span className=\"flex size-10 shrink-0 items-center justify-center rounded-lg bg-status-success-bg-subtle text-status-success-text\">\n <ShieldCheck className=\"h-5 w-5\" />\n </span>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium text-text-primary\">\n {tr('dashboard.needsAttention.allCaughtUp', \"You're all caught up\")}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'dashboard.needsAttention.allCaughtUpDescription',\n 'Required actions across your channels will surface here.'\n )}\n </p>\n </div>\n </div>\n ) : (\n <ul className=\"space-y-1\">\n {actionMessages.slice(0, 5).map((message) => (\n <li key={message.id}>\n <button\n type=\"button\"\n onClick={() => navigateTo('/inbox')}\n className=\"flex w-full items-center gap-3 rounded-lg border-l-2 border-status-warning-text/60 bg-status-warning-bg-subtle/50 p-3 text-left transition-colors hover:bg-status-warning-bg-subtle\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {message.subject ||\n tr('dashboard.needsAttention.noSubject', '(no subject)')}\n </p>\n {message.preview && (\n <p className=\"truncate text-xs text-text-secondary\">\n {message.preview}\n </p>\n )}\n </div>\n <StatusBadge status={message.category} className=\"shrink-0\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n </GlassCard>\n </Section>\n </div>\n </div>\n\n {/* Open-invoice call-out (only when there is real outstanding balance) */}\n {stats.openInvoiceCount > 0 && (\n <button\n type=\"button\"\n onClick={() => navigateTo('/invoices')}\n className=\"mt-6 flex w-full items-center justify-between gap-3 rounded-xl border border-status-warning-text/30 bg-status-warning-bg-subtle px-5 py-4 text-left transition-shadow hover:shadow-md\"\n >\n <div className=\"flex items-center gap-3\">\n <AlertTriangle className=\"h-5 w-5 shrink-0 text-status-warning-text\" />\n <span className=\"text-sm font-medium text-status-warning-text\">\n {tr(\n 'dashboard.openInvoices.label',\n '{{count}} open invoice · {{amount}} outstanding',\n {\n count: stats.openInvoiceCount,\n amount: formatCurrency(stats.openInvoiceTotal, stats.primaryCurrency),\n }\n )}\n </span>\n </div>\n <ArrowRight className=\"h-4 w-4 shrink-0 text-status-warning-text\" />\n </button>\n )}\n\n {/* Quick actions */}\n <Section\n title={tr('dashboard.quickActions.title', 'Quick actions')}\n description={tr('dashboard.quickActions.description', 'Jump straight into your workflow')}\n >\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4\">\n {quickActions.map((qa) => (\n <button\n key={qa.path}\n type=\"button\"\n onClick={() => navigateTo(qa.path)}\n className=\"group flex items-center gap-3 rounded-xl border border-border-subtle bg-bg-surface p-4 text-left transition-all hover:-translate-y-0.5 hover:border-border-seam hover:shadow-md\"\n >\n <span className=\"flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary\">\n {qa.icon}\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"block text-sm font-medium text-text-primary\">\n {tr(qa.labelKey, qa.fallbackLabel)}\n </span>\n <span className=\"block text-xs text-text-secondary\">\n {tr(qa.descriptionKey, qa.fallbackDescription)}\n </span>\n </span>\n <ArrowRight className=\"h-4 w-4 shrink-0 text-text-secondary transition-transform group-hover:translate-x-0.5\" />\n </button>\n ))}\n </div>\n </Section>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAsDA,SAAgB,IAAgB;CAC9B,IAAM,EAAE,eAAY,mBAAgB,EAAiB,GAC/C,IAAK,EAAM,GAEX,IAAiB,EAAiB,EAAE,YAAY;EAAE,OAAO;EAAK,QAAQ;CAAE,EAAE,CAAC,GAC3E,IAAY,EAAY,EAAE,YAAY;EAAE,OAAO;EAAI,QAAQ;CAAE,EAAE,CAAC,GAChE,IAAS,EAAiB,EAAE,YAAY;EAAE,OA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C,CAAA,CACF;;OACN,kBAAC,GAAD,EAAY,WAAU,wFAAyF,CAAA;MACzG;QAjBD,EAAG,IAiBF,CACT;IACE,CAAA;GACE,CAAA;EACC;;AAEhB"}
1
+ {"version":3,"file":"DashboardPage.js","names":[],"sources":["../../../src/subscriberbot/pages/DashboardPage.tsx"],"sourcesContent":["import { useFormatters } from '../hooks/useFormatters';\n/**\n * Dashboard / Overview\n * @module subscriberbot/pages\n *\n * The Subscriber Bot landing page: a premium fintech console over every\n * recurring digital relationship — total recurring spend, portfolio-by-status,\n * upcoming renewals, the action-required inbox, and outstanding invoices. Every\n * number and chart is COMPUTED from real data returned by\n * `wspace-subscriberbot-svc` — nothing is mocked.\n */\n\nimport { useMemo } from 'react';\nimport {\n Repeat2,\n Wallet,\n CalendarClock,\n Inbox,\n AlertTriangle,\n ArrowRight,\n ArrowUpRight,\n Sparkles,\n Bot,\n ShieldCheck,\n} from 'lucide-react';\nimport { PagePurpose, GlassCard } from '@burdenoff/fe-libs/ui';\nimport {\n PageLayout,\n MetricsCard,\n StatusBadge,\n EmptyState,\n LoadingView,\n ErrorView,\n Section,\n Donut,\n Legend,\n Timeline,\n type Segment,\n type TimelineItem,\n} from '../components';\nimport { useSubscriberBot } from '../context/SubscriberBotContext';\nimport {\n useRelationships,\n useInvoices,\n useInboxMessages,\n useRenewalEvents,\n useDecisions,\n} from '../hooks/useSubscriberBotApi';\nimport { useTr } from '../hooks/useTr';\n\nimport { buildUpcomingRenewals, recurringSpend } from '../utils/portfolio';\nimport { useCompactViewport } from '../hooks/useCompactViewport';\nimport { MobileDashboard } from '../components/mobile';\nimport type { SubRelationship } from '../types';\n\nexport function DashboardPage() {\n const { formatCurrency, formatEnumLabel, formatRelativeTime } = useFormatters();\n\n const { navigateTo, currentUser } = useSubscriberBot();\n const tr = useTr();\n\n const relationshipsQ = useRelationships({ pagination: { limit: 100, offset: 0 } });\n const invoicesQ = useInvoices({ pagination: { limit: 50, offset: 0 } });\n const inboxQ = useInboxMessages({ pagination: { limit: 50, offset: 0 } });\n const renewalsQ = useRenewalEvents({ upcomingOnly: true });\n // Phone layout (BOFF-4010) also surfaces open AI recommendations; the\n // desktop console keeps them on the dedicated decisions page, so only\n // fetch them when the mobile overview will render them.\n const compact = useCompactViewport();\n const decisionsQ = useDecisions({ status: 'PROPOSED' }, { enabled: compact });\n\n const relationships = useMemo(() => relationshipsQ.data?.items ?? [], [relationshipsQ.data]);\n const invoices = useMemo(() => invoicesQ.data?.items ?? [], [invoicesQ.data]);\n const messages = useMemo(() => inboxQ.data?.items ?? [], [inboxQ.data]);\n const renewals = useMemo(() => renewalsQ.data ?? [], [renewalsQ.data]);\n\n // Fast label lookup so mobile AI-recommendation rows can name their relationship.\n const relationshipById = useMemo(() => {\n const map = new Map<string, SubRelationship>();\n relationships.forEach((r) => map.set(r.id, r));\n return map;\n }, [relationships]);\n\n const stats = useMemo(() => {\n const spend = recurringSpend(relationships);\n // BOFF-8660 — KPI must match the Universal Inbox \"need action\" counter\n // and the on-page Needs-attention list, both of which count by\n // `actionRequired` alone (read state is irrelevant). The previous\n // `&& !m.isRead` clause made the tile show 0 the moment the user read\n // the only action-required message, contradicting the surfaces below.\n const actionRequired = messages.filter((m) => m.actionRequired).length;\n const openInvoices = invoices.filter(\n (i) => i.status === 'ISSUED' || i.status === 'OVERDUE' || i.status === 'FAILED'\n );\n const openInvoiceTotal = openInvoices.reduce((sum, i) => sum + i.total, 0);\n const atRisk = relationships.filter(\n (r) => r.status === 'PAST_DUE' || r.status === 'LAPSED'\n ).length;\n\n return {\n activeCount: spend.activeCount,\n totalCount: relationships.length,\n monthlySpend: spend.monthly,\n primaryCurrency: spend.currency,\n actionRequired,\n openInvoiceCount: openInvoices.length,\n openInvoiceTotal,\n atRisk,\n };\n }, [relationships, messages, invoices]);\n\n // Portfolio-by-status → donut segments (grouped from real relationships).\n const statusSegments = useMemo<Segment[]>(() => {\n const counts = new Map<string, number>();\n relationships.forEach((r) => counts.set(r.status, (counts.get(r.status) ?? 0) + 1));\n return Array.from(counts.entries())\n .sort((a, b) => b[1] - a[1])\n .map(([status, value]) => ({ label: formatEnumLabel(status), value }));\n }, [relationships, formatEnumLabel]);\n\n // Upcoming renewals, soonest first: real renewal events when present,\n // otherwise each relationship's own future `renewsAt` (shared with mobile).\n const upcoming = useMemo(\n () => buildUpcomingRenewals(relationships, renewals, (eventType) => formatEnumLabel(eventType)),\n [relationships, renewals, formatEnumLabel]\n );\n\n const timelineItems = useMemo<TimelineItem[]>(\n () =>\n upcoming.slice(0, 6).map((u) => ({\n title: u.title,\n sub: formatRelativeTime(u.when),\n tone: u.soon ? 'warning' : 'default',\n meta:\n u.amount != null\n ? formatCurrency(u.amount, u.currency ?? stats.primaryCurrency, {\n maximumFractionDigits: 0,\n })\n : undefined,\n })),\n [upcoming, stats.primaryCurrency, formatCurrency, formatRelativeTime]\n );\n\n const actionMessages = useMemo(() => messages.filter((m) => m.actionRequired), [messages]);\n\n const isLoading =\n relationshipsQ.isLoading || invoicesQ.isLoading || inboxQ.isLoading || renewalsQ.isLoading;\n const isError =\n relationshipsQ.isError && invoicesQ.isError && inboxQ.isError && renewalsQ.isError;\n\n if (isLoading) {\n return (\n <PageLayout\n title={tr('dashboard.title', 'Overview')}\n description={tr(\n 'dashboard.description',\n 'Your recurring digital relationships at a glance'\n )}\n >\n <LoadingView label={tr('dashboard.loading', 'Loading your subscription portfolio…')} />\n </PageLayout>\n );\n }\n\n if (isError) {\n return (\n <PageLayout\n title={tr('dashboard.title', 'Overview')}\n description={tr(\n 'dashboard.description',\n 'Your recurring digital relationships at a glance'\n )}\n >\n <ErrorView\n message={tr(\n 'dashboard.error',\n \"We couldn't reach the Subscriber Bot service. Please try again.\"\n )}\n onRetry={() => {\n void relationshipsQ.refetch();\n void invoicesQ.refetch();\n void inboxQ.refetch();\n void renewalsQ.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n const greetingName = currentUser?.firstName || currentUser?.name?.split(' ')[0];\n\n if (compact) {\n return (\n <MobileDashboard\n greetingName={greetingName || undefined}\n spend={{\n monthly: stats.monthlySpend,\n currency: stats.primaryCurrency,\n activeCount: stats.activeCount,\n }}\n upcoming={upcoming}\n actionMessages={actionMessages}\n decisions={decisionsQ.data?.items ?? []}\n relationshipLabel={(id) => relationshipById.get(id)?.label}\n openInvoiceCount={stats.openInvoiceCount}\n openInvoiceTotal={stats.openInvoiceTotal}\n navigateTo={navigateTo}\n />\n );\n }\n\n const quickActions = [\n {\n labelKey: 'dashboard.quickActions.addRelationship.label',\n descriptionKey: 'dashboard.quickActions.addRelationship.description',\n fallbackLabel: 'Add a relationship',\n fallbackDescription: 'Track a new subscription',\n icon: <Repeat2 className=\"h-5 w-5\" />,\n path: '/relationships/new',\n },\n {\n labelKey: 'dashboard.quickActions.discoverProviders.label',\n descriptionKey: 'dashboard.quickActions.discoverProviders.description',\n fallbackLabel: 'Discover providers',\n fallbackDescription: 'Browse the registry',\n icon: <Sparkles className=\"h-5 w-5\" />,\n path: '/providers',\n },\n {\n labelKey: 'dashboard.quickActions.openInbox.label',\n descriptionKey: 'dashboard.quickActions.openInbox.description',\n fallbackLabel: 'Open inbox',\n fallbackDescription: 'Merged communications',\n icon: <Inbox className=\"h-5 w-5\" />,\n path: '/inbox',\n },\n {\n labelKey: 'dashboard.quickActions.configureAgents.label',\n descriptionKey: 'dashboard.quickActions.configureAgents.description',\n fallbackLabel: 'Configure agents',\n fallbackDescription: 'Automate your portfolio',\n icon: <Bot className=\"h-5 w-5\" />,\n path: '/agents',\n },\n ];\n\n return (\n <PageLayout\n title={\n greetingName\n ? tr('dashboard.welcomeBack', 'Welcome back, {{name}}', { name: greetingName })\n : tr('dashboard.title', 'Overview')\n }\n description={tr(\n 'dashboard.description',\n 'Everything you pay for on repeat — in one intelligent console.'\n )}\n >\n <PagePurpose className=\"mb-6\">\n {tr(\n 'dashboard.purpose',\n 'Subscriber Bot is your system of record for every recurring digital relationship. See total recurring spend, what renews next, what needs action, and what to optimize — all from real data across your providers.'\n )}\n </PagePurpose>\n\n {/* KPI tiles */}\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n <MetricsCard\n featured\n icon={<Wallet />}\n value={formatCurrency(stats.monthlySpend, stats.primaryCurrency, {\n maximumFractionDigits: 0,\n })}\n label={tr('dashboard.metrics.recurringSpend', 'Recurring spend / month')}\n />\n <MetricsCard\n icon={<Repeat2 />}\n value={stats.activeCount}\n label={tr('dashboard.metrics.activeRelationships', 'Active relationships')}\n />\n <MetricsCard\n icon={<CalendarClock />}\n value={upcoming.length}\n label={tr('dashboard.metrics.upcomingRenewals', 'Upcoming renewals')}\n />\n <MetricsCard\n icon={<AlertTriangle />}\n value={stats.actionRequired}\n label={tr('dashboard.metrics.needsAction', 'Need your action')}\n trend={stats.actionRequired > 0 ? 'down' : undefined}\n />\n </div>\n\n {/* Main console: renewals (left) + portfolio donut & needs-attention (right) */}\n <div className=\"mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n {/* Upcoming renewals timeline — spans two columns on desktop */}\n <div className=\"lg:col-span-2\">\n <Section\n title={tr('dashboard.renewals.title', 'Upcoming renewals')}\n description={tr(\n 'dashboard.renewals.description',\n \"What's charging next across your portfolio\"\n )}\n className=\"mt-0\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships')}\n className=\"inline-flex items-center gap-1 text-sm font-medium text-text-link hover:underline\"\n >\n {tr('common.viewAll', 'View all')} <ArrowUpRight className=\"h-3.5 w-3.5\" />\n </button>\n }\n >\n <GlassCard treatment=\"plain\" className=\"p-5\">\n {timelineItems.length === 0 ? (\n <EmptyState\n illustration=\"empty-calendar\"\n title={tr('dashboard.renewals.emptyTitle', 'No upcoming renewals')}\n description={tr(\n 'dashboard.renewals.emptyDescription',\n 'Renewals you track will appear here ahead of time.'\n )}\n />\n ) : (\n <Timeline items={timelineItems} />\n )}\n </GlassCard>\n </Section>\n </div>\n\n {/* Right rail: portfolio-by-status donut + needs-attention panel */}\n <div className=\"flex flex-col gap-6\">\n <Section\n title={tr('dashboard.portfolio.title', 'Portfolio by status')}\n description={tr('dashboard.portfolio.description', 'Where your relationships stand')}\n className=\"mt-0\"\n >\n <GlassCard treatment=\"glass\" className=\"p-5\">\n {statusSegments.length === 0 ? (\n <EmptyState\n illustration=\"empty-data\"\n title={tr('dashboard.portfolio.emptyTitle', 'No relationships yet')}\n description={tr(\n 'dashboard.portfolio.emptyDescription',\n 'Add your first subscription to see the breakdown.'\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/relationships/new')}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90\"\n >\n {tr('dashboard.portfolio.addRelationship', 'Add relationship')}\n </button>\n }\n />\n ) : (\n <div className=\"flex flex-col items-center gap-5 sm:flex-row sm:items-center lg:flex-col xl:flex-row\">\n <Donut\n data={statusSegments}\n size={148}\n thickness={20}\n centerLabel={String(stats.totalCount)}\n centerSub={tr(\n stats.totalCount === 1\n ? 'dashboard.portfolio.relationshipSingular'\n : 'dashboard.portfolio.relationshipPlural',\n stats.totalCount === 1 ? 'relationship' : 'relationships'\n )}\n className=\"shrink-0\"\n />\n <Legend data={statusSegments} className=\"w-full min-w-0 flex-1\" />\n </div>\n )}\n </GlassCard>\n </Section>\n\n <Section\n title={tr('dashboard.needsAttention.title', 'Needs attention')}\n description={tr(\n 'dashboard.needsAttention.description',\n 'Required actions from the Universal Inbox'\n )}\n className=\"mt-0\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('/inbox')}\n className=\"text-sm font-medium text-text-link hover:underline\"\n >\n {tr('dashboard.needsAttention.openInbox', 'Open inbox')}\n </button>\n }\n >\n <GlassCard treatment=\"plain\" className=\"p-3\">\n {actionMessages.length === 0 ? (\n <div className=\"flex items-center gap-3 px-2 py-4\">\n <span className=\"flex size-10 shrink-0 items-center justify-center rounded-lg bg-status-success-bg-subtle text-status-success-text\">\n <ShieldCheck className=\"h-5 w-5\" />\n </span>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium text-text-primary\">\n {tr('dashboard.needsAttention.allCaughtUp', \"You're all caught up\")}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {tr(\n 'dashboard.needsAttention.allCaughtUpDescription',\n 'Required actions across your channels will surface here.'\n )}\n </p>\n </div>\n </div>\n ) : (\n <ul className=\"space-y-1\">\n {actionMessages.slice(0, 5).map((message) => (\n <li key={message.id}>\n <button\n type=\"button\"\n onClick={() => navigateTo('/inbox')}\n className=\"flex w-full items-center gap-3 rounded-lg border-l-2 border-status-warning-text/60 bg-status-warning-bg-subtle/50 p-3 text-start transition-colors hover:bg-status-warning-bg-subtle\"\n >\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n {message.subject ||\n tr('dashboard.needsAttention.noSubject', '(no subject)')}\n </p>\n {message.preview && (\n <p className=\"truncate text-xs text-text-secondary\">\n {message.preview}\n </p>\n )}\n </div>\n <StatusBadge status={message.category} className=\"shrink-0\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n </GlassCard>\n </Section>\n </div>\n </div>\n\n {/* Open-invoice call-out (only when there is real outstanding balance) */}\n {stats.openInvoiceCount > 0 && (\n <button\n type=\"button\"\n onClick={() => navigateTo('/invoices')}\n className=\"mt-6 flex w-full items-center justify-between gap-3 rounded-xl border border-status-warning-text/30 bg-status-warning-bg-subtle px-5 py-4 text-start transition-shadow hover:shadow-md\"\n >\n <div className=\"flex items-center gap-3\">\n <AlertTriangle className=\"h-5 w-5 shrink-0 text-status-warning-text\" />\n <span className=\"text-sm font-medium text-status-warning-text\">\n {tr(\n 'dashboard.openInvoices.label',\n '{{count}} open invoice · {{amount}} outstanding',\n {\n count: stats.openInvoiceCount,\n amount: formatCurrency(stats.openInvoiceTotal, stats.primaryCurrency),\n }\n )}\n </span>\n </div>\n <ArrowRight className=\"rtl:rotate-180 h-4 w-4 shrink-0 text-status-warning-text\" />\n </button>\n )}\n\n {/* Quick actions */}\n <Section\n title={tr('dashboard.quickActions.title', 'Quick actions')}\n description={tr('dashboard.quickActions.description', 'Jump straight into your workflow')}\n >\n <div className=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4\">\n {quickActions.map((qa) => (\n <button\n key={qa.path}\n type=\"button\"\n onClick={() => navigateTo(qa.path)}\n className=\"group flex items-center gap-3 rounded-xl border border-border-subtle bg-bg-surface p-4 text-start transition-all hover:-translate-y-0.5 hover:border-border-seam hover:shadow-md\"\n >\n <span className=\"flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary\">\n {qa.icon}\n </span>\n <span className=\"min-w-0 flex-1\">\n <span className=\"block text-sm font-medium text-text-primary\">\n {tr(qa.labelKey, qa.fallbackLabel)}\n </span>\n <span className=\"block text-xs text-text-secondary\">\n {tr(qa.descriptionKey, qa.fallbackDescription)}\n </span>\n </span>\n <ArrowRight className=\"rtl:rotate-180 h-4 w-4 shrink-0 text-text-secondary transition-transform group-hover:translate-x-0.5\" />\n </button>\n ))}\n </div>\n </Section>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuDA,SAAgB,IAAgB;CAC9B,IAAM,EAAE,mBAAgB,oBAAiB,0BAAuB,EAAc,GAExE,EAAE,eAAY,mBAAgB,EAAiB,GAC/C,IAAK,EAAM,GAEX,IAAiB,EAAiB,EAAE,YAAY;EAAE,OAAO;EAAK,QAAQ;CAAE,EAAE,CAAC,GAC3E,IAAY,EAAY,EAAE,YAAY;EAAE,OAAO;EAAI,QAAQ;CAAE,EAAE,CAAC,GAChE,IAAS,EAAiB,EAAE,YAAY;EAAE,OAAO;EAAI,QAAQ;CAAE,EAAE,CAAC,GAClE,IAAY,EAAiB,EAAE,cAAc,GAAK,CAAC,GAInD,IAAU,EAAmB,GAC7B,IAAa,EAAa,EAAE,QAAQ,WAAW,GAAG,EAAE,SAAS,EAAQ,CAAC,GAEtE,IAAgB,QAAc,EAAe,MAAM,SAAS,CAA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/pages
4
- *
5
- * Every merged subscription communication in one timeline, AI-categorized,
6
- * plus management of the ingest channels that feed it. Filter by category /
7
- * unread, mark messages read or unread, add & verify channels, and log a test message.
8
- * Reads `subListInboxMessages` / `subListChannels`; writes `subMarkMessageRead`, `subMarkMessageUnread`,
9
- * `subCreateChannel`, `subVerifyChannel`, `subIngestMessage`.
10
- */
11
1
  export declare function InboxPage(): import("react").JSX.Element;
12
2
  //# sourceMappingURL=InboxPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InboxPage.d.ts","sourceRoot":"","sources":["../../../src/subscriberbot/pages/InboxPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAq3BH,wBAAgB,SAAS,gCAgQxB"}
1
+ {"version":3,"file":"InboxPage.d.ts","sourceRoot":"","sources":["../../../src/subscriberbot/pages/InboxPage.tsx"],"names":[],"mappings":"AAm6BA,wBAAgB,SAAS,gCAgQxB"}