@gloom-sh/terminal 0.20.14 → 0.20.17

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 (186) hide show
  1. package/package.json +1 -1
  2. package/src/api-client/data.ts +13 -3
  3. package/src/api-client/index.ts +54 -0
  4. package/src/api-client/install-experiments.ts +8 -7
  5. package/src/api-client/paths.ts +2 -1
  6. package/src/api-client/product-waitlist.ts +63 -0
  7. package/src/api-client/request.ts +4 -2
  8. package/src/api-client/types/billing.ts +45 -0
  9. package/src/api-client/types/econ.ts +3 -0
  10. package/src/api-client/yearly-plan.ts +132 -0
  11. package/src/app/global-shortcuts.ts +5 -3
  12. package/src/app/pane-runtime/index.tsx +2 -2
  13. package/src/app/pane-runtime/plugin-bindings.ts +3 -1
  14. package/src/app/pane-runtime/ticker-open-runtime.ts +6 -1
  15. package/src/app/since-last-visit/keys.ts +26 -0
  16. package/src/app/since-last-visit/model.ts +266 -0
  17. package/src/app/since-last-visit/strip.tsx +193 -0
  18. package/src/app/since-last-visit/use-since-last-visit.ts +289 -0
  19. package/src/app/since-last-visit/visit-tracker.ts +191 -0
  20. package/src/app.tsx +15 -0
  21. package/src/cli/commands/fred-series.ts +3 -1
  22. package/src/cli/commands/market.ts +8 -4
  23. package/src/cli/commands/overview.ts +65 -13
  24. package/src/cli/commands/system.ts +29 -1
  25. package/src/cli/commands/ticker.ts +12 -5
  26. package/src/cli/csv-export.ts +73 -0
  27. package/src/cli/desktop-pane-shot-api-policy.ts +4 -1
  28. package/src/cli/desktop-pane-shot-browser.ts +2 -1
  29. package/src/cli/desktop-pane-shot-view.ts +3 -7
  30. package/src/cli/desktop-pane-shot.ts +29 -30
  31. package/src/cli/help.ts +5 -2
  32. package/src/cli/history-rows.ts +24 -0
  33. package/src/cli/index.ts +4 -0
  34. package/src/cli/options.ts +29 -1
  35. package/src/cli/pane-functions/catalog.ts +41 -4
  36. package/src/cli/pane-functions/function-help.ts +1 -1
  37. package/src/cli/pane-functions/headless.ts +70 -3
  38. package/src/cli/pane-functions/index.ts +4 -4
  39. package/src/cli/pane-functions/resolver.ts +43 -0
  40. package/src/cli/pane-functions/screenshot-bridge.ts +4 -2
  41. package/src/cli/pane-functions/screenshot-payload.ts +3 -0
  42. package/src/cli/report-tables.ts +37 -8
  43. package/src/cli/result.ts +3 -6
  44. package/src/cli/shot-temp-dir.ts +30 -0
  45. package/src/cli/suffixed-listing-rows.ts +11 -0
  46. package/src/components/chart/composite/composite-chart.tsx +3 -3
  47. package/src/components/chart/composite/legend.tsx +37 -7
  48. package/src/components/command-bar/commands/direct/index.ts +31 -8
  49. package/src/components/command-bar/commands/registry.ts +7 -0
  50. package/src/components/command-bar/routes/root/command-items.ts +8 -0
  51. package/src/components/command-bar/routes/root/results.ts +16 -0
  52. package/src/components/company-logo.tsx +10 -3
  53. package/src/components/data-table/sections.ts +6 -1
  54. package/src/components/layout/pane/title.ts +6 -2
  55. package/src/components/layout/shell/index.tsx +5 -1
  56. package/src/components/layout/shell/ticker-link-menu.ts +12 -9
  57. package/src/components/ticker/badge/format.ts +12 -3
  58. package/src/components/ticker/badge/index.tsx +9 -3
  59. package/src/components/ticker/list-table-view.tsx +119 -17
  60. package/src/components/ui/data-table/display-columns.ts +19 -0
  61. package/src/components/ui/data-table/hooks.ts +2 -3
  62. package/src/components/ui/data-table/index.tsx +43 -9
  63. package/src/components/ui/data-table/types.ts +21 -0
  64. package/src/components/ui/data-table/visible-range.ts +11 -1
  65. package/src/core/state/app/layout-reducer.ts +3 -1
  66. package/src/core/state/app/layout.ts +2 -2
  67. package/src/data/config/layout.ts +14 -0
  68. package/src/data/config/store/normalize.ts +11 -1
  69. package/src/i18n/es.ts +38 -0
  70. package/src/i18n/ja.ts +38 -0
  71. package/src/i18n/ko.ts +38 -0
  72. package/src/i18n/zh-cn.ts +38 -0
  73. package/src/i18n/zh-tw.ts +38 -0
  74. package/src/layout/pane-follow.ts +141 -4
  75. package/src/layout/pane-layout-move.ts +10 -7
  76. package/src/layout/ticker-navigation.ts +13 -19
  77. package/src/layout/ticker-retarget.ts +3 -2
  78. package/src/market-data/market/index-level.ts +19 -0
  79. package/src/plugins/builtin/account-management/keyboard.ts +14 -0
  80. package/src/plugins/builtin/account-management/model.ts +2 -0
  81. package/src/plugins/builtin/account-management/pane.tsx +79 -7
  82. package/src/plugins/builtin/account-management/payment-recovery-row.tsx +97 -0
  83. package/src/plugins/builtin/account-management/yearly-plan-row.tsx +359 -0
  84. package/src/plugins/builtin/awards/pane.tsx +12 -10
  85. package/src/plugins/builtin/changelog/index.tsx +6 -44
  86. package/src/plugins/builtin/changelog/versions.ts +17 -68
  87. package/src/plugins/builtin/chart-composer/pane.tsx +4 -1
  88. package/src/plugins/builtin/cloud/askg/executor.ts +2 -1
  89. package/src/plugins/builtin/cloud/askg/sources.ts +2 -1
  90. package/src/plugins/builtin/cpi/pane.tsx +1 -1
  91. package/src/plugins/builtin/credit-conditions/series.ts +2 -2
  92. package/src/plugins/builtin/debt-maturities/model.ts +1 -1
  93. package/src/plugins/builtin/earnings/board-model.ts +12 -0
  94. package/src/plugins/builtin/earnings/board-table.ts +8 -5
  95. package/src/plugins/builtin/earnings/board.tsx +38 -18
  96. package/src/plugins/builtin/earnings/highlight.ts +47 -0
  97. package/src/plugins/builtin/earnings/history-table.ts +1 -1
  98. package/src/plugins/builtin/earnings/index.tsx +1 -1
  99. package/src/plugins/builtin/earnings-calls/pane.tsx +2 -2
  100. package/src/plugins/builtin/econ/calendar-model.ts +2 -0
  101. package/src/plugins/builtin/econ/fred-catalog.ts +1 -256
  102. package/src/plugins/builtin/econ-statistics/cache.ts +1 -1
  103. package/src/plugins/builtin/econ-statistics/client.ts +11 -10
  104. package/src/plugins/builtin/econ-statistics/detail.tsx +1 -0
  105. package/src/plugins/builtin/econ-statistics/headless.ts +42 -6
  106. package/src/plugins/builtin/econ-statistics/index.tsx +1 -0
  107. package/src/plugins/builtin/econ-statistics/pane.tsx +7 -2
  108. package/src/plugins/builtin/econ-statistics/stats.ts +2 -1
  109. package/src/plugins/builtin/econ-statistics/view.ts +9 -3
  110. package/src/plugins/builtin/estimate-revisions/model.ts +1 -1
  111. package/src/plugins/builtin/exposure/index.tsx +1 -1
  112. package/src/plugins/builtin/macro-day/model.ts +6 -4
  113. package/src/plugins/builtin/market-valuation/detail.tsx +3 -3
  114. package/src/plugins/builtin/market-valuation/headless.ts +11 -4
  115. package/src/plugins/builtin/market-valuation/pane.tsx +3 -1
  116. package/src/plugins/builtin/market-valuation/view.ts +14 -0
  117. package/src/plugins/builtin/news/wire/news/detail-view.tsx +20 -8
  118. package/src/plugins/builtin/pe-band/pane.tsx +1 -1
  119. package/src/plugins/builtin/portfolio-list/cli/render.ts +8 -1
  120. package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +176 -17
  121. package/src/plugins/builtin/portfolio-list/pane/groups.tsx +220 -0
  122. package/src/plugins/builtin/portfolio-list/pane/index.tsx +90 -15
  123. package/src/plugins/builtin/portfolio-list/table.tsx +13 -1
  124. package/src/plugins/builtin/research/corporate-actions-pane.tsx +4 -2
  125. package/src/plugins/builtin/research/relative-valuation-headless.ts +15 -5
  126. package/src/plugins/builtin/research/relative-valuation-model.ts +7 -1
  127. package/src/plugins/builtin/research/relative-valuation-pane.tsx +7 -4
  128. package/src/plugins/builtin/shared/fred-catalog.ts +256 -0
  129. package/src/plugins/builtin/shared/headless-options.ts +1 -1
  130. package/src/plugins/builtin/shared/series-cache.ts +3 -0
  131. package/src/plugins/builtin/shared/series-detail-chart.tsx +3 -0
  132. package/src/plugins/builtin/short-interest/watch-pane.tsx +7 -7
  133. package/src/plugins/builtin/social-mentions/model.ts +2 -2
  134. package/src/plugins/builtin/thirteenf/pane.tsx +1 -1
  135. package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +16 -0
  136. package/src/plugins/builtin/ticker-detail/adr-pair/tab.tsx +8 -4
  137. package/src/plugins/builtin/ticker-detail/financials/model.ts +51 -16
  138. package/src/plugins/builtin/ticker-detail/financials/nopat.ts +16 -0
  139. package/src/plugins/builtin/ticker-detail/financials/ratios.ts +44 -13
  140. package/src/plugins/builtin/ticker-detail/financials/schema.ts +33 -2
  141. package/src/plugins/builtin/ticker-detail/financials/tab.tsx +4 -2
  142. package/src/plugins/builtin/ticker-detail/headless-schema.ts +30 -4
  143. package/src/plugins/builtin/ticker-detail/headless.ts +254 -34
  144. package/src/plugins/builtin/ticker-detail/overview/model.ts +7 -3
  145. package/src/plugins/builtin/ticker-detail/pharma-signals/eligibility.ts +32 -0
  146. package/src/plugins/builtin/ticker-detail/pharma-signals/tab.tsx +162 -0
  147. package/src/plugins/builtin/ticker-detail/pharma-signals/waitlist.ts +126 -0
  148. package/src/plugins/builtin/ticker-detail/research-groups.ts +6 -4
  149. package/src/plugins/builtin/ticker-detail/research-tabs.ts +11 -0
  150. package/src/plugins/builtin/time-sales/headless.ts +4 -1
  151. package/src/plugins/builtin/time-sales/pane.tsx +2 -0
  152. package/src/plugins/builtin/time-sales/window.ts +12 -0
  153. package/src/plugins/builtin/treasury-auctions/client.ts +4 -0
  154. package/src/plugins/builtin/treasury-auctions/treasury-direct.ts +2 -0
  155. package/src/plugins/builtin/treasury-daily/client.ts +23 -11
  156. package/src/portfolio/column-values.ts +20 -8
  157. package/src/portfolio/suffixed-listings.ts +3 -1
  158. package/src/portfolio/watchlist-groups.ts +212 -0
  159. package/src/react/ticker-source.ts +3 -1
  160. package/src/renderers/dom/styles.css +7 -0
  161. package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +2 -0
  162. package/src/sources/gloomberb-cloud/fred-publisher.ts +25 -0
  163. package/src/sources/gloomberb-cloud/fred-series.ts +1 -1
  164. package/src/state/app/bootstrap.ts +11 -0
  165. package/src/state/app/context/index.tsx +6 -0
  166. package/src/sync/collections-contributor.ts +5 -2
  167. package/src/sync/config-merge.ts +10 -2
  168. package/src/sync/sanitize.ts +28 -0
  169. package/src/telemetry/usage-counts.ts +17 -0
  170. package/src/time-series/base-series.ts +3 -0
  171. package/src/time-series/chart-seed.ts +1 -1
  172. package/src/time-series/financial-period-coverage.ts +4 -12
  173. package/src/time-series/ice-credit.ts +1 -0
  174. package/src/time-series/parsed-history-cache.ts +1 -1
  175. package/src/time-series/resolve.ts +1 -1
  176. package/src/time-series/types.ts +1 -0
  177. package/src/time-series/use-chart-resolution.ts +6 -1
  178. package/src/types/config.ts +32 -0
  179. package/src/types/headless.ts +9 -2
  180. package/src/types/plugin-context.ts +5 -0
  181. package/src/types/ticker.ts +14 -0
  182. package/src/ui/ascii-font.ts +1 -4
  183. package/src/utils/async-deadline.ts +2 -2
  184. package/src/utils/csv.ts +44 -5
  185. package/src/utils/futures-generic.ts +3 -0
  186. package/src/utils/throttled-fetch.ts +15 -1
@@ -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,18 +49,20 @@ 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" },
57
57
  } satisfies Record<string, DataTableColumn>;
58
58
  // Who won, what for, from whom and how much come first, so a 1280-wide pane
59
- // shows the contract; the period and date basis follow.
59
+ // shows the contract; the period and date basis follow. The feed is newest
60
+ // first across sources, so a screen of notices without an obligation or
61
+ // ceiling (UK, EU, Japan) can sit above older awards that report one: each
62
+ // amount shows while a row in view has it.
60
63
  const FEED_COLUMNS: DataTableColumn[] = [COLUMN.date, COLUMN.recipient, COLUMN.ticker, COLUMN.title, COLUMN.agency, COLUMN.currency,
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
+ ...[COLUMN.value, COLUMN.obligated, COLUMN.ceiling].map((column) => ({ ...column, omitWhenEmpty: "visible" as const })),
65
+ COLUMN.country, COLUMN.period, COLUMN.dateBasis];
64
66
  const EVENT_COLUMNS: DataTableColumn[] = [COLUMN.date, COLUMN.recipient, COLUMN.ticker,
65
67
  { id: "ratio", label: "% revenue", width: 11, align: "right" }, COLUMN.currency, { ...COLUMN.value, label: "Compared value" },
66
68
  { id: "revenue", label: "Annual revenue", width: 14, align: "right" }, { id: "basis", label: "Value basis", width: 13, align: "left" },
@@ -68,8 +70,8 @@ const EVENT_COLUMNS: DataTableColumn[] = [COLUMN.date, COLUMN.recipient, COLUMN.
68
70
  // The share leads the figures: concentration is what these views are for.
69
71
  const AGG_COLUMNS: DataTableColumn[] = [
70
72
  { 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" },
73
+ { id: "share", label: "Share %", width: 24, align: "right" }, { ...COLUMN.obligated, width: 12 }, { ...COLUMN.value, width: 12 },
74
+ { ...COLUMN.ceiling, width: 12 },
73
75
  { id: "contracts", label: "Awards", width: 8, align: "right" },
74
76
  { id: "scope", label: "Scope", width: 27, align: "left" },
75
77
  ];
@@ -220,7 +222,7 @@ function AwardsView({ width, height, focused, symbol }: PaneProps & { symbol: st
220
222
  view={tab === "sectors" ? { value: leaderView, options: [{ value: "companies", label: "Companies" }, { value: "sectors", label: "Sectors" }], onChange: setLeaderView } : undefined} />;
221
223
  const columns = showLeaders ? LEADER_COLUMNS.filter((column) => column.id !== "scope" && column.id !== "currency")
222
224
  : 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);
225
+ : tab === "events" ? EVENT_COLUMNS : FEED_COLUMNS;
224
226
  const maxShare = Math.max(0, ...items.map((item) => item.kind === "aggregate" || item.kind === "leader" ? item.row.sharePercent ?? 0 : 0));
225
227
  // A preview's cohorts are the latest of any company, so they never chart as the ticker's.
226
228
  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 {
@@ -494,7 +494,8 @@ function ChartComposerSurface({
494
494
  if (authored?.source.kind === "security" && authored.source.fieldId.startsWith("valuation.")) {
495
495
  const field = getTimeSeriesField(authored.source.fieldId);
496
496
  return { ...entry, label: authored.label?.trim()
497
- || `${authored.source.instrument.symbol} ${field?.shortLabel ?? "Multiple"}` };
497
+ || `${authored.source.instrument.symbol} ${field?.shortLabel ?? "Multiple"}`,
498
+ legendContext: authored.label?.trim() ? undefined : field?.shortLabel ?? "Multiple" };
498
499
  }
499
500
  const name = nameSeries ? listings.names.get(entry.id) : undefined;
500
501
  const company = name ? shortCompanyName(name) : "";
@@ -518,6 +519,8 @@ function ChartComposerSurface({
518
519
  ...missing.map((entry): ResolvedSeries => ({
519
520
  id: entry.id,
520
521
  label: chartSeriesLabel(entry),
522
+ legendContext: entry.label?.trim() || entry.source.kind !== "security" ? undefined
523
+ : getTimeSeriesField(entry.source.fieldId)?.seriesLabel ?? getTimeSeriesField(entry.source.fieldId)?.shortLabel,
521
524
  color: entry.color ?? colors.textDim,
522
525
  unit: "",
523
526
  unitGroup: "unknown",
@@ -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
  : "";
@@ -51,7 +51,7 @@ const COLUMNS: DataTableColumn[] = [
51
51
  { id: "annualized6m", label: "6M Ann", width: 7, align: "right", flexGrow: 1 },
52
52
  { id: "yoy", label: "Y/Y", width: 7, align: "right", flexGrow: 1 },
53
53
  { id: "contribution", label: "M/M Pts", width: 8, align: "right", flexGrow: 1 },
54
- { id: "contributionYoy", label: "Y/Y Pts", width: 8, align: "right", flexGrow: 1 },
54
+ { id: "contributionYoy", label: "Y/Y Pts", width: 8, align: "right", flexGrow: 1, omitWhenEmpty: true },
55
55
  ];
56
56
  const PANELS = [{ id: "main" }];
57
57
  /** Legend, four plot rows and the time axis; the read under them takes its own rows. */
@@ -1,6 +1,6 @@
1
1
  import { fredSeriesUrl } from "../../../sources/gloomberb-cloud/fred-series";
2
2
  import type { SeriesDefinition } from "../../../series/types";
3
- import { ICE_CREDIT_SERIES, ICE_HISTORY_LIMIT_NOTICE } from "../../../time-series/ice-credit";
3
+ import { ICE_CREDIT_PUBLISHER, ICE_CREDIT_SERIES, ICE_HISTORY_LIMIT_NOTICE } from "../../../time-series/ice-credit";
4
4
 
5
5
  /** Corporate bond option-adjusted spreads by rating and region, and the effective yields of the US indexes. */
6
6
  export const CREDIT_SPREAD_SERIES: readonly SeriesDefinition[] = ICE_CREDIT_SERIES.map((series) => ({
@@ -11,7 +11,7 @@ export const CREDIT_SPREAD_SERIES: readonly SeriesDefinition[] = ICE_CREDIT_SERI
11
11
  frequency: "daily",
12
12
  group: "Credit",
13
13
  tags: [series.measure, ...series.tags, "corporate bonds"],
14
- publisher: "FRED",
14
+ publisher: ICE_CREDIT_PUBLISHER,
15
15
  // A fixed note on every ICE series. G and CRD read the same sentence from each series' FRED notes instead, so there it lapses if FRED lifts the limit.
16
16
  limitation: ICE_HISTORY_LIMIT_NOTICE,
17
17
  url: fredSeriesUrl(series.seriesId),
@@ -201,7 +201,7 @@ export type BucketColumn = Omit<DataTableColumn, "id"> & { id: BucketColumnId };
201
201
  const BUCKET_TEXT_COLUMNS: BucketColumn[] = [
202
202
  { id: "label", label: "MATURITY", width: 15, align: "left" },
203
203
  { id: "value", label: "PRINCIPAL", width: 10, align: "right" },
204
- { id: "share", label: "% TOTAL", width: 8, align: "right" },
204
+ { id: "share", label: "% TOTAL", width: 8, align: "right", omitWhenEmpty: true },
205
205
  ];
206
206
  /** Below this the wall bars are too short to compare. */
207
207
  const MIN_WALL_WIDTH = 10;
@@ -39,6 +39,8 @@ export interface BoardReport {
39
39
  revenueEstimate: number | null;
40
40
  impliedMove: number | null;
41
41
  averageMove: number | null;
42
+ /** The move on a report already out: the close after it over the close before, signed. Null until both closes are in. */
43
+ realizedMove: number | null;
42
44
  owned: Ownership | null;
43
45
  /** ISO currency of the EPS and sales figures; null when the report has none. The market cap is always dollars. */
44
46
  currency?: string | null;
@@ -156,6 +158,7 @@ export function boardReport(report: EarningsCalendarReport, owned: ReadonlyMap<s
156
158
  revenueEstimate: report.revenueEstimate,
157
159
  impliedMove: report.implied?.move ?? null,
158
160
  averageMove: report.averageReports >= MIN_AVERAGE_REPORTS ? report.averageMove : null,
161
+ realizedMove: report.realized?.move ?? null,
159
162
  owned: owned.get(report.symbol) ?? null,
160
163
  // The board's US reports are in dollars; a listing abroad's say their own.
161
164
  currency: report.currency ?? "USD",
@@ -248,6 +251,7 @@ export function fallbackReport(event: EarningsEvent, owned: ReadonlyMap<string,
248
251
  revenueEstimate: dollars("revenueEstimate"),
249
252
  impliedMove: null,
250
253
  averageMove: null,
254
+ realizedMove: null,
251
255
  owned: owned.get(event.symbol) ?? null,
252
256
  currency: epsEstimate != null || dollars("revenueEstimate") != null ? "USD" : null,
253
257
  };
@@ -274,6 +278,14 @@ export function reportMove(report: Pick<BoardReport, "date" | "dateStatus" | "ti
274
278
  return percent != null && Number.isFinite(percent) ? percent / 100 : null;
275
279
  }
276
280
 
281
+ /**
282
+ * The MOVE a board row shows: the move so far on a report out today
283
+ * (reportMove), else the move across a report already out (`realizedMove`).
284
+ */
285
+ export function boardMove(report: BoardReport, quote: Quote | null | undefined, today: string): number | null {
286
+ return reportMove(report, quote, today) ?? report.realizedMove;
287
+ }
288
+
277
289
  function compare(left: BoardReport, right: BoardReport, sort: BoardSort): number {
278
290
  const value = (report: BoardReport) =>
279
291
  sort.column === "cap" ? report.marketCap : sort.column === "implied" ? report.impliedMove
@@ -27,16 +27,19 @@ const ALL_COLUMNS: BoardColumn[] = [
27
27
  { id: "name", label: "NAME", width: NAME_MIN_WIDTH, align: "left" },
28
28
  { id: "when", label: "WHEN", width: 7, align: "left" },
29
29
  { id: "status", label: "STATUS", width: 9, align: "left" },
30
- { id: "implied", label: "IMPLIED", width: 7, align: "right" },
30
+ // The implied move, the move on the report and their average are left out
31
+ // while no report in view has one: small caps list no options and too few
32
+ // reports to average, and a move is only measured on the day a report is out.
33
+ { id: "implied", label: "IMPLIED", width: 7, align: "right", omitWhenEmpty: "visible" },
31
34
  // The move, the actual EPS and its surprise come with the report: an upcoming one has none.
32
- { id: "move", label: "MOVE", width: 7, align: "right", mayBeBlank: true },
33
- { id: "average", label: "AVG MOVE", width: 8, align: "right" },
35
+ { id: "move", label: "MOVE", width: 7, align: "right", mayBeBlank: true, omitWhenEmpty: "visible" },
36
+ { id: "average", label: "AVG MOVE", width: 8, align: "right", omitWhenEmpty: "visible" },
34
37
  // The currency of the EPS and sales figures, on a board with a listing abroad's (CNY for Tencent).
35
38
  { id: "ccy", label: "CCY", width: 3, align: "left" },
36
39
  { id: "epsEstimate", label: "EPS EST", width: 7, align: "right" },
37
40
  { id: "analysts", label: "ESTS", width: 4, align: "right" },
38
41
  { id: "epsActual", label: "EPS ACT", width: 7, align: "right", mayBeBlank: true },
39
- { id: "basis", label: "BASIS", width: 5, align: "left" },
42
+ { id: "basis", label: "BASIS", width: 5, align: "left", mayBeBlank: true },
40
43
  { id: "epsSurprise", label: "EPS SURP", width: 8, align: "right", mayBeBlank: true },
41
44
  { id: "revenueEstimate", label: "SALES EST", width: 9, align: "right" },
42
45
  { id: "cap", label: "MKT CAP", width: 8, align: "right" },
@@ -120,7 +123,7 @@ export function renderBoardSection(row: BoardRow) {
120
123
  export interface BoardCellContext {
121
124
  /** Whether the STATUS column is on screen; without it the WHEN cell says which reports are out. */
122
125
  statusShown: boolean;
123
- /** The move on a report out today (reportMove); "loading" while its quote is. */
126
+ /** The move on the report (boardMove): so far for one out today, across it for one out before; "loading" while today's quote is. */
124
127
  move: (report: BoardReport) => number | "loading" | null;
125
128
  /** The desktop and the web lead each name with the company's logo; the terminal draws none. */
126
129
  logos?: boolean;
@@ -28,7 +28,9 @@ import { useAssetData, usePluginAppActions, usePluginTickerActions } from "../..
28
28
  import { earningsResultsAlertValues } from "../alerts/research-builder";
29
29
  import { cachedMembers, loadMembers } from "../members/client";
30
30
  import { isBoardRowLoading, useQuoteBoard } from "../shared/use-quote-board";
31
- import { listingAbroadVenue } from "../../../utils/sec";
31
+ import { usePlanAccess } from "../../../api-client/plan-access";
32
+ import { useResearchCloudSession } from "../shared/research-cloud-session";
33
+ import { loadEarningsHighlight } from "./highlight";
32
34
  import {
33
35
  addDays,
34
36
  boardKey,
@@ -39,7 +41,7 @@ import {
39
41
  newYorkToday,
40
42
  ownershipBySymbol,
41
43
  relativeDays,
42
- reportMove,
44
+ boardMove,
43
45
  type BoardReport,
44
46
  type BoardRow,
45
47
  type BoardSort,
@@ -117,7 +119,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
117
119
  height: number;
118
120
  /** Named on the command bar; empty for the market board. */
119
121
  scopedSymbols: readonly string[];
120
- /** `EVTS <ticker>`: the row to select when that company reports in these days. */
122
+ /** `EVTS <ticker>`: open on this company's report and select its row. */
121
123
  highlight?: string | null;
122
124
  }) {
123
125
  const dataProvider = useAssetData();
@@ -151,7 +153,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
151
153
  // range for both views: the table draws its days, the calendar its week (this week for the days ahead).
152
154
  const [requestedDate] = usePaneSettingValue<string>("date", "");
153
155
  const [requestedWeek] = usePaneSettingValue<string>("week", "");
154
- const [range, setRange] = usePluginPaneState<BoardRange>("range", requestedBoardRange(requestedDate, requestedWeek));
156
+ const [chosenRange, setRange] = usePluginPaneState<BoardRange | null>("range", null);
155
157
  // The calendar's groups opened past their "+N more" slot, by `calendarGroupKey`.
156
158
  const [expanded, setExpanded] = useState(NONE_EXPANDED);
157
159
  const desktop = useUiCapabilities().nativePaneChrome === true;
@@ -171,6 +173,12 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
171
173
 
172
174
  const today = newYorkToday();
173
175
  const market = !scoped && scope.kind === "all";
176
+ const access = usePlanAccess();
177
+ const session = useResearchCloudSession();
178
+ const accessKey = `${session.requestKey}:${access.hasProAccess ? "pro" : "free"}`;
179
+ const highlightLoader = useCallback((force: boolean) => loadEarningsHighlight(highlight!, today, dataProvider, force, accessKey), [accessKey, dataProvider, highlight, today]);
180
+ const highlightedReport = useAsyncResource(market && highlight ? highlightLoader : null);
181
+ const range = chosenRange ?? (requestedBoardRange(requestedDate, requestedWeek) || highlightedReport.data?.report.date || "");
174
182
  // Keyed by content: ticker records change for many reasons, the board reloads only when the list's names do.
175
183
  const collectionKey = useMemo(() => {
176
184
  if (scope.kind !== "portfolio" && scope.kind !== "watchlist") return "";
@@ -196,7 +204,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
196
204
  const weekOffset = boardRangeWeek(range, today);
197
205
  const week = useMemo(() => calendarWeekDates(today, weekOffset), [today, weekOffset]);
198
206
  // EVTS 0700.HK names its listing, which the market board then keeps whatever the day's cut.
199
- const highlightListing = market && highlight && listingAbroadVenue(boardKey(highlight)) ? boardKey(highlight) : null;
207
+ const highlightListing = market && highlight ? boardKey(highlight) : null;
200
208
  // The calendar reads its week, reported days included; the table its days. Each report says its currency
201
209
  // (CCY), so every board reads the listings abroad too.
202
210
  const query = useMemo<EarningsCalendarQuery>(() => {
@@ -228,6 +236,10 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
228
236
  const extra = fallback.status === "fulfilled"
229
237
  ? fallback.value.filter((event) => !covered.has(event.symbol)).map((event) => fallbackReport(event, owned, today))
230
238
  : [];
239
+ const target = highlightedReport.data?.report;
240
+ if (target && target.date >= read.from && target.date <= read.to && ![...reports, ...extra].some((report) => boardRowOf(report, target.symbol))) {
241
+ extra.push({ ...target, owned: owned.get(target.symbol) ?? null });
242
+ }
231
243
  return {
232
244
  queryKey,
233
245
  reports: [...reports, ...extra],
@@ -237,8 +249,8 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
237
249
  ? (cloud.reason instanceof Error ? cloud.reason.message : String(cloud.reason))
238
250
  : holdings?.refreshError ?? cloud.value.refreshError,
239
251
  };
240
- }, [calendar, dataProvider, market, named, owned, perTicker, query, queryKey, range, fund, today]);
241
- const resource = useAsyncResource(loader, {
252
+ }, [calendar, dataProvider, highlightedReport.data, market, named, owned, perTicker, query, queryKey, range, fund, today]);
253
+ const resource = useAsyncResource(highlightedReport.loading ? null : loader, {
242
254
  keepPreviousData: true,
243
255
  initialData: () => {
244
256
  const holdings = fund ? cachedMembers(fund.etf) : null;
@@ -290,7 +302,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
290
302
  logos,
291
303
  move: (report) => {
292
304
  const state = quotesRef.current.get(report.symbol);
293
- const move = reportMove(report, state?.quote, today);
305
+ const move = boardMove(report, state?.quote, today);
294
306
  return move == null && report.dateStatus === "reported" && report.date === today && isBoardRowLoading(state) ? "loading" : move;
295
307
  },
296
308
  };
@@ -324,16 +336,23 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
324
336
  const updatedAgo = useUpdatedAgo(resource.updatedAt);
325
337
  const utcDay = useUtcDay();
326
338
  // 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]);
339
+ const highlightMissing = market && highlight && !resource.loading && !highlightedReport.loading && !data?.reports.some((report) => boardRowOf(report, highlight));
340
+ const footerInfo = useMemo(() => [
341
+ ...(highlightMissing ? [{ id: "highlight", capture: true, parts: [{
342
+ text: highlightedReport.error ? `${highlight}: report date unavailable`
343
+ : highlightedReport.data ? `${highlight} reports on ${highlightedReport.data.report.date}; not in this range`
344
+ : `No report date for ${highlight}.`,
345
+ tone: "warning" as const,
346
+ }] }] : []),
347
+ ...(data ? [reportFooterSegment(earningsBoardHeadless, { rows: [], metadata: { asOf: data.asOf } }),
348
+ ...(updatedAgo ? [ageFooterSegment(updatedAgo)] : [])] : []),
349
+ ], [data, highlight, highlightedReport.data, highlightedReport.error, highlightMissing, updatedAgo, utcDay]);
331
350
  usePaneStatusFooter({
332
351
  registrationId: "earnings-board",
333
352
  enabled: !open,
334
- loading: resource.loading,
335
- error: resource.error ?? data?.refreshError ?? null,
336
- stale: !!data?.stale,
353
+ loading: resource.loading || highlightedReport.loading,
354
+ error: resource.error ?? highlightedReport.error ?? data?.refreshError ?? highlightedReport.data?.refreshError ?? null,
355
+ stale: !!data?.stale || !!highlightedReport.data?.stale,
337
356
  info: footerInfo,
338
357
  });
339
358
  const symbol = open?.symbol ?? selectedReport?.symbol ?? null;
@@ -357,8 +376,9 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
357
376
  }), [alerts, createPaneFromTemplate, navigateTicker, notify, symbol]);
358
377
 
359
378
  // t, e, c, a and n are footer hints, which bind their own keys.
360
- const handleKeyDown = useCallback((event: DataTableKeyEvent) => handleRefreshKey(event, () => resource.reload()), [resource.reload]);
361
- usePaneRefreshKey(() => resource.reload(), { focused, enabled: calendar && !open });
379
+ const refresh = useCallback(() => { highlightedReport.reload(); resource.reload(); }, [highlightedReport.reload, resource.reload]);
380
+ const handleKeyDown = useCallback((event: DataTableKeyEvent) => handleRefreshKey(event, refresh), [refresh]);
381
+ usePaneRefreshKey(refresh, { focused, enabled: calendar && !open });
362
382
 
363
383
  const sortColumn = (Object.entries(SORTABLE).find(([, value]) => value === sort.column)?.[0]) ?? null;
364
384
  const namesFilter: QueryBarFilter[] = scoped ? [] : [{
@@ -457,7 +477,7 @@ export function EarningsBoard({ focused, width, height, scopedSymbols, highlight
457
477
  rootWidth={width}
458
478
  rootHeight={height}
459
479
  rootBefore={queryBar}
460
- status={{ loading: resource.loading && !data, error: !data ? resource.error : null, subject: "the earnings calendar" }}
480
+ status={{ loading: (resource.loading || highlightedReport.loading) && !data, error: !data ? resource.error : null, subject: "the earnings calendar" }}
461
481
  columns={columns}
462
482
  items={rows}
463
483
  getItemKey={(row) => row.key}