@gloom-sh/terminal 0.20.10 → 0.20.12

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 (324) hide show
  1. package/package.json +2 -1
  2. package/patches/@opentui%2Fcore@0.3.2.patch +16 -0
  3. package/src/api-client/awards.ts +16 -0
  4. package/src/api-client/central-bank-rates.ts +5 -0
  5. package/src/api-client/data.ts +55 -2
  6. package/src/api-client/index.ts +18 -1
  7. package/src/api-client/request.ts +86 -3
  8. package/src/api-client/socket-connection.ts +366 -0
  9. package/src/api-client/socket-features.ts +75 -0
  10. package/src/api-client/socket-frames.ts +161 -0
  11. package/src/api-client/socket-listeners.ts +207 -0
  12. package/src/api-client/socket-quotes.ts +332 -0
  13. package/src/api-client/socket.ts +168 -983
  14. package/src/api-client/supply-chain-graph.ts +4 -2
  15. package/src/api-client/supply-chain.ts +8 -0
  16. package/src/api-client/types/econ.ts +10 -7
  17. package/src/api-client/types/filings-and-calls.ts +8 -0
  18. package/src/app/global-shortcuts.ts +2 -1
  19. package/src/app/keybindings/actions.ts +19 -0
  20. package/src/app/pane-runtime/index.tsx +18 -3
  21. package/src/app/pane-runtime/layout-placement.ts +63 -0
  22. package/src/app/pane-runtime/ticker-open-runtime.ts +10 -2
  23. package/src/brokers/signed-in/adapter.ts +19 -5
  24. package/src/brokers/signed-in/client.ts +13 -1
  25. package/src/brokers/signed-in/sign-in-dialog.tsx +33 -9
  26. package/src/capabilities/chart-series.ts +4 -1
  27. package/src/cli/board-coins.ts +10 -1
  28. package/src/cli/commands/crypto-hints.ts +3 -2
  29. package/src/cli/commands/fred-series.ts +0 -54
  30. package/src/cli/commands/market.ts +209 -31
  31. package/src/cli/commands/overview.ts +47 -14
  32. package/src/cli/commands/search.ts +37 -8
  33. package/src/cli/commands/ticker.ts +15 -4
  34. package/src/cli/desktop-pane-shot.ts +27 -2
  35. package/src/cli/fx-quote-rate.ts +1 -1
  36. package/src/cli/glossary.ts +14 -5
  37. package/src/cli/history-catalog-series.ts +85 -0
  38. package/src/cli/index.ts +1 -1
  39. package/src/cli/list-progress.ts +45 -0
  40. package/src/cli/listing-arg.ts +71 -7
  41. package/src/cli/name-entries.ts +8 -4
  42. package/src/cli/not-a-ticker.ts +2 -2
  43. package/src/cli/pane-functions/freshness.ts +50 -3
  44. package/src/cli/pane-functions/index.ts +7 -4
  45. package/src/cli/pane-functions/market-session.ts +66 -14
  46. package/src/cli/pane-functions/options.ts +5 -0
  47. package/src/cli/pane-functions/resolver.ts +9 -2
  48. package/src/cli/pane-functions/screenshot-assessment.ts +28 -3
  49. package/src/cli/pane-functions/screenshot-types.ts +6 -0
  50. package/src/cli/quote-answer.ts +49 -10
  51. package/src/cli/quote-list-reads.ts +87 -0
  52. package/src/cli/report-tables.ts +70 -13
  53. package/src/cli/result.ts +24 -2
  54. package/src/cli/symbol-list.ts +31 -4
  55. package/src/cli/terminal-code-hints.ts +83 -0
  56. package/src/cli/ticker-resolution.ts +2 -1
  57. package/src/cli/treasury-yields.ts +5 -0
  58. package/src/components/chart/native/kitty/manager.ts +2 -0
  59. package/src/components/chart/native/surface/manager.ts +211 -11
  60. package/src/components/command-bar/action-runtime.ts +2 -0
  61. package/src/components/command-bar/panel/index.tsx +2 -13
  62. package/src/components/command-bar/panel/layout.ts +1 -7
  63. package/src/components/command-bar/panel/runtime.ts +0 -1
  64. package/src/components/command-bar/panel/types.ts +0 -2
  65. package/src/components/command-bar/routing/launch-request.ts +2 -1
  66. package/src/components/command-bar/routing/navigation-state.ts +4 -2
  67. package/src/components/command-bar/workflow/types.ts +6 -0
  68. package/src/components/data-table/column-menu.tsx +89 -0
  69. package/src/components/data-table/sort-menu.tsx +9 -2
  70. package/src/components/data-table/view.tsx +33 -6
  71. package/src/components/form-modal/content.tsx +10 -0
  72. package/src/components/index.ts +1 -1
  73. package/src/components/layout/detached-pane-shell.tsx +3 -0
  74. package/src/components/layout/double-escape-close.ts +34 -3
  75. package/src/components/layout/floating-pane.tsx +10 -4
  76. package/src/components/layout/pane/cycle-order.ts +66 -2
  77. package/src/components/layout/pane/footer/index.tsx +25 -11
  78. package/src/components/layout/pane/footer/model.ts +62 -20
  79. package/src/components/layout/pane/header.tsx +140 -31
  80. package/src/components/layout/pane/sidebar.tsx +138 -20
  81. package/src/components/layout/pane/status-footer.ts +3 -1
  82. package/src/components/layout/shell/active-drag.ts +18 -13
  83. package/src/components/layout/shell/drag/magnets.ts +34 -18
  84. package/src/components/layout/shell/drag/runtime.ts +5 -0
  85. package/src/components/layout/shell/index.tsx +25 -0
  86. package/src/components/layout/shell/menu.ts +9 -0
  87. package/src/components/layout/shell/pane/actions.ts +36 -0
  88. package/src/components/layout/shell/pane/management-shortcuts.ts +27 -3
  89. package/src/components/layout/shell/pane-occlusion.ts +40 -0
  90. package/src/components/layout/shell/shortcuts.ts +17 -1
  91. package/src/components/layout/shell/terminal-pointer-runtime.ts +39 -6
  92. package/src/components/layout/shell/window-mode/index.ts +5 -16
  93. package/src/components/layout/shell/window-mode/overlays.tsx +3 -1
  94. package/src/components/market-board/index.tsx +14 -5
  95. package/src/components/metric-treemap/index.tsx +3 -1
  96. package/src/components/ticker/list-table-view.tsx +5 -0
  97. package/src/components/ui/button.tsx +48 -4
  98. package/src/components/ui/data-table/column-order.ts +180 -0
  99. package/src/components/ui/data-table/index.tsx +12 -1
  100. package/src/components/ui/data-table/opentui/index.tsx +291 -32
  101. package/src/components/ui/data-table/opentui/model.ts +43 -4
  102. package/src/components/ui/data-table/types.ts +56 -0
  103. package/src/components/ui/data-table/use-column-order.ts +135 -0
  104. package/src/components/ui/index.ts +1 -1
  105. package/src/components/ui/inline-quick-add.tsx +19 -3
  106. package/src/components/ui/list-view.tsx +11 -5
  107. package/src/components/ui/query-bar.tsx +16 -1
  108. package/src/components/ui/selection-fill.ts +39 -0
  109. package/src/components/ui/table-layout.ts +120 -0
  110. package/src/core/state/app/layout-reducer.ts +2 -1
  111. package/src/core/state/app/pane-choices.ts +68 -0
  112. package/src/core/state/app/state.ts +14 -6
  113. package/src/core/state/app/types.ts +8 -0
  114. package/src/docs/snapshot.json +3 -2
  115. package/src/i18n/es.ts +2 -0
  116. package/src/i18n/ja.ts +2 -0
  117. package/src/i18n/ko.ts +2 -0
  118. package/src/i18n/zh-cn.ts +2 -0
  119. package/src/i18n/zh-tw.ts +2 -0
  120. package/src/layout/pane-manager/dock-tree.ts +19 -0
  121. package/src/layout/pane-manager/index.ts +3 -0
  122. package/src/market-data/coordinator/index.ts +4 -3
  123. package/src/market-data/coordinator/quotes.ts +12 -4
  124. package/src/market-data/market/freshness.ts +33 -0
  125. package/src/market-data/market/status.ts +5 -1
  126. package/src/market-data/quotes/contributions.ts +10 -0
  127. package/src/market-data/quotes/freshness.ts +31 -0
  128. package/src/market-data/quotes/live-valuation.ts +32 -5
  129. package/src/market-data/quotes/regular-session-valuation.ts +1 -1
  130. package/src/market-data/quotes/resolution.ts +4 -0
  131. package/src/market-data/quotes/time.ts +0 -14
  132. package/src/plugins/builtin/account-management/index.tsx +1 -0
  133. package/src/plugins/builtin/awards/detail.tsx +12 -4
  134. package/src/plugins/builtin/awards/headless.ts +29 -8
  135. package/src/plugins/builtin/awards/model.ts +36 -2
  136. package/src/plugins/builtin/awards/pane.tsx +7 -4
  137. package/src/plugins/builtin/broker-manager/detail.tsx +5 -3
  138. package/src/plugins/builtin/broker-manager/index.tsx +7 -6
  139. package/src/plugins/builtin/broker-manager/model.ts +15 -6
  140. package/src/plugins/builtin/broker-manager/pane-actions.tsx +11 -4
  141. package/src/plugins/builtin/broker-manager/sign-in-end.ts +50 -19
  142. package/src/plugins/builtin/broker-manager/table.ts +10 -4
  143. package/src/plugins/builtin/broker-trading/index.tsx +1 -1
  144. package/src/plugins/builtin/central-bank-rates/headless.ts +6 -6
  145. package/src/plugins/builtin/central-bank-rates/index.tsx +1 -1
  146. package/src/plugins/builtin/central-bank-rates/model.ts +21 -3
  147. package/src/plugins/builtin/central-bank-rates/pane.tsx +15 -5
  148. package/src/plugins/builtin/chart-composer/headless.ts +5 -1
  149. package/src/plugins/builtin/chart-composer/pane.tsx +1 -0
  150. package/src/plugins/builtin/chat/content/handle-prompt.tsx +4 -0
  151. package/src/plugins/builtin/chat/controller/realtime.ts +17 -1
  152. package/src/plugins/builtin/chat/message/terminal.tsx +4 -1
  153. package/src/plugins/builtin/chat/sidebar.tsx +35 -19
  154. package/src/plugins/builtin/cloud/askg/pane.tsx +4 -0
  155. package/src/plugins/builtin/cloud/askg/tool-timeline.tsx +2 -0
  156. package/src/plugins/builtin/cloud/plugin.tsx +1 -0
  157. package/src/plugins/builtin/cloud/team/module.tsx +1 -0
  158. package/src/plugins/builtin/cloud/thesis/detail.tsx +9 -4
  159. package/src/plugins/builtin/commodity-balances/pane.tsx +13 -5
  160. package/src/plugins/builtin/company-kpis/model.ts +3 -3
  161. package/src/plugins/builtin/connections/index.ts +1 -0
  162. package/src/plugins/builtin/credit-boards/cdx-pane.tsx +9 -5
  163. package/src/plugins/builtin/credit-boards/client.ts +5 -0
  164. package/src/plugins/builtin/credit-boards/headless.ts +1 -6
  165. package/src/plugins/builtin/credit-boards/model.ts +0 -6
  166. package/src/plugins/builtin/credit-boards/series.ts +19 -8
  167. package/src/plugins/builtin/credit-boards/sovr-pane.tsx +9 -5
  168. package/src/plugins/builtin/crypto-etf-flows/headless.ts +23 -13
  169. package/src/plugins/builtin/crypto-etf-flows/pane.tsx +8 -3
  170. package/src/plugins/builtin/debt-maturities/headless.ts +16 -7
  171. package/src/plugins/builtin/debt-maturities/model.ts +9 -15
  172. package/src/plugins/builtin/debt-maturities/pane.tsx +9 -10
  173. package/src/plugins/builtin/earnings/board-model.ts +33 -4
  174. package/src/plugins/builtin/earnings/board.tsx +15 -3
  175. package/src/plugins/builtin/earnings/calendar.tsx +10 -6
  176. package/src/plugins/builtin/earnings/client.ts +0 -9
  177. package/src/plugins/builtin/earnings/headless.ts +10 -7
  178. package/src/plugins/builtin/earnings/history.tsx +21 -14
  179. package/src/plugins/builtin/earnings-calls/data.ts +24 -4
  180. package/src/plugins/builtin/earnings-calls/format.ts +23 -5
  181. package/src/plugins/builtin/earnings-calls/headless.ts +23 -3
  182. package/src/plugins/builtin/earnings-calls/index.tsx +1 -0
  183. package/src/plugins/builtin/earnings-calls/model.ts +11 -1
  184. package/src/plugins/builtin/earnings-calls/pane.tsx +2 -5
  185. package/src/plugins/builtin/econ/calendar-model.ts +27 -0
  186. package/src/plugins/builtin/econ/fred-catalog.ts +3 -0
  187. package/src/plugins/builtin/econ/index.tsx +9 -2
  188. package/src/plugins/builtin/econ-statistics/headless.ts +3 -1
  189. package/src/plugins/builtin/econ-statistics/index.tsx +1 -1
  190. package/src/plugins/builtin/equity-screener/live.ts +74 -18
  191. package/src/plugins/builtin/equity-screener/model.ts +19 -4
  192. package/src/plugins/builtin/equity-screener/pane.tsx +19 -14
  193. package/src/plugins/builtin/equity-screener/refresh-anchor.ts +45 -0
  194. package/src/plugins/builtin/equity-screener/results.ts +22 -2
  195. package/src/plugins/builtin/equity-screener/screen-check.ts +9 -3
  196. package/src/plugins/builtin/fear-greed/headless.ts +16 -13
  197. package/src/plugins/builtin/fear-greed/pane.tsx +12 -4
  198. package/src/plugins/builtin/filing-events/index.tsx +1 -0
  199. package/src/plugins/builtin/futures/index.tsx +15 -1
  200. package/src/plugins/builtin/futures/table.tsx +1 -1
  201. package/src/plugins/builtin/fx-matrix/index.tsx +32 -19
  202. package/src/plugins/builtin/holders/pane.tsx +30 -20
  203. package/src/plugins/builtin/insider/table.tsx +10 -7
  204. package/src/plugins/builtin/insider/tickers.tsx +1 -1
  205. package/src/plugins/builtin/iv-history/events.ts +5 -0
  206. package/src/plugins/builtin/iv-history/headless.ts +15 -9
  207. package/src/plugins/builtin/jobs/index.tsx +1 -0
  208. package/src/plugins/builtin/kelly-sizer/sections.tsx +2 -0
  209. package/src/plugins/builtin/macro-day/headless.ts +15 -6
  210. package/src/plugins/builtin/macro-day/model.ts +1 -1
  211. package/src/plugins/builtin/macro-day/releases.ts +25 -16
  212. package/src/plugins/builtin/market-movers/index.tsx +20 -8
  213. package/src/plugins/builtin/market-movers/model.ts +5 -0
  214. package/src/plugins/builtin/market-movers/session-body.tsx +2 -1
  215. package/src/plugins/builtin/money-markets/headless.ts +12 -2
  216. package/src/plugins/builtin/money-markets/pane.tsx +10 -1
  217. package/src/plugins/builtin/options/view.tsx +3 -0
  218. package/src/plugins/builtin/options-positioning/pane.tsx +1 -1
  219. package/src/plugins/builtin/options-scenario/pane.tsx +2 -1
  220. package/src/plugins/builtin/perps/cascade-tabs.tsx +2 -1
  221. package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +4 -31
  222. package/src/plugins/builtin/portfolio-list/pane/index.tsx +19 -1
  223. package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +22 -8
  224. package/src/plugins/builtin/portfolio-list/summary/index.tsx +6 -8
  225. package/src/plugins/builtin/portfolio-list/table.tsx +15 -1
  226. package/src/plugins/builtin/rate-path/pane.tsx +2 -0
  227. package/src/plugins/builtin/realized-vol/headless.ts +28 -2
  228. package/src/plugins/builtin/revenue-breakdown/pane.tsx +2 -0
  229. package/src/plugins/builtin/reverse-dcf/pane.tsx +2 -1
  230. package/src/plugins/builtin/risk-factors/index.tsx +1 -0
  231. package/src/plugins/builtin/seasonality/pane.tsx +2 -1
  232. package/src/plugins/builtin/shared/source-footer.ts +70 -0
  233. package/src/plugins/builtin/short-interest/publications-pane.tsx +5 -1
  234. package/src/plugins/builtin/short-volume/pane.tsx +5 -1
  235. package/src/plugins/builtin/social-mentions/outliers.tsx +10 -1
  236. package/src/plugins/builtin/social-mentions/pane.tsx +7 -0
  237. package/src/plugins/builtin/supply-chain/client.ts +3 -1
  238. package/src/plugins/builtin/supply-chain/flow.tsx +25 -8
  239. package/src/plugins/builtin/supply-chain/graph-client.ts +1 -1
  240. package/src/plugins/builtin/supply-chain/graph-evidence.ts +1 -1
  241. package/src/plugins/builtin/supply-chain/graph-model.ts +12 -1
  242. package/src/plugins/builtin/supply-chain/graph-pane.tsx +9 -8
  243. package/src/plugins/builtin/supply-chain/graph.tsx +12 -6
  244. package/src/plugins/builtin/supply-chain/headless.ts +13 -7
  245. package/src/plugins/builtin/supply-chain/model.ts +68 -11
  246. package/src/plugins/builtin/supply-chain/pane.tsx +9 -6
  247. package/src/plugins/builtin/supply-chain/row-evidence.tsx +5 -5
  248. package/src/plugins/builtin/thirteenf/pane.tsx +2 -0
  249. package/src/plugins/builtin/ticker-detail/financials/model.ts +28 -6
  250. package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +26 -9
  251. package/src/plugins/builtin/ticker-detail/financials/tab.tsx +58 -35
  252. package/src/plugins/builtin/ticker-detail/overview/components.tsx +14 -1
  253. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +2 -0
  254. package/src/plugins/builtin/ticker-detail/pane.tsx +48 -24
  255. package/src/plugins/builtin/ticker-detail/quote-footer.ts +5 -0
  256. package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +6 -3
  257. package/src/plugins/builtin/treasury-auctions/after.ts +50 -23
  258. package/src/plugins/builtin/treasury-auctions/cache.ts +23 -5
  259. package/src/plugins/builtin/treasury-auctions/headless.ts +226 -37
  260. package/src/plugins/builtin/treasury-auctions/hk-headless.ts +11 -5
  261. package/src/plugins/builtin/treasury-auctions/hk-view.tsx +27 -25
  262. package/src/plugins/builtin/treasury-auctions/hk.ts +60 -8
  263. package/src/plugins/builtin/treasury-auctions/index.tsx +3 -0
  264. package/src/plugins/builtin/treasury-auctions/keys.ts +27 -0
  265. package/src/plugins/builtin/treasury-auctions/like.ts +137 -0
  266. package/src/plugins/builtin/treasury-auctions/model.ts +100 -22
  267. package/src/plugins/builtin/treasury-auctions/pane.tsx +39 -11
  268. package/src/plugins/builtin/vol-surface/heat-grid.tsx +6 -3
  269. package/src/plugins/builtin/vol-surface/pane.tsx +7 -3
  270. package/src/plugins/builtin/world-indices/index.tsx +5 -1
  271. package/src/plugins/builtin/yield-curve/index.tsx +2 -1
  272. package/src/plugins/runtime/index.tsx +1 -0
  273. package/src/plugins/runtime/state.ts +20 -0
  274. package/src/portfolio/column-values.ts +8 -2
  275. package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
  276. package/src/public/react.ts +7 -0
  277. package/src/react/auto-refresh.ts +29 -0
  278. package/src/renderers/browser/deeplink-bridge.ts +24 -3
  279. package/src/renderers/dom/data-table/column-drag.ts +147 -0
  280. package/src/renderers/dom/data-table/index.tsx +22 -0
  281. package/src/renderers/dom/data-table/row.tsx +27 -5
  282. package/src/renderers/dom/desktop/query-bar.tsx +229 -60
  283. package/src/renderers/dom/host/overflow-fade-px.ts +2 -0
  284. package/src/renderers/dom/host/overflow-fade.ts +1 -2
  285. package/src/renderers/dom/styles.css +47 -5
  286. package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -1
  287. package/src/renderers/opentui/chart-surface.tsx +1 -0
  288. package/src/renderers/opentui/frame-hits.ts +33 -0
  289. package/src/renderers/opentui/host.tsx +2 -0
  290. package/src/renderers/opentui/native-surface.ts +14 -21
  291. package/src/renderers/opentui/test-utils.tsx +3 -0
  292. package/src/series/types.ts +2 -0
  293. package/src/sources/gloomberb-cloud/fred-attribution.ts +86 -0
  294. package/src/sources/gloomberb-cloud/index.ts +25 -1
  295. package/src/sources/gloomberb-cloud/normalizers.ts +22 -3
  296. package/src/sources/provider-errors.ts +64 -1
  297. package/src/sources/provider-router/batches.ts +19 -0
  298. package/src/sources/provider-router/index.ts +7 -1
  299. package/src/state/app/context/index.tsx +46 -1
  300. package/src/state/pane-unsent-work.ts +47 -0
  301. package/src/test-support/app-store.ts +24 -1
  302. package/src/test-support/shell-pane-keys.tsx +5 -0
  303. package/src/test-support/telemetry-guard.ts +83 -0
  304. package/src/test-support/test-env.ts +12 -0
  305. package/src/theme/colors.ts +17 -1
  306. package/src/theme/ui-tokens.ts +50 -1
  307. package/src/tickers/listing-venues.ts +11 -1
  308. package/src/tickers/search/japanese-names.json +1 -0
  309. package/src/tickers/search/japanese-names.ts +152 -0
  310. package/src/tickers/terminal-codes.ts +55 -6
  311. package/src/time-series/base-series.ts +3 -0
  312. package/src/time-series/live-quotes.ts +3 -9
  313. package/src/types/data-provider.ts +6 -0
  314. package/src/types/financials.ts +11 -0
  315. package/src/types/plugin-contributions.ts +7 -0
  316. package/src/types/plugin-panes.ts +7 -0
  317. package/src/ui/host.tsx +24 -0
  318. package/src/ui/pointer-drag.ts +11 -2
  319. package/src/utils/double-escape-close.ts +42 -0
  320. package/src/utils/fundamentals.ts +14 -3
  321. package/src/utils/fx-status.ts +30 -7
  322. package/src/utils/network-failure.ts +23 -0
  323. package/src/utils/share-multiples.cases.json +780 -2
  324. package/src/utils/share-multiples.ts +154 -24
@@ -7,7 +7,7 @@ import { HV_WINDOWS, type HvWindow, type IvLookback, type IvStatRow, projectIvHi
7
7
  import { vcaUniverse } from "./universe";
8
8
  import { offsetText, releaseOffsetRows } from "./events";
9
9
  import { loadMacroReleases } from "../macro-day/client";
10
- import { IV_EVENT_KINDS, MACRO_EVENT_LABELS, MACRO_RELEASE_SOURCES, staleMacroReleasesNotice, type MacroEventKind, type MacroRelease,
10
+ import { IV_EVENT_KINDS, MACRO_EVENT_LABELS, MACRO_RELEASE_SOURCES, POLICY_DECISION_KINDS, staleMacroReleasesNotice, type MacroEventKind, type MacroRelease,
11
11
  type MacroReleaseList } from "../macro-day/releases";
12
12
  import { lookupScheduledDates } from "../alerts/scheduled";
13
13
  import { fetchCpiBoard } from "../cpi/client";
@@ -38,7 +38,7 @@ export const ivHistoryHeadless: HeadlessPaneDefinition<"bundle"> = {
38
38
  { key: "lookback", type: "enum", values: [{ value: "1Y" }, { value: "2Y" }, { value: "ALL" }], defaultValue: "1Y", description: "Visible history" },
39
39
  { key: "hvWindow", type: "enum", values: HV_WINDOWS.map((window) => ({ value: String(window) })), defaultValue: "20", description: "Realized volatility window in sessions" },
40
40
  { key: "event", type: "enum", aliases: ["release"], values: IV_EVENT_KINDS.map((value) => ({ value, ...value === "jobs" ? { aliases: ["nfp", "payrolls"] } : {} })),
41
- description: "One row per release of this kind whose session at --offset has closed (the next scheduled FOMC, CPI or ECB decision included), in place of the daily history",
41
+ description: "One row per release of this kind whose session at --offset has closed (the next scheduled FOMC, CPI, ECB or BoJ decision included), in place of the daily history",
42
42
  example: "--event fomc --offset -6", shot: { reportOnly: "lists the readings around past release days" } },
43
43
  { key: "offset", type: "integer", minimum: -60, maximum: 60, defaultValue: 0,
44
44
  description: "Sessions from each release with --event: 0 is the first session on or after the release day, -6 the sixth session before that",
@@ -47,7 +47,7 @@ export const ivHistoryHeadless: HeadlessPaneDefinition<"bundle"> = {
47
47
  async load(args, ctx) {
48
48
  const event = typeof args.options.event === "string" && args.options.event ? args.options.event as MacroEventKind : null;
49
49
  const offset = Number(args.options.offset) || 0;
50
- if (!event && offset !== 0) throw new Error("--offset counts sessions from a release day: add --event fomc, cpi, jobs or ecb.");
50
+ if (!event && offset !== 0) throw new Error("--offset counts sessions from a release day: add --event fomc, cpi, jobs, ecb or boj.");
51
51
  const instrument = await resolveHeadlessInstrument(ctx, args.symbols[0]!);
52
52
  // What became of the symbol, as `quote` reads it, looked up beside the figures: FB's are the fund listed
53
53
  // there now, TWTR stopped trading, and HFC, which became DINO, has none of its own.
@@ -102,15 +102,20 @@ export const ivHistoryHeadless: HeadlessPaneDefinition<"bundle"> = {
102
102
  releases.upcomingNote,
103
103
  staleMacroReleasesNotice(releases.list),
104
104
  ].filter((note): note is string => !!note);
105
- const eventColumns = [{ key: "releaseDate", header: "Release date" }, { key: "session", header: "Session" },
105
+ // A policy decision's row says what it did (ECB raised 75bp to 0.75%), as MDAY's does; the export keeps the rate before too.
106
+ const decisionColumns = POLICY_DECISION_KINDS.has(event)
107
+ ? [{ key: "decision", header: "Decision" }, { key: "actual", header: "Actual" }, { key: "prior", header: "Prior" }] : [];
108
+ const eventColumns = [{ key: "releaseDate", header: "Release date" }, ...decisionColumns, { key: "session", header: "Session" },
106
109
  ...historyColumns.slice(1), ...skewColumns];
110
+ const decided = offsets.rows.some((row) => row.decision != null);
111
+ const textColumns = eventColumns.filter((column) => decided ? column.key !== "prior" : !decisionColumns.includes(column));
107
112
  return {
108
113
  sections: [{
109
114
  title: `${label} releases, ${offsetText(offset)}`,
110
115
  // The export names the release and the offset on every row, so files of several offsets or releases join.
111
116
  columns: [{ key: "release", header: "Release" }, eventColumns[0]!, { key: "offset", header: "Offset (sessions)" }, ...eventColumns.slice(1)],
112
117
  rows: offsets.rows.map(({ date, ...row }) => ({ ...row, session: date, release: label })),
113
- textColumns: offsets.rows.some((row) => row.skew25d != null) ? eventColumns : eventColumns.slice(0, -skewColumns.length),
118
+ textColumns: offsets.rows.some((row) => row.skew25d != null) ? textColumns : textColumns.slice(0, -skewColumns.length),
114
119
  }],
115
120
  complete: payload.status === "ready" && errors.length === 0,
116
121
  unavailableSymbols: offsets.rows.some((row) => row.iv30 != null) ? [] : [instrument.symbol], errors,
@@ -237,8 +242,8 @@ export const ivScreenHeadless: HeadlessPaneDefinition<"bundle"> = {
237
242
  * The releases of `event` HIVG reads around: the days MDAY studies (the list
238
243
  * the app ships with, extended by Gloom Cloud's), and the next one scheduled,
239
244
  * from the CPI board's release calendar or the FOMC meetings WIRP prices, as
240
- * scheduled alerts read them, or the ECB's next decision as Gloom Cloud lists
241
- * it with its decision days. Payrolls have no schedule to read.
245
+ * scheduled alerts read them, or the ECB's or BoJ's next decision as Gloom
246
+ * Cloud lists it with its decision days. Payrolls have no schedule to read.
242
247
  */
243
248
  async function eventReleases(event: MacroEventKind, ctx: HeadlessPaneContext): Promise<{
244
249
  list: MacroReleaseList; upcoming: string | null; upcomingNote: string | null;
@@ -252,13 +257,14 @@ async function eventReleases(event: MacroEventKind, ctx: HeadlessPaneContext): P
252
257
  fomc: async () => (await fetchRatePath(ctx.apiClient)).meetings,
253
258
  }, zonedDateKey(Date.now(), "America/New_York")).then((dates) => dates.get(`macro:${event}`) ?? { date: null }),
254
259
  ]);
255
- const upcoming = event === "ecb" ? published.scheduled?.ecb ?? null : next && "date" in next ? next.date : null;
260
+ const served = event === "ecb" || event === "boj";
261
+ const upcoming = served ? published.scheduled?.[event] ?? null : next && "date" in next ? next.date : null;
256
262
  const listed = upcoming != null && published.releases.some((release) => release.kind === event && release.date === upcoming);
257
263
  const releases: MacroRelease[] = upcoming && !listed ? [...published.releases, { kind: event, date: upcoming }] : published.releases;
258
264
  return {
259
265
  list: { ...published, releases },
260
266
  upcoming,
261
- upcomingNote: event === "ecb" ? upcoming ? null : `The next ${label} decision is not scheduled here, so it has no row yet.`
267
+ upcomingNote: served ? upcoming ? null : `The next ${label} decision is not scheduled here, so it has no row yet.`
262
268
  : next == null ? `The next ${label} release is not scheduled here, so it has no row yet.`
263
269
  : "error" in next ? `The next ${label} date could not be loaded (${next.error}), so it has no row.` : null,
264
270
  };
@@ -24,6 +24,7 @@ export const jobsModule: PluginModule = {
24
24
  order: 37,
25
25
  component: JobsResearchTab,
26
26
  instruments: ["equity"],
27
+ proOnly: true,
27
28
  });
28
29
  },
29
30
 
@@ -204,6 +204,8 @@ export function KellySensitivitySection({
204
204
  return (
205
205
  <DataTableView<SensitivityRow>
206
206
  columns={columns}
207
+ // Prices or returns in order: a sensitivity grid's axis.
208
+ columnReorder={false}
207
209
  items={rows}
208
210
  getItemKey={(row) => row.id}
209
211
  selection={{ kind: "none" }}
@@ -24,8 +24,8 @@ export const macroDayHeadless: HeadlessPaneDefinition<"bundle"> = {
24
24
  describe: (args) => `MDAY ${args.symbols[0] ?? ""}`,
25
25
  discovery: { screenshotReadiness: "live-dom", limitations: [
26
26
  "US listings, or a FRED series (FRED:T10Y2Y, whose moves in a rate or spread read in bp); close-to-close on the release day.",
27
- "Published CPI, jobs and FOMC days, and from Gloom Cloud Brazil's IPCA days and the ECB's decision days (every Governing Council monetary policy meeting); sessions after the list's last covered day (releasesThrough) are left out.",
28
- "Actual, forecast and prior for the days Gloom Cloud has them (the US headlines from its kept economic calendar, under either feed's title; an FOMC day's are the federal funds target range and whether it held or moved, an ECB day's the deposit facility rate; IPCA from the central bank's SGS series); --surprise keeps the days that came in hot, cool or in line with the forecast.",
27
+ "Published CPI, jobs and FOMC days, and from Gloom Cloud Brazil's IPCA days, the ECB's decision days (every Governing Council monetary policy meeting) and the BoJ's (each monetary policy meeting's Tokyo day, from 2026); sessions after the list's last covered day (releasesThrough) are left out.",
28
+ "Actual, forecast and prior for the days Gloom Cloud has them (the US headlines from its kept economic calendar, under either feed's title; an FOMC day's are the federal funds target range and whether it held or moved, an ECB day's the deposit facility rate, a BoJ day's its policy rate; IPCA from the central bank's SGS series); --surprise keeps the days that came in hot, cool or in line with the forecast.",
29
29
  "A CPI day the calendar lists without its year-on-year actual takes one computed from the CPI index against a year earlier, labelled computed.",
30
30
  "A release day without figures says why: before the kept calendar starts, or listed without them.",
31
31
  "A release day that is also the reaction session of the company's own earnings report is marked earnings and left out of the release averages and the normal day.",
@@ -66,15 +66,24 @@ export const macroDayHeadless: HeadlessPaneDefinition<"bundle"> = {
66
66
  // The days the filter keeps get a row of their own: how the name moved on hot CPI days.
67
67
  const selected = surprise === "all" ? [] : [row(`${MACRO_SURPRISE_LABELS[surprise]} ${release === "all" ? "release"
68
68
  : MACRO_EVENT_LABELS[release as MacroEventKind]}`, macroDayStats(events, model.normal.meanAbs))];
69
- // A day without figures says why: before the kept calendar (one note for them all), or the calendar's own gap.
69
+ // A day without figures says why: before the kept calendar (one note for them all), or the calendar's own gap. An ECB
70
+ // decision before it has its rates (Gloom Cloud reads them off the deposit rate series) and lacks only the forecast.
70
71
  const figuresFrom = releases.figuresFrom;
71
- const beforeCalendar = (event: MacroDayEvent) => !!figuresFrom && event.kind !== "ipca" && !event.figures && event.date < figuresFrom;
72
- // A release Gloom Cloud alone lists (IPCA, the ECB) is summed up on its own: "Any release" is then the US ones'.
72
+ const predates = (event: MacroDayEvent) => !!figuresFrom && event.kind !== "ipca" && event.date < figuresFrom;
73
+ const beforeCalendar = (event: MacroDayEvent) => predates(event) && !event.figures;
74
+ const noForecast = (event: MacroDayEvent) => predates(event) && !!event.figures && event.figures.forecast == null;
75
+ /** "CPI and Jobs days": the kinds of the listed days `pick` takes, in the order the summary lists them. */
76
+ const daysOf = (pick: (event: MacroDayEvent) => boolean) => {
77
+ const labels = model.kinds.filter((kind) => events.some((event) => event.kind === kind && pick(event))).map((kind) => MACRO_EVENT_LABELS[kind]);
78
+ return `${labels.length > 1 ? `${labels.slice(0, -1).join(", ")} and ${labels.at(-1)}` : labels[0]} days`;
79
+ };
80
+ // A release Gloom Cloud alone lists (IPCA, the ECB, the BoJ) is summed up on its own: "Any release" is then the US ones'.
73
81
  const usOnly = model.kinds.some((kind) => !US_MACRO_EVENT_KINDS.includes(kind as (typeof US_MACRO_EVENT_KINDS)[number]));
74
82
  const missing = (event: MacroDayEvent) => event.figures ? null : event.figuresMissing
75
83
  ?? (beforeCalendar(event) ? `before ${figuresFrom}, when Gloom Cloud's economic calendar starts` : null);
76
84
  const figureNotes = [
77
- ...(events.some(beforeCalendar) ? [`Release days before ${figuresFrom} have no actual, forecast or prior: Gloom Cloud's economic calendar starts then.`] : []),
85
+ ...(events.some(beforeCalendar) ? [`${daysOf(beforeCalendar)} before ${figuresFrom} have no actual, forecast or prior: Gloom Cloud's economic calendar starts then.`] : []),
86
+ ...(events.some(noForecast) ? [`Forecasts start ${figuresFrom}, with Gloom Cloud's economic calendar: ${daysOf(noForecast)} before it have an actual and prior, no forecast or surprise.`] : []),
78
87
  ...macroFigureGapNotices(events),
79
88
  ];
80
89
  return {
@@ -213,7 +213,7 @@ export function projectMacroDays(history: readonly PricePoint[], options: {
213
213
  const last = sessions.at(-1) ?? null;
214
214
  const empty = (): MacroDayStats => stats([], null);
215
215
  const kinds = MACRO_EVENT_KINDS.filter((kind) => US_KINDS.has(kind) || options.releases.some((release) => release.kind === kind));
216
- if (!last) return { symbol: options.symbol, basis, events: [], kinds, byKind: { cpi: empty(), jobs: empty(), fomc: empty(), ipca: empty(), ecb: empty() },
216
+ if (!last) return { symbol: options.symbol, basis, events: [], kinds, byKind: { cpi: empty(), jobs: empty(), fomc: empty(), ipca: empty(), ecb: empty(), boj: empty() },
217
217
  allEvents: empty(), earnings: empty(), normal: empty(), start: null, asOf: null };
218
218
 
219
219
  // Sessions after the published lists end may be unlisted release days, so they are left out of both sides.
@@ -1,28 +1,35 @@
1
1
  // Published release days, not a rule engine: the dates each release came
2
2
  // out, read from the publishers' own archives. A release cancelled or moved (the
3
3
  // 2025 shutdown) is as published, and a scheduled date is not a release day
4
- // until it is out. Dates are New York calendar days. Brazil's IPCA days and the
5
- // ECB's decision days come from Gloom Cloud only; the list the app ships with
6
- // has the US releases.
4
+ // until it is out. Dates are New York calendar days, but for the Bank of
5
+ // Japan's decisions, which are its own Tokyo days (announced around noon in
6
+ // Tokyo, after the New York close the evening before), so a day's close is the
7
+ // first to carry the decision. Brazil's IPCA days and the ECB's and BoJ's
8
+ // decision days come from Gloom Cloud only; the list the app ships with has
9
+ // the US releases.
7
10
  import { zonedDateKey } from "../../../utils/zoned-date-time";
8
11
  import { MACRO_RELEASE_TABLE } from "./release-table";
9
12
 
10
13
  /** The US releases the bundled list carries, and the ones HIVG reads around. */
11
14
  export type UsMacroEventKind = "cpi" | "jobs" | "fomc";
12
- export type MacroEventKind = UsMacroEventKind | "ipca" | "ecb";
15
+ export type MacroEventKind = UsMacroEventKind | "ipca" | "ecb" | "boj";
13
16
 
14
17
  export const US_MACRO_EVENT_KINDS: readonly UsMacroEventKind[] = ["cpi", "jobs", "fomc"];
15
- /** The releases Gloom Cloud alone lists: Brazil's IPCA and the ECB's decisions. */
16
- const SERVED_MACRO_EVENT_KINDS = ["ipca", "ecb"] as const satisfies readonly MacroEventKind[];
18
+ /** The releases Gloom Cloud alone lists: Brazil's IPCA and the ECB's and BoJ's decisions. */
19
+ const SERVED_MACRO_EVENT_KINDS = ["ipca", "ecb", "boj"] as const satisfies readonly MacroEventKind[];
17
20
  export const MACRO_EVENT_KINDS: readonly MacroEventKind[] = [...US_MACRO_EVENT_KINDS, ...SERVED_MACRO_EVENT_KINDS];
18
- /** The releases HIVG reads around: the US ones and the ECB's decisions. */
19
- export const IV_EVENT_KINDS: readonly MacroEventKind[] = [...US_MACRO_EVENT_KINDS, "ecb"];
21
+ /** The releases HIVG reads around: the US ones and the ECB's and BoJ's decisions. */
22
+ export const IV_EVENT_KINDS: readonly MacroEventKind[] = [...US_MACRO_EVENT_KINDS, "ecb", "boj"];
23
+ /** The central banks' decisions: each day's row says what the meeting did and the rate after it. */
24
+ export const POLICY_DECISION_KINDS: ReadonlySet<MacroEventKind> = new Set(["fomc", "ecb", "boj"]);
25
+ /** The decisions whose next meeting Gloom Cloud lists ahead with their days. */
26
+ type ScheduledMacroEventKind = "ecb" | "boj";
20
27
 
21
- export const MACRO_EVENT_LABELS: Record<MacroEventKind, string> = { cpi: "CPI", jobs: "Jobs", fomc: "FOMC", ipca: "IPCA", ecb: "ECB" };
28
+ export const MACRO_EVENT_LABELS: Record<MacroEventKind, string> = { cpi: "CPI", jobs: "Jobs", fomc: "FOMC", ipca: "IPCA", ecb: "ECB", boj: "BoJ" };
22
29
 
23
30
  /**
24
31
  * BLS news release archives for CPI and the Employment Situation, the Federal Reserve's meeting calendar, IBGE's
25
- * calendar, the ECB's monetary policy decisions.
32
+ * calendar, the ECB's monetary policy decisions, the BoJ's monetary policy meetings.
26
33
  */
27
34
  export const MACRO_RELEASE_SOURCES: Record<MacroEventKind, string> = {
28
35
  cpi: "https://www.bls.gov/bls/news-release/cpi.htm",
@@ -30,6 +37,7 @@ export const MACRO_RELEASE_SOURCES: Record<MacroEventKind, string> = {
30
37
  fomc: "https://www.federalreserve.gov/monetarypolicy/fomccalendars.htm",
31
38
  ipca: "https://www.ibge.gov.br/calendario-indicadores-novoportal.html",
32
39
  ecb: "https://www.ecb.europa.eu/press/govcdec/mopo/html/index.en.html",
40
+ boj: "https://www.boj.or.jp/en/mopo/mpmsche_minu/index.htm",
33
41
  };
34
42
 
35
43
  /** A list more than this many days behind today says so: a release day may be missing from its end. */
@@ -71,8 +79,8 @@ export interface MacroReleaseList {
71
79
  coveredThrough: string;
72
80
  /** The first day Gloom Cloud's economic calendar covers: days before it have no figures. */
73
81
  figuresFrom?: string;
74
- /** The ECB's next decision, which Gloom Cloud lists ahead. */
75
- scheduled?: { ecb?: string };
82
+ /** The ECB's and the BoJ's next decisions, which Gloom Cloud lists ahead. */
83
+ scheduled?: Partial<Record<ScheduledMacroEventKind, string>>;
76
84
  }
77
85
 
78
86
  const DAY_MS = 86_400_000;
@@ -104,7 +112,7 @@ function servedFigures(value: unknown): MacroReleaseFigures | undefined {
104
112
 
105
113
  /**
106
114
  * The served list extends the floor past its end; the floor keeps its own
107
- * days up to there. IPCA and the ECB's decisions, which the floor does not
115
+ * days up to there. IPCA and the ECB's and BoJ's decisions, which the floor does not
108
116
  * carry, are the served list's through its end, and left out when the server
109
117
  * lists none. Every day, the
110
118
  * floor's included, takes the figures the server has for it, or the reason it
@@ -115,7 +123,7 @@ function servedFigures(value: unknown): MacroReleaseFigures | undefined {
115
123
  export function mergeMacroReleases(floor: MacroReleaseList, served: unknown): MacroReleaseList {
116
124
  const payload = served as { coveredThrough?: unknown; releases?: Partial<Record<MacroEventKind, unknown>>;
117
125
  figures?: Partial<Record<MacroEventKind, Record<string, unknown>>>; figuresFrom?: unknown;
118
- figureGaps?: Partial<Record<MacroEventKind, Record<string, unknown>>>; scheduled?: { ecb?: unknown } } | null;
126
+ figureGaps?: Partial<Record<MacroEventKind, Record<string, unknown>>>; scheduled?: Partial<Record<ScheduledMacroEventKind, unknown>> } | null;
119
127
  const servedThrough = payload?.coveredThrough;
120
128
  if (!isDate(servedThrough)) return floor;
121
129
  // The list is complete through the later of the two ends; a served list that stops short of the floor's adds figures only.
@@ -134,7 +142,8 @@ export function mergeMacroReleases(floor: MacroReleaseList, served: unknown): Ma
134
142
  for (const date of new Set(dates)) if (date <= servedThrough) later.push({ kind, date });
135
143
  }
136
144
  const figuresFrom = isDate(payload?.figuresFrom) ? payload.figuresFrom : null;
137
- const nextEcb = isDate(payload?.scheduled?.ecb) ? payload.scheduled.ecb : null;
145
+ const scheduled = Object.fromEntries((["ecb", "boj"] as const)
146
+ .flatMap((kind) => isDate(payload?.scheduled?.[kind]) ? [[kind, payload.scheduled[kind]]] : [])) as Partial<Record<ScheduledMacroEventKind, string>>;
138
147
  const figuresOf = (release: MacroRelease): MacroRelease => {
139
148
  const figures = servedFigures(payload?.figures?.[release.kind]?.[release.date]);
140
149
  if (figures) return { ...release, figures };
@@ -142,7 +151,7 @@ export function mergeMacroReleases(floor: MacroReleaseList, served: unknown): Ma
142
151
  return missing ? { ...release, figuresMissing: missing } : release;
143
152
  };
144
153
  return { releases: [...floor.releases, ...later].map(figuresOf).sort(byDate), coveredThrough, ...(figuresFrom ? { figuresFrom } : {}),
145
- ...(nextEcb ? { scheduled: { ecb: nextEcb } } : {}) };
154
+ ...(Object.keys(scheduled).length ? { scheduled } : {}) };
146
155
  }
147
156
 
148
157
  /** Whole days from the list's last covered day to today in New York. */
@@ -10,7 +10,9 @@ import type { PluginModule } from "../plugin-module";
10
10
  import { TICKER_RESEARCH_PANE_ID } from "../../../types/config";
11
11
  import { publicTickerKey } from "../../../utils/exchanges";
12
12
  import { usePaneSettingValue } from "../../../state/app/context";
13
- import { useAssetData, usePluginPaneState, usePluginTickerActions } from "../../runtime";
13
+ import { useAssetData, usePluginPaneChoice, usePluginPaneState, usePluginTickerActions } from "../../runtime";
14
+ import { usePlanAccess } from "../../../api-client/plan-access";
15
+ import { shownPaneChoice } from "../../../core/state/app/pane-choices";
14
16
  import { useLiveQuoteEntries } from "../../../state/hooks/quote-streaming";
15
17
  import { useAutoRefresh } from "../../../react/auto-refresh";
16
18
  import { useQuoteBoard } from "../shared/use-quote-board";
@@ -27,6 +29,7 @@ import {
27
29
  INDEX_SHORT,
28
30
  TABS,
29
31
  createRows,
32
+ isProOnlyTab,
30
33
  moverExtendedSessions,
31
34
  overlayMarketMoverQuotes,
32
35
  resolveSummarySymbols,
@@ -94,12 +97,19 @@ function MarketMoversPane({ focused, width, height }: PaneProps) {
94
97
  const [requestedTab, setRequestedTab] = usePluginPaneState<TabId | null>("requestedTab", null);
95
98
  const session = useUsSession();
96
99
  const tabIds = useMemo(() => tabs.map((tab) => tab.id), [tabs]);
97
- const activeTab = resolveActiveTab({
98
- tabs: tabIds,
99
- saved: savedTab,
100
- pickedIn,
101
- session,
102
- requested: requestedTab,
100
+ const freeTabIds = useMemo(() => tabIds.filter((tab) => !isProOnlyTab(tab)), [tabIds]);
101
+ // A list picked or asked for in this session, as opposed to restored with the workspace.
102
+ const [listChosen, chooseList] = usePluginPaneChoice("activeTab");
103
+ const [requestChosen] = usePluginPaneChoice("requestedTab");
104
+ const access = usePlanAccess();
105
+ const pick = { saved: savedTab, pickedIn, session, requested: requestedTab };
106
+ // Gaps restored for an account without Pro open on the list the session
107
+ // would show without them; the wall shows once Gaps is picked.
108
+ const activeTab = shownPaneChoice(resolveActiveTab({ tabs: tabIds, ...pick }), {
109
+ chosen: listChosen || requestChosen,
110
+ hasProAccess: access.hasProAccess,
111
+ proOnly: isProOnlyTab,
112
+ fallback: freeTabIds.length > 0 ? resolveActiveTab({ tabs: freeTabIds, ...pick }) : tabIds[0]!,
103
113
  });
104
114
 
105
115
  // The index summary is a quote board like any other, so it runs on the shared
@@ -117,10 +127,12 @@ function MarketMoversPane({ focused, width, height }: PaneProps) {
117
127
  // Kept between quotes, so the tab strip skips the renders a board update gives the pane.
118
128
  const tabItems = useMemo(() => tabs.map((tab) => ({ label: tab.label, value: tab.id })), [tabs]);
119
129
  const selectTab = useCallback((value: string) => {
130
+ // Picking the list already saved changes no value, so say it was picked.
131
+ if (!listChosen) chooseList();
120
132
  setSavedTab(value as TabId);
121
133
  setPickedIn(session.key);
122
134
  if (requestedTab) setRequestedTab(null);
123
- }, [requestedTab, session.key, setPickedIn, setRequestedTab, setSavedTab]);
135
+ }, [chooseList, listChosen, requestedTab, session.key, setPickedIn, setRequestedTab, setSavedTab]);
124
136
  const { strip: tabStrip } = usePaneTabs({ tabs: tabItems, activeValue: activeTab, onSelect: selectTab, focused, compact: true, variant: "bare" });
125
137
 
126
138
  return (
@@ -26,6 +26,11 @@ export type ScreenerTabId = "gainers" | "losers" | "actives" | "trending";
26
26
  export type SessionTabId = CloudSessionMoversCategory;
27
27
  export type TabId = ScreenerTabId | SessionTabId;
28
28
 
29
+ /** Gaps only open with Gloom Cloud Pro; every plan reads the other lists (session-body.tsx). */
30
+ export function isProOnlyTab(tab: string): boolean {
31
+ return tab === "gaps";
32
+ }
33
+
29
34
  export const TABS: Array<{ id: TabId; label: string }> = [
30
35
  { id: "gainers", label: "Gainers" },
31
36
  { id: "losers", label: "Losers" },
@@ -25,6 +25,7 @@ import { loadSessionMovers, SessionMoversAccessError } from "./client";
25
25
  import { ANY_FLOAT, minFloatEmptyTitle, minFloatFilter, minFloatShares, partialFloatFooter } from "./min-float";
26
26
  import { summaryFooterSegments } from "./footer";
27
27
  import type { MarketSummaryQuote } from "./screener";
28
+ import { isProOnlyTab } from "./model";
28
29
  import {
29
30
  earlierSessionLabel,
30
31
  listAsOfLabel,
@@ -67,7 +68,7 @@ export function SessionMoversBody(props: {
67
68
  liveStreaming: boolean;
68
69
  }) {
69
70
  const access = usePlanAccess();
70
- const proOnly = props.view === "gaps";
71
+ const proOnly = isProOnlyTab(props.view);
71
72
  const [denied, setDenied] = useState(false);
72
73
  const deny = useCallback(() => setDenied(true), []);
73
74
  // A refusal is about the plan the account had then; a new plan asks again.
@@ -4,6 +4,15 @@ import { fetchHongKongMoneyMarkets, fetchMoneyMarkets } from "./client";
4
4
  import { isHongKongTab, MONEY_MARKET_TABS, moneyMarketChange, moneyMarketNotices, moneyMarketRowNotices, moneyMarketRows, moneyMarketValue } from "./model";
5
5
 
6
6
  const FRED_FRESHNESS = { source: "FRED", status: "not-a-feed", basis: "published daily and weekly data" } as const;
7
+ const HONG_KONG_FRESHNESS = { ...FRED_FRESHNESS, source: "HKMA", basis: "published Exchange Fund Bill closing yields" } as const;
8
+
9
+ /** The rows a view reports, without their histories, and what the view declares about them beyond the definition. */
10
+ export function moneyMarketReport(rows: readonly MoneyMarketRow[], hongKong: boolean) {
11
+ return {
12
+ ...hongKong ? { freshness: HONG_KONG_FRESHNESS } : {},
13
+ rows: rows.map(({ history: _history, ...row }) => ({ ...row, percentileValue: row.percentile.value })),
14
+ };
15
+ }
7
16
 
8
17
  export const moneyMarketsHeadless: HeadlessPaneDefinition<"bundle"> = {
9
18
  discovery: { aliases: ["BTMM"], dataRequirements: ["Gloom Cloud money-markets endpoint"],
@@ -20,7 +29,8 @@ export const moneyMarketsHeadless: HeadlessPaneDefinition<"bundle"> = {
20
29
  const rows: MoneyMarketRow[] = "billsCurve" in data ? moneyMarketRows(data, String(args.options.tab)) : data.rows;
21
30
  const errors = "billsCurve" in data ? moneyMarketNotices(data) : moneyMarketRowNotices(data.rows);
22
31
  const complete = data.status === "available" && errors.length === 0;
23
- return { complete, ...hongKong ? { freshness: { ...FRED_FRESHNESS, source: "HKMA", basis: "published Exchange Fund Bill closing yields" } } : {},
32
+ const report = moneyMarketReport(rows, hongKong);
33
+ return { complete, ...report.freshness ? { freshness: report.freshness } : {},
24
34
  sections: [{ title: hongKong ? "Exchange Fund Bill yields" : "Observations", columns: [
25
35
  { key: "label", header: "Instrument" },
26
36
  { key: "value", header: "Level", align: "right", format: (value, row) => moneyMarketValue(value as number | null, row.unit as "percent" | "usd-billions") },
@@ -29,7 +39,7 @@ export const moneyMarketsHeadless: HeadlessPaneDefinition<"bundle"> = {
29
39
  { key: "previousAsOf", header: "Versus", shrink: false, stackPriority: 1 },
30
40
  { key: "percentileValue", header: "Pctl 1Y", align: "right", stackPriority: 2, format: (value) => value == null ? "--" : Number(value).toFixed(0) },
31
41
  { key: "asOf", header: "As of", shrink: false }, { key: "status", header: "Status", stackPriority: 3 },
32
- ], rows: rows.map(({ history: _history, ...row }) => ({ ...row, percentileValue: row.percentile.value })) }],
42
+ ], rows: report.rows }],
33
43
  errors, unavailableSymbols: rows.filter((row) => row.status === "unavailable").flatMap((row) => row.sourceSeriesIds.length ? row.sourceSeriesIds : [row.label]),
34
44
  metadata: { ...data, complete, selectedTab: args.options.tab } };
35
45
  },
@@ -15,6 +15,8 @@ import { formatPercentileRank } from "../../../utils/format";
15
15
  import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
16
16
  import { useResearchCloudSession } from "../shared/research-cloud-session";
17
17
  import { getCachedHongKongMoneyMarkets, getCachedMoneyMarkets, loadHongKongMoneyMarkets, loadMoneyMarkets } from "./client";
18
+ import { moneyMarketReport, moneyMarketsHeadless } from "./headless";
19
+ import { reportFooterSegment } from "../shared/source-footer";
18
20
  import { isHongKongTab, MONEY_MARKET_TABS, moneyMarketAxis, moneyMarketChange, moneyMarketCurves, moneyMarketNotices, moneyMarketObservations, moneyMarketRateChange, moneyMarketRowNotices, moneyMarketRows, moneyMarketValue } from "./model";
19
21
 
20
22
  const TABS = MONEY_MARKET_TABS.map(({ value, label }) => ({ value, label }));
@@ -128,6 +130,12 @@ export function MoneyMarketsPane({ width, height, focused }: PaneProps) {
128
130
  } : null;
129
131
  const figures = billsTab ? billsItems : [];
130
132
  const updatedAgo = useUpdatedAgo(active.updatedAt);
133
+ const sourceLine = useMemo(() => {
134
+ if (!shown) return null;
135
+ const report = moneyMarketReport(hongKong ? hongKongData?.rows ?? [] : data ? moneyMarketRows(data, tab) : [], hongKong);
136
+ return reportFooterSegment(moneyMarketsHeadless, { ...report.freshness ? { freshness: report.freshness } : {},
137
+ sections: [{ title: "", columns: [], rows: report.rows }] });
138
+ }, [data, hongKong, hongKongData, shown, tab]);
131
139
  const { strip: tabStrip, rows: tabRows } = usePaneTabs({ tabs: TABS, activeValue: tab, onSelect: setTab, focused, dense: true });
132
140
  const bodyHeight = Math.max(3, height - tabRows);
133
141
  useAutoRefresh(active.updatedAt, active.load);
@@ -137,7 +145,8 @@ export function MoneyMarketsPane({ width, height, focused }: PaneProps) {
137
145
  ...(active.data?.refreshError ? [active.data.refreshError] : [])] });
138
146
  usePaneStatusLinkFooter({ registrationId: "money-markets", focused, loading: active.loading, error: active.error,
139
147
  url: selected?.observation.sourceUrl ?? null, showOpenHint: true,
140
- info: shown && updatedAgo ? [ageFooterSegment(updatedAgo)] : [],
148
+ // Its source and the rows' dates, as `fn BTMM` ends; how long ago it loaded goes first on a narrow row.
149
+ info: shown ? [sourceLine!, ...(updatedAgo ? [ageFooterSegment(updatedAgo)] : [])] : [],
141
150
  stale: !!shown && active.data?.stale,
142
151
  });
143
152
  return <Box width={width} height={height} flexDirection="column">
@@ -359,6 +359,7 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
359
359
  id: "expiration",
360
360
  label: "Exp",
361
361
  inline: true,
362
+ scrolls: true,
362
363
  value: String(selectedExpiration),
363
364
  // The dates either side name the key that steps to them: a terminal
364
365
  // label prefix, a desktop tooltip.
@@ -1040,6 +1041,8 @@ export function OptionsView({ width, height, focused, nestedInTabs = false, ivRa
1040
1041
  headerScrollId="options-table-header-scroll"
1041
1042
  bodyScrollId="options-table-body-scroll"
1042
1043
  columns={optionColumns}
1044
+ // Calls and puts mirror each other around the strike; Settings orders their fields.
1045
+ columnReorder={false}
1043
1046
  items={rows}
1044
1047
  sortColumnId={null}
1045
1048
  sortDirection="asc"
@@ -334,7 +334,7 @@ function OptionsPositioningView({ width, height, focused, symbol }: PaneProps &
334
334
  usePaneNoticeFooter({ registrationId: "options-positioning:notices", focused, notices });
335
335
 
336
336
  const expiryFilter = (value: string, options: { value: string; label: string }[], onChange: (value: string) => void): QueryBarFilter => ({
337
- id: "expiry", label: "Exp", inline: true, value, onChange,
337
+ id: "expiry", label: "Exp", inline: true, scrolls: true, value, onChange,
338
338
  options: options.map((option, index) => ({
339
339
  ...option,
340
340
  hint: index === options.findIndex((entry) => entry.value === value) - 1 ? EXPIRY_PREVIOUS_KEY
@@ -373,7 +373,8 @@ export function OptionsScenarioPane({ width, height, focused }: PaneProps) {
373
373
  { id: "expiration", label: "Expiry", width: 12, align: "left" }, { id: "price", label: "Entry / share", width: 14, align: "right" },
374
374
  { id: "volatility", label: "IV %", width: 9, align: "right" }, { id: "multiplier", label: "Units", width: 7, align: "right" }];
375
375
  const activeContent = scenario && tab === "payoff" ? <ScenarioPayoffChart scenario={scenario} width={width} height={bodyHeight} focused={tabsFocused} session={valuedSession} />
376
- : scenario && tab === "grid" ? <DataTableView focused={focused && !volActive} rootWidth={width}
376
+ // Valuation dates in time order across the spot rows.
377
+ : scenario && tab === "grid" ? <DataTableView focused={focused && !volActive} rootWidth={width} columnReorder={false}
377
378
  rootHeight={bodyHeight} items={scenario.grid.toSorted((a, b) => { const value = (row: typeof a) => gridSort.columnId === "spot" ? row.spot : gridSort.columnId === "move" ? row.move ?? 0 : row.values[Number(gridSort.columnId)] ?? 0; return (value(a) - value(b)) * (gridSort.direction === "asc" ? 1 : -1); })}
378
379
  sortColumnId={gridSort.columnId} sortDirection={gridSort.direction} onHeaderClick={(id) => {
379
380
  // The landmark column has no label and no order of its own.
@@ -149,7 +149,8 @@ export function Depth({ asset, onAssetChange, accessKey, width, height, focused,
149
149
  </>;
150
150
  const lock = data && !pro ? <Lock text="Upgrade for hourly depth history" onPress={upgrade} role="perps-depth-upgrade" /> : null;
151
151
  return <PaneStatusBody loading={!data && resource.loading} error={!data ? resource.error : null} subject="order book depth">
152
- <DataTableView<PerpDepthRow> columns={columns} items={rows} focused={focused && !querySearch.active} rootWidth={width} rootHeight={height} rootBefore={before}
152
+ {/* Bid and ask depth in pairs at widening distances from mid: the columns keep their order. */}
153
+ <DataTableView<PerpDepthRow> columns={columns} columnReorder={false} items={rows} focused={focused && !querySearch.active} rootWidth={width} rootHeight={height} rootBefore={before}
153
154
  getItemKey={(row) => row.marketId} sortColumnId={null} sortDirection="desc" resetScrollKey={base}
154
155
  selection={{ kind: "id", selectedId: selected?.marketId ?? null, getId: (row) => row.marketId, onChange: setSelected }} onActivate={(row) => onOpenMarket(row.marketId)}
155
156
  renderCell={(row, column) => depthCell(row, column.id as DepthColumnId, colors)} selectedTextOverridesCellColor
@@ -8,6 +8,7 @@ import { splitSymbolArgs, splitSymbolWords, symbolInputKey } from "../../../../c
8
8
  import { notASymbolError } from "../../../../cli/symbol-cells";
9
9
  import { readSymbolList, SymbolListError } from "../../../../cli/symbol-list";
10
10
  import { cliStyles } from "../../../../utils/cli-output";
11
+ import { listProgressNotice } from "../../../../cli/list-progress";
11
12
  import { shellWord } from "../../../../utils/shell-word";
12
13
  import { logFailure } from "../../../../utils/log-failure";
13
14
  import { parsePublicTickerKey } from "../../../../utils/exchanges";
@@ -256,45 +257,17 @@ export function retryNotice(ctx: CliCommandContext): (count: number, waitMs: num
256
257
  };
257
258
  }
258
259
 
259
- /** A lookup this slow says how far it has got, so an add never looks stuck: first after two seconds, then every five. */
260
- const PROGRESS_AFTER_MS = 2_000;
261
- const PROGRESS_EVERY_MS = 5_000;
262
-
263
260
  /**
264
261
  * Lines on standard error while an add of several symbols is slow to look
265
262
  * them up: "Looking up 10 symbols." two seconds in when none is settled yet,
266
263
  * else "Looked up 4 of 10 symbols.", which it says again every five seconds
267
- * until all are. Nothing for one symbol or a lookup that is quick. It is told
268
- * (0, total) as the lookup starts and each symbol as it settles; the lines
269
- * come from a timer, so a lookup waiting on one slow answer still says so.
264
+ * until all are (`listProgressNotice`).
270
265
  */
271
266
  export function progressNotice(
272
267
  ctx: Pick<CliCommandContext, "cliOptions">,
273
- { afterMs = PROGRESS_AFTER_MS, everyMs = PROGRESS_EVERY_MS }: { afterMs?: number; everyMs?: number } = {},
268
+ timing: { afterMs?: number; everyMs?: number } = {},
274
269
  ): (looked: number, total: number) => void {
275
- let timer: ReturnType<typeof setTimeout> | undefined;
276
- let looked = 0, total = 0, told = false;
277
- const tell = () => {
278
- timer = undefined;
279
- if (looked >= total) return;
280
- console.error(cliStyles.muted(told || looked > 0 ? `Looked up ${looked} of ${total} symbols.` : `Looking up ${total} symbols.`));
281
- told = true;
282
- schedule(everyMs);
283
- };
284
- const schedule = (ms: number) => {
285
- timer = setTimeout(tell, ms);
286
- // The add's own end, not this line, decides when the process exits.
287
- (timer as { unref?: () => void }).unref?.();
288
- };
289
- return (settled, of) => {
290
- if (ctx.cliOptions.quiet || of < 2) return;
291
- looked = settled;
292
- total = of;
293
- if (looked >= total) {
294
- if (timer) clearTimeout(timer);
295
- timer = undefined;
296
- } else if (!timer) schedule(afterMs);
297
- };
270
+ return listProgressNotice(ctx, (looked, total, told) => told || looked > 0 ? `Looked up ${looked} of ${total} symbols.` : `Looking up ${total} symbols.`, timing);
298
271
  }
299
272
 
300
273
  /**
@@ -24,6 +24,7 @@ import {
24
24
  useAppSelector,
25
25
  useAppStateRef,
26
26
  usePaneCollection,
27
+ useOptionalPaneSettingUpdater,
27
28
  usePaneInstance,
28
29
  usePaneSettingValue,
29
30
  usePaneStateValue,
@@ -34,6 +35,7 @@ import { summarizeFxRates, fxStatusLabel } from "../../../../utils/fx-status";
34
35
  import { convertCurrency } from "../../../../utils/format";
35
36
  import { nextHeaderSort } from "../../../../utils/sort-values";
36
37
  import { getSharedMarketDataCoordinator } from "../../../../market-data/coordinator";
38
+ import { DEFAULT_PORTFOLIO_COLUMN_IDS } from "../../../../types/config";
37
39
  import type { TickerRecord } from "../../../../types/ticker";
38
40
  import type { TickerFinancials } from "../../../../types/financials";
39
41
  import type { PaneProps } from "../../../../types/plugin";
@@ -102,6 +104,7 @@ import { openPerpLabel, useOpenPerpMarket } from "../../perps/open-market";
102
104
  import { useLiveStreamingSetting } from "../../../../state/hooks/live-streaming";
103
105
  import { useThrottledTickerOrder } from "../use-throttled-ticker-order";
104
106
  import { useThrottledMemo } from "../use-throttled-memo";
107
+ import { useUtcDay } from "../../../../react/auto-refresh";
105
108
  import { perpetualDisplaySymbol, perpetualListing, perpetualVenueName } from "../../../../tickers/perpetual-listing";
106
109
  import { useColumnClock } from "../use-column-clock";
107
110
  import { liveMarketCapitalization } from "../../../../market-data/quotes/live-valuation";
@@ -169,6 +172,7 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
169
172
  const [collectionSorts, setCollectionSorts] = usePaneStateValue<Record<string, CollectionSortPreference>>("collectionSorts", NO_COLLECTION_SORTS);
170
173
  const [cashDrawerExpanded, setCashDrawerExpanded] = usePaneStateValue<boolean>("cashDrawerExpanded", false);
171
174
  const [, setViewMode] = usePaneSettingValue<PortfolioViewMode>("viewMode", "table");
175
+ const updateColumnIds = useOptionalPaneSettingUpdater(paneInstance?.instanceId ?? null, "columnIds");
172
176
 
173
177
  const [streamWindow, setStreamWindow] = useState({ start: 0, end: 24 });
174
178
  const [quickAddFocused, setQuickAddFocused] = useState(false);
@@ -260,6 +264,15 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
260
264
  () => resolveVisibleColumns(paneSettings.columnIds, isPortfolioTab, { targetWeights: hasTargetWeights(currentPortfolio), otherCurrencies }),
261
265
  [currentPortfolio, isPortfolioTab, otherCurrencies, paneSettings.columnIds],
262
266
  );
267
+ // A header dragged to a new place rewrites the Columns setting, so Settings lists them as the table shows them;
268
+ // back in the default order, the setting goes, so columns later added to the defaults still show.
269
+ const columnReorder = useMemo(() => ({
270
+ control: {
271
+ order: paneSettings.columnIds,
272
+ defaultOrder: DEFAULT_PORTFOLIO_COLUMN_IDS,
273
+ onChange: (ids: string[] | undefined) => updateColumnIds(() => ids),
274
+ },
275
+ }), [paneSettings.columnIds, updateColumnIds]);
263
276
  const supplementalData = usePortfolioSupplementalData(tickers, columns, appActive, financialsMap);
264
277
  // One lookup for the whole list, only while a perpetual column is on screen.
265
278
  const showsPerpetuals = viewMode === "table" && columns.some((column) => PERPETUAL_COLUMN_IDS.has(column.id));
@@ -660,6 +673,8 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
660
673
  liveStreaming,
661
674
  });
662
675
 
676
+ // The quotes' time of today drops its day; the next day the footer names it.
677
+ const utcDay = useUtcDay();
663
678
  const summaryFooterInfo = useThrottledMemo(() => buildPortfolioFooterSegments({
664
679
  accountState: summaryAccountState,
665
680
  accountStatusText: accountsError
@@ -680,6 +695,7 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
680
695
  portfolioSummaryTotals,
681
696
  refreshingSize,
682
697
  summaryAccountState,
698
+ utcDay,
683
699
  ], FOOTER_TOTALS_THROTTLE_MS);
684
700
  const fxWarning = !!(fxStatus.stale || fxStatus.unknownTime || fxStatus.unavailable);
685
701
  // Signed out or free, the rows' prices are the delayed ones; a list of coins is live and says nothing.
@@ -783,9 +799,10 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
783
799
  ...offlineBrokerFooter.asOf,
784
800
  ...summaryFooterInfo,
785
801
  ...offlineBrokerFooter.status,
802
+ // The delay clock beside the quotes' source and time; the FX note after it gives way first on a narrow row.
803
+ ...(quoteDelay ? [quoteDelay] : []),
786
804
  ...(fxStatusText && !fxWarning ? [{ id: "fx", parts: [{ text: `FX ${fxStatusText}`, tone: "muted" as const }] }] : []),
787
805
  ...(showsPerpetuals && perpetuals.stale ? [{ id: "perpetuals", parts: [{ text: "perpetuals stale", tone: "warning" as const }] }] : []),
788
- ...(quoteDelay ? [quoteDelay] : []),
789
806
  ],
790
807
  hints: [
791
808
  ...offlineBrokerFooter.hints,
@@ -922,6 +939,7 @@ export function PortfolioListPane({ focused, width, height }: PaneProps) {
922
939
  answeredSnapshots={answeredSnapshots}
923
940
  exportName={activeCollectionEntry?.name}
924
941
  allocationRows={allocationRows}
942
+ columnReorder={columnReorder}
925
943
  />
926
944
  ) : (
927
945
  <PortfolioGrid