@gloom-sh/terminal 0.20.17 → 0.20.19

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 (453) hide show
  1. package/package.json +3 -1
  2. package/src/account/auth-dialog.tsx +19 -1
  3. package/src/account/billing.ts +2 -1
  4. package/src/account/heard-from-question.tsx +235 -0
  5. package/src/account/heard-from.ts +97 -0
  6. package/src/api-client/cot.ts +5 -6
  7. package/src/api-client/data.ts +14 -3
  8. package/src/api-client/heard-from.ts +72 -0
  9. package/src/api-client/index.ts +64 -6
  10. package/src/api-client/mna.ts +18 -0
  11. package/src/api-client/request.ts +162 -40
  12. package/src/api-client/supply-chain.ts +9 -0
  13. package/src/api-client/types/billing.ts +35 -1
  14. package/src/api-client/types/news.ts +45 -0
  15. package/src/api-client/types/world-venues.ts +9 -0
  16. package/src/app/global-shortcuts.ts +5 -3
  17. package/src/app/pro-welcome/keys.ts +27 -0
  18. package/src/app/pro-welcome/model.ts +158 -0
  19. package/src/app/pro-welcome/row.tsx +176 -0
  20. package/src/app/pro-welcome/use-pro-welcome.ts +156 -0
  21. package/src/app/runtime/external-profile-changes.ts +135 -0
  22. package/src/app.tsx +37 -4
  23. package/src/architecture/core-builtin-allowlist.json +1 -1
  24. package/src/architecture/floating-promise-allowlist.json +1 -2
  25. package/src/architecture/shortcut-labels-allowlist.json +1 -0
  26. package/src/cli/alert-listing.ts +98 -0
  27. package/src/cli/commands/market.ts +191 -39
  28. package/src/cli/commands/overview.ts +7 -1
  29. package/src/cli/commands/plugins.ts +3 -2
  30. package/src/cli/commands/search.ts +30 -6
  31. package/src/cli/commands/ticker.ts +13 -6
  32. package/src/cli/context.ts +24 -5
  33. package/src/cli/csv-export.ts +2 -1
  34. package/src/cli/desktop-pane-shot-browser.ts +3 -1
  35. package/src/cli/desktop-pane-shot-view.ts +0 -1
  36. package/src/cli/desktop-pane-shot.ts +276 -52
  37. package/src/cli/errors.ts +3 -9
  38. package/src/cli/exit-codes.ts +1 -1
  39. package/src/cli/glossary.ts +65 -11
  40. package/src/cli/help.ts +1 -1
  41. package/src/cli/history-demergers.ts +117 -0
  42. package/src/cli/history-rows.ts +8 -4
  43. package/src/cli/index.ts +2 -1
  44. package/src/cli/known-gaps.ts +16 -0
  45. package/src/cli/known-us-stocks.ts +18 -0
  46. package/src/cli/listing-arg.ts +192 -38
  47. package/src/cli/pane-functions/catalog-snapshot-build.ts +83 -0
  48. package/src/cli/pane-functions/catalog-snapshot.json +877 -0
  49. package/src/cli/pane-functions/catalog-snapshot.ts +62 -0
  50. package/src/cli/pane-functions/catalog.ts +50 -16
  51. package/src/cli/pane-functions/data.ts +16 -4
  52. package/src/cli/pane-functions/dom.ts +54 -8
  53. package/src/cli/pane-functions/freshness.ts +39 -4
  54. package/src/cli/pane-functions/function-help.ts +3 -3
  55. package/src/cli/pane-functions/headless.ts +9 -1
  56. package/src/cli/pane-functions/index.ts +175 -50
  57. package/src/cli/pane-functions/report-notices.ts +10 -0
  58. package/src/cli/pane-functions/resolver.ts +11 -7
  59. package/src/cli/pane-functions/screenshot-assessment.ts +38 -10
  60. package/src/cli/pane-functions/screenshot-data-evidence.ts +7 -15
  61. package/src/cli/pane-functions/screenshot-payload.ts +36 -1
  62. package/src/cli/pane-functions/screenshot-render.ts +24 -9
  63. package/src/cli/pane-functions/screenshot-types.ts +9 -0
  64. package/src/cli/quote-answer.ts +33 -17
  65. package/src/cli/registry.ts +22 -2
  66. package/src/cli/result.ts +22 -4
  67. package/src/cli/scroll-truncation.ts +7 -2
  68. package/src/cli/series-search.ts +45 -6
  69. package/src/cli/shot-temp-dir.ts +4 -9
  70. package/src/cli/ticker-resolution.ts +1 -1
  71. package/src/cli/unreachable.ts +21 -0
  72. package/src/components/chart/composite/drawing-store.ts +11 -7
  73. package/src/components/chart/composite/format.ts +1 -0
  74. package/src/components/chart/composite/legend.tsx +48 -20
  75. package/src/components/chart/composite/panel-surface/panel-cursor.tsx +3 -3
  76. package/src/components/chart/composite/panel-surface/plot-gestures.ts +9 -2
  77. package/src/components/chart/composite/panel-surface.tsx +1 -1
  78. package/src/components/chart/composite/price-axis-labels.tsx +7 -5
  79. package/src/components/chart/composite/tools.ts +164 -39
  80. package/src/components/chart-table/header.tsx +11 -2
  81. package/src/components/chart-table/layout.ts +16 -17
  82. package/src/components/command-bar/pane-templates/items.ts +17 -1
  83. package/src/components/command-bar/routes/root/provider-search.ts +10 -1
  84. package/src/components/command-bar/routes/root/results.ts +34 -2
  85. package/src/components/command-bar/routes/root/runtime.ts +19 -4
  86. package/src/components/command-bar/routes/ticker-search/results.ts +5 -0
  87. package/src/components/command-bar/routes/ticker-search/route.ts +5 -0
  88. package/src/components/command-bar/selection-runtime.ts +29 -5
  89. package/src/components/command-bar/surface/index.tsx +4 -1
  90. package/src/components/command-bar/workflow/alert.ts +32 -13
  91. package/src/components/data-table/view.tsx +15 -2
  92. package/src/components/form-modal/content.tsx +9 -4
  93. package/src/components/index.ts +1 -1
  94. package/src/components/layout/header.tsx +9 -5
  95. package/src/components/layout/pane/capture-status.ts +6 -0
  96. package/src/components/layout/pane/footer/index.tsx +2 -0
  97. package/src/components/layout/pane/footer/model.ts +123 -17
  98. package/src/components/layout/pane/header.tsx +16 -2
  99. package/src/components/layout/pane/status-footer.ts +24 -0
  100. package/src/components/market-board/index.tsx +4 -2
  101. package/src/components/onboarding/onboarding-frame.tsx +6 -2
  102. package/src/components/onboarding/onboarding-keyboard.ts +7 -1
  103. package/src/components/onboarding/onboarding-wizard.tsx +3 -1
  104. package/src/components/onboarding/portfolio-step/positions-panel.tsx +24 -15
  105. package/src/components/onboarding/setup-cards.ts +36 -0
  106. package/src/components/onboarding/use-onboarding-progress.ts +22 -1
  107. package/src/components/onboarding/wizard-account.ts +6 -1
  108. package/src/components/onboarding/wizard-model.ts +32 -6
  109. package/src/components/onboarding/wizard-positions.ts +1 -1
  110. package/src/components/price-performance.tsx +26 -8
  111. package/src/components/reader/article-reader.tsx +12 -5
  112. package/src/components/sign-in-gate.tsx +3 -1
  113. package/src/components/toggle-list.tsx +6 -8
  114. package/src/components/ui/confirm-dialog.tsx +47 -7
  115. package/src/components/ui/data-table/opentui/index.tsx +7 -0
  116. package/src/components/ui/data-table/types.ts +8 -0
  117. package/src/components/ui/display.tsx +17 -2
  118. package/src/components/ui/index.ts +1 -1
  119. package/src/components/ui/stat-grid.tsx +4 -0
  120. package/src/components/ui/status.tsx +13 -1
  121. package/src/components/ui/table-layout.ts +34 -2
  122. package/src/components/use-pane-notice-footer.tsx +16 -3
  123. package/src/data/config/store/index.ts +31 -0
  124. package/src/data/config/store/node.ts +61 -11
  125. package/src/data/config/store/normalize.ts +4 -6
  126. package/src/data/config/store/shared-file.ts +309 -0
  127. package/src/data/profile-merge.ts +299 -0
  128. package/src/data/sqlite/checkpointer.ts +11 -1
  129. package/src/data/sqlite/database.ts +1 -1
  130. package/src/data/ticker-repository.ts +134 -10
  131. package/src/data/ticker-store.ts +67 -0
  132. package/src/data/ticker-writes.ts +5 -0
  133. package/src/i18n/es.ts +27 -0
  134. package/src/i18n/ja.ts +27 -0
  135. package/src/i18n/ko.ts +27 -0
  136. package/src/i18n/zh-cn.ts +27 -0
  137. package/src/i18n/zh-tw.ts +27 -0
  138. package/src/layout-marketplace/gallery-desktop.tsx +2 -2
  139. package/src/market-data/ah-pair.ts +122 -0
  140. package/src/market-data/coordinator/entries.ts +6 -4
  141. package/src/market-data/coordinator/index.ts +14 -3
  142. package/src/market-data/depositary-pair.ts +6 -2
  143. package/src/market-data/futures-board.ts +36 -29
  144. package/src/market-data/futures-contract.ts +37 -1
  145. package/src/market-data/hooks.tsx +33 -2
  146. package/src/market-data/market/change-basis.ts +11 -1
  147. package/src/market-data/market/header-market.ts +11 -0
  148. package/src/market-data/market/status.ts +40 -4
  149. package/src/market-data/performance.ts +127 -32
  150. package/src/market-data/quotes/time.ts +5 -2
  151. package/src/market-data/split-terms.ts +28 -0
  152. package/src/news/types.ts +28 -0
  153. package/src/notifications/app-badge.ts +2 -3
  154. package/src/notifications/app-notifier.ts +5 -0
  155. package/src/plugins/builtin/account-management/footer.ts +1 -1
  156. package/src/plugins/builtin/account-management/keyboard.ts +4 -0
  157. package/src/plugins/builtin/account-management/model.ts +1 -0
  158. package/src/plugins/builtin/account-management/pane.tsx +75 -7
  159. package/src/plugins/builtin/account-management/payment-recovery-row.tsx +12 -5
  160. package/src/plugins/builtin/account-management/pro-cancel.tsx +197 -0
  161. package/src/plugins/builtin/account-management/trial-cancel.ts +1 -1
  162. package/src/plugins/builtin/alerts/cli-move.ts +2 -2
  163. package/src/plugins/builtin/alerts/cli.ts +101 -48
  164. package/src/plugins/builtin/alerts/command.ts +39 -9
  165. package/src/plugins/builtin/alerts/constants.ts +10 -0
  166. package/src/plugins/builtin/alerts/earnings-listing.ts +20 -0
  167. package/src/plugins/builtin/alerts/event-rows.ts +9 -3
  168. package/src/plugins/builtin/alerts/events-pane.tsx +16 -10
  169. package/src/plugins/builtin/alerts/format.ts +24 -8
  170. package/src/plugins/builtin/alerts/headless.ts +12 -6
  171. package/src/plugins/builtin/alerts/index.tsx +97 -16
  172. package/src/plugins/builtin/alerts/move-checks.ts +7 -0
  173. package/src/plugins/builtin/alerts/option-contract.ts +197 -0
  174. package/src/plugins/builtin/alerts/pane.tsx +1 -1
  175. package/src/plugins/builtin/alerts/price.ts +30 -5
  176. package/src/plugins/builtin/alerts/pro-rules.ts +62 -0
  177. package/src/plugins/builtin/alerts/quotes.ts +26 -2
  178. package/src/plugins/builtin/alerts/research-builder.ts +5 -10
  179. package/src/plugins/builtin/alerts/scheduled.ts +6 -1
  180. package/src/plugins/builtin/alerts/types.ts +7 -0
  181. package/src/plugins/builtin/analytics/account-returns.ts +1 -1
  182. package/src/plugins/builtin/analytics/manual-value.ts +61 -0
  183. package/src/plugins/builtin/analytics/pane-model.ts +2 -2
  184. package/src/plugins/builtin/analytics/risk-book.ts +7 -7
  185. package/src/plugins/builtin/analytics/risk-client.ts +27 -14
  186. package/src/plugins/builtin/analytics/risk-headless.ts +13 -8
  187. package/src/plugins/builtin/analytics/risk-model.ts +92 -4
  188. package/src/plugins/builtin/analytics/risk-pane.tsx +85 -38
  189. package/src/plugins/builtin/awards/pane.tsx +1 -1
  190. package/src/plugins/builtin/broker-trading/orders.tsx +2 -2
  191. package/src/plugins/builtin/buildout/company/pane.tsx +4 -14
  192. package/src/plugins/builtin/catalysts/model.ts +2 -1
  193. package/src/plugins/builtin/central-bank-rates/model.ts +8 -2
  194. package/src/plugins/builtin/central-bank-rates/pane.tsx +5 -3
  195. package/src/plugins/builtin/chart-composer/chart-spec.ts +5 -0
  196. package/src/plugins/builtin/chart-composer/cli-options.ts +9 -5
  197. package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +2 -6
  198. package/src/plugins/builtin/chart-composer/headless-schema.ts +14 -10
  199. package/src/plugins/builtin/chart-composer/headless.ts +2 -0
  200. package/src/plugins/builtin/chart-composer/index.tsx +17 -5
  201. package/src/plugins/builtin/chart-composer/pane.tsx +19 -6
  202. package/src/plugins/builtin/chart-composer/viewport-labels.ts +2 -17
  203. package/src/plugins/builtin/chat/controller/notifications.ts +1 -0
  204. package/src/plugins/builtin/chat/index.tsx +0 -1
  205. package/src/plugins/builtin/cloud/auth-actions.tsx +11 -6
  206. package/src/plugins/builtin/cloud/company-picker.tsx +5 -3
  207. package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
  208. package/src/plugins/builtin/commodities-energy/index.tsx +1 -1
  209. package/src/plugins/builtin/company-kpis/headless.ts +10 -5
  210. package/src/plugins/builtin/company-kpis/latest.ts +45 -0
  211. package/src/plugins/builtin/company-kpis/model.ts +57 -15
  212. package/src/plugins/builtin/company-kpis/pane.tsx +22 -8
  213. package/src/plugins/builtin/composite/alt-data.ts +20 -0
  214. package/src/plugins/builtin/composite/application.ts +14 -0
  215. package/src/plugins/builtin/composite/broker.ts +12 -0
  216. package/src/plugins/builtin/composite/credit.ts +33 -0
  217. package/src/plugins/builtin/composite/crypto.ts +10 -0
  218. package/src/plugins/builtin/composite/earnings.ts +12 -0
  219. package/src/plugins/builtin/composite/filings.ts +13 -0
  220. package/src/plugins/builtin/composite/futures-commodities.ts +23 -0
  221. package/src/plugins/builtin/composite/global-markets.ts +12 -0
  222. package/src/plugins/builtin/composite/options-volatility.ts +23 -0
  223. package/src/plugins/builtin/composite/ownership.ts +23 -0
  224. package/src/plugins/builtin/composite/portfolio.ts +10 -0
  225. package/src/plugins/builtin/composite/quant.ts +15 -0
  226. package/src/plugins/builtin/composite/rates-macro.ts +30 -0
  227. package/src/plugins/builtin/composite/screeners.ts +11 -0
  228. package/src/plugins/builtin/composite/shared.ts +11 -0
  229. package/src/plugins/builtin/composite/ticker-core.ts +36 -0
  230. package/src/plugins/builtin/congress-trades/headless.ts +31 -3
  231. package/src/plugins/builtin/congress-trades/model.ts +9 -5
  232. package/src/plugins/builtin/correlation/index.tsx +13 -17
  233. package/src/plugins/builtin/correlation/matrix/model.ts +18 -0
  234. package/src/plugins/builtin/cot/client.ts +2 -3
  235. package/src/plugins/builtin/cot/headless.ts +16 -16
  236. package/src/plugins/builtin/cot/index.tsx +6 -6
  237. package/src/plugins/builtin/cot/model.ts +25 -5
  238. package/src/plugins/builtin/cot/pane.tsx +11 -6
  239. package/src/plugins/builtin/cot/series.ts +11 -8
  240. package/src/plugins/builtin/cpi/model.ts +15 -4
  241. package/src/plugins/builtin/cpi/pane.tsx +29 -7
  242. package/src/plugins/builtin/dividend-yield/client.ts +57 -16
  243. package/src/plugins/builtin/dividend-yield/headless.ts +17 -11
  244. package/src/plugins/builtin/dividend-yield/model.ts +4 -3
  245. package/src/plugins/builtin/dividend-yield/pane.tsx +22 -18
  246. package/src/plugins/builtin/dividend-yield/ranking.ts +1 -1
  247. package/src/plugins/builtin/dividend-yield/types.ts +4 -0
  248. package/src/plugins/builtin/dividend-yield/view.ts +23 -12
  249. package/src/plugins/builtin/doe/model.ts +30 -0
  250. package/src/plugins/builtin/doe/pane.tsx +8 -2
  251. package/src/plugins/builtin/earnings/board-table.ts +9 -4
  252. package/src/plugins/builtin/earnings/fiscal-quarter.ts +39 -0
  253. package/src/plugins/builtin/earnings/headless.ts +16 -6
  254. package/src/plugins/builtin/earnings/history-model.ts +6 -4
  255. package/src/plugins/builtin/earnings/history-table.ts +7 -4
  256. package/src/plugins/builtin/earnings-calls/calendar.tsx +4 -3
  257. package/src/plugins/builtin/earnings-calls/pane.tsx +8 -2
  258. package/src/plugins/builtin/earnings-ripple/pane.tsx +2 -2
  259. package/src/plugins/builtin/econ/calendar-model.ts +16 -0
  260. package/src/plugins/builtin/econ/index.tsx +7 -2
  261. package/src/plugins/builtin/equity-screener/headless.ts +4 -1
  262. package/src/plugins/builtin/equity-screener/model.ts +7 -6
  263. package/src/plugins/builtin/estimate-revisions/headless.ts +1 -1
  264. package/src/plugins/builtin/exposure/model.ts +10 -0
  265. package/src/plugins/builtin/exposure/pane.tsx +10 -3
  266. package/src/plugins/builtin/futures/model.ts +14 -1
  267. package/src/plugins/builtin/futures/series.ts +1 -8
  268. package/src/plugins/builtin/fx-matrix/amount.ts +15 -1
  269. package/src/plugins/builtin/fx-matrix/headless.ts +12 -6
  270. package/src/plugins/builtin/fx-matrix/index.tsx +25 -7
  271. package/src/plugins/builtin/fx-matrix/settings.ts +9 -4
  272. package/src/plugins/builtin/insider/detail.tsx +36 -7
  273. package/src/plugins/builtin/insider/filing-stories.ts +110 -0
  274. package/src/plugins/builtin/insider/headless.ts +37 -2
  275. package/src/plugins/builtin/insider/index.tsx +79 -10
  276. package/src/plugins/builtin/insider/model.ts +43 -5
  277. package/src/plugins/builtin/ipo-calendar/client.ts +11 -1
  278. package/src/plugins/builtin/ipo-calendar/model.ts +3 -7
  279. package/src/plugins/builtin/jobs/headless.ts +2 -1
  280. package/src/plugins/builtin/jobs/model.ts +6 -0
  281. package/src/plugins/builtin/jobs/pane.tsx +8 -3
  282. package/src/plugins/builtin/kelly-sizer/pane.tsx +9 -4
  283. package/src/plugins/builtin/market-valuation/pane.tsx +22 -10
  284. package/src/plugins/builtin/mna/detail.tsx +67 -6
  285. package/src/plugins/builtin/mna/headless.ts +128 -13
  286. package/src/plugins/builtin/mna/model.ts +219 -16
  287. package/src/plugins/builtin/mna/pane.tsx +34 -6
  288. package/src/plugins/builtin/money-markets/model.ts +14 -5
  289. package/src/plugins/builtin/money-markets/pane.tsx +4 -3
  290. package/src/plugins/builtin/news/wire/news/detail-view.tsx +118 -10
  291. package/src/plugins/builtin/news/wire/news/footer.ts +3 -8
  292. package/src/plugins/builtin/news/wire/news/story-evidence.ts +178 -0
  293. package/src/plugins/builtin/options/analytics.ts +1 -1
  294. package/src/plugins/builtin/options/view.tsx +18 -11
  295. package/src/plugins/builtin/options-positioning/model.ts +11 -0
  296. package/src/plugins/builtin/options-positioning/pane.tsx +22 -1
  297. package/src/plugins/builtin/options-scenario/client.ts +49 -8
  298. package/src/plugins/builtin/options-scenario/csp-screen-pane.tsx +22 -6
  299. package/src/plugins/builtin/options-scenario/csp-screen.ts +39 -12
  300. package/src/plugins/builtin/options-scenario/headless.ts +7 -3
  301. package/src/plugins/builtin/options-scenario/model.ts +33 -2
  302. package/src/plugins/builtin/options-scenario/pane.tsx +3 -4
  303. package/src/plugins/builtin/options-scenario/strategy-screen.ts +7 -5
  304. package/src/plugins/builtin/pe-band/client.ts +13 -1
  305. package/src/plugins/builtin/pe-band/headless.ts +2 -2
  306. package/src/plugins/builtin/pe-band/model.ts +63 -10
  307. package/src/plugins/builtin/pe-band/pane.tsx +5 -5
  308. package/src/plugins/builtin/perps/cascade.ts +4 -3
  309. package/src/plugins/builtin/perps/markets-section.tsx +5 -2
  310. package/src/plugins/builtin/perps/model.ts +4 -3
  311. package/src/plugins/builtin/portfolio-list/allocation-rows.ts +26 -7
  312. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +66 -13
  313. package/src/plugins/builtin/portfolio-list/cli/render.ts +76 -33
  314. package/src/plugins/builtin/portfolio-list/headless.ts +69 -22
  315. package/src/plugins/builtin/portfolio-list/pane/data.ts +3 -3
  316. package/src/plugins/builtin/portfolio-list/pane/index.tsx +29 -14
  317. package/src/plugins/builtin/portfolio-list/summary/index.tsx +2 -2
  318. package/src/plugins/builtin/portfolio-list/table.tsx +3 -2
  319. package/src/plugins/builtin/relative-rotation/pane.tsx +2 -3
  320. package/src/plugins/builtin/research/corporate-actions-pane.tsx +33 -14
  321. package/src/plugins/builtin/research/event-model.ts +43 -19
  322. package/src/plugins/builtin/research/headless.ts +8 -1
  323. package/src/plugins/builtin/research/relative-valuation-pane.tsx +19 -17
  324. package/src/plugins/builtin/research-search/index.tsx +3 -1
  325. package/src/plugins/builtin/scanner/denied.tsx +16 -4
  326. package/src/plugins/builtin/scanner/flow-pane.tsx +1 -1
  327. package/src/plugins/builtin/scanner/hilo-pane.tsx +1 -1
  328. package/src/plugins/builtin/sec/filing-display.tsx +14 -2
  329. package/src/plugins/builtin/sec/headless.ts +42 -4
  330. package/src/plugins/builtin/sec/index.tsx +21 -1
  331. package/src/plugins/builtin/sectors/index.tsx +6 -9
  332. package/src/plugins/builtin/sectors/sector-model.ts +1 -1
  333. package/src/plugins/builtin/shared/cloud-upgrade.ts +1 -1
  334. package/src/plugins/builtin/shared/earnings-report.ts +49 -5
  335. package/src/plugins/builtin/shared/options-pro-copy.ts +34 -0
  336. package/src/plugins/builtin/shared/report-freshness.ts +2 -3
  337. package/src/plugins/builtin/shared/statement-currency.ts +23 -0
  338. package/src/plugins/builtin/shared/ticker-surface.ts +1 -1
  339. package/src/plugins/builtin/supply-chain/client.ts +34 -9
  340. package/src/plugins/builtin/supply-chain/evidence.ts +3 -2
  341. package/src/plugins/builtin/supply-chain/flow.tsx +4 -3
  342. package/src/plugins/builtin/supply-chain/graph-model.ts +14 -7
  343. package/src/plugins/builtin/supply-chain/graph-pane.tsx +3 -1
  344. package/src/plugins/builtin/supply-chain/graph.tsx +6 -3
  345. package/src/plugins/builtin/supply-chain/headless.ts +19 -4
  346. package/src/plugins/builtin/supply-chain/model.ts +50 -6
  347. package/src/plugins/builtin/supply-chain/pane.tsx +79 -18
  348. package/src/plugins/builtin/themes/headless.ts +4 -4
  349. package/src/plugins/builtin/themes/model.ts +11 -8
  350. package/src/plugins/builtin/themes/pane.tsx +2 -2
  351. package/src/plugins/builtin/ticker-detail/adr-pair/ah.ts +62 -0
  352. package/src/plugins/builtin/ticker-detail/adr-pair/headless.ts +119 -20
  353. package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +51 -1
  354. package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +25 -14
  355. package/src/plugins/builtin/ticker-detail/financials/model.ts +22 -32
  356. package/src/plugins/builtin/ticker-detail/financials/tab.tsx +7 -9
  357. package/src/plugins/builtin/ticker-detail/headless-schema.ts +2 -0
  358. package/src/plugins/builtin/ticker-detail/headless.ts +28 -12
  359. package/src/plugins/builtin/ticker-detail/overview/board-lot.ts +21 -0
  360. package/src/plugins/builtin/ticker-detail/overview/model.ts +28 -2
  361. package/src/plugins/builtin/ticker-detail/overview/pane.tsx +8 -0
  362. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +68 -13
  363. package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +9 -2
  364. package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +5 -2
  365. package/src/plugins/builtin/volatility/model.ts +17 -0
  366. package/src/plugins/builtin/volatility/pane.tsx +16 -7
  367. package/src/plugins/builtin/world-indices/index.tsx +2 -0
  368. package/src/plugins/builtin/world-indices/table.tsx +15 -0
  369. package/src/plugins/builtin/world-venue-map/evidence.ts +3 -2
  370. package/src/plugins/builtin/world-venue-map/headless.ts +32 -18
  371. package/src/plugins/builtin/world-venue-map/index.ts +19 -6
  372. package/src/plugins/builtin/world-venue-map/layered-pane.tsx +9 -5
  373. package/src/plugins/builtin/world-venue-map/layers.ts +33 -11
  374. package/src/plugins/builtin/world-venue-map/map.tsx +12 -0
  375. package/src/plugins/builtin/world-venue-map/model.ts +6 -1
  376. package/src/plugins/builtin/world-venue-map/pane.tsx +35 -6
  377. package/src/plugins/builtin/world-venue-map/place.ts +119 -0
  378. package/src/plugins/builtin/world-venue-map/venue-header.tsx +5 -3
  379. package/src/plugins/catalog-browser.ts +10 -1
  380. package/src/plugins/catalog-data.ts +20 -0
  381. package/src/plugins/catalog-lazy.ts +51 -0
  382. package/src/plugins/catalog-ui.ts +16 -18
  383. package/src/plugins/host-smoke.ts +5 -2
  384. package/src/portfolio/allocation.ts +79 -19
  385. package/src/portfolio/cash-balances.ts +76 -0
  386. package/src/portfolio/mutations.ts +43 -8
  387. package/src/public/__snapshots__/public-api.test.ts.snap +1 -0
  388. package/src/renderers/browser/activity.ts +16 -0
  389. package/src/renderers/browser/app-badge-host.ts +14 -0
  390. package/src/renderers/browser/main.tsx +5 -0
  391. package/src/renderers/browser/notifications.ts +103 -0
  392. package/src/renderers/browser/ui-host.tsx +4 -0
  393. package/src/renderers/desktop/window-layouts.ts +14 -0
  394. package/src/renderers/dom/data-table/index.tsx +27 -4
  395. package/src/renderers/dom/data-table/row.tsx +2 -0
  396. package/src/renderers/dom/host/tabs.tsx +57 -8
  397. package/src/renderers/dom/styles.css +13 -5
  398. package/src/renderers/electrobun/bun/desktop/backend-requests.ts +4 -0
  399. package/src/renderers/electrobun/bun/desktop/backend.ts +22 -1
  400. package/src/renderers/electrobun/bun/window/native-min-size.ts +6 -1
  401. package/src/renderers/electrobun/shared/protocol.ts +4 -0
  402. package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +50 -12
  403. package/src/renderers/electrobun/view/http-fetch.ts +3 -2
  404. package/src/renderers/electrobun/view/remote/ticker-repository.ts +10 -0
  405. package/src/series/standalone-catalog.ts +5 -4
  406. package/src/series/standalone.ts +13 -7
  407. package/src/sources/gloomberb-cloud/index.ts +22 -9
  408. package/src/sources/gloomberb-cloud/news.ts +35 -0
  409. package/src/sources/gloomberb-cloud/perpetuals.ts +60 -3
  410. package/src/sources/provider-errors.ts +34 -7
  411. package/src/sources/provider-router/financials.ts +20 -13
  412. package/src/sources/provider-router/history.ts +32 -6
  413. package/src/sources/provider-router/index.ts +4 -0
  414. package/src/sources/provider-router/search.ts +1 -0
  415. package/src/sync/collections-contributor.ts +3 -1
  416. package/src/sync/config-merge.ts +10 -1
  417. package/src/sync/sanitize.ts +26 -2
  418. package/src/tickers/company-name-listing.ts +16 -2
  419. package/src/tickers/listing-fate.ts +12 -8
  420. package/src/tickers/renamed-listings.ts +43 -10
  421. package/src/tickers/search/home-listing.ts +28 -0
  422. package/src/tickers/search/index.ts +19 -7
  423. package/src/tickers/terminal-codes.ts +11 -1
  424. package/src/time-series/base-series.ts +39 -6
  425. package/src/time-series/chart-seed.ts +2 -2
  426. package/src/time-series/history-quality.ts +4 -1
  427. package/src/time-series/hooks.ts +2 -0
  428. package/src/time-series/price-comparison.ts +17 -23
  429. package/src/time-series/reporting.ts +1 -1
  430. package/src/time-series/resolution.ts +13 -0
  431. package/src/time-series/resolve-context.ts +6 -0
  432. package/src/time-series/resolve.ts +42 -3
  433. package/src/time-series/spec.ts +2 -2
  434. package/src/time-series/types.ts +3 -2
  435. package/src/types/data-provider.ts +11 -0
  436. package/src/types/financials.ts +48 -4
  437. package/src/types/headless.ts +1 -0
  438. package/src/types/issuer-listings.ts +2 -0
  439. package/src/types/plugin-notifications.ts +3 -0
  440. package/src/types/price-history.ts +6 -4
  441. package/src/types/ticker.ts +10 -2
  442. package/src/ui/host.tsx +2 -0
  443. package/src/utils/cli-output.ts +1 -1
  444. package/src/utils/declared-dividends.ts +13 -1
  445. package/src/utils/dividend-cash.ts +5 -1
  446. package/src/utils/exchange-announcements.ts +7 -2
  447. package/src/utils/forward-dividend.ts +4 -3
  448. package/src/utils/fundamentals.ts +40 -0
  449. package/src/utils/network-failure.ts +2 -0
  450. package/src/utils/price-history-integrity.ts +9 -1
  451. package/src/utils/remove-folder.ts +37 -0
  452. package/src/utils/trailing-dividend.ts +1 -1
  453. package/src/plugins/builtin/composite-plugins.ts +0 -285
@@ -19,6 +19,7 @@ import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
19
19
  import { savedCopyFooterSegment } from "../../../components/layout/pane/footer";
20
20
  import { useAsyncResource, useAutoRefresh, usePaneSettingValue, usePluginPaneState } from "../../../public/react";
21
21
  import { usePaneInstance } from "../../../state/app/context";
22
+ import { useRemoteUiNode } from "../../../remote/semantic-tree";
22
23
  import { useThemeColors } from "../../../theme/theme-context";
23
24
  import type { ResolvedSeries } from "../../../time-series/types";
24
25
  import type { PaneProps } from "../../../types/plugin";
@@ -29,6 +30,7 @@ import {
29
30
  DOE_UNIT_LABEL,
30
31
  doeAxisFormatter,
31
32
  doeComparisonBasis,
33
+ doeCoverageNote,
32
34
  doeHeaderLine,
33
35
  doeReport,
34
36
  doeRows,
@@ -130,7 +132,11 @@ export function DoePane({ width, height, focused }: PaneProps) {
130
132
  const [openingTab] = usePaneSettingValue<string>("tab", "crude");
131
133
  const [storedTab, setTab] = usePluginPaneState<string>("tab", openingTab);
132
134
  const tab = doeTab(storedTab);
133
- const initialSeries = usePaneInstance()?.params?.series ?? null;
135
+ const params = usePaneInstance()?.params;
136
+ const initialSeries = params?.series ?? null;
137
+ // Opened from a futures search on a contract this board does not cover (`FUT HG --tab inventories`): it says so.
138
+ const coverage = useMemo(() => doeCoverageNote(params?.query), [params?.query]);
139
+ useRemoteUiNode(coverage ? { role: "report-notice", label: "Coverage", getMetadata: () => ({ text: coverage }) } : null);
134
140
  const resource = useAsyncResource(loadDoeBoard, { initialData: getCachedDoeBoard });
135
141
  const data = resource.data?.payload ?? null;
136
142
  // The server not serving the board yet is a state of the data, not a failure.
@@ -141,7 +147,7 @@ export function DoePane({ width, height, focused }: PaneProps) {
141
147
  // A refresh that failed shows the board an earlier read saved, and says when that copy is from.
142
148
  const savedAt = resource.data?.savedAt ?? null;
143
149
  usePaneNoticeFooter({ registrationId: "doe:notices", focused,
144
- notices: [...(data?.gaps ?? []), ...(resource.data?.refreshError && savedAt == null ? [resource.data.refreshError] : [])] });
150
+ notices: [...(coverage ? [coverage] : []), ...(data?.gaps ?? []), ...(resource.data?.refreshError && savedAt == null ? [resource.data.refreshError] : [])] });
145
151
  // What Vs 1Y and Vs 5Y are measured against on this tab: the EIA's published figures for gas storage.
146
152
  const basis = useMemo(() => data ? doeComparisonBasis(doeRows(data, tab)) : null, [data, tab]);
147
153
  const info = useMemo(() => {
@@ -6,7 +6,8 @@ import { colors } from "../../../theme/colors";
6
6
  import { notMeaningfulCell } from "../../../components/ui/not-meaningful";
7
7
  import { isNotMeaningful } from "../../../utils/growth";
8
8
  import { TextAttributes } from "../../../ui";
9
- import { epsBasisShort, showsEpsBasis } from "../shared/earnings-report";
9
+ import { ACTUAL_PENDING, actualPending, epsBasisShort, showsEpsBasis } from "../shared/earnings-report";
10
+ import { listingAbroadVenue } from "../../../utils/sec";
10
11
  import type { BoardReport, BoardRow, BoardSort } from "./board-model";
11
12
  import { epsText, impliedText, moneyText, moveSize, signedPercent, TIMING_LABEL, weekday, type Surprise } from "./format";
12
13
 
@@ -70,9 +71,12 @@ export const SORTABLE: Partial<Record<BoardColumnId, BoardSort["column"]>> = {
70
71
  symbol: "symbol", cap: "cap", implied: "implied", average: "average",
71
72
  };
72
73
 
73
- /** Whether any report on the board has an actual: the narrow board then keeps EPS ACT and EPS SURP (boardColumns). */
74
+ /**
75
+ * Whether any report on the board is out, with its actual or still pending: the narrow board then keeps EPS ACT and
76
+ * EPS SURP (boardColumns), so a report out today says its actual is pending rather than dropping the column.
77
+ */
74
78
  export function boardHasActuals(rows: readonly BoardRow[]): boolean {
75
- return rows.some((row) => row.kind === "report" && row.report.epsActual != null);
79
+ return rows.some((row) => row.kind === "report" && (row.report.epsActual != null || actualPending(row.report, listingAbroadVenue(row.report.symbol) != null)));
76
80
  }
77
81
 
78
82
  /**
@@ -172,7 +176,8 @@ export function renderBoardCell(row: BoardRow, column: BoardColumn, context: Boa
172
176
  case "analysts":
173
177
  return { text: report.epsAnalysts == null ? MISSING_VALUE : String(report.epsAnalysts), color: dim };
174
178
  case "epsActual":
175
- // The company's press release's figure reads quieter until the calendar's replaces it.
179
+ // A report out with no actual yet says so; the company's press release's figure reads quieter until the calendar's replaces it.
180
+ if (actualPending(report, listingAbroadVenue(report.symbol) != null)) return { text: ACTUAL_PENDING, color: dim };
176
181
  return { text: epsText(report.epsActual), color: report.epsActual == null ? dim : report.provisional ? colors.textMuted : colors.text };
177
182
  case "basis":
178
183
  return !showsEpsBasis(report)
@@ -1,5 +1,6 @@
1
1
  import type { EarningsFiscalAnchor } from "../../../api-client/earnings";
2
2
  import { addDays } from "./board-model";
3
+ import { quarterLabel } from "../shared/earnings-report";
3
4
 
4
5
  /** A quarter as the company names it: NVIDIA's October 2026 quarter is Q3 of fiscal 2027. */
5
6
  export interface FiscalQuarter {
@@ -28,6 +29,40 @@ export function fiscalQuarterOf(period: string | null | undefined, anchor: Earni
28
29
  return { fiscalYear: Math.floor(index / 4), fiscalQuarter: (index % 4) + 1 };
29
30
  }
30
31
 
32
+ /**
33
+ * The month a period ends in, from a YYYY-MM month or a YYYY-MM-DD end. A
34
+ * 52/53-week period that ends in a month's first week (Feb 1, 2026) closes
35
+ * the month before, as its filer counts it.
36
+ */
37
+ function closingMonth(period: string | null | undefined): number | null {
38
+ const day = period ? /^(\d{4}-\d{2})-(\d{2})/.exec(period) : null;
39
+ const month = monthIndex(day ? day[1] : period);
40
+ return month != null && day && Number(day[2]) <= 7 ? month - 1 : month;
41
+ }
42
+
43
+ /**
44
+ * The quarter ending in `period` on a fiscal year that ends in `yearEndMonth`
45
+ * (1 to 12, from the company's annual statements), where no calls name the
46
+ * company's quarters: Visa's December 2026 quarter is Q1 FY2027, its year
47
+ * ending in September. A fiscal year is named by the calendar year it ends
48
+ * in. Null off that year's quarters, or without a year end.
49
+ */
50
+ export function fiscalQuarterInYear(period: string | null | undefined, yearEndMonth: number | null | undefined): FiscalQuarter | null {
51
+ const month = closingMonth(period);
52
+ if (month == null || yearEndMonth == null || yearEndMonth < 1 || yearEndMonth > 12) return null;
53
+ const calendarMonth = (month % 12) + 1;
54
+ const offset = (calendarMonth - yearEndMonth + 12) % 12;
55
+ if (offset % 3 !== 0) return null;
56
+ const year = Math.floor(month / 12);
57
+ return { fiscalYear: calendarMonth <= yearEndMonth ? year : year + 1, fiscalQuarter: offset === 0 ? 4 : offset / 3 };
58
+ }
59
+
60
+ /** "FY2027" for a period that ends a fiscal year ending in `yearEndMonth`; null for any other. */
61
+ export function fiscalYearText(period: string | null | undefined, yearEndMonth: number | null | undefined): string | null {
62
+ const quarter = fiscalQuarterInYear(period, yearEndMonth);
63
+ return quarter?.fiscalQuarter === 4 ? `FY${quarter.fiscalYear}` : null;
64
+ }
65
+
31
66
  /**
32
67
  * The quarter-end month a report with none on record announces: the last on
33
68
  * the company's cycle that ended 5 to 100 days before it, as Gloom Cloud
@@ -52,3 +87,7 @@ export function fiscalQuarterText(quarter: FiscalQuarter | null | undefined, sho
52
87
  if (!quarter) return null;
53
88
  return `Q${quarter.fiscalQuarter} FY${short ? String(quarter.fiscalYear).slice(-2) : quarter.fiscalYear}`;
54
89
  }
90
+
91
+ export function fiscalPeriodText(period: string | null | undefined, quarter?: FiscalQuarter | null, short = false): string {
92
+ return fiscalQuarterText(quarter, short) ?? quarterLabel(period ?? undefined);
93
+ }
@@ -17,9 +17,9 @@ import { fetchEarningsCalendar, fetchEarningsHistory, noHistoryAbroad, sameHisto
17
17
  import { loadEarningsCalendar } from "./data/cache";
18
18
  import { epsText, impliedText, moneyText, moveSize, signedPercent, TIMING_LABEL } from "./format";
19
19
  import { historyRows, periodText } from "./history-model";
20
- import { fiscalQuarterText } from "./fiscal-quarter";
20
+ import { fiscalPeriodText, fiscalQuarterText } from "./fiscal-quarter";
21
21
  import { loadNoEarningsText } from "./no-earnings";
22
- import { EPS_BASIS_NOTE, epsBasisName, PROVISIONAL_NOTE, showsEpsBasis } from "../shared/earnings-report";
22
+ import { ACTUAL_PENDING, actualPending, EPS_BASIS_NOTE, epsBasisName, lacksConsensus, NO_CONSENSUS, PROVISIONAL_NOTE, showsEpsBasis } from "../shared/earnings-report";
23
23
  import { lastReportOnRecord, listingDay, noNextReportText } from "../shared/earnings-calendar";
24
24
  import { commandWord } from "../../../utils/shell-word";
25
25
  import { listingAbroadVenue } from "../../../utils/sec";
@@ -59,6 +59,11 @@ const BASIS_COLUMN: HeadlessPaneColumn = {
59
59
  textFormat: (value, row) => (value == null ? MISSING_VALUE : row.epsActualProvisional === true ? `${String(value)}, provisional` : String(value)),
60
60
  };
61
61
 
62
+ /** A listing abroad's row (a board row naming one, an ERN row in its own currency) has no actual pending: see actualPending. */
63
+ function pendingAbroad(row: Record<string, unknown>): boolean {
64
+ return typeof row.symbol === "string" ? listingAbroadVenue(row.symbol) != null : row.currency != null && row.currency !== "USD";
65
+ }
66
+
62
67
  const BOARD_COLUMNS: HeadlessPaneColumn[] = [
63
68
  { key: "date", header: "Date" },
64
69
  { key: "dateStatus", header: "Status" },
@@ -71,7 +76,8 @@ const BOARD_COLUMNS: HeadlessPaneColumn[] = [
71
76
  { key: "currency", header: "Ccy" },
72
77
  { key: "epsEstimate", header: "EPS est", align: right, format: (value) => epsText(num(value)) },
73
78
  { key: "epsAnalysts", header: "Ests", align: right },
74
- { key: "epsActual", header: "EPS act", align: right, format: (value) => epsText(num(value)) },
79
+ // A report out with no actual yet says so (exports: in the status column), never a bare blank.
80
+ { key: "epsActual", header: "EPS act", align: right, format: (value, row) => actualPending({ date: typeof row.date === "string" ? row.date : null, epsActual: num(value), dateStatus: typeof row.dateStatus === "string" ? row.dateStatus : null }, pendingAbroad(row)) ? ACTUAL_PENDING : epsText(num(value)) },
75
81
  BASIS_COLUMN,
76
82
  surpriseColumn("epsSurprise", "EPS surp"),
77
83
  { key: "revenueEstimate", header: "Sales est", align: right, format: (value) => moneyText(num(value)) },
@@ -96,10 +102,12 @@ const HISTORY_COLUMNS: HeadlessPaneColumn[] = [
96
102
  { key: "dateStatus", header: "Status" },
97
103
  { key: "timing", header: "When" },
98
104
  // The quarter as the company names it; its end month where the company's calls do not say. Exports keep both.
99
- { key: "fiscalQuarter", header: "Quarter", format: (value, row) => typeof value === "string" ? value : typeof row.fiscalPeriod === "string" ? row.fiscalPeriod : MISSING_VALUE },
100
- { key: "epsEstimate", header: "EPS est", align: right, format: (value) => epsText(num(value)) },
105
+ { key: "fiscalQuarter", header: "Quarter", format: (value, row) => typeof value === "string" ? value : fiscalPeriodText(typeof row.fiscalPeriod === "string" ? row.fiscalPeriod : undefined) },
106
+ // A reported quarter with no consensus on record says so (exports: in the status column), never a bare blank.
107
+ { key: "epsEstimate", header: "EPS est", align: right, format: (value, row) => lacksConsensus({ epsActual: num(row.epsActual), epsEstimate: num(value) }) ? NO_CONSENSUS : epsText(num(value)) },
101
108
  { key: "epsAnalysts", header: "Ests", align: right },
102
- { key: "epsActual", header: "EPS act", align: right, format: (value) => epsText(num(value)) },
109
+ // A report out with no actual yet says so (exports: in the status column), never a bare blank.
110
+ { key: "epsActual", header: "EPS act", align: right, format: (value, row) => actualPending({ date: typeof row.date === "string" ? row.date : null, epsActual: num(value), dateStatus: typeof row.dateStatus === "string" ? row.dateStatus : null }, pendingAbroad(row)) ? ACTUAL_PENDING : epsText(num(value)) },
103
111
  BASIS_COLUMN,
104
112
  surpriseColumn("epsSurprise", "EPS surp"),
105
113
  { key: "revenueEstimate", header: "Sales est", align: right, format: (value) => moneyText(num(value)) },
@@ -245,6 +253,8 @@ async function boardRows(args: HeadlessPaneLoadArgs, context: HeadlessPaneContex
245
253
  return {
246
254
  columns: BOARD_COLUMNS,
247
255
  rows,
256
+ complete: rows.length === all.length && cloud.status !== "rejected",
257
+ ...(rows.length < all.length ? { notes: [`Showing ${rows.length} of ${all.length} reports. Retrieve all with --limit ${all.length}.`] } : {}),
248
258
  errors: cloud.status === "rejected" ? [String(cloud.reason instanceof Error ? cloud.reason.message : cloud.reason)] : undefined,
249
259
  metadata: {
250
260
  ...(ticker ? { notices: [ticker.notice], highlight: { symbol: highlight, onBoard: ticker.date != null, date: ticker.date, row: ticker.row } } : {}),
@@ -7,8 +7,8 @@ import type { EarningsDateStatus, EarningsEpsBasis } from "../../../types/financ
7
7
  import { earningsDateStatus, earningsEpsBasis, isProvisionalActual } from "../shared/earnings-report";
8
8
  import { resolveReportRows, type ReportRowAdapter } from "../shared/earnings-calendar";
9
9
  import { addDays, MIN_AVERAGE_REPORTS } from "./board-model";
10
- import { fiscalQuarterOf, fiscalQuarterText, placedPeriod, type FiscalQuarter } from "./fiscal-quarter";
11
- import { datedYear, fiscalMonth, impliedText, moveSize, shortDate, surprise, TIMING_LABEL, type Surprise } from "./format";
10
+ import { fiscalQuarterOf, fiscalPeriodText, placedPeriod, type FiscalQuarter } from "./fiscal-quarter";
11
+ import { datedYear, epsText, fiscalMonth, impliedText, moveSize, shortDate, surprise, TIMING_LABEL, type Surprise } from "./format";
12
12
 
13
13
  export interface HistoryRow {
14
14
  key: string;
@@ -67,7 +67,7 @@ export function periodText(
67
67
  row: Pick<HistoryRow, "periodKind" | "periodMonths" | "periodFiscalYear" | "fiscalHalf" | "fiscalQuarter" | "fiscalPeriod">,
68
68
  short = true,
69
69
  ): string {
70
- if (row.periodKind === "quarter") return fiscalQuarterText(row.fiscalQuarter, short) ?? fiscalMonth(row.fiscalPeriod);
70
+ if (row.periodKind === "quarter") return fiscalPeriodText(row.fiscalPeriod, row.fiscalQuarter, short);
71
71
  const year = row.periodFiscalYear == null ? null : `FY${short ? String(row.periodFiscalYear).slice(-2) : row.periodFiscalYear}`;
72
72
  if (row.periodKind === "year" && year) return year;
73
73
  if (row.periodKind === "half" && year && row.fiscalHalf != null) return `H${row.fiscalHalf} ${year}`;
@@ -262,11 +262,13 @@ export function historyFigures(rows: readonly HistoryRow[], today: string): Stat
262
262
  const beats = past.filter((row) => row.epsSurprise != null && row.epsActual != null && row.epsEstimate != null);
263
263
  const figures: StatItem[] = [];
264
264
  if (next) {
265
+ const estimate = next.epsEstimate == null ? null : `EPS est ${epsText(next.epsEstimate)}${next.currency ? ` ${next.currency}` : ""}`;
265
266
  figures.push({
266
267
  id: "next",
267
268
  label: "Next report",
268
269
  value: `${shortDate(next.date)}${next.timing ? ` ${TIMING_LABEL[next.timing]}` : ""}`,
269
- detail: [next.dateStatus === "reported" ? null : next.dateStatus, daysUntil(next.date, today)].filter(Boolean).join(", "),
270
+ detail: [estimate, next.dateStatus === "reported" ? null : next.dateStatus, daysUntil(next.date, today)].filter(Boolean).join(", "),
271
+ ...(estimate ? { detailVariants: [estimate] } : {}),
270
272
  });
271
273
  if (next.implied != null) {
272
274
  figures.push({
@@ -6,7 +6,7 @@ import { notMeaningfulCell } from "../../../components/ui/not-meaningful";
6
6
  import { isNotMeaningful } from "../../../utils/growth";
7
7
  import { TextAttributes } from "../../../ui";
8
8
  import { datedYear, epsText, impliedText, moneyText, signedPercent, TIMING_LABEL, type Surprise } from "./format";
9
- import { epsBasisShort, showsEpsBasis } from "../shared/earnings-report";
9
+ import { ACTUAL_PENDING, actualPending, epsBasisShort, lacksConsensus, NO_CONSENSUS_SHORT, showsEpsBasis } from "../shared/earnings-report";
10
10
  import { periodText, type HistoryRow } from "./history-model";
11
11
 
12
12
  type HistoryColumnId =
@@ -18,7 +18,7 @@ export type HistoryColumn = DataTableColumn & { id: HistoryColumnId };
18
18
  const ALL_COLUMNS: HistoryColumn[] = [
19
19
  { id: "date", label: "DATE", width: 10, align: "left" },
20
20
  { id: "when", label: "WHEN", width: 4, align: "left" },
21
- { id: "period", label: "QTR", width: 7, align: "left" },
21
+ { id: "period", label: "QTR", width: 8, align: "left" },
22
22
  { id: "epsEstimate", label: "EPS EST", width: 7, align: "right" },
23
23
  { id: "analysts", label: "ESTS", width: 4, align: "right" },
24
24
  { id: "epsActual", label: "EPS ACT", width: 7, align: "right" },
@@ -117,11 +117,14 @@ export function renderHistoryCell(row: HistoryRow, column: HistoryColumn, liveMo
117
117
  case "period":
118
118
  return { text: periodText(row), color: dim };
119
119
  case "epsEstimate":
120
- return { text: inCurrency(epsText(row.epsEstimate), row), color: dim };
120
+ // A reported quarter with no consensus on record says so; its surprise stays blank.
121
+ return { text: lacksConsensus(row) ? NO_CONSENSUS_SHORT : inCurrency(epsText(row.epsEstimate), row), color: dim };
121
122
  case "analysts":
122
123
  return { text: row.epsAnalysts == null ? MISSING_VALUE : String(row.epsAnalysts), color: dim };
123
124
  case "epsActual":
124
- // The company's press release's figure reads quieter until the calendar's replaces it.
125
+ // A report out with no actual yet says so; the company's press release's figure reads quieter until the calendar's replaces it.
126
+ // A listing abroad's rows carry their own currency; a US listing's are dollars (null).
127
+ if (actualPending(row, row.currency != null)) return { text: ACTUAL_PENDING, color: dim };
125
128
  return { text: inCurrency(epsText(row.epsActual), row), color: row.provisional ? colors.textMuted : colors.text };
126
129
  case "basis":
127
130
  // A listing abroad's basic EPS is not the statements' diluted figure: it says what it is.
@@ -22,7 +22,7 @@ import {
22
22
  import { handleRefreshKey } from "../../../components/data-table/table-pane";
23
23
  import { savedCopyFooterInfo } from "../../../components/layout/pane/footer";
24
24
  import { isPermanentClientError } from "../../../api-client/errors";
25
- import { TABLE_COLUMN_GAP, tableColumnWidth } from "../../../components/ui/table-layout";
25
+ import { markHiddenTableColumns, TABLE_COLUMN_GAP, tableColumnWidth } from "../../../components/ui/table-layout";
26
26
  import { useAsyncResource } from "../../../react/async-resource";
27
27
  import { useAgeClock, useAutoRefresh } from "../../../react/auto-refresh";
28
28
  import { colors } from "../../../theme/colors";
@@ -80,13 +80,14 @@ const SORTABLE: Partial<Record<CalendarColumnId, CalendarSort["column"]>> = {
80
80
  function calendarColumns(width: number, { localClock }: { localClock: boolean }): CalendarColumn[] {
81
81
  const fixed = (list: CalendarColumn[]) =>
82
82
  list.reduce((sum, column) => sum + (column.id === "company" ? 0 : tableColumnWidth(column)) + TABLE_COLUMN_GAP, 2);
83
- let columns = localClock ? ALL_COLUMNS : ALL_COLUMNS.filter((column) => column.id !== "local");
83
+ const original = localClock ? ALL_COLUMNS : ALL_COLUMNS.filter((column) => column.id !== "local");
84
+ let columns = original;
84
85
  for (const id of DROP_ORDER) {
85
86
  if (fixed(columns) + COMPANY_MIN_WIDTH <= width) break;
86
87
  columns = columns.filter((column) => column.id !== id);
87
88
  }
88
89
  const companyWidth = Math.max(COMPANY_MIN_WIDTH, width - fixed(columns));
89
- return columns.map((column) => (column.id === "company" ? { ...column, width: companyWidth } : column));
90
+ return markHiddenTableColumns(original, columns.map((column) => (column.id === "company" ? { ...column, width: companyWidth } : column)));
90
91
  }
91
92
 
92
93
  function renderCalendarCell(row: CalendarRow, column: CalendarColumn, now: number): DataTableCell {
@@ -278,6 +278,10 @@ function CallsListView({
278
278
  });
279
279
 
280
280
  const [calls, setCalls] = useState<CloudEarningsCallPayload[]>(initialShelf?.calls ?? []);
281
+ // The binding the shelf was read for. A dual-listed company's calls carry its
282
+ // home line's ticker (CALLS 1088:HKEX lists 601088:SSE's), so a call on this
283
+ // binding's shelf is its own whatever ticker it carries.
284
+ const [shelfTicker, setShelfTicker] = useState(() => symbol ? symbol.toUpperCase() : null);
281
285
  const [listStatus, setListStatus] = useState<"idle" | "loading" | "loaded" | "error">(initialShelf ? "loaded" : "idle");
282
286
  const [listError, setListError] = useState<{ message: string; status?: number } | null>(null);
283
287
  const [stale, setStale] = useState(initialShelf?.stale === true);
@@ -345,6 +349,7 @@ function CallsListView({
345
349
  .then((result) => {
346
350
  if (request !== listRequestVersion.current) return;
347
351
  setCalls(result.calls);
352
+ setShelfTicker(ticker);
348
353
  setNextOffset(result.calls.length);
349
354
  setHasMore(result.sourceLimitReached === true);
350
355
  setStale(result.stale);
@@ -416,6 +421,7 @@ function CallsListView({
416
421
  firstShelfLoadRef.current = false;
417
422
  const held = cachedEarningsCalls(ticker, { limit: CALL_PAGE_SIZE, exchange: listingVenue, name: listingName });
418
423
  setCalls(held?.calls ?? []);
424
+ setShelfTicker(ticker);
419
425
  setHasMore(held?.sourceLimitReached === true);
420
426
  setLoadingMore(false);
421
427
  setNextOffset(held?.calls.length ?? 0);
@@ -660,7 +666,7 @@ function CallsListView({
660
666
  if (!detailOpen || !selectedCallId || selectedUpcoming || !access.emailVerified || !access.hasProAccess) return;
661
667
  // A binding change clears selection in an effect; do not start a request
662
668
  // for that previous selection during the same render's effect pass.
663
- if (ticker && selected?.ticker.toUpperCase() !== ticker) return;
669
+ if (ticker && selected?.ticker.toUpperCase() !== ticker && shelfTicker !== ticker) return;
664
670
  let cancelled = false;
665
671
  let timer: ReturnType<typeof setTimeout> | null = null;
666
672
  setTranscriptError(null);
@@ -705,7 +711,7 @@ function CallsListView({
705
711
  };
706
712
  // The call's identity is what matters; list refreshes must not restart this.
707
713
  // eslint-disable-next-line react-hooks/exhaustive-deps
708
- }, [detailOpen, selectedCallId, selectedUpcoming, ticker, access.emailVerified, access.hasProAccess]);
714
+ }, [detailOpen, selectedCallId, selectedUpcoming, ticker, shelfTicker, access.emailVerified, access.hasProAccess]);
709
715
 
710
716
  const scrollTranscriptBy = useCallback((delta: number) => {
711
717
  if (transcriptScrollRef.current) scrollByLines(transcriptScrollRef.current, delta);
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
2
2
  import { DataTableView, EmptyState, PaneStatusBody, usePaneFooter, usePaneNoticeFooter, usePaneTabs,
3
3
  type DataTableCell, type DataTableColumn, type PaneHint } from "../../../components";
4
4
  import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
5
- import { getTableWidth } from "../../../components/ui/table-layout";
5
+ import { getTableWidth, markHiddenTableColumns } from "../../../components/ui/table-layout";
6
6
  import { usePlanAccess } from "../../../api-client/plan-access";
7
7
  import { useAsyncResource, useAutoRefresh, usePaneSettingValue, usePluginAppActions, usePluginPaneState, useTickers } from "../../../public/react";
8
8
  import type { PaneProps } from "../../../types/plugin";
@@ -91,7 +91,7 @@ function secondHopLayout(width: number, rows: readonly SecondHopRow[]) {
91
91
  add();
92
92
  if (room() < 0) undo();
93
93
  }
94
- return { columns: columns(), firstHopWidth };
94
+ return { columns: markHiddenTableColumns(SECOND_HOP_COLUMNS, columns()), firstHopWidth };
95
95
  }
96
96
 
97
97
  const move = (row: RippleRow | SecondHopRow): DataTableCell =>
@@ -530,6 +530,22 @@ export function figureGap(
530
530
  return releaseIn ? "none" : "awaiting";
531
531
  }
532
532
 
533
+ /**
534
+ * Whether a row's ACTUAL is blank with no figure missing: the release is
535
+ * still to come (by its time, or by its day where it has none), or it prints
536
+ * no figure at all (a speech, a meeting, with neither forecast nor prior).
537
+ * A release past its time with a figure due is not: figureGap says it is
538
+ * awaited for a day, and its blank after that is a figure the source lost.
539
+ */
540
+ export function actualMayBeBlank(
541
+ event: Pick<EconEvent, "actual" | "forecast" | "prior" | "date" | "time" | "timeNote">,
542
+ now: number,
543
+ ): boolean {
544
+ if (event.actual?.trim()) return false;
545
+ if (!event.forecast?.trim() && !event.prior?.trim()) return true;
546
+ return now < event.date.getTime() + (hasNoReleaseTime(event) ? AWAITING_FIGURE_MS : 0);
547
+ }
548
+
533
549
  /** What a release awaiting its figure says in place of it: "due 07:00 UTC, awaiting figure". */
534
550
  function awaitingFigureText(event: Pick<EconEvent, "date">): string {
535
551
  return `due ${timeLabel(event.date)} ${CALENDAR_TIME_ZONE_LABEL}, awaiting figure`;
@@ -36,6 +36,7 @@ import {
36
36
  FILTER_CYCLE,
37
37
  attachEconCalendarPersistence,
38
38
  actualColor,
39
+ actualMayBeBlank,
39
40
  AWAITING_FIGURE_CELL,
40
41
  awaitsConsensus,
41
42
  figureGap,
@@ -110,7 +111,7 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
110
111
  useEffect(() => subscribeCalendar(() => setCacheVersion((version) => version + 1)), []);
111
112
  const cached = useMemo(() => getCalendarCache(), [cacheVersion]);
112
113
  const shown = cached && (!calendar.data || cached.fetchedAt > calendar.data.fetchedAt) ? cached : calendar.data;
113
- const { loading } = calendar;
114
+ const loading = calendar.loading || (!shown && !calendar.error);
114
115
  const events = shown?.data ?? NO_EVENTS;
115
116
  const stale = shown?.stale ?? false;
116
117
  const fetchedAt = shown?.fetchedAt ?? null;
@@ -422,6 +423,7 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
422
423
  registrationId: "econ-calendar",
423
424
  loading,
424
425
  error,
426
+ emptyResult: !!shown && !rows.length && !detailEvent,
425
427
  info: calendarStatus,
426
428
  });
427
429
  // The filter keys step through the choices; Shift steps back. The pane menu
@@ -506,6 +508,8 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
506
508
  return {
507
509
  text: figureWithCurrency(ev.actual, ev.currency) ?? MISSING_VALUE,
508
510
  color: actualColor(ev.actual, ev.forecast),
511
+ // A release still to come, or one with no figure to print: its dash is no figure lost.
512
+ ...(actualMayBeBlank(ev, now) ? { mayBeBlank: true } : {}),
509
513
  };
510
514
  case "forecast":
511
515
  return { text: figureWithCurrency(ev.forecast, ev.currency) ?? MISSING_VALUE, color: colors.textDim };
@@ -581,12 +585,13 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
581
585
  renderSectionHeader={renderSectionHeader}
582
586
  renderCell={renderCell}
583
587
  selectedTextOverridesCellColor
588
+ status={{ loading: loading && !rows.length, error: !loading && !events.length ? error : null, subject: "economic events" }}
584
589
  emptyContent={filterEmptyTitle ? (
585
590
  <Box width="100%" paddingX={1} paddingY={1}>
586
591
  <EmptyState title={filterEmptyTitle} actions={<Button label="Show all" compact onPress={showAllEvents} />} />
587
592
  </Box>
588
593
  ) : undefined}
589
- emptyStateTitle={loading ? "Loading economic events..." : listedAfter ?? "No events"}
594
+ emptyStateTitle={listedAfter ?? "No events"}
590
595
  emptyStateHint={emptyStateHint}
591
596
  showHorizontalScrollbar={false}
592
597
  />
@@ -1,4 +1,5 @@
1
1
  import type { HeadlessPaneDefinition } from "../../../types/plugin";
2
+ import { isProLock } from "../../../cli/pane-functions/access-gate";
2
3
  import type { HeadlessPaneColumn, HeadlessPaneContext } from "../../../types/headless";
3
4
  import {
4
5
  KPI_FIELDS,
@@ -387,7 +388,9 @@ export const equityScreenerHeadless: HeadlessPaneDefinition<"bundle"> = {
387
388
  const extra = extraScreenColumns(metrics, data.definition.sort.field);
388
389
  const states = new Set(rows.map((row) => row.metrics[metric].state));
389
390
  const legend = STATE_LEGEND.filter(({ state }) => states.has(state)).map(({ text }) => text);
390
- const notes = [...watchlistRead.notes, ...listingReadNotes(data.listings, data.definition.currency), ...kpiGaps, ...legend];
391
+ const locked = rows.some((row) => metrics.some((field) => row.metrics[field]?.access === "pro"));
392
+ const notes = [...watchlistRead.notes, ...listingReadNotes(data.listings, data.definition.currency), ...kpiGaps, ...legend,
393
+ ...(locked && !errors.some(isProLock) ? ["Locked figures require Gloom Pro access."] : [])];
391
394
  // Payload status also counts ordinary per-field sparsity; only generation
392
395
  // warnings are failures, and more pages are not an error.
393
396
  return {
@@ -73,7 +73,7 @@ export const SHORT_LABELS: Record<NumericField, string> = {
73
73
  revenueGrowthPercent: "FY REV GR%",
74
74
  earningsGrowthPercent: "FY EARN GR%",
75
75
  grossMarginPercent: "FY GROSS MGN%",
76
- payoutRatioPercent: "FY PAYOUT%",
76
+ payoutRatioPercent: "FY CASH PAYOUT%",
77
77
  dividendGrowth1YPercent: "DIV GR 1Y%",
78
78
  dividendGrowth3YPercent: "DIV CAGR 3Y%",
79
79
  operatingMarginPercent: "FY OP MGN%",
@@ -257,15 +257,16 @@ export function formatScreenValue(field: NumericField, value: number | null): st
257
257
  }
258
258
 
259
259
  /** A row's metric as a cell prints it: N/M for a multiple that is not meaningful, as RV and `valuation` print it. */
260
- export function formatScreenMetric(field: NumericField, metric: Pick<ScreenMetric, "value" | "notMeaningful">): string {
261
- return metric.value == null && metric.notMeaningful ? formatPriceEarnings(NOT_MEANINGFUL) : formatScreenValue(field, metric.value);
260
+ export function formatScreenMetric(field: NumericField, metric: Pick<ScreenMetric, "value" | "notMeaningful"> & Partial<Pick<ScreenMetric, "reason">>): string {
261
+ const text = metric.value == null && metric.notMeaningful ? formatPriceEarnings(NOT_MEANINGFUL) : formatScreenValue(field, metric.value);
262
+ return field === "dividendGrowthYears" && metric.value != null && /^At least \d+: the stored history starts \d{4}-\d{2}-\d{2}$/.test(metric.reason ?? "") ? `${text}+` : text;
262
263
  }
263
264
 
264
265
  /** A metric as a company's detail prints it: with its unit, but a grade or the composite reads as itself (B+, 4.72 Top). */
265
- export function screenDetailValue(field: NumericField, metric: Pick<ScreenMetric, "value" | "notMeaningful" | "unit">): string {
266
+ export function screenDetailValue(field: NumericField, metric: Pick<ScreenMetric, "value" | "notMeaningful" | "unit"> & Partial<Pick<ScreenMetric, "reason">>): string {
266
267
  // A missing value is just "--", without the unit it would have had; N/M says so.
267
268
  if (metric.value == null) return metric.notMeaningful ? formatScreenMetric(field, metric) : formatScreenValue(field, null);
268
- const text = formatScreenValue(field, metric.value);
269
+ const text = formatScreenMetric(field, metric);
269
270
  if (GRADE_DISPLAY_FIELDS.has(field)) return text;
270
271
  // A count of one is singular: 1 year, 1 day.
271
272
  const unit = metric.value === 1 && COUNT_UNITS.has(metric.unit) ? metric.unit.slice(0, -1) : metric.unit;
@@ -484,7 +485,7 @@ export const screenLabel = (field: string) =>
484
485
  dividendYieldPercent: "Dividend yield %",
485
486
  xPostsPerDay: "X posts per day",
486
487
  xPostsVsMedian: "X posts vs median",
487
- payoutRatioPercent: "Annual payout ratio %",
488
+ payoutRatioPercent: "FY cash dividends / parent net income %",
488
489
  dividendGrowth1YPercent: "Dividend growth 1Y %",
489
490
  dividendGrowth3YPercent: "Dividend growth 3Y CAGR %",
490
491
  wikiViewsPerDay: "Wikipedia views per day",
@@ -30,7 +30,7 @@ export const estimateRevisionsHeadless: HeadlessPaneDefinition<"bundle"> = {
30
30
  ],
31
31
  discovery: {
32
32
  aliases: ["EM", "GUID", "EEO"],
33
- dataRequirements: ["Free Gloom sign-in", "Gloom Cloud analyst snapshots"],
33
+ dataRequirements: ["Verified Gloom sign-in", "Gloom Cloud analyst snapshots"],
34
34
  limitations: [
35
35
  "Actual collection days and provider backfills remain separate.",
36
36
  "Range dispersion is not standard deviation.",
@@ -104,6 +104,16 @@ function shockLabel(data: ExposurePayload, id: string): string {
104
104
  return shock ? shockText(shock) : id;
105
105
  }
106
106
  /** The scenario as the pane's scenario picker names it, with its one shock when it has one: Taiwan disruption (TW -100%). */
107
+ /**
108
+ * What the analysis says of the whole portfolio, for the footer: the
109
+ * payload's unknowns less each holding's own, which the service repeats there
110
+ * as `AAPL: …` and which that holding's rows (`Estimated 6 gaps`) and detail say.
111
+ */
112
+ export function analysisNotes(data: Pick<ExposurePayload, "unknowns" | "holdings">): string[] {
113
+ const holdings = data.holdings.map((holding) => `${holding.symbol}: `);
114
+ return data.unknowns.filter((note) => !holdings.some((prefix) => note.startsWith(prefix)));
115
+ }
116
+
107
117
  export function scenarioTitle(scenario: ExposureScenario): string {
108
118
  return `${scenario.label}${scenario.shocks.length === 1 ? ` (${shockText(scenario.shocks[0]!)})` : ""}`;
109
119
  }
@@ -21,7 +21,7 @@ import { ExposurePathDiagram, ExposureRanges } from "./charts";
21
21
  import { fetchExposure, fetchScenarios, validateExposure } from "./client";
22
22
  import { ExposureEditor, type ExposureInputs } from "./editor";
23
23
  import { portfolioHoldings, watchlistHoldings } from "./holdings";
24
- import { basisLabel, DEFAULT_SCENARIO, exposureCellText, fraction, hopsText, parseCustomScenario, parseHoldings, pathRows, periodText, portfolioRows, rangeText, tableRows, TABS, type ExposureRow } from "./model";
24
+ import { analysisNotes, basisLabel, DEFAULT_SCENARIO, exposureCellText, fraction, hopsText, parseCustomScenario, parseHoldings, pathRows, periodText, portfolioRows, rangeText, tableRows, TABS, type ExposureRow } from "./model";
25
25
  import { useExposureEvidence } from "./evidence";
26
26
  import { driverRows, driverScope, driverUnits, driverValue } from "./drivers";
27
27
 
@@ -36,6 +36,12 @@ function EvidenceItem({ item }: { item: ExposureEvidence }) {
36
36
  {item.url ? <ActionRow label="Open primary evidence" onPress={() => void host.openExternal(item.url!)} /> : null}
37
37
  </Box>;
38
38
  }
39
+ /** How many things a row's evidence could not see, beside its evidence word (`Estimated 3 gaps`); its detail lists them. */
40
+ function gapsNote(row: ExposureRow): { note?: string } {
41
+ const gaps = new Set(row.unknowns).size;
42
+ return gaps ? { note: `${gaps} gap${gaps === 1 ? "" : "s"}` } : {};
43
+ }
44
+
39
45
  function ExposureDetail({ row, data, width }: { row: ExposureRow | null; data: ExposurePayload; width: number }) {
40
46
  const colors = useThemeColors();
41
47
  const unknowns = row ? row.unknowns : [...data.unknowns, ...data.holdings.flatMap(h => h.unknowns.map(u => `${h.symbol}: ${u}`))];
@@ -181,7 +187,8 @@ export function ExposurePane({ width, height, focused }: PaneProps) {
181
187
  ];
182
188
  usePaneStatusFooter({ registrationId: "exposure", loading: resource.loading, error: inputError ?? (data ? resource.error : null), hints,
183
189
  info: data ? [{ id: "asof", parts: [{ text: `analyzed ${data.evaluatedAt.slice(0, 10)}`, tone: "muted" as const }] }] : [] });
184
- usePaneNoticeFooter({ registrationId: "exposure:notices", focused, notices: [...(library.error ? [library.error] : []), ...(data?.unknowns ?? []), ...(data?.holdings.flatMap(h => h.unknowns.map(u => `${h.symbol}: ${u}`)) ?? [])] });
190
+ // The footer's notes are the analysis's; what one holding's rows could not see is on those rows (gapsNote) and in their detail.
191
+ usePaneNoticeFooter({ registrationId: "exposure:notices", focused, notices: [...(library.error ? [library.error] : []), ...(data ? analysisNotes(data) : [])] });
185
192
  const sources = [{ value: "typed", label: "Typed holdings" }, ...config.portfolios.map(p => ({ value: `PORT:${p.id}`, label: `PORT · ${p.name}` })), ...config.watchlists.map(w => ({ value: `WATCH:${w.id}`, label: `Watchlist · ${w.name}` }))];
186
193
  const bodyHeight = Math.max(3, height - tabRows);
187
194
  const concentration = tab === "portfolio" && view !== "stress";
@@ -222,7 +229,7 @@ export function ExposurePane({ width, height, focused }: PaneProps) {
222
229
  case "basis": return row.basis ? { text: exposureCellText(row, "basis"), color: colors.textDim } : missingCell(colors);
223
230
  case "exposure": return row.exposure ? { text: exposureCellText(row, "exposure"), value: row.exposure.high, color: colors.textBright } : { text: exposureCellText(row, "exposure"), value: null, color: colors.textMuted };
224
231
  // Disclosed figures stand out; estimates read plainly, and the word says which is which.
225
- case "classification": return { text: exposureCellText(row, "classification"),
232
+ case "classification": return { text: exposureCellText(row, "classification"), ...gapsNote(row),
226
233
  color: row.classification === "disclosed" ? colors.borderFocused : unknown ? colors.textMuted : colors.textDim, keepColorWhenSelected: row.classification === "disclosed" };
227
234
  case "impact": return !row.impact ? missingCell(colors) : { text: exposureCellText(row, "impact"), value: row.impact.low,
228
235
  color: row.concentration ? colors.text : row.impact.high < 0 ? colors.negative : row.impact.low > 0 ? colors.positive : colors.text };
@@ -2,7 +2,10 @@ import type { FuturesContractTermsPayload } from "../../../api-client/futures-cu
2
2
  import type { Quote } from "../../../types/financials";
3
3
  import { compareSortValues, type SortDirection } from "../../../utils/sort-values";
4
4
  import type { BoardQuoteMap } from "../shared/use-quote-board";
5
- import { FUTURES_SECTOR_ORDER, futuresBoardCode, futuresGroupFilter, futuresNameKey, type FuturesContract, type FuturesSector } from "../../../market-data/futures-board";
5
+ import {
6
+ FUTURES_BOARD_ROWS, FUTURES_SECTOR_ORDER, futuresBoardCode, futuresBoardContract, futuresGroupFilter, futuresNameKey,
7
+ type FuturesContract, type FuturesSector,
8
+ } from "../../../market-data/futures-board";
6
9
  import { CONTRACT_MONTH_NAME, futuresPriceUnit } from "../../../market-data/futures-contract";
7
10
  import { contractMonthLabel } from "../../../utils/contract-month";
8
11
  import { quoteDotMarketState } from "../../../market-data/market/status";
@@ -165,6 +168,16 @@ function matchesFuturesSearch(contract: FuturesContract, query: string, quote?:
165
168
  );
166
169
  }
167
170
 
171
+ /**
172
+ * The board's contracts a search lists, as the board filters them: the one a
173
+ * code or symbol names (`FUT HG` opens on HG=F), else every contract the text
174
+ * matches (`FUT copper`, `FUT metals`).
175
+ */
176
+ export function futuresSearchContracts(query: string): FuturesContract[] {
177
+ const named = futuresBoardContract(query.trim());
178
+ return named ? [named] : FUTURES_BOARD_ROWS.filter((contract) => matchesFuturesSearch(contract, query));
179
+ }
180
+
168
181
  /**
169
182
  * Why `fn FUT urea` lists nothing, for a search no contract matches: what
170
183
  * to type instead, never the board's own Clear search button.
@@ -2,13 +2,6 @@ import type { SeriesDefinition } from "../../../series/types";
2
2
  import { FUTURES_CONTRACTS, FUTURES_SECTOR_LABELS, futuresGroupTags, type FuturesContract } from "../../../market-data/futures-board";
3
3
  import { futuresContractCode } from "../../../utils/futures-generic";
4
4
 
5
- /**
6
- * Grains and softs the board quotes in US cents with no unit of its own
7
- * (soybean meal and cocoa quote in dollars). Checked against the server's
8
- * contract terms on 2026-10-13.
9
- */
10
- const US_CENT_CONTRACTS: ReadonlySet<string> = new Set(["ZC", "ZS", "ZL", "ZW", "KE", "KC", "SB", "CT"]);
11
-
12
5
  /**
13
6
  * The unit the board prints, not a blanket dollar price. Index and sector
14
7
  * futures are points, rates are points (the board prints decimals, not 32nds), cents
@@ -16,7 +9,7 @@ const US_CENT_CONTRACTS: ReadonlySet<string> = new Set(["ZC", "ZS", "ZL", "ZW",
16
9
  * futures are dollars per unit of the foreign currency.
17
10
  */
18
11
  function futuresSeriesUnit(contract: FuturesContract): string {
19
- if (contract.unit?.startsWith("US cents") || US_CENT_CONTRACTS.has(contract.code)) return "USX";
12
+ if (contract.unit?.startsWith("US cents")) return "USX";
20
13
  if (contract.unit?.startsWith("EUR")) return "EUR";
21
14
  if (contract.unit?.startsWith("USD")) return "USD";
22
15
  if (contract.sector === "equity-index" || contract.sector === "equity-sectors" || contract.sector === "rates") return "points";