gloomberb 0.20.13 → 0.20.16

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 (275) hide show
  1. package/package.json +2 -1
  2. package/patches/@opentui%2Fcore@0.3.2.patch +22 -4
  3. package/src/account/auth-dialog.tsx +22 -4
  4. package/src/account/auth-form.tsx +6 -1
  5. package/src/account/checkout-handoff.tsx +7 -14
  6. package/src/account/device-signin-dialog.tsx +35 -24
  7. package/src/api-client/crypto-markets.ts +10 -0
  8. package/src/api-client/errors.ts +3 -1
  9. package/src/api-client/index.ts +54 -0
  10. package/src/api-client/install-experiments.ts +8 -7
  11. package/src/api-client/money-markets.ts +7 -0
  12. package/src/api-client/paths.ts +2 -1
  13. package/src/api-client/product-waitlist.ts +63 -0
  14. package/src/api-client/request.ts +16 -4
  15. package/src/api-client/types/billing.ts +45 -0
  16. package/src/api-client/yearly-plan.ts +132 -0
  17. package/src/app/global-shortcuts.ts +5 -3
  18. package/src/app/pane-runtime/index.tsx +2 -2
  19. package/src/app/pane-runtime/plugin-bindings.ts +3 -1
  20. package/src/app/pane-runtime/ticker-open-runtime.ts +6 -1
  21. package/src/app/since-last-visit/keys.ts +26 -0
  22. package/src/app/since-last-visit/model.ts +266 -0
  23. package/src/app/since-last-visit/strip.tsx +193 -0
  24. package/src/app/since-last-visit/use-since-last-visit.ts +289 -0
  25. package/src/app/since-last-visit/visit-tracker.ts +191 -0
  26. package/src/app.tsx +15 -0
  27. package/src/architecture/floating-promise-allowlist.json +0 -1
  28. package/src/brokers/signed-in/sign-in-dialog.tsx +38 -38
  29. package/src/cli/commands/market.ts +103 -27
  30. package/src/cli/commands/overview.ts +18 -4
  31. package/src/cli/commands/system.ts +29 -1
  32. package/src/cli/commands/ticker.ts +12 -5
  33. package/src/cli/desktop-pane-shot-api-policy.ts +4 -1
  34. package/src/cli/desktop-pane-shot-browser.ts +2 -1
  35. package/src/cli/desktop-pane-shot-view.ts +3 -7
  36. package/src/cli/desktop-pane-shot.ts +26 -28
  37. package/src/cli/errors.ts +3 -1
  38. package/src/cli/freshness.ts +7 -2
  39. package/src/cli/glossary.ts +10 -5
  40. package/src/cli/help.ts +1 -0
  41. package/src/cli/helpers.ts +8 -16
  42. package/src/cli/history-export.ts +4 -0
  43. package/src/cli/history-rows.ts +24 -0
  44. package/src/cli/index.ts +4 -0
  45. package/src/cli/known-gaps.ts +2 -2
  46. package/src/cli/listing-arg.ts +79 -11
  47. package/src/cli/not-a-ticker.ts +4 -0
  48. package/src/cli/options.ts +29 -1
  49. package/src/cli/pane-functions/catalog.ts +70 -12
  50. package/src/cli/pane-functions/function-help.ts +1 -1
  51. package/src/cli/pane-functions/headless.ts +68 -3
  52. package/src/cli/pane-functions/index.ts +2 -2
  53. package/src/cli/pane-functions/options.ts +7 -0
  54. package/src/cli/pane-functions/resolver.ts +104 -15
  55. package/src/cli/pane-functions/screenshot-payload.ts +3 -0
  56. package/src/cli/report-tables.ts +20 -5
  57. package/src/cli/result.ts +22 -4
  58. package/src/cli/shot-temp-dir.ts +30 -0
  59. package/src/cli/suffixed-listing-rows.ts +11 -0
  60. package/src/cli/symbol-args.ts +5 -3
  61. package/src/cli/symbol-list.ts +23 -10
  62. package/src/cli/symbol-rows.ts +135 -3
  63. package/src/cli/treasury-yields.ts +15 -1
  64. package/src/components/chart/composite/composite-chart.tsx +3 -3
  65. package/src/components/chart/composite/format.ts +2 -1
  66. package/src/components/chart/composite/panel-surface/axis-markers.ts +133 -0
  67. package/src/components/chart/composite/panel-surface/level-labels.tsx +78 -0
  68. package/src/components/chart/composite/panel-surface/overlays.ts +108 -0
  69. package/src/components/chart/composite/panel-surface/pan-coast.ts +54 -0
  70. package/src/components/chart/composite/panel-surface/panel-cursor.tsx +138 -0
  71. package/src/components/chart/composite/panel-surface/panel-levels.ts +47 -0
  72. package/src/components/chart/composite/panel-surface/plot-gestures.ts +403 -0
  73. package/src/components/chart/composite/panel-surface/plot-pointer.ts +65 -0
  74. package/src/components/chart/composite/panel-surface/plot-wheel.ts +102 -0
  75. package/src/components/chart/composite/panel-surface/pointer.ts +12 -0
  76. package/src/components/chart/composite/panel-surface/props.ts +79 -0
  77. package/src/components/chart/composite/panel-surface/tool-readout.ts +151 -0
  78. package/src/components/chart/composite/panel-surface/value-axis-gestures.ts +152 -0
  79. package/src/components/chart/composite/panel-surface.tsx +81 -1177
  80. package/src/components/command-bar/commands/collection-list.ts +1 -0
  81. package/src/components/command-bar/commands/direct/index.ts +31 -8
  82. package/src/components/command-bar/commands/registry.ts +7 -0
  83. package/src/components/command-bar/routes/root/command-items.ts +8 -0
  84. package/src/components/command-bar/routes/root/results.ts +19 -2
  85. package/src/components/command-bar/routes/root/runtime.ts +3 -2
  86. package/src/components/command-bar/routes/root/selection.ts +3 -2
  87. package/src/components/command-bar/routes/root/shortcuts.ts +15 -0
  88. package/src/components/company-logo.tsx +10 -3
  89. package/src/components/data-table/sections.ts +6 -1
  90. package/src/components/layout/pane/title.ts +16 -6
  91. package/src/components/layout/shell/index.tsx +5 -1
  92. package/src/components/layout/shell/ticker-link-menu.ts +12 -9
  93. package/src/components/pane-settings-dialog/tui.tsx +6 -3
  94. package/src/components/pane-settings-dialog.tsx +2 -1
  95. package/src/components/pane-template-wizard.tsx +2 -0
  96. package/src/components/ticker/badge/format.ts +12 -3
  97. package/src/components/ticker/badge/index.tsx +9 -3
  98. package/src/components/ticker/list-table-view.tsx +119 -17
  99. package/src/components/ui/choice-dialog.tsx +1 -1
  100. package/src/components/ui/confirm-dialog.tsx +3 -2
  101. package/src/components/ui/data-table/display-columns.ts +16 -0
  102. package/src/components/ui/data-table/index.tsx +40 -9
  103. package/src/components/ui/data-table/types.ts +14 -0
  104. package/src/components/ui/frame.tsx +7 -3
  105. package/src/components/ui/icon.tsx +4 -2
  106. package/src/components/ui/list-view.tsx +8 -0
  107. package/src/components/ui/number-prompt-dialog.tsx +2 -1
  108. package/src/components/use-pane-notice-footer.tsx +3 -1
  109. package/src/core/state/app/layout-reducer.ts +3 -1
  110. package/src/core/state/app/layout.ts +2 -2
  111. package/src/data/config/layout.ts +14 -0
  112. package/src/data/config/store/normalize.ts +11 -1
  113. package/src/docs/snapshot.json +2 -2
  114. package/src/i18n/es.ts +39 -0
  115. package/src/i18n/ja.ts +39 -0
  116. package/src/i18n/ko.ts +39 -0
  117. package/src/i18n/zh-cn.ts +39 -0
  118. package/src/i18n/zh-tw.ts +39 -0
  119. package/src/layout/pane-follow.ts +141 -4
  120. package/src/layout/pane-layout-move.ts +10 -7
  121. package/src/layout/ticker-navigation.ts +13 -19
  122. package/src/layout/ticker-retarget.ts +3 -2
  123. package/src/market-data/market/format.ts +35 -1
  124. package/src/market-data/market/index-level.ts +19 -0
  125. package/src/market-data/quotes/contributions.ts +13 -0
  126. package/src/market-data/quotes/export-identity.ts +36 -1
  127. package/src/market-data/quotes/resolution.ts +16 -0
  128. package/src/plugins/builtin/account-management/keyboard.ts +14 -0
  129. package/src/plugins/builtin/account-management/model.ts +2 -0
  130. package/src/plugins/builtin/account-management/pane.tsx +79 -7
  131. package/src/plugins/builtin/account-management/password-dialog.tsx +2 -2
  132. package/src/plugins/builtin/account-management/payment-recovery-row.tsx +97 -0
  133. package/src/plugins/builtin/account-management/yearly-plan-row.tsx +359 -0
  134. package/src/plugins/builtin/analytics/risk-client.ts +12 -2
  135. package/src/plugins/builtin/analytics/risk-headless.ts +66 -6
  136. package/src/plugins/builtin/analytics/risk-math.ts +23 -6
  137. package/src/plugins/builtin/analytics/risk-model.ts +20 -9
  138. package/src/plugins/builtin/analytics/risk-pane.tsx +2 -2
  139. package/src/plugins/builtin/awards/pane.tsx +6 -8
  140. package/src/plugins/builtin/changelog/index.tsx +6 -44
  141. package/src/plugins/builtin/changelog/versions.ts +17 -68
  142. package/src/plugins/builtin/chart-composer/catalog-inventory.ts +5 -2
  143. package/src/plugins/builtin/chart-composer/editor.tsx +1 -0
  144. package/src/plugins/builtin/chart-composer/pane.tsx +1 -1
  145. package/src/plugins/builtin/chart-composer/quick-add.tsx +4 -1
  146. package/src/plugins/builtin/chart-composer/series-catalog.ts +17 -1
  147. package/src/plugins/builtin/cloud/askg/executor.ts +2 -1
  148. package/src/plugins/builtin/cloud/askg/sources.ts +2 -1
  149. package/src/plugins/builtin/cloud/plugin.tsx +2 -0
  150. package/src/plugins/builtin/cloud/thesis/module.tsx +2 -0
  151. package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +6 -2
  152. package/src/plugins/builtin/cpi/headless.ts +6 -1
  153. package/src/plugins/builtin/cpi/model.ts +17 -0
  154. package/src/plugins/builtin/cpi/pane.tsx +4 -2
  155. package/src/plugins/builtin/crypto-board/client.ts +6 -1
  156. package/src/plugins/builtin/crypto-board/headless.ts +10 -2
  157. package/src/plugins/builtin/crypto-board/model.ts +89 -11
  158. package/src/plugins/builtin/crypto-board/pane.tsx +20 -5
  159. package/src/plugins/builtin/debt-maturities/model.ts +1 -1
  160. package/src/plugins/builtin/dividend-yield/client.ts +24 -2
  161. package/src/plugins/builtin/dividend-yield/headless.ts +4 -2
  162. package/src/plugins/builtin/dividend-yield/ranking.ts +2 -1
  163. package/src/plugins/builtin/dividend-yield/view.ts +5 -1
  164. package/src/plugins/builtin/earnings/board-table.ts +1 -1
  165. package/src/plugins/builtin/earnings/board.tsx +36 -16
  166. package/src/plugins/builtin/earnings/highlight.ts +47 -0
  167. package/src/plugins/builtin/earnings/history-table.ts +9 -1
  168. package/src/plugins/builtin/earnings/index.tsx +1 -1
  169. package/src/plugins/builtin/earnings-calls/pane.tsx +2 -2
  170. package/src/plugins/builtin/earnings-ripple/index.tsx +2 -0
  171. package/src/plugins/builtin/econ/calendar-model.ts +17 -1
  172. package/src/plugins/builtin/econ/fred-catalog.ts +33 -4
  173. package/src/plugins/builtin/econ-statistics/headless.ts +21 -0
  174. package/src/plugins/builtin/estimate-revisions/model.ts +1 -1
  175. package/src/plugins/builtin/exposure/index.tsx +1 -1
  176. package/src/plugins/builtin/macro-day/headless.ts +21 -10
  177. package/src/plugins/builtin/macro-day/model.ts +42 -3
  178. package/src/plugins/builtin/macro-day/pane.tsx +26 -8
  179. package/src/plugins/builtin/macro-day/releases.ts +24 -1
  180. package/src/plugins/builtin/market-valuation/detail.tsx +3 -3
  181. package/src/plugins/builtin/market-valuation/headless.ts +11 -4
  182. package/src/plugins/builtin/market-valuation/pane.tsx +3 -1
  183. package/src/plugins/builtin/market-valuation/view.ts +14 -0
  184. package/src/plugins/builtin/money-markets/client.ts +4 -1
  185. package/src/plugins/builtin/money-markets/headless.ts +15 -4
  186. package/src/plugins/builtin/money-markets/index.tsx +1 -1
  187. package/src/plugins/builtin/money-markets/pane.tsx +7 -1
  188. package/src/plugins/builtin/news/wire/news/detail-view.tsx +20 -8
  189. package/src/plugins/builtin/pe-band/pane.tsx +1 -1
  190. package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +4 -2
  191. package/src/plugins/builtin/portfolio-list/cli/period-report.ts +61 -11
  192. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +11 -3
  193. package/src/plugins/builtin/portfolio-list/cli/render.ts +8 -1
  194. package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +178 -17
  195. package/src/plugins/builtin/portfolio-list/headless.ts +33 -6
  196. package/src/plugins/builtin/portfolio-list/pane/groups.tsx +220 -0
  197. package/src/plugins/builtin/portfolio-list/pane/index.tsx +95 -18
  198. package/src/plugins/builtin/portfolio-list/pane/period-pnl.ts +24 -6
  199. package/src/plugins/builtin/portfolio-list/period-pnl.ts +16 -1
  200. package/src/plugins/builtin/portfolio-list/summary/index.tsx +4 -1
  201. package/src/plugins/builtin/portfolio-list/summary/totals.ts +6 -4
  202. package/src/plugins/builtin/portfolio-list/table.tsx +38 -16
  203. package/src/plugins/builtin/research/corporate-actions-pane.tsx +4 -2
  204. package/src/plugins/builtin/research/relative-valuation-headless.ts +15 -5
  205. package/src/plugins/builtin/research/relative-valuation-model.ts +7 -1
  206. package/src/plugins/builtin/research/relative-valuation-pane.tsx +7 -4
  207. package/src/plugins/builtin/shared/cloud-upgrade.ts +4 -2
  208. package/src/plugins/builtin/shared/cpi-year-gap.ts +67 -0
  209. package/src/plugins/builtin/shared/headless-options.ts +1 -1
  210. package/src/plugins/builtin/social-mentions/model.ts +2 -2
  211. package/src/plugins/builtin/thirteenf/pane.tsx +1 -1
  212. package/src/plugins/builtin/ticker-detail/adr-pair/headless.ts +45 -2
  213. package/src/plugins/builtin/ticker-detail/financials/model.ts +51 -16
  214. package/src/plugins/builtin/ticker-detail/financials/nopat.ts +16 -0
  215. package/src/plugins/builtin/ticker-detail/financials/ratios.ts +44 -13
  216. package/src/plugins/builtin/ticker-detail/financials/schema.ts +33 -2
  217. package/src/plugins/builtin/ticker-detail/financials/tab.tsx +4 -2
  218. package/src/plugins/builtin/ticker-detail/headless-schema.ts +30 -4
  219. package/src/plugins/builtin/ticker-detail/headless.ts +280 -35
  220. package/src/plugins/builtin/ticker-detail/overview/components.tsx +4 -5
  221. package/src/plugins/builtin/ticker-detail/overview/model.ts +9 -2
  222. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +10 -2
  223. package/src/plugins/builtin/ticker-detail/pharma-signals/eligibility.ts +32 -0
  224. package/src/plugins/builtin/ticker-detail/pharma-signals/tab.tsx +162 -0
  225. package/src/plugins/builtin/ticker-detail/pharma-signals/waitlist.ts +126 -0
  226. package/src/plugins/builtin/ticker-detail/research-groups.ts +6 -4
  227. package/src/plugins/builtin/ticker-detail/research-tabs.ts +11 -0
  228. package/src/portfolio/collection-name.ts +2 -1
  229. package/src/portfolio/column-values.ts +34 -12
  230. package/src/portfolio/listed-symbol.ts +4 -2
  231. package/src/portfolio/period-pnl.ts +51 -1
  232. package/src/portfolio/suffixed-listings.ts +3 -1
  233. package/src/portfolio/watchlist-groups.ts +212 -0
  234. package/src/react/ticker-source.ts +3 -1
  235. package/src/renderers/dom/dialog-host.tsx +5 -5
  236. package/src/renderers/dom/styles.css +7 -0
  237. package/src/renderers/electrobun/view/remote/capability-invoker.ts +1 -1
  238. package/src/renderers/opentui/dialog-host.tsx +3 -4
  239. package/src/sources/gloomberb-cloud/normalizers.ts +5 -0
  240. package/src/sources/provider-router/history.ts +5 -2
  241. package/src/state/app/bootstrap.ts +11 -0
  242. package/src/state/app/context/index.tsx +6 -0
  243. package/src/sync/collections-contributor.ts +5 -2
  244. package/src/sync/config-merge.ts +10 -2
  245. package/src/sync/sanitize.ts +28 -0
  246. package/src/telemetry/usage-counts.ts +17 -0
  247. package/src/test-support/plugin-persistence.ts +12 -0
  248. package/src/tickers/company-name-listing.ts +4 -3
  249. package/src/tickers/company-name.ts +19 -1
  250. package/src/tickers/instrument-coverage.ts +27 -0
  251. package/src/tickers/search/home-listing.ts +38 -1
  252. package/src/tickers/search/index.ts +3 -2
  253. package/src/tickers/search/ranking.ts +21 -2
  254. package/src/time-series/base-series.ts +4 -0
  255. package/src/time-series/chart-seed.ts +1 -1
  256. package/src/time-series/financial-period-coverage.ts +4 -12
  257. package/src/time-series/parsed-history-cache.ts +1 -1
  258. package/src/time-series/resolve.ts +1 -1
  259. package/src/time-series/types.ts +5 -2
  260. package/src/time-series/use-chart-resolution.ts +6 -1
  261. package/src/types/config.ts +32 -0
  262. package/src/types/financials.ts +13 -0
  263. package/src/types/headless.ts +7 -0
  264. package/src/types/plugin-context.ts +5 -0
  265. package/src/types/ticker.ts +14 -0
  266. package/src/ui/ascii-font.ts +1 -4
  267. package/src/ui/dialog-stack.ts +17 -0
  268. package/src/ui/dialog.tsx +6 -2
  269. package/src/utils/async-deadline.ts +2 -2
  270. package/src/utils/crypto-pair.ts +9 -0
  271. package/src/utils/csv.ts +44 -5
  272. package/src/utils/exchanges.ts +13 -0
  273. package/src/utils/financial-statements.ts +60 -3
  274. package/src/utils/futures-generic.ts +17 -0
  275. package/src/utils/trailing-dividend.ts +13 -3
@@ -19,6 +19,7 @@ import {
19
19
  import {
20
20
  buyAndHoldReturns,
21
21
  concentration,
22
+ matchedReturnCount,
22
23
  pairedReturns,
23
24
  regressReturns,
24
25
  RISK_TAIL_CONFIDENCE,
@@ -46,6 +47,7 @@ import {
46
47
  import {
47
48
  RISK_FACTOR_INSTRUMENTS,
48
49
  riskInstrumentId,
50
+ riskInstrumentOf,
49
51
  type RiskHoldingRequest,
50
52
  type RiskMarketSnapshot,
51
53
  } from "./risk-client";
@@ -92,6 +94,8 @@ interface PortfolioRiskHolding {
92
94
  error: string | null;
93
95
  /** Why the holding is outside the basket; null when it qualifies. */
94
96
  leftOut: string | null;
97
+ /** Set when that is its daily closes not loading, which asked again they may. */
98
+ historyFailed?: true;
95
99
  }
96
100
  /** A holding or a currency's cash outside the basket, with its share of the book when one is known. */
97
101
  interface RiskLeftOut {
@@ -102,6 +106,8 @@ interface RiskLeftOut {
102
106
  share: number | null;
103
107
  /** Set on a currency's cash, which is never in the basket and does not make a report incomplete. */
104
108
  cash?: true;
109
+ /** Set when its daily closes did not load, which asked again they may. */
110
+ historyFailed?: true;
105
111
  }
106
112
  /** One currency of the book's cash, valued in the account currency. */
107
113
  interface RiskCashHolding extends RiskCashLine {
@@ -412,8 +418,7 @@ export function portfolioRiskRequests(
412
418
  ? lots.reduce((sum, row) => sum + Math.abs(row.marketValue!), 0)
413
419
  : null;
414
420
  return {
415
- symbol: ticker.metadata.ticker,
416
- exchange: ticker.metadata.exchange,
421
+ ...riskInstrumentOf(ticker),
417
422
  quantity: signedQuantity(lots),
418
423
  currency,
419
424
  snapshotValue: snapshot,
@@ -717,10 +722,7 @@ export function buildPortfolioRisk(
717
722
  tickers,
718
723
  portfolio.id,
719
724
  ).map((ticker) => {
720
- const instrument = {
721
- symbol: ticker.metadata.ticker,
722
- exchange: ticker.metadata.exchange,
723
- },
725
+ const instrument = riskInstrumentOf(ticker),
724
726
  id = riskInstrumentId(instrument);
725
727
  const history = byId.get(id),
726
728
  quote = history?.quote,
@@ -808,6 +810,7 @@ export function buildPortfolioRisk(
808
810
  fxBridged: holdingFxBridges(convertedFrom, history?.converted?.fxBridged, account, inAccount?.bridged),
809
811
  error,
810
812
  leftOut,
813
+ ...(history?.loadFailed && leftOut === history.error ? { historyFailed: true as const } : {}),
811
814
  };
812
815
  });
813
816
  // Each currency's cash once, valued in the portfolio currency.
@@ -858,6 +861,7 @@ export function buildPortfolioRisk(
858
861
  reason: row.leftOut!,
859
862
  value: row.marketValue,
860
863
  share: bookShare(row.marketValue),
864
+ ...(row.historyFailed ? { historyFailed: true as const } : {}),
861
865
  })),
862
866
  ...cashHoldings.map((row): RiskLeftOut => {
863
867
  const value = row.value == null ? null : Math.abs(row.value);
@@ -1019,17 +1023,24 @@ export function buildPortfolioRisk(
1019
1023
  : []),
1020
1024
  ].map((factor) => ({
1021
1025
  ...rollingBeta(basket, factor.series, factor.label, factor.id),
1022
- regression: regressReturns(basket.slice(-60), factor.series),
1026
+ regression: regressReturns(basket, factor.series, { window: 60 }),
1023
1027
  }));
1028
+ // The latest 60 returns both holdings have: a US close today and a Singapore close yesterday still pair their common days.
1024
1029
  const correlation = members.flatMap((left, index) =>
1025
1030
  members.slice(index + 1).map((right) => {
1026
- const regression = regressReturns(left.returns.slice(-60), right.returns);
1031
+ const regression = regressReturns(left.returns, right.returns, { window: 60 });
1032
+ const matched = regression?.samples ?? matchedReturnCount(left.returns, right.returns);
1027
1033
  return {
1028
1034
  left: left.id,
1029
1035
  right: right.id,
1030
1036
  label: `${left.symbol} / ${right.symbol}`,
1031
1037
  ...regression,
1032
1038
  value: regression?.correlation ?? null,
1039
+ // Why a pair has no correlation, in words.
1040
+ evidence: regression?.correlation != null ? `${matched} matched daily returns`
1041
+ : matched === 0 ? "no daily returns on the same dates"
1042
+ : matched < 60 ? `only ${matched} daily returns on the same dates; 60 needed`
1043
+ : `a price that did not move over ${matched} matched daily returns`,
1033
1044
  };
1034
1045
  }),
1035
1046
  );
@@ -1212,7 +1223,7 @@ export function buildPortfolioRisk(
1212
1223
  unit: "correlation",
1213
1224
  percentile: null,
1214
1225
  asOf: row.asOf ?? null,
1215
- detail: `${row.samples ?? 0} matched daily returns`,
1226
+ detail: row.evidence,
1216
1227
  }))
1217
1228
  .sort((left, right) => (right.value == null ? -1 : Math.abs(right.value)) - (left.value == null ? -1 : Math.abs(left.value))),
1218
1229
  stress: [
@@ -45,7 +45,7 @@ import { useThemeColors } from "../../../theme/theme-context";
45
45
  import type { PaneProps } from "../../../types/plugin";
46
46
  import { isAccessDenied } from "../../../api-client/errors";
47
47
  import { useResearchCloudSession } from "../shared/research-cloud-session";
48
- import { loadPortfolioRiskMarket } from "./risk-client";
48
+ import { loadPortfolioRiskMarket, riskInstrumentOf } from "./risk-client";
49
49
  import { loadRiskEpisodeHistory, riskEpisodeTargets, type RiskEpisodeState, type RiskEpisodeTarget } from "./risk-episodes";
50
50
  import { brokerPerformanceEvidence, parsePortfolioRiskEvidence } from "./risk-evidence";
51
51
  import { useBrokerPortfolioPerformance } from "./broker-performance";
@@ -443,7 +443,7 @@ export function PortfolioRiskPane({ focused, width, height }: PaneProps) {
443
443
  // load only there, once the market load says which holdings the basket takes.
444
444
  const episodeTargetsKey = useMemo(() => {
445
445
  if (frozen || view !== "stress" || !resource.data) return null;
446
- const held = localTickers.map((ticker) => ({ symbol: ticker.metadata.ticker, exchange: ticker.metadata.exchange }));
446
+ const held = localTickers.map(riskInstrumentOf);
447
447
  const targets = riskEpisodeTargets(resource.data, held);
448
448
  return targets.length ? JSON.stringify(targets) : null;
449
449
  }, [frozen, localTickers, resource.data, view]);
@@ -6,7 +6,7 @@ import { Badge, ChartTableHeader, DataTableView, Notice, PageStackView, PaneStat
6
6
  usePaneNoticeFooter, usePaneStatusFooter, usePaneTabs, useQueryBarSearch, useTableLoadMore, type DataTableColumn, type PaneHint, type QueryBarFilter } from "../../../components";
7
7
  import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
8
8
  import { formatCompactAxis } from "../../../components/chart-table";
9
- import { missingCell, shareCell, withoutQuietColumns } from "../shared/research-cells";
9
+ import { missingCell, shareCell } from "../shared/research-cells";
10
10
  import { useAsyncResource, useAutoRefresh, usePaneSettingValue, usePluginAppActions, usePluginPaneState } from "../../../public/react";
11
11
  import { usePaneTickerIdentity } from "../../../state/hooks/pane-ticker";
12
12
  import { useThemeColors } from "../../../theme/theme-context";
@@ -49,8 +49,8 @@ const rowDate = (row: AwardRow) => new Date(`${row.awardDate}T00:00:00Z`);
49
49
  const COLUMN = {
50
50
  date: { id: "date", label: "Date", width: 11, align: "left" }, recipient: { id: "recipient", label: "Awardee", width: 26, flexGrow: 1, align: "left" },
51
51
  ticker: { id: "ticker", label: "Ticker", width: 10, align: "left" }, currency: { id: "currency", label: "CCY", width: 5, align: "left" },
52
- value: { id: "value", label: "Value", width: 11, align: "right" }, obligated: { id: "obligated", label: "Obligated", width: 11, align: "right" },
53
- ceiling: { id: "ceiling", label: "Ceiling", width: 11, align: "right" }, agency: { id: "agency", label: "Agency", width: 24, align: "left" },
52
+ value: { id: "value", label: "Value", width: 11, align: "right", omitWhenEmpty: true }, obligated: { id: "obligated", label: "Obligated", width: 11, align: "right", omitWhenEmpty: true },
53
+ ceiling: { id: "ceiling", label: "Ceiling", width: 11, align: "right", omitWhenEmpty: true }, agency: { id: "agency", label: "Agency", width: 24, align: "left" },
54
54
  country: { id: "country", label: "Country", width: 8, align: "left" }, period: { id: "period", label: "Performance period", width: 24, align: "left" },
55
55
  title: { id: "title", label: "Contract", width: 36, flexGrow: 1, align: "left" },
56
56
  dateBasis: { id: "dateBasis", label: "Date basis", width: 14, align: "left" },
@@ -59,8 +59,6 @@ const COLUMN = {
59
59
  // shows the contract; the period and date basis follow.
60
60
  const FEED_COLUMNS: DataTableColumn[] = [COLUMN.date, COLUMN.recipient, COLUMN.ticker, COLUMN.title, COLUMN.agency, COLUMN.currency,
61
61
  COLUMN.value, COLUMN.obligated, COLUMN.ceiling, COLUMN.country, COLUMN.period, COLUMN.dateBasis];
62
- /** Amounts a source never reports (UK and EU notices have no obligation or ceiling) leave a column of dashes. */
63
- const QUIET_AMOUNTS = { obligated: [MISSING_VALUE], ceiling: [MISSING_VALUE] } as const;
64
62
  const EVENT_COLUMNS: DataTableColumn[] = [COLUMN.date, COLUMN.recipient, COLUMN.ticker,
65
63
  { id: "ratio", label: "% revenue", width: 11, align: "right" }, COLUMN.currency, { ...COLUMN.value, label: "Compared value" },
66
64
  { id: "revenue", label: "Annual revenue", width: 14, align: "right" }, { id: "basis", label: "Value basis", width: 13, align: "left" },
@@ -68,8 +66,8 @@ const EVENT_COLUMNS: DataTableColumn[] = [COLUMN.date, COLUMN.recipient, COLUMN.
68
66
  // The share leads the figures: concentration is what these views are for.
69
67
  const AGG_COLUMNS: DataTableColumn[] = [
70
68
  { id: "label", label: "Agency", width: 30, flexGrow: 1, align: "left" }, { id: "currency", label: "CCY", width: 5, align: "left" },
71
- { id: "share", label: "Share %", width: 24, align: "right" }, { id: "obligated", label: "Obligated", width: 12, align: "right" }, { id: "value", label: "Value", width: 12, align: "right" },
72
- { id: "ceiling", label: "Ceiling", width: 12, align: "right" },
69
+ { id: "share", label: "Share %", width: 24, align: "right" }, { ...COLUMN.obligated, width: 12 }, { ...COLUMN.value, width: 12 },
70
+ { ...COLUMN.ceiling, width: 12 },
73
71
  { id: "contracts", label: "Awards", width: 8, align: "right" },
74
72
  { id: "scope", label: "Scope", width: 27, align: "left" },
75
73
  ];
@@ -220,7 +218,7 @@ function AwardsView({ width, height, focused, symbol }: PaneProps & { symbol: st
220
218
  view={tab === "sectors" ? { value: leaderView, options: [{ value: "companies", label: "Companies" }, { value: "sectors", label: "Sectors" }], onChange: setLeaderView } : undefined} />;
221
219
  const columns = showLeaders ? LEADER_COLUMNS.filter((column) => column.id !== "scope" && column.id !== "currency")
222
220
  : aggregated ? AGG_COLUMNS.filter((column) => column.id !== "scope" && column.id !== "currency").map((column) => column.id === "label" ? { ...column, label: tab === "agencies" ? "Agency" : "Sector" } : column)
223
- : tab === "events" ? EVENT_COLUMNS : withoutQuietColumns(FEED_COLUMNS, rows, (row, id) => (id === "obligated" ? row.obligatedAmount : row.ceilingAmount) ?? MISSING_VALUE, QUIET_AMOUNTS);
221
+ : tab === "events" ? EVENT_COLUMNS : FEED_COLUMNS;
224
222
  const maxShare = Math.max(0, ...items.map((item) => item.kind === "aggregate" || item.kind === "leader" ? item.row.sharePercent ?? 0 : 0));
225
223
  // A preview's cohorts are the latest of any company, so they never chart as the ticker's.
226
224
  const charted = data?.locked ? [] : series;
@@ -1,10 +1,9 @@
1
1
  import { useCallback, useEffect, useMemo, useRef, useState, type RefObject } from "react";
2
- import { Box, TextAttributes, useUiCapabilities, type ScrollBoxRenderable } from "../../../ui";
2
+ import { Box, TextAttributes, type ScrollBoxRenderable } from "../../../ui";
3
3
  import { usePaneInstance } from "../../../state/app/context";
4
4
  import {
5
5
  DataTableStackView,
6
6
  DataTableView,
7
- MarkdownText,
8
7
  PaneLinkMenu,
9
8
  PaneStatusBody,
10
9
  useExternalLinkFooter,
@@ -12,7 +11,6 @@ import {
12
11
  type DataTableColumn,
13
12
  } from "../../../components";
14
13
  import { DetailReader } from "../../../components/reader/detail-reader";
15
- import { DESKTOP_LINE_HEIGHT, READER_COLUMN_FONT, READER_MEASURE } from "../../../components/reader/reader-text";
16
14
  import { loadingErrorFooterInfo, usePaneRefreshKey } from "../../../components/data-table/table-pane";
17
15
  import { getReleaseSummaries } from "../../../api-client/release-summaries";
18
16
  import { createTtlCache } from "../../../data/ttl-cache";
@@ -38,7 +36,6 @@ import {
38
36
  import {
39
37
  DEFAULT_CHANGELOG_VERSION_SORT,
40
38
  groupChangelogVersions,
41
- highlightsMarkdown,
42
39
  nextChangelogVersionSort,
43
40
  parseVersionSummaries,
44
41
  sortChangelogVersions,
@@ -76,7 +73,7 @@ export function resetChangelogCacheForTests(): void {
76
73
  /**
77
74
  * CHANGELOG.md from Gloom Cloud, which reads GitHub with its own credentials,
78
75
  * else from GitHub itself; null when neither has it, and then each version
79
- * shows its updates' own highlights.
76
+ * takes its first update's title.
80
77
  */
81
78
  async function readSummaries(signal: AbortSignal): Promise<string | null> {
82
79
  try {
@@ -164,42 +161,9 @@ function ReleaseNotes({
164
161
  );
165
162
  }
166
163
 
167
- /** The pane's inset around the highlights, as a detail reader has: 12px above, 16px below. */
168
- const HIGHLIGHTS_BOX_STYLE = { padding: "var(--gloom-space-md) var(--gloom-inset) var(--gloom-space-lg)" } as const;
169
- /** The reader's type and measure; markdown lines take the reader's line height (the host sets Text line height from --cell-h). */
170
- const HIGHLIGHTS_COLUMN_STYLE = {
171
- fontSize: READER_COLUMN_FONT,
172
- lineHeight: DESKTOP_LINE_HEIGHT,
173
- maxWidth: READER_MEASURE,
174
- "--cell-h": `${DESKTOP_LINE_HEIGHT}em`,
175
- } as const;
176
-
177
- /**
178
- * A version's highlights above its updates. The desktop and the web set them
179
- * in the reader's type at the reading measure, as the notes an update opens
180
- * are, lined up with the table's left edge; the terminal wraps them at `width`.
181
- */
182
- function VersionHighlights({ markdown, width }: { markdown: string; width: number }) {
183
- const { nativePaneChrome } = useUiCapabilities();
184
- if (nativePaneChrome) {
185
- return (
186
- <Box flexDirection="column" width="100%" flexShrink={0} style={HIGHLIGHTS_BOX_STYLE} data-gloom-ui="changelog-highlights">
187
- <Box flexDirection="column" width="100%" style={HIGHLIGHTS_COLUMN_STYLE}>
188
- <MarkdownText text={markdown} />
189
- </Box>
190
- </Box>
191
- );
192
- }
193
- return (
194
- <Box flexDirection="column" paddingX={1} paddingY={1} flexShrink={0}>
195
- <MarkdownText text={markdown} lineWidth={Math.max(12, width - 2)} />
196
- </Box>
197
- );
198
- }
199
-
200
164
  /**
201
- * An open version: its highlights, each naming the updates it shipped in,
202
- * over the table of those updates. Enter opens an update's notes.
165
+ * An open version: the table of its updates, under the title the stack
166
+ * header already gives it. Enter opens an update's notes.
203
167
  */
204
168
  function VersionDetail({
205
169
  version,
@@ -227,12 +191,10 @@ function VersionDetail({
227
191
  );
228
192
  const selectedIndex = resolveSelectedReleaseIndex(releases, selectedReleaseId);
229
193
  const columns = useMemo(() => buildReleaseColumns(version.releases), [version.releases]);
230
- const highlights = useMemo(() => highlightsMarkdown(version), [version]);
231
194
 
232
195
  return (
233
196
  <DataTableView<ChangelogRelease, ReleaseColumn>
234
197
  focused={focused}
235
- rootBefore={highlights ? <VersionHighlights markdown={highlights} width={width} /> : undefined}
236
198
  selection={{
237
199
  kind: "id",
238
200
  selectedId: releases[selectedIndex]?.id ?? null,
@@ -258,8 +220,8 @@ function VersionDetail({
258
220
 
259
221
  /**
260
222
  * The Changelog, as its own pane (CHG) and as ROADMAP's Changelog view: one
261
- * row per minor version, then a version's highlights and updates, then an
262
- * update's notes, one Back at a time.
223
+ * row per minor version, then a version's updates, then an update's notes,
224
+ * one Back at a time.
263
225
  */
264
226
  export function ChangelogPane({ focused, width, height }: PaneProps) {
265
227
  const paneInstance = usePaneInstance();
@@ -4,9 +4,10 @@ import { nextHeaderSort, type SortDirection } from "../../../utils/sort-values";
4
4
 
5
5
  /*
6
6
  * The Changelog by minor version: every update of 0.20 under one row, with
7
- * the version's title and highlights from the repository's CHANGELOG.md, or,
8
- * for a version it does not cover yet, from the updates' own notes. The
9
- * website's changelog reads the same file the same way.
7
+ * the version's title from the repository's CHANGELOG.md, or, for a version
8
+ * it does not cover yet, its first update's title. The website's changelog
9
+ * reads the same file the same way and shows its highlights too; they are
10
+ * read here so the file's own test holds them to that format.
10
11
  *
11
12
  * CHANGELOG.md has one section per minor version:
12
13
  *
@@ -21,10 +22,7 @@ import { nextHeaderSort, type SortDirection } from "../../../utils/sort-values";
21
22
  * skipped here.
22
23
  */
23
24
 
24
- /** Highlights shown for a version at most. */
25
- export const HIGHLIGHTS_MAX = 5;
26
-
27
- export interface ChangelogHighlight {
25
+ interface ChangelogHighlight {
28
26
  /** The bold claim, as written: "A faster, lighter desktop app." */
29
27
  lead: string;
30
28
  /** The line after the claim (inline markdown), or "". */
@@ -46,7 +44,6 @@ export interface ChangelogVersion {
46
44
  /** "0.20" */
47
45
  minor: string;
48
46
  title: string;
49
- highlights: ChangelogHighlight[];
50
47
  /** Newest first, as GitHub lists them. */
51
48
  releases: ChangelogRelease[];
52
49
  firstPublishedAt: string;
@@ -57,7 +54,6 @@ const SECTION = /^##\s+v?(\d+\.\d+)(?:\s*:\s*(.*))?$/;
57
54
  const VERSIONS = /\s*\(\s*(v?\d+\.\d+\.\d+(?:\s*,\s*v?\d+\.\d+\.\d+)*)\s*\)\s*$/;
58
55
  const BULLET = /^[-*]\s+(.+)$/;
59
56
  const BOLD_LEAD = /^\*\*(.+?)\*\*\s*(.*)$/;
60
- const PULL_REFS = /\s*\(\s*#\d+(?:\s*,\s*#\d+)*\s*\)\s*$/;
61
57
  const IMAGE = /^!\[[^\]]*\]\([^)\s]+\)$/;
62
58
 
63
59
  /** "**Claim.** Line" as its claim and its line; text without a claim is all claim. */
@@ -143,35 +139,6 @@ function minorOf(tagName: string): string {
143
139
  return tagName.match(/^v?(\d+\.\d+)\.\d+$/i)?.[1] ?? tagName;
144
140
  }
145
141
 
146
- /**
147
- * A plain bullet's claim: its first sentence, up to a colon that brings in
148
- * the details. Never inside inline code.
149
- */
150
- function firstClaim(text: string): string {
151
- let code = false;
152
- for (let index = 0; index < text.length; index += 1) {
153
- const char = text[index];
154
- if (char === "`") code = !code;
155
- if (code) continue;
156
- const next = text[index + 1];
157
- if ((char === "." || char === "!" || char === "?") && (next === undefined || next === " ")) return text.slice(0, index + 1);
158
- if (char === ":" && next === " ") return `${text.slice(0, index)}.`;
159
- }
160
- return text;
161
- }
162
-
163
- /**
164
- * An update's top highlight: the claim of the first bullet of its notes, a
165
- * plain bullet's first sentence, or its title when the notes have no bullet.
166
- */
167
- export function topHighlight(release: ChangelogRelease): ChangelogHighlight {
168
- const versions = [release.version.replace(/^v/i, "")];
169
- const bullet = release.body.split(/\r?\n/).map((line) => line.trim().match(BULLET)?.[1]).find(Boolean);
170
- if (!bullet) return { lead: release.title, detail: "", versions };
171
- const lead = bullet.startsWith("**") ? splitLead(bullet).lead : firstClaim(bullet.replace(PULL_REFS, ""));
172
- return { lead, detail: "", versions };
173
- }
174
-
175
142
  function fallbackTitle(releases: ChangelogRelease[], minor: string): string {
176
143
  const first = releases.find((release) => release.version.replace(/^v/i, "") === `${minor}.0`) ?? releases.at(-1);
177
144
  return first?.title ?? `Version ${minor}`;
@@ -190,10 +157,10 @@ function compareMinors(left: string, right: string): number {
190
157
 
191
158
  /**
192
159
  * The releases (newest first) as one version per minor, the highest first. A
193
- * version's title and highlights come from its summary; what the summary
194
- * leaves out comes from the updates themselves, so a missing or half-written
195
- * summary never empties a row. With `cut`, the list stopped at its limit, so
196
- * its oldest version may be missing updates and is left out.
160
+ * version's title comes from its summary, else from its first update, so a
161
+ * missing or half-written summary never empties a row. With `cut`, the list
162
+ * stopped at its limit, so its oldest version may be missing updates and is
163
+ * left out.
197
164
  */
198
165
  export function groupChangelogVersions(
199
166
  releases: ChangelogRelease[],
@@ -210,22 +177,14 @@ export function groupChangelogVersions(
210
177
 
211
178
  const versions = [...byMinor]
212
179
  .sort(([left], [right]) => compareMinors(left, right))
213
- .map(([minor, group]): ChangelogVersion => {
214
- const summary = summaries.get(minor);
215
- const highlights = summary?.highlights.length
216
- ? summary.highlights.slice(0, HIGHLIGHTS_MAX)
217
- // The newest updates', in the order they shipped.
218
- : group.slice(0, HIGHLIGHTS_MAX).reverse().map(topHighlight);
219
- return {
220
- id: /^\d+\.\d+$/.test(minor) ? `v${minor}` : minor,
221
- minor,
222
- title: summary?.title ?? fallbackTitle(group, minor),
223
- highlights,
224
- releases: group,
225
- firstPublishedAt: group.at(-1)?.publishedAt ?? "",
226
- lastPublishedAt: group[0]?.publishedAt ?? "",
227
- };
228
- });
180
+ .map(([minor, group]): ChangelogVersion => ({
181
+ id: /^\d+\.\d+$/.test(minor) ? `v${minor}` : minor,
182
+ minor,
183
+ title: summaries.get(minor)?.title ?? fallbackTitle(group, minor),
184
+ releases: group,
185
+ firstPublishedAt: group.at(-1)?.publishedAt ?? "",
186
+ lastPublishedAt: group[0]?.publishedAt ?? "",
187
+ }));
229
188
  return cut && versions.length > 1 ? versions.slice(0, -1) : versions;
230
189
  }
231
190
 
@@ -235,16 +194,6 @@ export function versionOfRelease(versions: ChangelogVersion[], releaseId: string
235
194
  return versions.find((version) => version.releases.some((release) => release.id === releaseId)) ?? null;
236
195
  }
237
196
 
238
- /** A version's highlights as the markdown list its detail shows, each naming its updates. */
239
- export function highlightsMarkdown(version: ChangelogVersion): string {
240
- return version.highlights.map((highlight) => {
241
- const claim = `**${highlight.lead}**`;
242
- const detail = highlight.detail ? ` ${highlight.detail}` : "";
243
- const shipped = highlight.versions.length ? ` (${highlight.versions.join(", ")})` : "";
244
- return `- ${claim}${detail}${shipped}`;
245
- }).join("\n");
246
- }
247
-
248
197
  export type ChangelogVersionColumnId = "date" | "version" | "title" | "updates";
249
198
 
250
199
  export interface ChangelogVersionSort {
@@ -5,7 +5,7 @@ import {
5
5
  } from "../../../time-series/field-catalog";
6
6
  import type { SeriesCatalogEntry, SeriesFrequency, SeriesInput, SeriesPlacement } from "../../../series/types";
7
7
  import { parseOptionSymbol } from "../../../utils/options";
8
- import type { SeriesCatalogInstrument } from "./series-catalog";
8
+ import { hasCompanyFields, type SeriesCatalogInstrument } from "./series-catalog";
9
9
  import { macroReleaseTopic } from "../shared/macro-releases";
10
10
 
11
11
  export const CHART_COMPOSER_TEMPLATE_ID = "chart-composer-pane";
@@ -262,7 +262,10 @@ export function catalogRowsForResolvedInstruments(
262
262
  const symbol = catalogTickerFromInput(instrument.symbol);
263
263
  if (!symbol) return [];
264
264
  const input = instrumentInput(instrument);
265
- return templates.filter((row) => row.input === input).map((row): CatalogSeriesRow => {
265
+ // An index or a currency pair has prices, not a company's revenue or EPS.
266
+ const companyFields = hasCompanyFields(instrument);
267
+ return templates.filter((row) => row.input === input
268
+ && (companyFields || !row.id.startsWith("field:") || row.id.startsWith("field:market."))).map((row): CatalogSeriesRow => {
266
269
  const expression = fillTemplate(row.template, symbol);
267
270
  return {
268
271
  ...row,
@@ -84,6 +84,7 @@ export function SeriesEditorDialog({ dialogId, resolve, initialSpec }: SeriesEdi
84
84
  return (
85
85
  <DialogFrame
86
86
  title="Chart Series"
87
+ onClose={() => resolve(null)}
87
88
  footer={[...navigationKeys, ...seriesKeys].join(" · ")}
88
89
  // The desktop's fields take the pointer and arrows like any form.
89
90
  desktopFooter={selected
@@ -1394,7 +1394,7 @@ function ChartComposerSurface({
1394
1394
  spec={spec}
1395
1395
  setSpec={setSpec}
1396
1396
  focused={focused}
1397
- width={Math.max(8, Math.min(36, width - 1))}
1397
+ width={Math.max(8, width - 1)}
1398
1398
  height={height}
1399
1399
  shortcutEnabled={surfaceInteractive}
1400
1400
  shortcutBlocked={dialogOpen}
@@ -29,7 +29,8 @@ const CHART_TOOLBAR_HEIGHT = 1;
29
29
  const MINIMUM_CHART_HEIGHT = 4;
30
30
  const QUICK_ADD_ROW_HEIGHT = 1;
31
31
  const IDLE_QUICK_ADD_WIDTH = 14;
32
- const ACTIVE_QUICK_ADD_WIDTH = 36;
32
+ /** A pair's price row (`USDC-USD · Price (OHLCV)`) and its `Chart bars` fit whole. */
33
+ const ACTIVE_QUICK_ADD_WIDTH = 40;
33
34
 
34
35
  interface ClosestElementLike {
35
36
  closest(selector: string): {
@@ -474,6 +475,8 @@ export function ChartSeriesQuickAdd({
474
475
  surface="plain"
475
476
  bgColor={colors.panel}
476
477
  scrollable={items.length > drawerHeight}
478
+ // A scrollbar would take the rows' last column, where a press must add the row like the rest of it.
479
+ scrollbar={false}
477
480
  rowGap={0}
478
481
  selectOnHover
479
482
  onSelect={(index) => setSelectedIndex(index - (searchError ? 1 : 0))}
@@ -17,6 +17,8 @@ import {
17
17
  import { parseSeriesExpression, type ParsedSeriesExpression } from "./series-expression";
18
18
  import { parseFormulaExpression } from "./formula";
19
19
  import { currencyCodeLabel } from "../../../utils/currency-units";
20
+ import { classifyInstrumentType, kindFromListingSyntax } from "../../../tickers/instrument-kind";
21
+ import { isCryptoPairSymbol } from "../../../utils/crypto-pair";
20
22
 
21
23
  export interface SeriesCatalogInstrument {
22
24
  symbol: string;
@@ -204,7 +206,9 @@ export function fieldCategory(field: TimeSeriesFieldDefinition): string {
204
206
  return "Fundamentals";
205
207
  }
206
208
 
209
+ /** A market field is drawn at the chart's own bar size (1m on a day's chart), never fixed at its daily default. */
207
210
  function fieldFrequency(field: TimeSeriesFieldDefinition): string {
211
+ if (field.id.startsWith("market.")) return "Chart bars";
208
212
  return field.nativeFrequency === "auto"
209
213
  ? "Automatic"
210
214
  : `${field.nativeFrequency[0]!.toUpperCase()}${field.nativeFrequency.slice(1)}`;
@@ -425,6 +429,17 @@ export function buildCapabilitySeriesSuggestions(
425
429
  }));
426
430
  }
427
431
 
432
+ /**
433
+ * Whether a listing can have company fields (revenue, EPS, valuation): not a coin, a currency pair, an index or a
434
+ * future, which have prices alone. A coin's add-series list offered Revenue, Net Income and EPS.
435
+ */
436
+ export function hasCompanyFields(instrument: SeriesCatalogInstrument): boolean {
437
+ const kind = classifyInstrumentType(instrument.assetCategory)
438
+ ?? kindFromListingSyntax(instrument.symbol, instrument.exchange)
439
+ ?? (isCryptoPairSymbol(instrument.symbol.trim().toUpperCase()) ? "crypto" : null);
440
+ return kind == null || kind === "equity" || kind === "fund" || kind === "other";
441
+ }
442
+
428
443
  export function buildSeriesCatalogSuggestions(
429
444
  query: string,
430
445
  defaultInstrument: SeriesCatalogInstrument,
@@ -455,7 +470,8 @@ export function buildSeriesCatalogSuggestions(
455
470
  for (const instrument of instruments) {
456
471
  const instrumentKey = publicTickerKey(instrument.symbol, instrument.exchange);
457
472
  const instrumentLabel = canonicalTickerKey(instrument.symbol, instrument.exchange);
458
- for (const { field } of rankedFields.slice(0, fieldLimit)) {
473
+ const fields = hasCompanyFields(instrument) ? rankedFields : rankedFields.filter(({ field }) => field.id.startsWith("market."));
474
+ for (const { field } of fields.slice(0, fieldLimit)) {
459
475
  const expression: ParsedSeriesExpression = {
460
476
  kind: "security",
461
477
  symbol: instrument.symbol,
@@ -215,7 +215,8 @@ function rawArgumentFor(manifest: ClientToolManifest, args: Record<string, JsonV
215
215
  }
216
216
  case "tickers":
217
217
  case "symbol-list": {
218
- const symbols = args.symbols;
218
+ // One ticker as `symbol`, as a call to a function that took one (FA before it read several) names it.
219
+ const symbols = args.symbols ?? (typeof args.symbol === "string" ? [args.symbol] : undefined);
219
220
  if (symbols == null && manifest.argument.optional) return "";
220
221
  if (!Array.isArray(symbols) || !symbols.every((symbol) => typeof symbol === "string")) {
221
222
  throw new Error(`${manifest.name} requires a symbols array.`);
@@ -216,8 +216,9 @@ function clientToolCommand(catalog: PaneFunctionCatalog, found: CatalogFunction,
216
216
  if (!headless) return null;
217
217
  const arg = headless.argument.kind === "ticker"
218
218
  ? text(args.symbol)
219
+ // A call made while the function took one ticker (FA before it read several) named it as `symbol`.
219
220
  : headless.argument.kind === "tickers" || headless.argument.kind === "symbol-list"
220
- ? symbols(args.symbols).join(",")
221
+ ? symbols(args.symbols ?? args.symbol).join(",")
221
222
  : headless.argument.kind === "free-text"
222
223
  ? text(args.text)
223
224
  : "";
@@ -119,6 +119,8 @@ const askgModule: PluginModule = {
119
119
  description: "Ask a question about your panes and watch the tools Gloom runs",
120
120
  keywords: ["ask", "gloom", "assistant", "ai", "question", "askg"],
121
121
  shortcut: { prefix: "ASKG", argPlaceholder: "question", argKind: "text" },
122
+ // createInstance asks the open pane a question, so catalog discovery must not run it with a sample one.
123
+ catalogSettings: {},
122
124
  createInstance: (_context, options) => {
123
125
  // The question is handed to the pane directly, so it is never persisted
124
126
  // with the layout and never replayed on the next launch.
@@ -31,6 +31,8 @@ export const thesisModule: PluginModule = {
31
31
  description: "Every thesis you and your teams hold, sorted by what needs a ruling",
32
32
  keywords: ["thesis", "theses", "conviction", "invalidation", "kill", "pillars", "journal"],
33
33
  shortcut: { prefix: "THESIS", argPlaceholder: "tickers (optional)", argKind: "text" },
34
+ // createInstance starts a thesis in the open board, so catalog discovery must not run it with a sample ticker.
35
+ catalogSettings: {},
34
36
  createInstance: (_context, options) => {
35
37
  // `THESIS NVDA` opens that thesis or starts one; `THESIS NVDA AMD` starts a pair. The params name the
36
38
  // ticker to a board that is drawn without the request (a capture), which shows it without starting one.
@@ -11,6 +11,7 @@ import { chatController, type ChatController } from "../chat/controller";
11
11
  import { useCloudPlanAction, useCloudUpgradeAction } from "../shared/cloud-upgrade";
12
12
  import { CLOUD_QUOTE_DELAY_MINUTES, resolvePlanAccess } from "../../../api-client/plan-access";
13
13
  import { useTrialOfferShowing } from "./trial-offer-status-widget";
14
+ import { logFailure } from "../../../utils/log-failure";
14
15
  import {
15
16
  NARROW_STATUS_BAR_COLUMNS,
16
17
  STATUS_WIDGET_COLUMNS,
@@ -86,16 +87,19 @@ export function CloudUpgradeStatusWidget({ controller = chatController }: CloudU
86
87
 
87
88
  const mark = <DelayedMark minutes={CLOUD_QUOTE_DELAY_MINUTES} />;
88
89
  const detail = tf("{delay} delayed", { delay: `${CLOUD_QUOTE_DELAY_MINUTES}m` });
90
+ // What is late, and by how much: stock quotes. A crypto exchange's own prices are not held back.
91
+ const reason = tf("Stock quotes are {minutes} min delayed without Pro.", { minutes: CLOUD_QUOTE_DELAY_MINUTES });
92
+ const upgrade = () => { openUpgrade({ reason }).catch(logFailure("cloud.upgrade-status-widget", "Open upgrade from the delayed mark failed")); };
89
93
  return (
90
94
  <Box flexDirection="row" alignItems="center" flexShrink={0} paddingRight={1} data-gloom-role="delayed-status">
91
95
  {spelled ? (
92
96
  <Button
93
97
  label={detail}
94
- title={`${detail}. ${tf("Upgrade to Pro ({key}, then {command})", { key: commandBarKey, command: "UPGRADE" })}`}
98
+ title={`${reason} ${tf("Upgrade to Pro ({key}, then {command})", { key: commandBarKey, command: "UPGRADE" })}`}
95
99
  variant="plain"
96
100
  compact
97
101
  stopPropagation
98
- onPress={openUpgrade}
102
+ onPress={upgrade}
99
103
  >
100
104
  <Box flexDirection="row" alignItems="center" gap={1}>
101
105
  {mark}
@@ -2,7 +2,7 @@ import { MISSING_VALUE } from "../../../utils/format";
2
2
  import type { CpiRow } from "../../../api-client/cpi";
3
3
  import type { HeadlessPaneDefinition } from "../../../types/plugin";
4
4
  import { fetchCpiBoard } from "./client";
5
- import { cpiHeaderLine, cpiMonth, cpiRowOption, cpiRows } from "./model";
5
+ import { cpiHeaderLine, cpiHeadlineYearGapLine, cpiMonth, cpiRowOption, cpiRows, cpiYearGapLine } from "./model";
6
6
 
7
7
  /** Two decimals; a value that rounds to zero reads 0.00, never -0.00. */
8
8
  const percent = (value: unknown) => typeof value === "number" ? (Number(value.toFixed(2)) === 0 ? "0.00" : value.toFixed(2)) : MISSING_VALUE;
@@ -29,6 +29,8 @@ const SUMMARY_COLUMNS = [
29
29
  { key: "contributionYear", header: "Y/Y pts", align: "right" as const, format: percent },
30
30
  ];
31
31
 
32
+ const notesOf = (note: string | null) => note ? { notes: [note] } : {};
33
+
32
34
  /** The selected row's months against the headline's year over year: the chart as a table. */
33
35
  function historyRows(row: CpiRow, headline: CpiRow | null) {
34
36
  const headlineYear = new Map((headline?.history ?? []).map(([month, , yoy]) => [month, yoy]));
@@ -73,6 +75,8 @@ export const cpiHeadless: HeadlessPaneDefinition<"bundle"> = {
73
75
  rows: historyRows(row, headline) },
74
76
  ],
75
77
  errors: data.gaps,
78
+ // Why the month's y/y is empty (no October 2025 index), and the latest the row has.
79
+ ...notesOf(cpiYearGapLine(data, row)),
76
80
  freshness,
77
81
  metadata: { ...metadata, rows: [row] },
78
82
  };
@@ -80,6 +84,7 @@ export const cpiHeadless: HeadlessPaneDefinition<"bundle"> = {
80
84
  return {
81
85
  sections: [{ title: header, columns: SUMMARY_COLUMNS, rows: cpiRows(data).map((row) => reportRow(row)) }],
82
86
  errors: data.gaps,
87
+ ...notesOf(cpiHeadlineYearGapLine(data)),
83
88
  freshness,
84
89
  metadata,
85
90
  };