@gloom-sh/terminal 0.20.11 → 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 (242) hide show
  1. package/package.json +2 -1
  2. package/src/api-client/awards.ts +16 -0
  3. package/src/api-client/central-bank-rates.ts +5 -0
  4. package/src/api-client/data.ts +55 -2
  5. package/src/api-client/index.ts +18 -1
  6. package/src/api-client/request.ts +86 -3
  7. package/src/api-client/socket-connection.ts +12 -1
  8. package/src/api-client/socket.ts +21 -3
  9. package/src/api-client/supply-chain-graph.ts +4 -2
  10. package/src/api-client/supply-chain.ts +8 -0
  11. package/src/api-client/types/econ.ts +10 -7
  12. package/src/api-client/types/filings-and-calls.ts +8 -0
  13. package/src/app/global-shortcuts.ts +2 -1
  14. package/src/app/keybindings/actions.ts +19 -0
  15. package/src/app/pane-runtime/index.tsx +18 -3
  16. package/src/app/pane-runtime/layout-placement.ts +63 -0
  17. package/src/app/pane-runtime/ticker-open-runtime.ts +10 -2
  18. package/src/capabilities/chart-series.ts +4 -1
  19. package/src/cli/board-coins.ts +10 -1
  20. package/src/cli/commands/crypto-hints.ts +3 -2
  21. package/src/cli/commands/fred-series.ts +0 -54
  22. package/src/cli/commands/market.ts +209 -31
  23. package/src/cli/commands/overview.ts +47 -14
  24. package/src/cli/commands/search.ts +37 -8
  25. package/src/cli/commands/ticker.ts +15 -4
  26. package/src/cli/desktop-pane-shot.ts +27 -2
  27. package/src/cli/fx-quote-rate.ts +1 -1
  28. package/src/cli/glossary.ts +14 -5
  29. package/src/cli/history-catalog-series.ts +85 -0
  30. package/src/cli/index.ts +1 -1
  31. package/src/cli/list-progress.ts +45 -0
  32. package/src/cli/listing-arg.ts +71 -7
  33. package/src/cli/name-entries.ts +8 -4
  34. package/src/cli/not-a-ticker.ts +2 -2
  35. package/src/cli/pane-functions/freshness.ts +50 -3
  36. package/src/cli/pane-functions/index.ts +7 -4
  37. package/src/cli/pane-functions/market-session.ts +66 -14
  38. package/src/cli/pane-functions/options.ts +5 -0
  39. package/src/cli/pane-functions/resolver.ts +9 -2
  40. package/src/cli/pane-functions/screenshot-assessment.ts +28 -3
  41. package/src/cli/pane-functions/screenshot-types.ts +6 -0
  42. package/src/cli/quote-answer.ts +49 -10
  43. package/src/cli/quote-list-reads.ts +87 -0
  44. package/src/cli/report-tables.ts +70 -13
  45. package/src/cli/result.ts +24 -2
  46. package/src/cli/symbol-list.ts +31 -4
  47. package/src/cli/terminal-code-hints.ts +83 -0
  48. package/src/cli/ticker-resolution.ts +2 -1
  49. package/src/cli/treasury-yields.ts +5 -0
  50. package/src/components/command-bar/action-runtime.ts +2 -0
  51. package/src/components/command-bar/routing/launch-request.ts +2 -1
  52. package/src/components/command-bar/routing/navigation-state.ts +4 -2
  53. package/src/components/command-bar/workflow/types.ts +6 -0
  54. package/src/components/layout/detached-pane-shell.tsx +3 -0
  55. package/src/components/layout/double-escape-close.ts +34 -3
  56. package/src/components/layout/floating-pane.tsx +10 -4
  57. package/src/components/layout/pane/cycle-order.ts +66 -2
  58. package/src/components/layout/pane/header.tsx +140 -31
  59. package/src/components/layout/pane/sidebar.tsx +13 -5
  60. package/src/components/layout/pane/status-footer.ts +3 -1
  61. package/src/components/layout/shell/drag/runtime.ts +5 -0
  62. package/src/components/layout/shell/index.tsx +25 -0
  63. package/src/components/layout/shell/menu.ts +9 -0
  64. package/src/components/layout/shell/pane/actions.ts +36 -0
  65. package/src/components/layout/shell/pane/management-shortcuts.ts +27 -3
  66. package/src/components/layout/shell/pane-occlusion.ts +40 -0
  67. package/src/components/layout/shell/shortcuts.ts +17 -1
  68. package/src/components/layout/shell/terminal-pointer-runtime.ts +39 -6
  69. package/src/components/layout/shell/window-mode/index.ts +5 -16
  70. package/src/components/layout/shell/window-mode/overlays.tsx +3 -1
  71. package/src/components/market-board/index.tsx +14 -5
  72. package/src/components/metric-treemap/index.tsx +3 -1
  73. package/src/components/ui/button.tsx +48 -4
  74. package/src/components/ui/data-table/opentui/index.tsx +24 -9
  75. package/src/components/ui/data-table/types.ts +7 -0
  76. package/src/components/ui/inline-quick-add.tsx +19 -3
  77. package/src/components/ui/list-view.tsx +11 -5
  78. package/src/components/ui/query-bar.tsx +16 -1
  79. package/src/components/ui/selection-fill.ts +39 -0
  80. package/src/core/state/app/layout-reducer.ts +2 -1
  81. package/src/core/state/app/pane-choices.ts +68 -0
  82. package/src/core/state/app/state.ts +14 -6
  83. package/src/core/state/app/types.ts +8 -0
  84. package/src/layout/pane-manager/dock-tree.ts +19 -0
  85. package/src/layout/pane-manager/index.ts +3 -0
  86. package/src/market-data/market/freshness.ts +33 -0
  87. package/src/market-data/market/status.ts +5 -1
  88. package/src/market-data/quotes/contributions.ts +10 -0
  89. package/src/market-data/quotes/freshness.ts +19 -0
  90. package/src/market-data/quotes/live-valuation.ts +31 -4
  91. package/src/market-data/quotes/resolution.ts +4 -0
  92. package/src/market-data/quotes/time.ts +0 -14
  93. package/src/plugins/builtin/account-management/index.tsx +1 -0
  94. package/src/plugins/builtin/awards/detail.tsx +12 -4
  95. package/src/plugins/builtin/awards/headless.ts +29 -8
  96. package/src/plugins/builtin/awards/model.ts +36 -2
  97. package/src/plugins/builtin/awards/pane.tsx +7 -4
  98. package/src/plugins/builtin/broker-manager/index.tsx +1 -0
  99. package/src/plugins/builtin/broker-trading/index.tsx +1 -1
  100. package/src/plugins/builtin/central-bank-rates/headless.ts +6 -6
  101. package/src/plugins/builtin/central-bank-rates/index.tsx +1 -1
  102. package/src/plugins/builtin/central-bank-rates/model.ts +21 -3
  103. package/src/plugins/builtin/central-bank-rates/pane.tsx +15 -5
  104. package/src/plugins/builtin/chart-composer/headless.ts +5 -1
  105. package/src/plugins/builtin/chart-composer/pane.tsx +1 -0
  106. package/src/plugins/builtin/chat/content/handle-prompt.tsx +4 -0
  107. package/src/plugins/builtin/chat/controller/realtime.ts +17 -1
  108. package/src/plugins/builtin/chat/message/terminal.tsx +4 -1
  109. package/src/plugins/builtin/chat/sidebar.tsx +3 -4
  110. package/src/plugins/builtin/cloud/askg/pane.tsx +4 -0
  111. package/src/plugins/builtin/cloud/plugin.tsx +1 -0
  112. package/src/plugins/builtin/cloud/team/module.tsx +1 -0
  113. package/src/plugins/builtin/cloud/thesis/detail.tsx +9 -4
  114. package/src/plugins/builtin/commodity-balances/pane.tsx +13 -5
  115. package/src/plugins/builtin/company-kpis/model.ts +3 -3
  116. package/src/plugins/builtin/connections/index.ts +1 -0
  117. package/src/plugins/builtin/credit-boards/cdx-pane.tsx +9 -5
  118. package/src/plugins/builtin/credit-boards/client.ts +5 -0
  119. package/src/plugins/builtin/credit-boards/headless.ts +1 -6
  120. package/src/plugins/builtin/credit-boards/model.ts +0 -6
  121. package/src/plugins/builtin/credit-boards/series.ts +19 -8
  122. package/src/plugins/builtin/credit-boards/sovr-pane.tsx +9 -5
  123. package/src/plugins/builtin/crypto-etf-flows/headless.ts +23 -13
  124. package/src/plugins/builtin/crypto-etf-flows/pane.tsx +8 -3
  125. package/src/plugins/builtin/debt-maturities/headless.ts +16 -7
  126. package/src/plugins/builtin/debt-maturities/model.ts +9 -15
  127. package/src/plugins/builtin/debt-maturities/pane.tsx +9 -10
  128. package/src/plugins/builtin/earnings/board-model.ts +33 -4
  129. package/src/plugins/builtin/earnings/board.tsx +15 -3
  130. package/src/plugins/builtin/earnings/calendar.tsx +10 -6
  131. package/src/plugins/builtin/earnings/client.ts +0 -9
  132. package/src/plugins/builtin/earnings/headless.ts +10 -7
  133. package/src/plugins/builtin/earnings/history.tsx +21 -14
  134. package/src/plugins/builtin/earnings-calls/data.ts +24 -4
  135. package/src/plugins/builtin/earnings-calls/format.ts +23 -5
  136. package/src/plugins/builtin/earnings-calls/headless.ts +23 -3
  137. package/src/plugins/builtin/earnings-calls/index.tsx +1 -0
  138. package/src/plugins/builtin/earnings-calls/model.ts +11 -1
  139. package/src/plugins/builtin/earnings-calls/pane.tsx +2 -5
  140. package/src/plugins/builtin/econ/calendar-model.ts +27 -0
  141. package/src/plugins/builtin/econ/fred-catalog.ts +3 -0
  142. package/src/plugins/builtin/econ/index.tsx +9 -2
  143. package/src/plugins/builtin/econ-statistics/headless.ts +3 -1
  144. package/src/plugins/builtin/econ-statistics/index.tsx +1 -1
  145. package/src/plugins/builtin/fear-greed/headless.ts +16 -13
  146. package/src/plugins/builtin/fear-greed/pane.tsx +12 -4
  147. package/src/plugins/builtin/filing-events/index.tsx +1 -0
  148. package/src/plugins/builtin/fx-matrix/index.tsx +30 -19
  149. package/src/plugins/builtin/insider/table.tsx +10 -7
  150. package/src/plugins/builtin/insider/tickers.tsx +1 -1
  151. package/src/plugins/builtin/iv-history/headless.ts +9 -8
  152. package/src/plugins/builtin/jobs/index.tsx +1 -0
  153. package/src/plugins/builtin/macro-day/headless.ts +3 -3
  154. package/src/plugins/builtin/macro-day/model.ts +1 -1
  155. package/src/plugins/builtin/macro-day/releases.ts +25 -16
  156. package/src/plugins/builtin/market-movers/index.tsx +20 -8
  157. package/src/plugins/builtin/market-movers/model.ts +5 -0
  158. package/src/plugins/builtin/market-movers/session-body.tsx +2 -1
  159. package/src/plugins/builtin/money-markets/headless.ts +12 -2
  160. package/src/plugins/builtin/money-markets/pane.tsx +10 -1
  161. package/src/plugins/builtin/options/view.tsx +1 -0
  162. package/src/plugins/builtin/options-positioning/pane.tsx +1 -1
  163. package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +4 -31
  164. package/src/plugins/builtin/portfolio-list/pane/index.tsx +6 -1
  165. package/src/plugins/builtin/portfolio-list/quick-add/index.tsx +22 -8
  166. package/src/plugins/builtin/portfolio-list/summary/index.tsx +6 -8
  167. package/src/plugins/builtin/portfolio-list/table.tsx +10 -1
  168. package/src/plugins/builtin/realized-vol/headless.ts +28 -2
  169. package/src/plugins/builtin/risk-factors/index.tsx +1 -0
  170. package/src/plugins/builtin/shared/source-footer.ts +70 -0
  171. package/src/plugins/builtin/short-interest/publications-pane.tsx +5 -1
  172. package/src/plugins/builtin/short-volume/pane.tsx +5 -1
  173. package/src/plugins/builtin/social-mentions/outliers.tsx +10 -1
  174. package/src/plugins/builtin/social-mentions/pane.tsx +7 -0
  175. package/src/plugins/builtin/supply-chain/client.ts +3 -1
  176. package/src/plugins/builtin/supply-chain/flow.tsx +25 -8
  177. package/src/plugins/builtin/supply-chain/graph-client.ts +1 -1
  178. package/src/plugins/builtin/supply-chain/graph-evidence.ts +1 -1
  179. package/src/plugins/builtin/supply-chain/graph-model.ts +12 -1
  180. package/src/plugins/builtin/supply-chain/graph-pane.tsx +9 -8
  181. package/src/plugins/builtin/supply-chain/graph.tsx +12 -6
  182. package/src/plugins/builtin/supply-chain/headless.ts +13 -7
  183. package/src/plugins/builtin/supply-chain/model.ts +68 -11
  184. package/src/plugins/builtin/supply-chain/pane.tsx +9 -6
  185. package/src/plugins/builtin/supply-chain/row-evidence.tsx +5 -5
  186. package/src/plugins/builtin/ticker-detail/overview/components.tsx +14 -1
  187. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +2 -0
  188. package/src/plugins/builtin/ticker-detail/pane.tsx +48 -24
  189. package/src/plugins/builtin/ticker-detail/quote-footer.ts +5 -0
  190. package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +6 -3
  191. package/src/plugins/builtin/treasury-auctions/after.ts +50 -23
  192. package/src/plugins/builtin/treasury-auctions/cache.ts +23 -5
  193. package/src/plugins/builtin/treasury-auctions/headless.ts +226 -37
  194. package/src/plugins/builtin/treasury-auctions/hk-headless.ts +11 -5
  195. package/src/plugins/builtin/treasury-auctions/hk-view.tsx +27 -25
  196. package/src/plugins/builtin/treasury-auctions/hk.ts +60 -8
  197. package/src/plugins/builtin/treasury-auctions/index.tsx +3 -0
  198. package/src/plugins/builtin/treasury-auctions/keys.ts +27 -0
  199. package/src/plugins/builtin/treasury-auctions/like.ts +137 -0
  200. package/src/plugins/builtin/treasury-auctions/model.ts +100 -22
  201. package/src/plugins/builtin/treasury-auctions/pane.tsx +39 -11
  202. package/src/plugins/builtin/vol-surface/heat-grid.tsx +4 -2
  203. package/src/plugins/builtin/vol-surface/pane.tsx +5 -2
  204. package/src/plugins/runtime/index.tsx +1 -0
  205. package/src/plugins/runtime/state.ts +20 -0
  206. package/src/portfolio/column-values.ts +8 -2
  207. package/src/public/__snapshots__/public-api.test.ts.snap +5 -0
  208. package/src/public/react.ts +7 -0
  209. package/src/react/auto-refresh.ts +29 -0
  210. package/src/renderers/browser/deeplink-bridge.ts +24 -3
  211. package/src/renderers/dom/desktop/query-bar.tsx +229 -60
  212. package/src/renderers/dom/host/overflow-fade-px.ts +2 -0
  213. package/src/renderers/dom/host/overflow-fade.ts +1 -2
  214. package/src/renderers/dom/styles.css +25 -5
  215. package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -1
  216. package/src/series/types.ts +2 -0
  217. package/src/sources/gloomberb-cloud/fred-attribution.ts +86 -0
  218. package/src/sources/gloomberb-cloud/index.ts +25 -1
  219. package/src/sources/gloomberb-cloud/normalizers.ts +22 -3
  220. package/src/sources/provider-errors.ts +64 -1
  221. package/src/sources/provider-router/batches.ts +19 -0
  222. package/src/sources/provider-router/index.ts +7 -1
  223. package/src/state/app/context/index.tsx +24 -1
  224. package/src/state/pane-unsent-work.ts +47 -0
  225. package/src/test-support/shell-pane-keys.tsx +5 -0
  226. package/src/test-support/telemetry-guard.ts +83 -0
  227. package/src/test-support/test-env.ts +12 -0
  228. package/src/theme/colors.ts +17 -1
  229. package/src/theme/ui-tokens.ts +50 -1
  230. package/src/tickers/listing-venues.ts +11 -1
  231. package/src/tickers/search/japanese-names.json +1 -0
  232. package/src/tickers/search/japanese-names.ts +152 -0
  233. package/src/tickers/terminal-codes.ts +55 -6
  234. package/src/time-series/base-series.ts +3 -0
  235. package/src/types/data-provider.ts +6 -0
  236. package/src/types/financials.ts +11 -0
  237. package/src/types/plugin-contributions.ts +7 -0
  238. package/src/types/plugin-panes.ts +7 -0
  239. package/src/ui/host.tsx +6 -0
  240. package/src/utils/double-escape-close.ts +42 -0
  241. package/src/utils/fx-status.ts +30 -7
  242. package/src/utils/network-failure.ts +23 -0
@@ -18,6 +18,9 @@ import type { EarningsCalendarQuery } from "../../../api-client/earnings";
18
18
  import { useAppSelector, usePaneAppConfig, usePaneSettingValue } from "../../../state/app/context";
19
19
  import { useLiveStreamingSetting } from "../../../state/hooks/live-streaming";
20
20
  import { useAsyncResource, useAutoRefresh, usePluginPaneState, useUpdatedAgo } from "../../../public/react";
21
+ import { useUtcDay } from "../../../react/auto-refresh";
22
+ import { reportFooterSegment } from "../shared/source-footer";
23
+ import { earningsBoardHeadless } from "./headless";
21
24
  import type { EarningsEvent } from "../../../types/data-provider";
22
25
  import { getSharedRegistry } from "../../registry/shared";
23
26
  import { Box, useUiCapabilities } from "../../../ui";
@@ -94,6 +97,8 @@ interface BoardData {
94
97
  /** The query read, by `earningsCalendarKey`: kept data from another week is not this week's. */
95
98
  queryKey: string;
96
99
  reports: BoardReport[];
100
+ /** When the service built the calendar read, which dates the board; null without one. */
101
+ asOf: string | null;
97
102
  stale: boolean;
98
103
  refreshError: string | null;
99
104
  }
@@ -208,7 +213,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
208
213
  const loader = useCallback(async (force: boolean): Promise<BoardData> => {
209
214
  const holdings = fund ? await loadMembers(fund.etf, force) : null;
210
215
  const names = holdings ? fundNames(holdings.payload.members) : named;
211
- if (!market && names.length === 0) return { queryKey, reports: [], stale: !!holdings && (holdings.stale || holdings.payload.stale), refreshError: holdings?.refreshError ?? null };
216
+ if (!market && names.length === 0) return { queryKey, reports: [], asOf: null, stale: !!holdings && (holdings.stale || holdings.payload.stale), refreshError: holdings?.refreshError ?? null };
212
217
  const read = fund ? { ...query, symbols: names } : query;
213
218
  const [cloud, fallback] = await Promise.allSettled([
214
219
  loadEarningsBoard(read, force),
@@ -226,6 +231,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
226
231
  return {
227
232
  queryKey,
228
233
  reports: [...reports, ...extra],
234
+ asOf: cloud.status === "fulfilled" ? cloud.value.payload.asOf : null,
229
235
  stale: (!!holdings && (holdings.stale || holdings.payload.stale)) || (cloud.status === "fulfilled" && cloud.value.stale),
230
236
  refreshError: cloud.status === "rejected"
231
237
  ? (cloud.reason instanceof Error ? cloud.reason.message : String(cloud.reason))
@@ -238,7 +244,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
238
244
  const holdings = fund ? cachedMembers(fund.etf) : null;
239
245
  if (fund && !holdings) return null;
240
246
  const cached = cachedEarningsCalendar(holdings ? { ...query, symbols: fundNames(holdings.payload.members) } : query);
241
- return cached ? { queryKey, reports: cached.payload.reports.map((report) => boardReport(report, owned)), stale: !!holdings?.payload.stale, refreshError: null } : null;
247
+ return cached ? { queryKey, reports: cached.payload.reports.map((report) => boardReport(report, owned)), asOf: cached.payload.asOf, stale: !!holdings?.payload.stale, refreshError: null } : null;
242
248
  },
243
249
  });
244
250
  // A new fund or range never shows the previous scope while its holdings load or fail.
@@ -316,13 +322,19 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
316
322
 
317
323
  useAutoRefresh(resource.updatedAt, resource.load);
318
324
  const updatedAgo = useUpdatedAgo(resource.updatedAt);
325
+ const utcDay = useUtcDay();
326
+ // Its source and when the calendar was read, as `fn EVTS` ends; how long ago it loaded goes first on a narrow row.
327
+ const footerInfo = useMemo(() => data ? [
328
+ reportFooterSegment(earningsBoardHeadless, { rows: [], metadata: { asOf: data.asOf } }),
329
+ ...(updatedAgo ? [ageFooterSegment(updatedAgo)] : []),
330
+ ] : [], [data, updatedAgo, utcDay]);
319
331
  usePaneStatusFooter({
320
332
  registrationId: "earnings-board",
321
333
  enabled: !open,
322
334
  loading: resource.loading,
323
335
  error: resource.error ?? data?.refreshError ?? null,
324
336
  stale: !!data?.stale,
325
- info: data && updatedAgo ? [ageFooterSegment(updatedAgo)] : [],
337
+ info: footerInfo,
326
338
  });
327
339
  const symbol = open?.symbol ?? selectedReport?.symbol ?? null;
328
340
  // The desktop and the web only: the terminal's footer stays as it was.
@@ -3,6 +3,7 @@ import { CompanyLogoMark } from "../../../components/company-logo";
3
3
  import { PaneStatusBody } from "../../../components";
4
4
  import { ClippedText } from "../../../components/ui/display";
5
5
  import { FILL_REST } from "../../../components/ui/fill";
6
+ import { useSelectionFill } from "../../../components/ui/selection-fill";
6
7
  import { afterLayout, revealInScrollBox } from "../../../components/ui/reveal-in-scroll-box";
7
8
  import { useDoubleClickActivation } from "../../../components/use-double-click-activation";
8
9
  import { useShortcut } from "../../../react/input";
@@ -285,9 +286,10 @@ function ReportTile({ report, selected, onPress, tileRef }: {
285
286
  tileRef: (node: BoxRenderable | null) => void;
286
287
  }) {
287
288
  const colors = useThemeColors();
289
+ const selectionFill = useSelectionFill();
288
290
  const surprise = report.epsSurprise;
289
- const ink = selected ? colors.selectedText
290
- : surprise == null || surprise === 0 ? colors.text : surprise > 0 ? colors.positive : colors.negative;
291
+ const tone = surprise == null || surprise === 0 ? colors.text : surprise > 0 ? colors.positive : colors.negative;
292
+ const ink = !selected ? tone : selectionFill.lit ? colors.selectedText : selectionFill.ink(tone);
291
293
  return (
292
294
  <Box
293
295
  ref={tileRef}
@@ -296,7 +298,7 @@ function ReportTile({ report, selected, onPress, tileRef }: {
296
298
  minWidth={0}
297
299
  flexDirection="column"
298
300
  alignItems="center"
299
- backgroundColor={selected ? colors.selected : undefined}
301
+ backgroundColor={selected ? selectionFill.bg : undefined}
300
302
  hoverBackgroundColor={selected ? undefined : "var(--gloom-hover-fill)"}
301
303
  onMouseDown={onPress}
302
304
  title={reportTitle(report)}
@@ -323,6 +325,8 @@ function MoreTile({ count, selected, onPress, tileRef }: {
323
325
  tileRef: (node: BoxRenderable | null) => void;
324
326
  }) {
325
327
  const colors = useThemeColors();
328
+ const selectionFill = useSelectionFill();
329
+ const lit = selected && selectionFill.lit;
326
330
  return (
327
331
  <Box
328
332
  ref={tileRef}
@@ -332,7 +336,7 @@ function MoreTile({ count, selected, onPress, tileRef }: {
332
336
  flexDirection="column"
333
337
  alignItems="center"
334
338
  justifyContent="center"
335
- backgroundColor={selected ? colors.selected : undefined}
339
+ backgroundColor={selected ? selectionFill.bg : undefined}
336
340
  hoverBackgroundColor={selected ? undefined : "var(--gloom-hover-fill)"}
337
341
  onMouseDown={onPress}
338
342
  title={`Show the other ${count}`}
@@ -342,9 +346,9 @@ function MoreTile({ count, selected, onPress, tileRef }: {
342
346
  style={TILE_STYLE}
343
347
  >
344
348
  <Box style={LOGO_STYLE} alignItems="center" justifyContent="center">
345
- <Text fg={selected ? colors.selectedText : colors.textDim} attributes={TextAttributes.BOLD}>{`+${count}`}</Text>
349
+ <Text fg={lit ? colors.selectedText : selected ? selectionFill.ink(colors.textDim) : colors.textDim} attributes={TextAttributes.BOLD}>{`+${count}`}</Text>
346
350
  </Box>
347
- <Text fg={selected ? colors.selectedText : colors.textMuted}>more</Text>
351
+ <Text fg={lit ? colors.selectedText : colors.textMuted}>more</Text>
348
352
  </Box>
349
353
  );
350
354
  }
@@ -114,15 +114,6 @@ export function cachedEarningsHistory(symbol: string, accessKey?: string) {
114
114
  return cachedCloudResource(historyCache, historyKey(symbol, undefined, accessKey), (payload) => validateEarningsHistory(payload, symbol));
115
115
  }
116
116
 
117
- /**
118
- * Whether ERN reads a listing's own past reports: every US listing, and of
119
- * the listings abroad Hong Kong's, which Gloom Cloud reads from their
120
- * results announcements. Any other listing abroad shows its next report.
121
- */
122
- export function hasEarningsHistory(venueAbroad: string | null): boolean {
123
- return venueAbroad == null || venueAbroad === "HKEX";
124
- }
125
-
126
117
  /** A server that does not read a listing abroad's history yet refuses it (400): the next report stands alone, as before. */
127
118
  export function noHistoryAbroad(error: unknown): null {
128
119
  if (error instanceof ApiRequestError && error.status === 400) return null;
@@ -9,9 +9,9 @@ import type {
9
9
  HeadlessRowsResult,
10
10
  } from "../../../types/plugin";
11
11
  import type { EarningsEvent } from "../../../types/data-provider";
12
- import { addDays, boardKey, boardReport, boardRowOf, fallbackReport, MIN_AVERAGE_REPORTS, newYorkToday, type BoardReport } from "./board-model";
12
+ import { addDays, boardKey, boardReport, boardRowOf, fallbackReport, historyListing, MIN_AVERAGE_REPORTS, newYorkToday, type BoardReport } from "./board-model";
13
13
  import { BOARD_WEEKS, boardRangeDays, boardRangeLabel, isBoardWeek, requestedBoardRange, type BoardRange } from "./calendar-model";
14
- import { fetchEarningsCalendar, fetchEarningsHistory, hasEarningsHistory, noHistoryAbroad, sameHistoryListing } from "./client";
14
+ import { fetchEarningsCalendar, fetchEarningsHistory, noHistoryAbroad, sameHistoryListing } from "./client";
15
15
  import { loadEarningsCalendar } from "./data/cache";
16
16
  import { epsText, impliedText, moneyText, moveSize, signedPercent, TIMING_LABEL } from "./format";
17
17
  import { historyRows, periodText } from "./history-model";
@@ -254,11 +254,9 @@ async function abroadHistoryNotice(symbol: string, company: string | null, conte
254
254
  async function historyReport(symbol: string, context: HeadlessPaneContext, deps: EarningsHeadlessDependencies): Promise<HeadlessRowsResult> {
255
255
  // The board is US listings'; SAN:EPA's past reports are not on it, and bare SAN there is another company.
256
256
  // A Hong Kong listing has its own, from its results announcements.
257
- const venueAbroad = listingAbroadVenue(symbol);
258
- const abroad = !hasEarningsHistory(venueAbroad);
259
- const ownAbroad = venueAbroad != null && !abroad;
257
+ const { listing, abroad, ownAbroad } = historyListing(symbol);
260
258
  const [history, upcoming] = await Promise.allSettled([
261
- abroad ? Promise.resolve(null) : ownAbroad ? deps.history(symbol, context).catch(noHistoryAbroad) : deps.history(symbol, context),
259
+ abroad ? Promise.resolve(null) : ownAbroad ? deps.history(listing, context).catch(noHistoryAbroad) : deps.history(listing, context),
262
260
  deps.upcoming([symbol], context),
263
261
  ]);
264
262
  if (history.status === "rejected" && upcoming.status === "rejected") throw history.reason;
@@ -299,10 +297,15 @@ async function historyReport(symbol: string, context: HeadlessPaneContext, deps:
299
297
  // An ETF, an index, a currency pair, a coin or a future has no earnings: that is the answer, not a gap in the data,
300
298
  // and a history that failed for one (a coin is no US ticker) is no error.
301
299
  const noEarnings = rows.length === 0 && !abroad ? await loadNoEarningsText(context.marketData, symbol, "cli") : null;
300
+ // A company ERN covers whose history answered with nothing (AIA's, 1299:HKEX) has no reports on record yet: no
301
+ // complete answer, and not one ERN does not cover.
302
+ // A listing abroad shows only its next report: none on the calendar is what it has, not a listing ERN does not cover.
303
+ const empty = noEarnings ?? (rows.length === 0 && payload ? `No earnings reports on record for ${symbol}.`
304
+ : rows.length === 0 && abroad && upcoming.status === "fulfilled" ? `${symbol} has no report on the calendar yet.` : null);
302
305
  return {
303
306
  columns: ownAbroad ? LISTING_HISTORY_COLUMNS : HISTORY_COLUMNS,
304
307
  rows,
305
- ...(noEarnings ? { empty: noEarnings, complete: true, unavailableSymbols: [] } : {}),
308
+ ...(noEarnings ? { empty: noEarnings, complete: true, unavailableSymbols: [] } : empty ? { empty } : {}),
306
309
  errors: history.status === "rejected" && !noEarnings ? [String(history.reason instanceof Error ? history.reason.message : history.reason)] : undefined,
307
310
  metadata: {
308
311
  symbol, name: payload?.name ?? next?.name ?? null, asOf: payload?.asOf ?? null,
@@ -12,19 +12,21 @@ import { ageFooterSegment } from "../../../components/layout/pane/footer";
12
12
  import { staticSeries } from "../../../components/chart/static/series";
13
13
  import { usePaneRefreshKey } from "../../../components/data-table/table-pane";
14
14
  import { useAsyncResource, useAutoRefresh, usePluginPaneState, useUpdatedAgo } from "../../../public/react";
15
+ import { useUtcDay } from "../../../react/auto-refresh";
16
+ import { reportFooterSegment } from "../shared/source-footer";
17
+ import { earningsCalendarHeadless } from "./headless";
15
18
  import { colors } from "../../../theme/colors";
16
19
  import { useLiveStreamingSetting } from "../../../state/hooks/live-streaming";
17
20
  import { useAssetData } from "../../runtime";
18
21
  import { isBoardRowLoading, useQuoteBoard } from "../shared/use-quote-board";
19
- import { newYorkToday, reportMove } from "./board-model";
22
+ import { historyListing, newYorkToday, reportMove } from "./board-model";
20
23
  import { usePlanAccess } from "../../../api-client/plan-access";
21
24
  import { useResearchCloudSession } from "../shared/research-cloud-session";
22
- import { cachedEarningsHistory, hasEarningsHistory, loadEarningsHistory, noHistoryAbroad } from "./client";
25
+ import { cachedEarningsHistory, loadEarningsHistory, noHistoryAbroad } from "./client";
23
26
  import { loadEarningsCalendar } from "./data/cache";
24
27
  import { chartAxis, chartPoints, chartRows, historyFigures, historyRows, type HistoryRow } from "./history-model";
25
28
  import { historyColumns, renderHistoryCell, type HistoryColumn, type LiveMove } from "./history-table";
26
29
  import { loadNoEarningsText } from "./no-earnings";
27
- import { listingAbroadVenue } from "../../../utils/sec";
28
30
 
29
31
  const barDate = (row: HistoryRow) => (row.implied != null || row.move != null ? new Date(`${row.date}T00:00:00Z`) : null);
30
32
 
@@ -41,11 +43,9 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
41
43
  registrationId: string;
42
44
  }) {
43
45
  const dataProvider = useAssetData();
44
- // Past reports are the US board's, where SAN is not SAN:EPA's company, and a Hong Kong listing's own (its results
45
- // announcements, in their currency): any other listing abroad shows its next report alone.
46
- const venueAbroad = listingAbroadVenue(symbol);
47
- const abroad = !hasEarningsHistory(venueAbroad);
48
- const ownAbroad = venueAbroad != null && !abroad;
46
+ // Past reports are a US listing's and a Hong Kong listing's own, read by its key however it was typed (0700.HK is
47
+ // 0700:HKEX): any other listing abroad shows its next report alone.
48
+ const { listing, abroad, ownAbroad } = historyListing(symbol);
49
49
  // A Hong Kong listing's announcement figures come with Pro, as KPIS has them: what Gloom Cloud answers differs by
50
50
  // plan, so it is kept per session and plan.
51
51
  const access = usePlanAccess();
@@ -53,11 +53,11 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
53
53
  const accessKey = ownAbroad ? `${session.requestKey}:${access.hasProAccess ? "pro" : "free"}` : undefined;
54
54
  const loader = useCallback(
55
55
  (force: boolean) => (abroad ? Promise.resolve(null)
56
- : ownAbroad ? loadEarningsHistory(symbol, force, undefined, accessKey).catch(noHistoryAbroad)
57
- : loadEarningsHistory(symbol, force)),
58
- [abroad, accessKey, ownAbroad, symbol],
56
+ : ownAbroad ? loadEarningsHistory(listing, force, undefined, accessKey).catch(noHistoryAbroad)
57
+ : loadEarningsHistory(listing, force)),
58
+ [abroad, accessKey, listing, ownAbroad],
59
59
  );
60
- const resource = useAsyncResource(loader, { initialData: () => (abroad ? null : cachedEarningsHistory(symbol, accessKey)) });
60
+ const resource = useAsyncResource(loader, { initialData: () => (abroad ? null : cachedEarningsHistory(listing, accessKey)) });
61
61
  // Past the stored calendar's horizon, and for listings it does not carry, the per-ticker calendar has the next date.
62
62
  const upcomingLoader = useCallback(
63
63
  (force: boolean) => loadEarningsCalendar(dataProvider, [symbol], { force }).then((result) => result.events[0] ?? null),
@@ -115,6 +115,14 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
115
115
  // A coin's history fails (it is no US ticker), which says nothing once its type has answered.
116
116
  const historyError = noEarnings.loading || noEarnings.data ? null : resource.error;
117
117
  const updatedAgo = useUpdatedAgo(resource.updatedAt);
118
+ const utcDay = useUtcDay();
119
+ // Its source and when the history was read, as `fn ERN` ends; how long ago it loaded goes first on a narrow row.
120
+ const footerInfo = useMemo(() => abroad
121
+ ? [{ id: "us-listings", parts: [{ text: "past reports: US and Hong Kong listings only", tone: "muted" as const }] }]
122
+ : payload ? [
123
+ reportFooterSegment(earningsCalendarHeadless, { rows: [], metadata: { asOf: payload.asOf } }),
124
+ ...(updatedAgo ? [ageFooterSegment(updatedAgo)] : []),
125
+ ] : [], [abroad, payload, updatedAgo, utcDay]);
118
126
  useAutoRefresh(resource.updatedAt, resource.load);
119
127
  usePaneRefreshKey(() => { resource.reload(); upcoming.reload(); }, { focused });
120
128
  usePaneStatusFooter({
@@ -122,8 +130,7 @@ export function EarningsHistoryView({ symbol, width, height, focused, registrati
122
130
  loading: resource.loading,
123
131
  error: historyError,
124
132
  stale: !!resource.data?.stale,
125
- info: abroad ? [{ id: "us-listings", parts: [{ text: "past reports: US and Hong Kong listings only", tone: "muted" as const }] }]
126
- : payload && updatedAgo ? [ageFooterSegment(updatedAgo)] : [],
133
+ info: footerInfo,
127
134
  });
128
135
 
129
136
  return (
@@ -53,7 +53,11 @@ export interface EarningsCallsResult {
53
53
  errorStatus?: number;
54
54
  /** The server has just started looking for this company's calls. */
55
55
  pending?: boolean;
56
- /** The symbol is not one the SEC knows, so there is nothing to look for. */
56
+ /**
57
+ * The symbol is not one the SEC knows, so there is nothing to look for. Never
58
+ * set for a listing abroad, which the server answers by its stored calls:
59
+ * C38U:SGX with none yet is a company whose calls are not yet available.
60
+ */
57
61
  unknownTicker?: boolean;
58
62
  /** The company's home line the calls are read from, when not the listing asked. */
59
63
  companyFrom?: CompanyFrom | null;
@@ -172,16 +176,32 @@ function listKey(ticker: string | null, abroad: ListingAbroad | null, limit: num
172
176
  return offset > 0 ? JSON.stringify([identity, limit, offset]) : JSON.stringify([identity, limit]);
173
177
  }
174
178
 
179
+ /** A listing code without the zeros a venue pads it with: 0016 and 16 are one Hong Kong listing. */
180
+ const listingCode = (symbol: string) => symbol.trim().toUpperCase().replace(/^0+(?=\d)/, "");
181
+
182
+ /**
183
+ * A call filed under the listing's own key (0016:HKEX) is the listing's,
184
+ * whatever short name the exchange gives the company there: "SHK PPT" is Sun
185
+ * Hung Kai Properties, "HKEX" Hong Kong Exchanges and Clearing.
186
+ */
187
+ function filedUnderListing(call: CloudEarningsCallPayload, abroad: ListingAbroad): boolean {
188
+ const separator = call.ticker.lastIndexOf(":");
189
+ if (separator < 0) return false;
190
+ return listingCode(call.ticker.slice(0, separator)) === listingCode(abroad.symbol)
191
+ && call.ticker.slice(separator + 1).trim().toUpperCase() === abroad.exchange.toUpperCase();
192
+ }
193
+
175
194
  /**
176
195
  * A server that predates venue-aware lookups ignores the venue and lists the
177
196
  * calls of the US company with the same symbol: AI in Paris would show C3.ai.
178
197
  * Those calls are another company's, so they are dropped, and without the
179
- * listing's company they cannot be told apart.
198
+ * listing's company they cannot be told apart. A call filed under the
199
+ * listing's own key is never such a call.
180
200
  */
181
201
  function listingCalls(calls: CloudEarningsCallPayload[], abroad: ListingAbroad | null): CloudEarningsCallPayload[] {
182
202
  if (!abroad) return calls;
183
203
  const name = abroad.name;
184
- return name ? calls.filter((call) => !areDifferentCompanies(name, call.companyName)) : [];
204
+ return calls.filter((call) => filedUnderListing(call, abroad) || (!!name && !areDifferentCompanies(name, call.companyName)));
185
205
  }
186
206
 
187
207
  type EarningsCallsLoadOptions = IssuerListingParams & { force?: boolean; limit?: number; offset?: number };
@@ -231,7 +251,7 @@ export async function loadEarningsCallsWithClient(
231
251
  const value = {
232
252
  calls,
233
253
  pending: payload.pending === true,
234
- unknownTicker: payload.unknownTicker === true,
254
+ unknownTicker: payload.unknownTicker === true && !abroad,
235
255
  ...(companyFrom ? { companyFrom } : {}),
236
256
  };
237
257
  // A list with calls still being produced changes by the minute, so it
@@ -1,17 +1,35 @@
1
1
  import type { CloudEarningsCallPayload } from "../../../api-client";
2
2
  import { formatShortDate } from "../../../utils/datetime-format";
3
3
 
4
- /** "FQ4 26" — fiscal period, compact enough for a table column. */
4
+ /**
5
+ * "FQ4 26", "H1 26" or "FY 26": the fiscal period, compact enough for a table
6
+ * column. A half year's results have no quarter, as a year's do, and are told
7
+ * apart by `fiscalHalf` (SHKP's interim and annual results calls of FY2026).
8
+ */
5
9
  function formatPeriod(
6
10
  fiscalYear: number | null,
7
11
  fiscalQuarter: number | null,
12
+ fiscalHalf?: number | null,
8
13
  ): string {
9
14
  if (!fiscalQuarter && !fiscalYear) return "—";
10
- const quarter = fiscalQuarter ? `FQ${fiscalQuarter}` : "FY";
15
+ const quarter = fiscalQuarter ? `FQ${fiscalQuarter}` : fiscalHalf ? `H${fiscalHalf}` : "FY";
11
16
  const year = fiscalYear ? ` ${String(fiscalYear).slice(-2)}` : "";
12
17
  return `${quarter}${year}`;
13
18
  }
14
19
 
20
+ /** The FQ column of `fn CALLS`: the quarter, or `H1` for a half year's results. */
21
+ export function fiscalQuarterText(call: { fiscalQuarter: number | null; fiscalHalf?: number | null }): string | number | null {
22
+ return call.fiscalQuarter ?? (call.fiscalHalf ? `H${call.fiscalHalf}` : null);
23
+ }
24
+
25
+ /**
26
+ * What a company with no call yet reads, in the pane and `fn CALLS`: not yet
27
+ * available, never an error or a gap in coverage.
28
+ */
29
+ export function noCallsText(ticker: string): { title: string; message: string } {
30
+ return { title: `Earnings calls for ${ticker} are not yet available.`, message: "Calls appear once the company's investor site or filings list a webcast." };
31
+ }
32
+
15
33
  export function formatCallDate(value: string | null): string {
16
34
  return formatShortDate(value, { day: "2-digit", year: "2-digit", fallback: "\u2014" });
17
35
  }
@@ -38,7 +56,7 @@ export function formatTimestamp(seconds: number): string {
38
56
 
39
57
  type NamedCall = Pick<
40
58
  CloudEarningsCallPayload,
41
- "ticker" | "fiscalYear" | "fiscalQuarter" | "eventKind" | "eventLabel"
59
+ "ticker" | "fiscalYear" | "fiscalQuarter" | "fiscalHalf" | "eventKind" | "eventLabel"
42
60
  >;
43
61
 
44
62
  /** An event that is not an earnings call (a deal call, an investor day), shown by its label and never as a quarter. */
@@ -60,13 +78,13 @@ const SHORT_EVENT_LABELS: Record<string, string> = {
60
78
  export function callPeriod(call: Omit<NamedCall, "ticker">): string {
61
79
  const label = eventLabelOf(call);
62
80
  if (label) return SHORT_EVENT_LABELS[label] ?? label;
63
- return formatPeriod(call.fiscalYear, call.fiscalQuarter);
81
+ return formatPeriod(call.fiscalYear, call.fiscalQuarter, call.fiscalHalf);
64
82
  }
65
83
 
66
84
  /** Title for the detail stack: names the call so the body need not repeat it. */
67
85
  export function callTitle(call: NamedCall): string {
68
86
  const label = eventLabelOf(call);
69
87
  if (label) return `${call.ticker} ${label}`;
70
- const period = formatPeriod(call.fiscalYear, call.fiscalQuarter);
88
+ const period = formatPeriod(call.fiscalYear, call.fiscalQuarter, call.fiscalHalf);
71
89
  return period === "—" ? call.ticker : `${call.ticker} ${period}`;
72
90
  }
@@ -6,6 +6,7 @@ import type {
6
6
  HeadlessPaneContext,
7
7
  HeadlessPaneDefinition,
8
8
  HeadlessPaneLoadArgs,
9
+ HeadlessPaneRow,
9
10
  HeadlessRowsResult,
10
11
  } from "../../../types/plugin";
11
12
  import { explainRefusal } from "../shared/cloud-denied";
@@ -23,7 +24,7 @@ import {
23
24
  type UpcomingCallsResult,
24
25
  type UpcomingDays,
25
26
  } from "./data";
26
- import { callPeriod, eventLabelOf } from "./format";
27
+ import { callPeriod, eventLabelOf, fiscalQuarterText, noCallsText } from "./format";
27
28
  import type { MarketDay } from "../earnings/board-model";
28
29
  import {
29
30
  calendarDays,
@@ -56,9 +57,11 @@ const optionalErrors = (error: string | null) => error ? [error] : undefined;
56
57
  const CALL_COLUMNS = [
57
58
  { key: "ticker", header: "Ticker" },
58
59
  { key: "company", header: "Company" },
59
- { key: "callAt", header: "Call date" },
60
+ // A call known by its day alone prints the day, never a midnight it was not held at.
61
+ { key: "callAt", header: "Call date", textFormat: (value: unknown, row: HeadlessPaneRow) => callDateText(value, row.timeKnown !== false) },
60
62
  { key: "fiscalYear", header: "FY", align: "right" as const },
61
- { key: "fiscalQuarter", header: "FQ", align: "right" as const },
63
+ // A half year's results read H1, never a blank quarter beside the year's.
64
+ { key: "fiscalQuarter", header: "FQ", align: "right" as const, textFormat: (value: unknown, row: HeadlessPaneRow) => String(fiscalQuarterText({ fiscalQuarter: value as number | null, fiscalHalf: row.fiscalHalf as number | undefined }) ?? "—") },
62
65
  { key: "event", header: "Event" },
63
66
  { key: "status", header: "Status" },
64
67
  { key: "durationSeconds", header: "Seconds", align: "right" as const },
@@ -122,6 +125,14 @@ function explainDenied(ticker: string | null, context: HeadlessPaneContext) {
122
125
  return async (error: unknown): Promise<never> => { throw await explainRefusal(error, callsLockNote, { symbol: ticker, context }); };
123
126
  }
124
127
 
128
+ /** "2026-10-27 07:45 UTC" for a call whose start is known, "2026-09-10" for one known by its day. */
129
+ function callDateText(value: unknown, timeKnown: boolean): string {
130
+ const at = typeof value === "string" ? Date.parse(value) : Number.NaN;
131
+ if (!Number.isFinite(at)) return "—";
132
+ const iso = new Date(at).toISOString();
133
+ return timeKnown ? `${iso.slice(0, 16).replace("T", " ")} UTC` : iso.slice(0, 10);
134
+ }
135
+
125
136
  function callRow(call: CloudEarningsCallPayload, now: number) {
126
137
  const upcoming = isUpcomingCall(call, now);
127
138
  return {
@@ -129,8 +140,10 @@ function callRow(call: CloudEarningsCallPayload, now: number) {
129
140
  ticker: call.ticker,
130
141
  company: call.companyName,
131
142
  callAt: call.callAt,
143
+ timeKnown: callTimeKnown(call),
132
144
  fiscalYear: call.fiscalYear,
133
145
  fiscalQuarter: call.fiscalQuarter,
146
+ ...(call.fiscalHalf ? { fiscalHalf: call.fiscalHalf } : {}),
134
147
  // A deal call, a conference, an investor day: not a quarter's earnings call.
135
148
  event: eventLabelOf(call),
136
149
  status: call.hasTranscript ? "transcribed" : callStatusLabel(call, now) || call.status,
@@ -170,11 +183,15 @@ function projectEarningsCallsHeadless(
170
183
  const ordered = next ? [next, ...matching.filter((call) => call !== next)] : matching;
171
184
  const rows = ordered.slice(0, limit).map((call) => callRow(call, now));
172
185
  const sourceLimit = result.sourceLimit ?? 200;
186
+ // A company with no call yet says so, as the pane does; a US symbol the SEC does not know is not one.
187
+ const ticker = typeof args.argument === "string" ? args.argument : null;
188
+ const none = ticker && !result.calls.length && !result.pending && !result.unknownTicker ? noCallsText(ticker) : null;
173
189
  const sourceLimitReached = result.sourceLimitReached ?? result.calls.length >= sourceLimit;
174
190
 
175
191
  return {
176
192
  columns: CALL_COLUMNS,
177
193
  rows,
194
+ ...(none ? { empty: `${none.title} ${none.message}` } : {}),
178
195
  ...(next ? { textRows: rows.filter((row) => row.id !== next.id) } : {}),
179
196
  errors: optionalErrors(unansweredRefreshError(result)),
180
197
  ...(sourceLimitReached || result.pending ? { complete: false } : {}),
@@ -243,6 +260,7 @@ function transcriptResult(
243
260
  company: transcript.companyName,
244
261
  fiscalYear: transcript.fiscalYear,
245
262
  fiscalQuarter: transcript.fiscalQuarter,
263
+ ...(transcript.fiscalHalf ? { fiscalHalf: transcript.fiscalHalf } : {}),
246
264
  event: eventLabelOf(transcript),
247
265
  // A call held in another language: the text is an English translation, its original under --section original.
248
266
  translatedFrom: language,
@@ -290,6 +308,7 @@ function projectCalendar(
290
308
  event: eventLabelOf(call),
291
309
  fiscalYear: call.fiscalYear,
292
310
  fiscalQuarter: call.fiscalQuarter,
311
+ ...(call.fiscalHalf ? { fiscalHalf: call.fiscalHalf } : {}),
293
312
  in: calendarAway(call, now),
294
313
  status: call.hasTranscript ? "transcribed" : callStatusLabel(call, now) || call.status,
295
314
  hasTranscript: call.hasTranscript,
@@ -469,6 +488,7 @@ export function createEarningsCallsHeadless(
469
488
  const ahead = findCallForQuarter(calls.calls, quarter);
470
489
  if (ahead) throw new Error(`${ticker}'s ${quarter} call is still to come. ${nextCallNotice(ahead, now)}`);
471
490
  if (calls.unknownTicker) throw new Error(`${ticker} is not a known listed company.`);
491
+ if (!calls.calls.length && !calls.pending) throw new Error(noCallsText(ticker).title);
472
492
  if (calls.pending) throw new Error(`Earnings call discovery for ${ticker} is still pending.`);
473
493
  if (calls.sourceLimitReached ?? calls.calls.length >= (calls.sourceLimit ?? 200)) {
474
494
  throw new Error(`No ${quarter} earnings call found among the latest ${calls.sourceLimit ?? 200} loaded calls for ${ticker}; earlier calls may exist.`);
@@ -23,6 +23,7 @@ export const earningsCallsModule: PluginModule = {
23
23
  order: 34,
24
24
  component: EarningsCallsPane,
25
25
  instruments: ["equity"],
26
+ proOnly: true,
26
27
  });
27
28
  },
28
29
 
@@ -295,10 +295,20 @@ export function findCallForQuarter(
295
295
  )) ?? null;
296
296
  }
297
297
 
298
+ // A half year's results: "H1 26", "1H26", "26H1".
299
+ const half = token.match(/^(?:H([12])(\d{2}|\d{4})?|([12])H(\d{2}|\d{4})?|(\d{2}|\d{4})H([12]))$/);
300
+ if (half) {
301
+ const which = Number(half[1] ?? half[3] ?? half[6]);
302
+ const year = half[2] ?? half[4] ?? half[5];
303
+ return sorted.find((call) => call.fiscalHalf === which && sameYear(call.fiscalYear, year ? Number(year) : null)) ?? null;
304
+ }
305
+
306
+ // A year's call, never its half's (SHKP's interim and annual results calls share FY2026), even when the half is all
307
+ // the year has so far: H1-2026 asks for that one.
298
308
  const fiscalYear = token.match(/^(?:FY)?(\d{2}|\d{4})$/);
299
309
  if (fiscalYear) {
300
310
  const year = Number(fiscalYear[1]);
301
- return sorted.find((call) => sameYear(call.fiscalYear, year)) ?? null;
311
+ return sorted.find((call) => sameYear(call.fiscalYear, year) && !call.fiscalHalf) ?? null;
302
312
  }
303
313
 
304
314
  return null;
@@ -51,7 +51,7 @@ import {
51
51
  import { isPermanentClientError } from "../../../api-client/errors";
52
52
  import { savedCopyFooterInfo } from "../../../components/layout/pane/footer";
53
53
  import { STALE_SEGMENT } from "../../../components/layout/pane/status-footer";
54
- import { callPeriod, callTitle, eventLabelOf, formatCallDate, formatDuration, formatSentiment } from "./format";
54
+ import { callPeriod, callTitle, eventLabelOf, formatCallDate, formatDuration, formatSentiment, noCallsText } from "./format";
55
55
  import { findCallForQuarter, findInLines, MIN_FIND_LENGTH, originalIsMachineTranscript, translatedFrom, turnParagraphs } from "./model";
56
56
  import { READER_TABS, TranscriptView, type ReaderTab, type TranscriptPlayback } from "./transcript-view";
57
57
  import { PLAYBACK_RATES, SEEK_STEP_SECONDS, useCallPlayback } from "./use-call-playback";
@@ -1012,10 +1012,7 @@ function CallsListView({
1012
1012
  return listPending ? (
1013
1013
  <PaneStatusBody loading align="center" loadingLabel={`Looking for ${ticker}'s earnings calls...`} />
1014
1014
  ) : (
1015
- <EmptyState
1016
- title={`No earnings calls found for ${ticker}.`}
1017
- message="Calls appear here once the company's investor site or filings list a webcast."
1018
- />
1015
+ <EmptyState {...noCallsText(ticker)} />
1019
1016
  );
1020
1017
  }
1021
1018
 
@@ -605,6 +605,33 @@ export function countriesWithoutEvents(filter: CountryFilter, events: ReadonlyAr
605
605
  return filterCountries(filter).filter((country) => !listed.has(country));
606
606
  }
607
607
 
608
+ /**
609
+ * The countries the calendar covers: those of the currencies its release feed
610
+ * lists (the euro area's members under EU), the banks whose decisions and the
611
+ * statistics offices whose CPI releases Gloom Cloud keeps, and Hong Kong's and
612
+ * Singapore's government bond auctions.
613
+ */
614
+ const CALENDAR_COUNTRIES: ReadonlySet<string> = new Set([
615
+ "US", "EU", ...Object.values(EURO_AREA_MEMBERS), "GB", "JP", "CN", "CA", "AU", "NZ", "CH",
616
+ "IN", "ID", "KR", "BR", "MX", "RU", "TR", "ZA", "NO", "SE", "HK", "SG",
617
+ ]);
618
+
619
+ /**
620
+ * Countries the filter names that the calendar does not cover (EG, NG, AR):
621
+ * none it knows of, and none any row of the loaded calendar is for, so no
622
+ * release of theirs would show however long the window.
623
+ */
624
+ export function countriesNotInCalendar(filter: CountryFilter, events: ReadonlyArray<Pick<EconEvent, "country" | "event">>): string[] {
625
+ const listed = new Set(countriesWithoutEvents(filter, events));
626
+ return filterCountries(filter).filter((country) => listed.has(country) && !CALENDAR_COUNTRIES.has(country));
627
+ }
628
+
629
+ /** "EG is not in the calendar", or EG, NG and AR are (`countriesNotInCalendar`). */
630
+ export function notInCalendarMessage(countries: readonly string[]): string {
631
+ const named = countries.length > 1 ? `${countries.slice(0, -1).join(", ")} and ${countries.at(-1)}` : countries.join("");
632
+ return `${named} ${countries.length > 1 ? "are" : "is"} not in the calendar.`;
633
+ }
634
+
608
635
  /**
609
636
  * "No scheduled releases for MX in this window", or for MX or ZA; with the
610
637
  * day the listing ends, where it does ("; releases are listed through 2026-11-20").
@@ -28,6 +28,9 @@ const GROUPS: ReadonlyArray<{ group: string; rows: readonly FredRow[] }> = [
28
28
  ["DFII10", "10Y TIPS real yield", "%", "daily", ["treasury", "real yield"]],
29
29
  ["T10Y2Y", "10Y minus 2Y Treasury spread", "%", "daily", ["treasury", "curve", "2s10s"]],
30
30
  ["T10Y3M", "10Y minus 3M Treasury spread", "%", "daily", ["treasury", "curve"]],
31
+ // The Federal Reserve Board's Kim-Wright estimates, a week or so behind.
32
+ ...Array.from({ length: 10 }, (_, index): FredRow =>
33
+ [`THREEFYTP${index + 1}`, `${index + 1}Y Treasury term premium (Kim-Wright)`, "%", "daily", ["treasury", "term premium", "Kim-Wright"]]),
31
34
  ["SOFR", "SOFR", "%", "daily", ["secured overnight financing rate", "money markets"]],
32
35
  ["SORA", "SORA (Singapore overnight rate average)", "%", "daily", ["SGD", "Singapore", "MAS", "overnight", "money markets"]],
33
36
  ["OBFR", "Overnight bank funding rate", "%", "daily", ["OBFR", "money markets"]],
@@ -56,7 +56,9 @@ import {
56
56
  matchesCountry,
57
57
  matchesImpact,
58
58
  NO_CONSENSUS_NOTE,
59
+ countriesNotInCalendar,
59
60
  noScheduledReleasesMessage,
61
+ notInCalendarMessage,
60
62
  noTimeNote as noTimeNoteText,
61
63
  parseCountryFilter,
62
64
  listingEnd,
@@ -322,11 +324,16 @@ function EconCalendarPane({ focused, width, height }: PaneProps) {
322
324
  const separatorBg = blendHex(colors.bg, colors.border, 0.3);
323
325
  const staleness = fetchedAt ? formatStaleness(fetchedAt, now) : "";
324
326
  // The calendar has events and the filters hid them all: say which, with the way back.
325
- // Countries named one by one with nothing in the calendar: a quiet window there, said plainly.
327
+ // Countries named one by one with nothing in the calendar: a quiet window there, or one the calendar does not cover
328
+ // (EG, NG), said plainly.
326
329
  const unscheduled = useMemo(() => countriesWithoutEvents(countryFilter, events), [countryFilter, events]);
330
+ const absent = useMemo(() => countriesNotInCalendar(countryFilter, events), [countryFilter, events]);
331
+ const quiet = unscheduled.filter((code) => !absent.includes(code));
327
332
  const filterEmptyTitle = events.length === 0 ? null
328
333
  : unscheduled.length > 0 && unscheduled.length === countryFilter.split(",").length
329
- ? noScheduledReleasesMessage(unscheduled, releasesThrough ? shortDayLabel(dayStart(releasesThrough)) : null).replace(/\.$/, "")
334
+ ? [absent.length > 0 ? notInCalendarMessage(absent) : null,
335
+ quiet.length > 0 ? noScheduledReleasesMessage(quiet, releasesThrough ? shortDayLabel(dayStart(releasesThrough)) : null) : null]
336
+ .filter(Boolean).join(" ").replace(/\.$/, "")
330
337
  : filteredEmptyTitle(impactFilter, countryFilter);
331
338
  const emptyStateHint = !loading && !error
332
339
  ? [
@@ -261,8 +261,10 @@ export const econStatisticsHeadless: HeadlessPaneDefinition<"bundle"> = {
261
261
  const read = typeof args.argument === "string" ? readStatArg(args.argument) : null;
262
262
  const requested = read?.stat ?? null;
263
263
  if (args.argument && !requested) {
264
+ // ECST is the US's statistics; another country's policy rate is in CBR, and its published series in `fred`.
264
265
  throw new Error(
265
- `Unknown economic statistic "${String(args.argument)}". Use one of: ${STATS.map(({ id }) => id).join(", ")}.`,
266
+ `Unknown economic statistic "${String(args.argument)}". ECST covers US statistics only: ${STATS.map(({ id }) => id).join(", ")}. `
267
+ + "For other countries, policy rates are in fn CBR and published series in gloom fred --list.",
266
268
  );
267
269
  }
268
270
  const range = args.options.range as StatRangeId;
@@ -22,7 +22,7 @@ export const econStatisticsModule: PluginModule = {
22
22
  id: "econ-statistics-pane",
23
23
  paneId: ECON_STATISTICS_PANE_ID,
24
24
  label: "Economic Statistics",
25
- description: "Inflation, labour, growth, housing and rates against their own history.",
25
+ description: "US inflation, labour, growth, housing and rates against their own history.",
26
26
  keywords: [...new Set([
27
27
  "economic",
28
28
  "statistics",