@wopr-network/platform-ui-core 1.27.8 → 1.27.9

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 (353) hide show
  1. package/next.config.ts +1 -2
  2. package/package.json +17 -17
  3. package/src/__tests__/account-switcher.test.tsx +21 -20
  4. package/src/__tests__/activity-page.test.tsx +2 -6
  5. package/src/__tests__/add-payment-method-dialog.test.tsx +9 -32
  6. package/src/__tests__/admin-api.test.ts +1 -6
  7. package/src/__tests__/admin-gpu-api.test.ts +1 -3
  8. package/src/__tests__/admin-marketplace-api.test.ts +1 -4
  9. package/src/__tests__/admin-middleware.test.ts +76 -83
  10. package/src/__tests__/affiliate-dashboard.test.tsx +3 -3
  11. package/src/__tests__/api-401-redirect.test.ts +46 -9
  12. package/src/__tests__/api-client.test.ts +3 -5
  13. package/src/__tests__/api-config.test.ts +22 -42
  14. package/src/__tests__/api-fleet-resources.test.ts +1 -2
  15. package/src/__tests__/api-fleet-trpc.test.ts +2 -8
  16. package/src/__tests__/api-null-guards.test.ts +3 -1
  17. package/src/__tests__/audit-log-table-pagination.test.tsx +2 -6
  18. package/src/__tests__/auth-password-reset.test.tsx +7 -21
  19. package/src/__tests__/auth-redirect.test.tsx +8 -2
  20. package/src/__tests__/auth.test.tsx +25 -23
  21. package/src/__tests__/auto-topup-card.test.tsx +4 -12
  22. package/src/__tests__/backups-tab.test.tsx +3 -4
  23. package/src/__tests__/billing-layout-nav-hidden.test.tsx +5 -37
  24. package/src/__tests__/billing-payment-org-invoices.test.tsx +2 -18
  25. package/src/__tests__/billing.test.tsx +8 -39
  26. package/src/__tests__/bot-settings/resources-tab.test.tsx +1 -3
  27. package/src/__tests__/bot-settings/storage-tab.test.tsx +1 -3
  28. package/src/__tests__/bot-settings/vps-upgrade-card.test.tsx +1 -3
  29. package/src/__tests__/bot-settings-restart.test.tsx +1 -3
  30. package/src/__tests__/bot-settings.test.tsx +2 -6
  31. package/src/__tests__/brand.test.ts +6 -26
  32. package/src/__tests__/buy-credits-panel.test.tsx +1 -3
  33. package/src/__tests__/buy-crypto-credits-panel.test.tsx +101 -119
  34. package/src/__tests__/capability-conflicts.test.ts +2 -8
  35. package/src/__tests__/capability-resolver.test.tsx +2 -12
  36. package/src/__tests__/channel-wizard.test.tsx +4 -17
  37. package/src/__tests__/chat/chat-panel.test.tsx +1 -4
  38. package/src/__tests__/chat-store.test.ts +5 -15
  39. package/src/__tests__/command-center.test.tsx +10 -12
  40. package/src/__tests__/compliance-retention-edit.test.tsx +3 -6
  41. package/src/__tests__/confirmation-tracker.test.tsx +3 -18
  42. package/src/__tests__/coupon-input.test.tsx +1 -3
  43. package/src/__tests__/create-instance.test.tsx +1 -3
  44. package/src/__tests__/credit-balance.test.tsx +4 -12
  45. package/src/__tests__/credits.test.tsx +32 -85
  46. package/src/__tests__/email-verification-banner.test.tsx +2 -6
  47. package/src/__tests__/error-boundaries.test.tsx +0 -1
  48. package/src/__tests__/fetch-pricing.test.ts +2 -1
  49. package/src/__tests__/field-oauth.test.tsx +2 -6
  50. package/src/__tests__/fixtures/mock-manifests-data.js +1 -3
  51. package/src/__tests__/fixtures/mock-manifests.ts +2 -4
  52. package/src/__tests__/fleet-health-timestamp.test.tsx +1 -8
  53. package/src/__tests__/fleet-health-update.test.tsx +1 -8
  54. package/src/__tests__/gpu-dashboard.test.tsx +2 -6
  55. package/src/__tests__/instance-detail.test.tsx +3 -9
  56. package/src/__tests__/instance-list.test.tsx +1 -5
  57. package/src/__tests__/layout-snapshots.test.tsx +64 -11
  58. package/src/__tests__/marketplace-admin.test.tsx +2 -6
  59. package/src/__tests__/marketplace.test.tsx +11 -35
  60. package/src/__tests__/merge-api-rates.test.ts +1 -6
  61. package/src/__tests__/middleware.test.ts +32 -219
  62. package/src/__tests__/next-config-headers.test.ts +1 -3
  63. package/src/__tests__/notifications.test.tsx +4 -11
  64. package/src/__tests__/oauth-buttons.test.tsx +36 -59
  65. package/src/__tests__/oauth-error-mapping.test.tsx +2 -6
  66. package/src/__tests__/observability.test.tsx +23 -36
  67. package/src/__tests__/onboarding-page.test.tsx +4 -6
  68. package/src/__tests__/org-billing-api.test.tsx +1 -6
  69. package/src/__tests__/plugin-install-flow.test.tsx +28 -58
  70. package/src/__tests__/plugin-registry.test.tsx +3 -11
  71. package/src/__tests__/plugin-tool-sync.test.ts +1 -3
  72. package/src/__tests__/plugins-catalog-error.test.tsx +2 -6
  73. package/src/__tests__/plugins-toggle-race.test.tsx +3 -5
  74. package/src/__tests__/portfolio-chart.test.tsx +2 -6
  75. package/src/__tests__/promotion-form.test.tsx +2 -6
  76. package/src/__tests__/promotions-list.test.tsx +1 -3
  77. package/src/__tests__/provider-key-api.test.ts +2 -1
  78. package/src/__tests__/resend-verification-button.test.tsx +8 -24
  79. package/src/__tests__/secrets-audit-pagination.test.tsx +1 -3
  80. package/src/__tests__/settings.test.tsx +11 -21
  81. package/src/__tests__/setup-checklist.test.tsx +3 -9
  82. package/src/__tests__/setup.ts +25 -6
  83. package/src/__tests__/snapshot-api.test.ts +2 -1
  84. package/src/__tests__/step-superpowers.test.tsx +1 -3
  85. package/src/__tests__/tenant-context.test.tsx +1 -6
  86. package/src/__tests__/tenant-keys-api.test.ts +3 -4
  87. package/src/__tests__/tenant-table-pagination.test.tsx +2 -6
  88. package/src/__tests__/terminal-log-cleanup.test.tsx +0 -1
  89. package/src/__tests__/transaction-history.test.tsx +190 -238
  90. package/src/__tests__/trpc-types.test.ts +2 -6
  91. package/src/__tests__/use-chat.test.ts +1 -3
  92. package/src/__tests__/use-plugin-setup-chat-stale-closure.test.ts +1 -4
  93. package/src/__tests__/use-sidecar-bridge.test.tsx +105 -0
  94. package/src/__tests__/use-webmcp.test.ts +1 -3
  95. package/src/__tests__/validate-elevenlabs-key.test.ts +2 -1
  96. package/src/__tests__/verify-page.test.tsx +4 -13
  97. package/src/__tests__/verify-redirect.test.tsx +2 -6
  98. package/src/app/(auth)/error.tsx +1 -7
  99. package/src/app/(auth)/forgot-password/page.tsx +4 -18
  100. package/src/app/(auth)/login/page.tsx +5 -22
  101. package/src/app/(auth)/reset-password/page.tsx +2 -12
  102. package/src/app/(auth)/signup/page.tsx +10 -44
  103. package/src/app/(auth)/verify/page.tsx +47 -0
  104. package/src/app/(dashboard)/billing/credits/page.tsx +14 -67
  105. package/src/app/(dashboard)/billing/error.tsx +2 -10
  106. package/src/app/(dashboard)/billing/layout.tsx +12 -62
  107. package/src/app/(dashboard)/billing/payment/page.tsx +17 -68
  108. package/src/app/(dashboard)/billing/plans/page.tsx +3 -9
  109. package/src/app/(dashboard)/billing/usage/hosted/page.tsx +8 -25
  110. package/src/app/(dashboard)/billing/usage/page.tsx +63 -103
  111. package/src/app/(dashboard)/changesets/[id]/changeset-detail-client.tsx +9 -27
  112. package/src/app/(dashboard)/changesets/[id]/error.tsx +2 -6
  113. package/src/app/(dashboard)/changesets/error.tsx +1 -7
  114. package/src/app/(dashboard)/chat/page.tsx +2 -6
  115. package/src/app/(dashboard)/dashboard/network/page.tsx +5 -19
  116. package/src/app/(dashboard)/error.tsx +1 -7
  117. package/src/app/(dashboard)/layout.tsx +15 -36
  118. package/src/app/(dashboard)/marketplace/[plugin]/page.tsx +14 -51
  119. package/src/app/(dashboard)/marketplace/error.tsx +1 -7
  120. package/src/app/(dashboard)/marketplace/page.tsx +6 -27
  121. package/src/app/(dashboard)/not-found.tsx +2 -5
  122. package/src/app/(dashboard)/onboarding/page.tsx +5 -22
  123. package/src/app/(dashboard)/settings/account/page.tsx +1 -6
  124. package/src/app/(dashboard)/settings/activity/page.tsx +8 -34
  125. package/src/app/(dashboard)/settings/api-keys/page.tsx +15 -60
  126. package/src/app/(dashboard)/settings/brain/page.tsx +9 -31
  127. package/src/app/(dashboard)/settings/error.tsx +2 -10
  128. package/src/app/(dashboard)/settings/notifications/page.tsx +2 -6
  129. package/src/app/(dashboard)/settings/org/page.tsx +13 -56
  130. package/src/app/(dashboard)/settings/page.tsx +1 -0
  131. package/src/app/(dashboard)/settings/profile/page.tsx +126 -73
  132. package/src/app/(dashboard)/settings/providers/page.tsx +21 -78
  133. package/src/app/(dashboard)/settings/secrets/page.tsx +13 -58
  134. package/src/app/(dashboard)/settings/security/page.tsx +31 -111
  135. package/src/app/admin/email-templates/email-templates-client.tsx +15 -58
  136. package/src/app/admin/error.tsx +1 -7
  137. package/src/app/admin/fleet-updates/error.tsx +1 -7
  138. package/src/app/admin/fleet-updates/fleet-updates-client.tsx +10 -50
  139. package/src/app/admin/layout.tsx +4 -0
  140. package/src/app/admin/payment-methods/page.tsx +9 -38
  141. package/src/app/admin/products/error.tsx +2 -7
  142. package/src/app/admin/products/page.tsx +1 -4
  143. package/src/app/admin/promotions/[id]/page.tsx +9 -38
  144. package/src/app/admin/promotions/page.tsx +9 -36
  145. package/src/app/admin/rate-overrides/page.tsx +9 -45
  146. package/src/app/auth/callback/[provider]/page.tsx +1 -8
  147. package/src/app/auth/verify/page.tsx +9 -36
  148. package/src/app/channels/error.tsx +2 -10
  149. package/src/app/channels/layout.tsx +9 -0
  150. package/src/app/channels/page.tsx +8 -20
  151. package/src/app/channels/setup/[plugin]/page.tsx +3 -5
  152. package/src/app/error.tsx +1 -7
  153. package/src/app/fleet/error.tsx +1 -7
  154. package/src/app/fleet/layout.tsx +5 -0
  155. package/src/app/fleet/settings/page.tsx +1 -3
  156. package/src/app/global-error.tsx +2 -10
  157. package/src/app/globals.css +1 -4
  158. package/src/app/instances/[id]/instance-detail-client.tsx +51 -125
  159. package/src/app/instances/error.tsx +2 -10
  160. package/src/app/instances/instance-list-client.tsx +20 -69
  161. package/src/app/instances/layout.tsx +9 -0
  162. package/src/app/instances/new/create-instance-client.tsx +10 -31
  163. package/src/app/layout.tsx +2 -10
  164. package/src/app/not-found.tsx +1 -3
  165. package/src/app/page.tsx +1 -2
  166. package/src/app/plugins/error.tsx +2 -10
  167. package/src/app/plugins/layout.tsx +5 -0
  168. package/src/app/plugins/page.tsx +16 -48
  169. package/src/app/pricing/error.tsx +1 -7
  170. package/src/app/privacy/page.tsx +93 -150
  171. package/src/app/status/error.tsx +1 -7
  172. package/src/app/terms/page.tsx +89 -144
  173. package/src/components/account-switcher.tsx +25 -52
  174. package/src/components/admin/accounting-dashboard.tsx +1 -3
  175. package/src/components/admin/admin-guard.tsx +1 -3
  176. package/src/components/admin/admin-nav.tsx +1 -3
  177. package/src/components/admin/affiliate-dashboard.tsx +25 -94
  178. package/src/components/admin/audit-log-table.tsx +13 -49
  179. package/src/components/admin/billing-health-dashboard.tsx +7 -25
  180. package/src/components/admin/bulk-actions-bar.test.tsx +1 -7
  181. package/src/components/admin/bulk-actions-bar.tsx +1 -3
  182. package/src/components/admin/bulk-export-dialog.test.tsx +1 -7
  183. package/src/components/admin/bulk-export-dialog.tsx +6 -32
  184. package/src/components/admin/bulk-grant-dialog.test.tsx +2 -6
  185. package/src/components/admin/bulk-grant-dialog.tsx +4 -15
  186. package/src/components/admin/bulk-preview-dialog.tsx +3 -12
  187. package/src/components/admin/bulk-reactivate-dialog.tsx +1 -7
  188. package/src/components/admin/bulk-select-all-banner.tsx +1 -6
  189. package/src/components/admin/bulk-suspend-dialog.tsx +5 -12
  190. package/src/components/admin/bulk-undo-toast.tsx +1 -2
  191. package/src/components/admin/compliance-dashboard.tsx +31 -101
  192. package/src/components/admin/gpu-dashboard.tsx +21 -70
  193. package/src/components/admin/grant-credits-dialog.tsx +4 -17
  194. package/src/components/admin/incident-dashboard.tsx +10 -25
  195. package/src/components/admin/inference-dashboard.tsx +14 -54
  196. package/src/components/admin/marketplace-admin.tsx +18 -60
  197. package/src/components/admin/migrations-dashboard.tsx +9 -42
  198. package/src/components/admin/onboarding-dashboard.tsx +14 -64
  199. package/src/components/admin/pool-config-dashboard.tsx +4 -10
  200. package/src/components/admin/products/fleet-form.tsx +2 -11
  201. package/src/components/admin/products/nav-editor.tsx +3 -10
  202. package/src/components/admin/promotions/promotion-form.tsx +9 -42
  203. package/src/components/admin/roles-dashboard.tsx +7 -34
  204. package/src/components/admin/suspend-dialog.tsx +4 -11
  205. package/src/components/admin/tenant-notes-panel.tsx +1 -3
  206. package/src/components/admin/tenant-row-actions.tsx +4 -20
  207. package/src/components/admin/tenant-table.tsx +12 -49
  208. package/src/components/auth/auth-redirect.tsx +11 -3
  209. package/src/components/auth/email-verification-result-banner.tsx +1 -3
  210. package/src/components/auth/resend-verification-button.tsx +2 -10
  211. package/src/components/auth/wopr-wordmark.tsx +1 -3
  212. package/src/components/billing/add-payment-method-dialog.tsx +1 -2
  213. package/src/components/billing/affiliate-dashboard.tsx +4 -16
  214. package/src/components/billing/amount-selector.tsx +1 -3
  215. package/src/components/billing/auto-topup-card.tsx +2 -11
  216. package/src/components/billing/buy-credits-panel.tsx +4 -14
  217. package/src/components/billing/byok-callout.tsx +6 -8
  218. package/src/components/billing/confirmation-tracker.tsx +4 -14
  219. package/src/components/billing/credit-balance-badge.tsx +22 -0
  220. package/src/components/billing/credit-balance.tsx +3 -9
  221. package/src/components/billing/crypto-checkout.tsx +5 -24
  222. package/src/components/billing/degraded-state-banner.tsx +1 -3
  223. package/src/components/billing/deposit-view.tsx +301 -41
  224. package/src/components/billing/dividend-banner.tsx +1 -3
  225. package/src/components/billing/dividend-eligibility.tsx +3 -12
  226. package/src/components/billing/dividend-pool-stats.tsx +6 -20
  227. package/src/components/billing/first-dividend-dialog.tsx +2 -2
  228. package/src/components/billing/org-billing-page.tsx +8 -31
  229. package/src/components/billing/payment-method-picker.tsx +2 -10
  230. package/src/components/billing/suspension-banner.tsx +2 -7
  231. package/src/components/billing/transaction-history.tsx +10 -58
  232. package/src/components/billing/unified-checkout.tsx +547 -0
  233. package/src/components/bot-settings/backups-tab.tsx +9 -33
  234. package/src/components/bot-settings/bot-settings-client.tsx +32 -134
  235. package/src/components/bot-settings/resources-tab.tsx +2 -9
  236. package/src/components/bot-settings/storage-tab.tsx +19 -48
  237. package/src/components/bot-settings/vps-info-panel.tsx +3 -11
  238. package/src/components/bot-settings/vps-upgrade-card.tsx +3 -4
  239. package/src/components/brand-hydrator.tsx +13 -0
  240. package/src/components/channel-wizard/field-interactive.tsx +1 -3
  241. package/src/components/channel-wizard/field-qr.tsx +10 -39
  242. package/src/components/channel-wizard/step-renderer.tsx +5 -28
  243. package/src/components/channel-wizard/wizard.tsx +6 -31
  244. package/src/components/chat/chat-message.tsx +1 -4
  245. package/src/components/chat/chat-panel.tsx +4 -18
  246. package/src/components/chat/chat-widget.tsx +3 -14
  247. package/src/components/dashboard/command-center.tsx +15 -61
  248. package/src/components/fleet/update-settings-card.tsx +7 -23
  249. package/src/components/instance-update-banner.tsx +130 -0
  250. package/src/components/instances/friends-tab.test.tsx +2 -9
  251. package/src/components/instances/friends-tab.tsx +18 -74
  252. package/src/components/instances/update-available-badge.tsx +2 -11
  253. package/src/components/landing/hero.tsx +3 -9
  254. package/src/components/landing/landing-page.tsx +1 -3
  255. package/src/components/landing/portfolio-chart.tsx +4 -9
  256. package/src/components/landing/story-sections.tsx +1 -3
  257. package/src/components/landing/terminal-sequence.tsx +4 -17
  258. package/src/components/marketplace/empty-state.tsx +2 -6
  259. package/src/components/marketplace/first-visit-hero.tsx +1 -3
  260. package/src/components/marketplace/install-wizard.tsx +20 -77
  261. package/src/components/marketplace/marketplace-tabs.tsx +1 -4
  262. package/src/components/marketplace/plugin-card.tsx +2 -9
  263. package/src/components/marketplace/superpower-content.tsx +1 -3
  264. package/src/components/marketplace/terminal-search.tsx +2 -8
  265. package/src/components/oauth-buttons.tsx +29 -14
  266. package/src/components/observability/fleet-health.tsx +5 -18
  267. package/src/components/observability/health-overview.tsx +7 -20
  268. package/src/components/observability/logs-viewer.tsx +8 -32
  269. package/src/components/observability/metrics-dashboard.tsx +2 -15
  270. package/src/components/onboarding/fallback-setup.tsx +6 -25
  271. package/src/components/onboarding/setup-checklist.tsx +18 -51
  272. package/src/components/onboarding/step-superpowers.tsx +1 -4
  273. package/src/components/plugin-setup/setup-chat-panel.tsx +6 -22
  274. package/src/components/pricing/dividend-calculator.tsx +6 -12
  275. package/src/components/pricing/dividend-stats.tsx +5 -17
  276. package/src/components/pricing/pricing-page.tsx +17 -36
  277. package/src/components/settings/create-org-wizard.tsx +2 -5
  278. package/src/components/sidebar.tsx +7 -42
  279. package/src/components/sidecar-frame.tsx +78 -0
  280. package/src/components/status/status-page.tsx +6 -28
  281. package/src/components/ui/alert-dialog.tsx +8 -25
  282. package/src/components/ui/badge.tsx +2 -8
  283. package/src/components/ui/banner.tsx +1 -6
  284. package/src/components/ui/card.tsx +5 -24
  285. package/src/components/ui/checkbox.tsx +1 -5
  286. package/src/components/ui/collapsible.tsx +3 -8
  287. package/src/components/ui/dialog.tsx +4 -10
  288. package/src/components/ui/dropdown-menu.tsx +9 -18
  289. package/src/components/ui/form.tsx +2 -16
  290. package/src/components/ui/popover.tsx +3 -23
  291. package/src/components/ui/progress.tsx +1 -5
  292. package/src/components/ui/radio-group.tsx +3 -15
  293. package/src/components/ui/select.tsx +4 -17
  294. package/src/components/ui/sheet.tsx +5 -19
  295. package/src/components/ui/skeleton.tsx +1 -7
  296. package/src/components/ui/table.tsx +5 -22
  297. package/src/components/ui/tabs.tsx +3 -13
  298. package/src/components/ui/tooltip.tsx +1 -1
  299. package/src/components/unified-sidebar.tsx +493 -0
  300. package/src/hooks/__tests__/use-fleet-sse.test.ts +1 -4
  301. package/src/hooks/__tests__/use-save-queue.test.ts +2 -8
  302. package/src/hooks/use-credit-balance.ts +27 -0
  303. package/src/hooks/use-my-org-role.ts +1 -3
  304. package/src/hooks/use-plugin-registry.ts +8 -14
  305. package/src/hooks/use-plugin-setup-chat.ts +2 -5
  306. package/src/hooks/use-sidecar-bridge.tsx +148 -0
  307. package/src/hooks/use-webmcp.ts +1 -4
  308. package/src/lib/__tests__/admin-api.test.ts +1 -3
  309. package/src/lib/__tests__/api-bot-crud.test.ts +8 -18
  310. package/src/lib/__tests__/api-fetch.test.ts +4 -16
  311. package/src/lib/__tests__/org-billing-api.test.ts +1 -3
  312. package/src/lib/__tests__/pricing-data.test.ts +0 -8
  313. package/src/lib/__tests__/settings-api.test.ts +1 -3
  314. package/src/lib/admin-affiliate-api.ts +2 -7
  315. package/src/lib/admin-api.ts +6 -26
  316. package/src/lib/admin-incident-api.ts +11 -19
  317. package/src/lib/admin-marketplace-api.ts +1 -5
  318. package/src/lib/api-config.test.ts +5 -50
  319. package/src/lib/api.ts +143 -122
  320. package/src/lib/auth-client.ts +1 -2
  321. package/src/lib/bot-settings-data.ts +11 -36
  322. package/src/lib/brand-config.ts +56 -115
  323. package/src/lib/brand.ts +2 -15
  324. package/src/lib/chat/use-chat.ts +2 -7
  325. package/src/lib/cost-comparison-data.test.ts +1 -3
  326. package/src/lib/cost-comparison-data.ts +1 -4
  327. package/src/lib/errors.ts +1 -4
  328. package/src/lib/fetch-utils.test.ts +26 -9
  329. package/src/lib/fetch-utils.ts +40 -11
  330. package/src/lib/logger.ts +2 -0
  331. package/src/lib/marketplace-data.ts +3 -11
  332. package/src/lib/oauth-errors.ts +2 -4
  333. package/src/lib/onboarding-data.ts +3 -11
  334. package/src/lib/org-api.ts +2 -10
  335. package/src/lib/org-billing-api.ts +5 -19
  336. package/src/lib/plugin/tool-definitions.ts +1 -2
  337. package/src/lib/require-auth.ts +57 -0
  338. package/src/lib/settings-api.ts +1 -4
  339. package/src/lib/sidecar-routes.ts +43 -0
  340. package/src/lib/trpc-server.ts +49 -0
  341. package/src/lib/trpc-types.ts +4 -6
  342. package/src/lib/trpc.tsx +12 -4
  343. package/src/lib/validate-redirect-url.ts +1 -4
  344. package/src/lib/webmcp/marketplace-onboarding-tools.ts +6 -16
  345. package/src/lib/webmcp/register.ts +1 -4
  346. package/src/lib/webmcp/tools.ts +2 -9
  347. package/src/proxy.ts +35 -212
  348. package/src/types/missing-deps.d.ts +2 -8
  349. package/tsconfig.json +1 -8
  350. package/biome.json +0 -52
  351. package/src/__tests__/__snapshots__/layout-snapshots.test.tsx.snap +0 -741
  352. package/src/__tests__/billing-byok-callout.test.tsx +0 -76
  353. package/src/lib/__tests__/__snapshots__/pricing-data.test.ts.snap +0 -112
@@ -19,31 +19,11 @@ import {
19
19
  } from "@/components/ui/dialog";
20
20
  import { Input } from "@/components/ui/input";
21
21
  import { Label } from "@/components/ui/label";
22
- import {
23
- Select,
24
- SelectContent,
25
- SelectItem,
26
- SelectTrigger,
27
- SelectValue,
28
- } from "@/components/ui/select";
22
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
29
23
  import { Skeleton } from "@/components/ui/skeleton";
30
- import {
31
- Table,
32
- TableBody,
33
- TableCell,
34
- TableHead,
35
- TableHeader,
36
- TableRow,
37
- } from "@/components/ui/table";
24
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
38
25
  import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
39
- import {
40
- createApiKey,
41
- type Instance,
42
- listApiKeys,
43
- listInstances,
44
- type PlatformApiKey,
45
- revokeApiKey,
46
- } from "@/lib/api";
26
+ import { createApiKey, type Instance, listApiKeys, listInstances, type PlatformApiKey, revokeApiKey } from "@/lib/api";
47
27
 
48
28
  function formatDate(iso: string | null): string {
49
29
  if (!iso) return "Never";
@@ -111,9 +91,7 @@ export default function ApiKeysPage() {
111
91
  <div className="max-w-3xl space-y-6">
112
92
  <div>
113
93
  <h1 className="text-2xl font-bold tracking-tight">API Keys</h1>
114
- <p className="text-sm text-muted-foreground">
115
- Generate and manage platform API keys for programmatic access
116
- </p>
94
+ <p className="text-sm text-muted-foreground">Generate and manage platform API keys for programmatic access</p>
117
95
  </div>
118
96
  <div className="flex h-40 flex-col items-center justify-center gap-3 text-muted-foreground">
119
97
  <p className="text-sm text-destructive">Failed to load API keys.</p>
@@ -130,9 +108,7 @@ export default function ApiKeysPage() {
130
108
  <div className="flex items-center justify-between">
131
109
  <div>
132
110
  <h1 className="text-2xl font-bold tracking-tight">API Keys</h1>
133
- <p className="text-sm text-muted-foreground">
134
- Generate and manage platform API keys for programmatic access
135
- </p>
111
+ <p className="text-sm text-muted-foreground">Generate and manage platform API keys for programmatic access</p>
136
112
  </div>
137
113
  <CreateKeyDialog
138
114
  onCreated={(secret) => {
@@ -169,29 +145,18 @@ export default function ApiKeysPage() {
169
145
  Your new API key has been created. Copy it now -- it will not be shown again.
170
146
  </p>
171
147
  <div className="flex items-center gap-2">
172
- <code className="flex-1 rounded bg-muted px-3 py-2 text-sm font-mono break-all">
173
- {newSecret}
174
- </code>
148
+ <code className="flex-1 rounded bg-muted px-3 py-2 text-sm font-mono break-all">{newSecret}</code>
175
149
  <Tooltip open={copied}>
176
150
  <TooltipTrigger asChild>
177
151
  <Button variant="outline" size="sm" onClick={handleCopy}>
178
- {copied ? (
179
- <CheckIcon className="size-4" />
180
- ) : (
181
- <CopyIcon className="size-4" />
182
- )}
152
+ {copied ? <CheckIcon className="size-4" /> : <CopyIcon className="size-4" />}
183
153
  {copied ? "Copied" : "Copy"}
184
154
  </Button>
185
155
  </TooltipTrigger>
186
156
  <TooltipContent>Copied!</TooltipContent>
187
157
  </Tooltip>
188
158
  </div>
189
- <Button
190
- variant="ghost"
191
- size="sm"
192
- className="mt-2"
193
- onClick={() => setNewSecret(null)}
194
- >
159
+ <Button variant="ghost" size="sm" className="mt-2" onClick={() => setNewSecret(null)}>
195
160
  Dismiss
196
161
  </Button>
197
162
  </CardContent>
@@ -274,15 +239,9 @@ export default function ApiKeysPage() {
274
239
  <TableCell>
275
240
  <Badge variant="secondary">{key.scope}</Badge>
276
241
  </TableCell>
277
- <TableCell className="text-muted-foreground">
278
- {formatDate(key.createdAt)}
279
- </TableCell>
280
- <TableCell className="text-muted-foreground">
281
- {formatDate(key.lastUsedAt)}
282
- </TableCell>
283
- <TableCell className="text-muted-foreground">
284
- {formatDate(key.expiresAt)}
285
- </TableCell>
242
+ <TableCell className="text-muted-foreground">{formatDate(key.createdAt)}</TableCell>
243
+ <TableCell className="text-muted-foreground">{formatDate(key.lastUsedAt)}</TableCell>
244
+ <TableCell className="text-muted-foreground">{formatDate(key.expiresAt)}</TableCell>
286
245
  <TableCell>
287
246
  <RevokeDialog keyName={key.name} onRevoke={() => handleRevoke(key.id)} />
288
247
  </TableCell>
@@ -364,9 +323,7 @@ function CreateKeyDialog({ onCreated }: { onCreated: (secret: string) => void })
364
323
  <DialogContent>
365
324
  <DialogHeader>
366
325
  <DialogTitle>Generate API Key</DialogTitle>
367
- <DialogDescription>
368
- Create a new API key with specific scope and expiration.
369
- </DialogDescription>
326
+ <DialogDescription>Create a new API key with specific scope and expiration.</DialogDescription>
370
327
  </DialogHeader>
371
328
  <form onSubmit={handleSubmit} className="flex flex-col gap-4">
372
329
  <div className="flex flex-col gap-2">
@@ -411,9 +368,7 @@ function CreateKeyDialog({ onCreated }: { onCreated: (secret: string) => void })
411
368
  <p className="text-sm text-destructive">Failed to load instances.</p>
412
369
  ) : instances.length === 0 ? (
413
370
  <div className="rounded-md border bg-muted/30 p-3 py-6 text-center">
414
- <p className="text-sm text-muted-foreground">
415
- No bot instances found. Deploy a bot first.
416
- </p>
371
+ <p className="text-sm text-muted-foreground">No bot instances found. Deploy a bot first.</p>
417
372
  </div>
418
373
  ) : (
419
374
  <>
@@ -506,8 +461,8 @@ function RevokeDialog({ keyName, onRevoke }: { keyName: string; onRevoke: () =>
506
461
  <DialogHeader>
507
462
  <DialogTitle>Revoke API Key</DialogTitle>
508
463
  <DialogDescription>
509
- Are you sure you want to revoke <strong>{keyName}</strong>? Any applications using this
510
- key will immediately lose access.
464
+ Are you sure you want to revoke <strong>{keyName}</strong>? Any applications using this key will immediately
465
+ lose access.
511
466
  </DialogDescription>
512
467
  </DialogHeader>
513
468
  <DialogFooter>
@@ -118,11 +118,7 @@ export default function BrainSettingsPage() {
118
118
  }
119
119
 
120
120
  if (loading) {
121
- return (
122
- <div className="flex h-40 items-center justify-center text-muted-foreground">
123
- Loading model settings...
124
- </div>
125
- );
121
+ return <div className="flex h-40 items-center justify-center text-muted-foreground">Loading model settings...</div>;
126
122
  }
127
123
 
128
124
  const currentModel = allModels.find((m) => m.id === selection?.modelId);
@@ -166,10 +162,7 @@ export default function BrainSettingsPage() {
166
162
  <p className="font-medium">{currentModel.name}</p>
167
163
  <p className="text-sm text-muted-foreground">{currentModel.description}</p>
168
164
  <div className="mt-2 flex items-center gap-2">
169
- <Badge
170
- variant={categoryBadgeVariant(currentModel.category)}
171
- className="text-[10px]"
172
- >
165
+ <Badge variant={categoryBadgeVariant(currentModel.category)} className="text-[10px]">
173
166
  {currentModel.category}
174
167
  </Badge>
175
168
  <span className="text-xs text-muted-foreground">{currentModel.provider}</span>
@@ -183,18 +176,10 @@ export default function BrainSettingsPage() {
183
176
 
184
177
  {/* View mode toggle */}
185
178
  <div className="flex gap-2">
186
- <Button
187
- variant={viewMode === "models" ? "default" : "outline"}
188
- size="sm"
189
- onClick={() => setViewMode("models")}
190
- >
179
+ <Button variant={viewMode === "models" ? "default" : "outline"} size="sm" onClick={() => setViewMode("models")}>
191
180
  Pick a model (Hosted)
192
181
  </Button>
193
- <Button
194
- variant={viewMode === "byok" ? "default" : "outline"}
195
- size="sm"
196
- onClick={() => setViewMode("byok")}
197
- >
182
+ <Button variant={viewMode === "byok" ? "default" : "outline"} size="sm" onClick={() => setViewMode("byok")}>
198
183
  Bring Your Own Key
199
184
  </Button>
200
185
  </div>
@@ -294,10 +279,7 @@ export default function BrainSettingsPage() {
294
279
  <CardContent>
295
280
  <p className="text-xs text-muted-foreground">{model.description}</p>
296
281
  <div className="mt-2 flex flex-wrap items-center gap-1">
297
- <Badge
298
- variant={categoryBadgeVariant(model.category)}
299
- className="text-[10px]"
300
- >
282
+ <Badge variant={categoryBadgeVariant(model.category)} className="text-[10px]">
301
283
  {model.category}
302
284
  </Badge>
303
285
  <span className="text-xs text-muted-foreground">{model.provider}</span>
@@ -318,8 +300,8 @@ export default function BrainSettingsPage() {
318
300
  {viewMode === "byok" && (
319
301
  <div className="space-y-6">
320
302
  <p className="text-sm text-muted-foreground">
321
- Bring your own provider key and bypass credits. {productName()} takes nothing when using
322
- BYOK providers -- you pay the provider directly.
303
+ Bring your own provider key and bypass credits. {productName()} takes nothing when using BYOK providers --
304
+ you pay the provider directly.
323
305
  </p>
324
306
 
325
307
  <div className="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
@@ -328,9 +310,7 @@ export default function BrainSettingsPage() {
328
310
  key={provider.id}
329
311
  className={cn(
330
312
  "transition-all",
331
- byokProvider === provider.id
332
- ? "border-primary bg-primary/5"
333
- : "hover:border-primary/30",
313
+ byokProvider === provider.id ? "border-primary bg-primary/5" : "hover:border-primary/30",
334
314
  )}
335
315
  >
336
316
  <CardHeader>
@@ -352,9 +332,7 @@ export default function BrainSettingsPage() {
352
332
  variant="outline"
353
333
  size="sm"
354
334
  className="w-full"
355
- onClick={() =>
356
- setByokProvider(byokProvider === provider.id ? null : provider.id)
357
- }
335
+ onClick={() => setByokProvider(byokProvider === provider.id ? null : provider.id)}
358
336
  >
359
337
  {byokProvider === provider.id ? "Cancel" : "Add key"}
360
338
  </Button>
@@ -8,13 +8,7 @@ import { logger } from "@/lib/logger";
8
8
 
9
9
  const log = logger("error-boundary:settings");
10
10
 
11
- export default function SettingsError({
12
- error,
13
- reset,
14
- }: {
15
- error: Error & { digest?: string };
16
- reset: () => void;
17
- }) {
11
+ export default function SettingsError({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) {
18
12
  const [showDetails, setShowDetails] = useState(false);
19
13
  const isDev = process.env.NODE_ENV === "development";
20
14
 
@@ -32,9 +26,7 @@ export default function SettingsError({
32
26
  </div>
33
27
  </CardHeader>
34
28
  <CardContent className="space-y-4">
35
- <p className="text-muted-foreground">
36
- Something went wrong loading settings. This may be a temporary issue.
37
- </p>
29
+ <p className="text-muted-foreground">Something went wrong loading settings. This may be a temporary issue.</p>
38
30
  {isDev && (
39
31
  <Button
40
32
  type="button"
@@ -146,9 +146,7 @@ export default function NotificationsPage() {
146
146
  <div className="flex items-center justify-between">
147
147
  <div>
148
148
  <h1 className="text-lg font-semibold">Notifications</h1>
149
- <p className="text-sm text-muted-foreground">
150
- Control which system emails you receive from {brandName()}.
151
- </p>
149
+ <p className="text-sm text-muted-foreground">Control which system emails you receive from {brandName()}.</p>
152
150
  </div>
153
151
 
154
152
  <AnimatePresence>
@@ -199,9 +197,7 @@ export default function NotificationsPage() {
199
197
  <Card key={group.title}>
200
198
  <CardHeader>
201
199
  <CardTitle className="text-sm font-medium">{group.title}</CardTitle>
202
- <CardDescription className="sr-only">
203
- {group.title} notification settings
204
- </CardDescription>
200
+ <CardDescription className="sr-only">{group.title} notification settings</CardDescription>
205
201
  </CardHeader>
206
202
  <CardContent className="space-y-4">
207
203
  {group.items.map((item) => (
@@ -19,23 +19,10 @@ import {
19
19
  } from "@/components/ui/dialog";
20
20
  import { Input } from "@/components/ui/input";
21
21
  import { Label } from "@/components/ui/label";
22
- import {
23
- Select,
24
- SelectContent,
25
- SelectItem,
26
- SelectTrigger,
27
- SelectValue,
28
- } from "@/components/ui/select";
22
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
29
23
  import { Separator } from "@/components/ui/separator";
30
24
  import { Skeleton } from "@/components/ui/skeleton";
31
- import {
32
- Table,
33
- TableBody,
34
- TableCell,
35
- TableHead,
36
- TableHeader,
37
- TableRow,
38
- } from "@/components/ui/table";
25
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
39
26
  import { useIsAdminOrOwner } from "@/hooks/use-my-org-role";
40
27
  import type { Organization, OrgMember } from "@/lib/api";
41
28
  import {
@@ -231,12 +218,7 @@ export default function OrgPage() {
231
218
  <form onSubmit={handleSave} className="flex flex-col gap-4">
232
219
  <div className="flex flex-col gap-2">
233
220
  <Label htmlFor="org-name">Organization name</Label>
234
- <Input
235
- id="org-name"
236
- value={orgName}
237
- onChange={(e) => setOrgName(e.target.value)}
238
- required
239
- />
221
+ <Input id="org-name" value={orgName} onChange={(e) => setOrgName(e.target.value)} required />
240
222
  </div>
241
223
  <div className="flex flex-col gap-2">
242
224
  <Label htmlFor="org-slug">Slug</Label>
@@ -284,12 +266,7 @@ export default function OrgPage() {
284
266
  Saved
285
267
  </motion.span>
286
268
  ) : (
287
- <motion.span
288
- key="save"
289
- initial={{ opacity: 0 }}
290
- animate={{ opacity: 1 }}
291
- exit={{ opacity: 0 }}
292
- >
269
+ <motion.span key="save" initial={{ opacity: 0 }} animate={{ opacity: 1 }} exit={{ opacity: 0 }}>
293
270
  {saving ? "Saving..." : "Save changes"}
294
271
  </motion.span>
295
272
  )}
@@ -385,14 +362,8 @@ export default function OrgPage() {
385
362
  currentRole={member.role}
386
363
  onChangeRole={(role) => handleChangeRole(member.userId, role)}
387
364
  />
388
- <TransferDialog
389
- memberName={member.name}
390
- onTransfer={() => handleTransfer(member.userId)}
391
- />
392
- <RemoveMemberDialog
393
- memberName={member.name}
394
- onRemove={() => handleRemove(member.userId)}
395
- />
365
+ <TransferDialog memberName={member.name} onTransfer={() => handleTransfer(member.userId)} />
366
+ <RemoveMemberDialog memberName={member.name} onRemove={() => handleRemove(member.userId)} />
396
367
  </div>
397
368
  )}
398
369
  </TableCell>
@@ -427,9 +398,7 @@ export default function OrgPage() {
427
398
  <TableRow key={invite.id}>
428
399
  <TableCell className="font-medium">{invite.email}</TableCell>
429
400
  <TableCell>
430
- <Badge variant={invite.role === "admin" ? "default" : "outline"}>
431
- {invite.role}
432
- </Badge>
401
+ <Badge variant={invite.role === "admin" ? "default" : "outline"}>{invite.role}</Badge>
433
402
  </TableCell>
434
403
  <TableCell className="text-muted-foreground">
435
404
  {new Date(invite.expiresAt).toLocaleDateString("en-US", {
@@ -554,13 +523,7 @@ function InviteDialog({ orgId, onInvited }: { orgId: string; onInvited: () => vo
554
523
  );
555
524
  }
556
525
 
557
- function RemoveMemberDialog({
558
- memberName,
559
- onRemove,
560
- }: {
561
- memberName: string;
562
- onRemove: () => void;
563
- }) {
526
+ function RemoveMemberDialog({ memberName, onRemove }: { memberName: string; onRemove: () => void }) {
564
527
  const [open, setOpen] = useState(false);
565
528
 
566
529
  return (
@@ -574,8 +537,8 @@ function RemoveMemberDialog({
574
537
  <DialogHeader>
575
538
  <DialogTitle>Remove Member</DialogTitle>
576
539
  <DialogDescription>
577
- Are you sure you want to remove <strong>{memberName}</strong> from the organization?
578
- They will lose access immediately.
540
+ Are you sure you want to remove <strong>{memberName}</strong> from the organization? They will lose access
541
+ immediately.
579
542
  </DialogDescription>
580
543
  </DialogHeader>
581
544
  <DialogFooter>
@@ -597,13 +560,7 @@ function RemoveMemberDialog({
597
560
  );
598
561
  }
599
562
 
600
- function TransferDialog({
601
- memberName,
602
- onTransfer,
603
- }: {
604
- memberName: string;
605
- onTransfer: () => void;
606
- }) {
563
+ function TransferDialog({ memberName, onTransfer }: { memberName: string; onTransfer: () => void }) {
607
564
  const [open, setOpen] = useState(false);
608
565
 
609
566
  return (
@@ -617,8 +574,8 @@ function TransferDialog({
617
574
  <DialogHeader>
618
575
  <DialogTitle>Transfer Ownership</DialogTitle>
619
576
  <DialogDescription>
620
- Transfer organization ownership to <strong>{memberName}</strong>? You will become an
621
- admin. This action cannot be undone.
577
+ Transfer organization ownership to <strong>{memberName}</strong>? You will become an admin. This action
578
+ cannot be undone.
622
579
  </DialogDescription>
623
580
  </DialogHeader>
624
581
  <DialogFooter>
@@ -0,0 +1 @@
1
+ export { default } from "./profile/page";