gloomberb 0.20.3 → 0.20.4

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 (154) hide show
  1. package/package.json +1 -1
  2. package/src/account/auth-dialog.tsx +17 -0
  3. package/src/api-client/data.ts +6 -0
  4. package/src/api-client/fx-interventions.ts +64 -0
  5. package/src/api-client/index.ts +1 -0
  6. package/src/api-client/release-summaries.ts +21 -0
  7. package/src/app/keybindings/actions.ts +2 -2
  8. package/src/app/pane-runtime/ticker-open-runtime.ts +245 -66
  9. package/src/cli/commands/market.ts +77 -1
  10. package/src/cli/commands/news-search.ts +1 -3
  11. package/src/cli/commands/plugins.ts +27 -5
  12. package/src/cli/commands/system.ts +19 -3
  13. package/src/cli/commands/ticker.ts +60 -19
  14. package/src/cli/index.ts +8 -8
  15. package/src/cli/pane-functions/function-help.ts +3 -3
  16. package/src/cli/report-tables.ts +18 -6
  17. package/src/cli/result.ts +15 -7
  18. package/src/cli/types.ts +2 -0
  19. package/src/components/chart/composite/axis-overlays.tsx +22 -0
  20. package/src/components/chart/composite/composite-chart.tsx +54 -13
  21. package/src/components/chart/composite/event-captions.ts +109 -0
  22. package/src/components/chart/composite/event-guides.ts +74 -0
  23. package/src/components/chart/composite/rasterizer.ts +2 -0
  24. package/src/components/chart/composite/text-renderer.ts +2 -0
  25. package/src/components/chart/composite/types.ts +31 -0
  26. package/src/components/command-bar/layout-items/focused-pane.ts +5 -5
  27. package/src/components/command-bar/routes/root/provider-search.ts +5 -4
  28. package/src/components/command-bar/routes/ticker-search/results.ts +51 -0
  29. package/src/components/command-bar/routes/ticker-search/route.ts +3 -2
  30. package/src/components/layout/detached-pane-shell.tsx +1 -1
  31. package/src/components/layout/floating-pane.tsx +5 -1
  32. package/src/components/layout/pane/footer/index.tsx +21 -14
  33. package/src/components/layout/pane/footer/model.ts +6 -0
  34. package/src/components/layout/shell/action-menu-overlay.tsx +10 -5
  35. package/src/components/layout/shell/active-drag.ts +149 -105
  36. package/src/components/layout/shell/drag/drop-zones.ts +162 -0
  37. package/src/components/layout/shell/drag/index.ts +47 -218
  38. package/src/components/layout/shell/drag/live.ts +10 -3
  39. package/src/components/layout/shell/drag/overlays.tsx +182 -5
  40. package/src/components/layout/shell/drag/runtime.ts +29 -6
  41. package/src/components/layout/shell/drag/shared-edges.ts +156 -0
  42. package/src/components/layout/shell/index.tsx +11 -6
  43. package/src/components/layout/shell/menu.ts +11 -2
  44. package/src/components/layout/shell/native/pointer-runtime.ts +25 -0
  45. package/src/components/layout/shell/native/window-state.ts +2 -2
  46. package/src/components/layout/shell/pane/layers.tsx +71 -7
  47. package/src/components/layout/shell/terminal-pointer-runtime.ts +18 -9
  48. package/src/components/layout/shell/window-mode/index.ts +8 -10
  49. package/src/components/layout/window-edit/mode.ts +39 -7
  50. package/src/components/layout/window-edit/presentation.ts +1 -1
  51. package/src/components/onboarding/onboarding-keyboard.ts +4 -0
  52. package/src/components/onboarding/onboarding-wizard.tsx +8 -3
  53. package/src/components/ui/button.tsx +2 -0
  54. package/src/components/ui/choice-dialog.tsx +1 -0
  55. package/src/components/ui/data-table/index.tsx +4 -3
  56. package/src/components/ui/list-view.tsx +7 -12
  57. package/src/components/ui/loading.tsx +10 -3
  58. package/src/components/ui/menu.tsx +6 -2
  59. package/src/components/ui/quote.ts +14 -1
  60. package/src/data/config/layout.ts +5 -2
  61. package/src/docs/snapshot.json +29 -5
  62. package/src/i18n/es.ts +9 -8
  63. package/src/i18n/ja.ts +9 -8
  64. package/src/i18n/ko.ts +9 -8
  65. package/src/i18n/zh-cn.ts +9 -8
  66. package/src/i18n/zh-tw.ts +9 -8
  67. package/src/layout/pane-manager/floating-actions.ts +17 -0
  68. package/src/layout/pane-manager/floating-stack.ts +187 -0
  69. package/src/layout/pane-manager/floating.ts +4 -2
  70. package/src/layout/pane-manager/gridlock.ts +5 -1
  71. package/src/layout/pane-manager/index.ts +11 -0
  72. package/src/layout/pane-manager/layout-state.ts +10 -3
  73. package/src/market-data/futures-board.ts +46 -1
  74. package/src/market-data/futures-contract.ts +12 -3
  75. package/src/market-data/fx-interventions.ts +270 -0
  76. package/src/news/news-model.ts +44 -2
  77. package/src/plugins/builtin/alerts/cli.ts +4 -4
  78. package/src/plugins/builtin/alerts/format.ts +1 -2
  79. package/src/plugins/builtin/alerts/headless.ts +1 -2
  80. package/src/plugins/builtin/alerts/move-checks.ts +12 -6
  81. package/src/plugins/builtin/alerts/move.ts +30 -9
  82. package/src/plugins/builtin/alerts/pane.tsx +0 -2
  83. package/src/plugins/builtin/alerts/storage.ts +4 -2
  84. package/src/plugins/builtin/alerts/types.ts +12 -0
  85. package/src/plugins/builtin/changelog/index.tsx +292 -101
  86. package/src/plugins/builtin/changelog/versions.ts +293 -0
  87. package/src/plugins/builtin/chart-composer/intervention-events.ts +105 -0
  88. package/src/plugins/builtin/chart-composer/pane.tsx +21 -7
  89. package/src/plugins/builtin/chat/message/render-state.ts +2 -5
  90. package/src/plugins/builtin/cloud/askg/attached-pane.tsx +10 -5
  91. package/src/plugins/builtin/cloud/askg/controller.ts +141 -5
  92. package/src/plugins/builtin/cloud/askg/executor.ts +113 -4
  93. package/src/plugins/builtin/cloud/askg/manifest.ts +28 -13
  94. package/src/plugins/builtin/cloud/askg/model.ts +14 -4
  95. package/src/plugins/builtin/cloud/askg/pane.tsx +70 -46
  96. package/src/plugins/builtin/cloud/askg/turn-parts.tsx +70 -0
  97. package/src/plugins/builtin/cloud/terminal-relay/engine.ts +50 -130
  98. package/src/plugins/builtin/cloud/terminal-relay/policy.ts +327 -7
  99. package/src/plugins/builtin/cloud/terminal-relay/prompts.tsx +2 -1
  100. package/src/plugins/builtin/cloud/terminal-relay/redact.ts +47 -6
  101. package/src/plugins/builtin/commodities-energy/index.tsx +1 -3
  102. package/src/plugins/builtin/commodities-energy/view-state.ts +3 -0
  103. package/src/plugins/builtin/cot/headless.ts +14 -2
  104. package/src/plugins/builtin/earnings/index.tsx +2 -2
  105. package/src/plugins/builtin/futures/index.tsx +25 -4
  106. package/src/plugins/builtin/futures/model.ts +28 -32
  107. package/src/plugins/builtin/futures/series.ts +4 -3
  108. package/src/plugins/builtin/futures/table.tsx +16 -9
  109. package/src/plugins/builtin/futures/use-board-terms.ts +3 -3
  110. package/src/plugins/builtin/help/index.tsx +3 -3
  111. package/src/plugins/builtin/help/keybindings-editor.tsx +18 -4
  112. package/src/plugins/builtin/layout-manager/index.tsx +8 -8
  113. package/src/plugins/builtin/news/headless.ts +2 -2
  114. package/src/plugins/builtin/news/index.tsx +3 -3
  115. package/src/plugins/builtin/perps/markets-section.tsx +5 -2
  116. package/src/plugins/builtin/plugin-marketplace/pane.tsx +11 -11
  117. package/src/plugins/builtin/portfolio-list/summary/index.tsx +3 -1
  118. package/src/plugins/builtin/research/event-model.ts +9 -1
  119. package/src/plugins/builtin/research/event-sources.ts +22 -0
  120. package/src/plugins/builtin/research/headless.ts +3 -3
  121. package/src/plugins/builtin/shared/cloud-upgrade.ts +27 -3
  122. package/src/plugins/builtin/ticker-detail/overview/components.tsx +54 -5
  123. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +28 -13
  124. package/src/plugins/builtin/ticker-detail/pane.tsx +7 -2
  125. package/src/plugins/installer.ts +45 -0
  126. package/src/remote/resources.ts +12 -1
  127. package/src/remote/schema.ts +1 -0
  128. package/src/remote/semantic-helpers.ts +29 -1
  129. package/src/remote/semantic-tree.tsx +32 -15
  130. package/src/renderers/cloudflare/worker.ts +16 -1
  131. package/src/renderers/dom/styles.css +40 -6
  132. package/src/renderers/share/layout-view.tsx +1 -1
  133. package/src/sources/gloomberb-cloud/news.ts +35 -12
  134. package/src/state/opening-ticker-panes.ts +47 -0
  135. package/src/test-support/cli-context.ts +2 -0
  136. package/src/test-support/preload.ts +4 -1
  137. package/src/tickers/instrument-kind.ts +23 -3
  138. package/src/types/config.ts +5 -0
  139. package/src/types/context-menu.ts +2 -0
  140. package/src/types/plugin-commands.ts +140 -0
  141. package/src/types/plugin-context.ts +125 -0
  142. package/src/types/plugin-contributions.ts +55 -0
  143. package/src/types/plugin-definition.ts +234 -0
  144. package/src/types/plugin-notifications.ts +38 -0
  145. package/src/types/plugin-pane-settings.ts +114 -0
  146. package/src/types/plugin-pane-templates.ts +160 -0
  147. package/src/types/plugin-panes.ts +221 -0
  148. package/src/types/plugin-reports.ts +35 -0
  149. package/src/types/plugin-shared.ts +14 -0
  150. package/src/types/plugin-state.ts +71 -0
  151. package/src/types/plugin.ts +14 -1169
  152. package/src/ui/index.tsx +14 -3
  153. package/src/updater/github-releases.ts +23 -0
  154. package/src/utils/cli-output.ts +22 -9
@@ -2,7 +2,7 @@ import type { FuturesContractTermsPayload } from "../../../api-client/futures-cu
2
2
  import type { Quote } from "../../../types/financials";
3
3
  import { compareSortValues, type SortDirection } from "../../../utils/sort-values";
4
4
  import type { BoardQuoteMap } from "../shared/use-quote-board";
5
- import { FUTURES_SECTOR_ORDER, type FuturesContract, type FuturesSector } from "../../../market-data/futures-board";
5
+ import { FUTURES_SECTOR_ORDER, futuresGroupFilter, futuresNameKey, type FuturesContract, type FuturesSector } from "../../../market-data/futures-board";
6
6
  import { CONTRACT_MONTH_NAME, futuresPriceUnit } from "../../../market-data/futures-contract";
7
7
  import { contractMonthLabel } from "../../../utils/contract-month";
8
8
  import { quoteDotMarketState } from "../../../market-data/market/status";
@@ -89,19 +89,21 @@ function dayMonth(date: string): string {
89
89
 
90
90
  /**
91
91
  * The row's headline: the contract its quote prices, as futuresContractName
92
- * words it: the root's front month until its roll date. Two notes follow,
93
- * each from the day's facts. Once the continuous symbol has rolled while the
94
- * nearer month still trades, that month's last trade: "WTI Crude Oil Dec 2026,
95
- * rolled (Nov expires 20 Oct)". When the day's volume put another month first,
96
- * that month: "WTI Crude Oil Nov 2026, Dec most active". The terms only add a
97
- * note when they name the month the quote prices, so a roll between the two
98
- * loads never mixes months, and place the month when the quote's name carries
99
- * none. A name column too narrow for a note drops it, the last one first.
92
+ * words it: the root's front month until its roll date. Once the continuous
93
+ * symbol has rolled while the nearer month still trades, a note gives that
94
+ * month's last trade: "WTI Crude Oil Dec 2026, rolled (Nov expires 20 Oct)".
95
+ * The label names only the contract whose price the row shows: the day's
96
+ * most active month, beside the price, read as that month's price ("Cocoa
97
+ * Dec 2026, Mar 2027 most active 5,119" was December's), so it stays in
98
+ * `quote`'s contract lines. The terms only add the note when they name the
99
+ * month the quote prices, so a roll between the two loads never mixes
100
+ * months, and place the month when the quote's name carries none. A name
101
+ * column too narrow for the note drops it.
100
102
  */
101
103
  export function futuresContractHeadline(
102
104
  contract: FuturesContract,
103
105
  quote?: Quote | null,
104
- terms?: Pick<FuturesContractTermsPayload, "deliveryMonth" | "nearest" | "mostActive"> | null,
106
+ terms?: Pick<FuturesContractTermsPayload, "deliveryMonth" | "nearest"> | null,
105
107
  width = Number.POSITIVE_INFINITY,
106
108
  ): string {
107
109
  const quoted = quotedContractMonth(contract, quote);
@@ -115,28 +117,13 @@ export function futuresContractHeadline(
115
117
  const priced = `${month.year}-${String(month.month + 1).padStart(2, "0")}`;
116
118
  const plain = `${contract.name} ${contractMonthLabel(month.year, month.month)}`;
117
119
  if (!agree) return plain;
118
- const notes: Array<{ text: string; min: string }> = [];
119
120
  const nearest = terms?.nearest;
120
- if (nearest && nearest.deliveryMonth < priced) {
121
- const nearer = MONTH_NAMES[Number(nearest.deliveryMonth.slice(5, 7)) - 1];
122
- const expiry = nearest.lastTrade ? `expires ${dayMonth(nearest.lastTrade)}` : "still trading";
123
- notes.push({ text: `, rolled (${nearer} ${expiry})`, min: ", rolled" });
124
- }
125
- const active = terms?.mostActive;
126
- if (active && /^\d{4}-\d{2}$/.test(active.deliveryMonth) && active.deliveryMonth !== priced) {
127
- // Another year's month says which year it is.
128
- const name = MONTH_NAMES[Number(active.deliveryMonth.slice(5, 7)) - 1];
129
- const label = active.deliveryMonth.slice(0, 4) === String(month.year) ? name : `${name} ${active.deliveryMonth.slice(0, 4)}`;
130
- notes.push({ text: `, ${label} most active`, min: `, ${label} most active` });
131
- }
132
- // The month the quote prices leads, so a column that clips the tail still shows it; a note keeps its place
121
+ if (!nearest || nearest.deliveryMonth >= priced) return plain;
122
+ const nearer = MONTH_NAMES[Number(nearest.deliveryMonth.slice(5, 7)) - 1];
123
+ const expiry = nearest.lastTrade ? `expires ${dayMonth(nearest.lastTrade)}` : "still trading";
124
+ // The month the quote prices leads, so a column that clips the tail still shows it; the note keeps its place
133
125
  // while the column fits at least its start.
134
- let headline = plain;
135
- for (const note of notes) {
136
- if (width < headline.length + note.min.length) break;
137
- headline += note.text;
138
- }
139
- return headline;
126
+ return width < plain.length + ", rolled".length ? plain : `${plain}, rolled (${nearer} ${expiry})`;
140
127
  }
141
128
 
142
129
  /**
@@ -148,13 +135,22 @@ export function futuresUnitLabel(contract: FuturesContract, terms?: Pick<Futures
148
135
  return futuresPriceUnit(contract, terms);
149
136
  }
150
137
 
138
+ /**
139
+ * Whether a row answers a search: its code, symbol, name or everyday names,
140
+ * a number marked as "No. 11" or "#11" alike ("SUGAR NO. 11", the CFTC's
141
+ * name, is Sugar #11), or a sector or group word that holds it (softs,
142
+ * grains, agriculture, metals, energy), which lists that group alone.
143
+ */
151
144
  function matchesFuturesSearch(contract: FuturesContract, query: string, quote?: Quote | null): boolean {
152
145
  const normalized = query.trim().toLowerCase();
153
146
  if (!normalized) return true;
147
+ const group = futuresGroupFilter(normalized);
148
+ if (group) return group(contract);
149
+ const named = futuresNameKey(normalized);
154
150
  return (
155
151
  contract.code.toLowerCase().includes(normalized)
156
- || contract.name.toLowerCase().includes(normalized)
157
- || futuresContractName(contract, quote).toLowerCase().includes(normalized)
152
+ || futuresNameKey(contract.name).includes(named)
153
+ || futuresNameKey(futuresContractName(contract, quote)).includes(named)
158
154
  || contract.symbol.toLowerCase().includes(normalized)
159
155
  // Everyday names the board's own does not hold: natgas is Natural Gas.
160
156
  || (contract.aliases ?? []).some((alias) => alias.includes(normalized))
@@ -1,5 +1,5 @@
1
1
  import type { SeriesDefinition } from "../../../series/types";
2
- import { FUTURES_CONTRACTS, FUTURES_SECTOR_LABELS, type FuturesContract } from "../../../market-data/futures-board";
2
+ import { FUTURES_CONTRACTS, FUTURES_SECTOR_LABELS, futuresGroupTags, type FuturesContract } from "../../../market-data/futures-board";
3
3
 
4
4
  /**
5
5
  * Grains and softs the board quotes in US cents with no unit of its own
@@ -37,14 +37,15 @@ const CONTRACT_TAGS: Readonly<Record<string, readonly string[]>> = {
37
37
  "6S": ["CHF", "franc", "swiss franc", "safe haven"],
38
38
  };
39
39
 
40
- /** Each continuous front-month contract on the futures board, as `FUT:ES`. */
40
+ /** Each continuous front-month contract on the futures board, as `FUT:ES`, found by its sector and group words too (`catalog softs`). */
41
41
  const FRONT_MONTH_SERIES: readonly SeriesDefinition[] = FUTURES_CONTRACTS.map((contract) => ({
42
42
  id: `fut:${contract.code}`,
43
43
  name: contract.name,
44
44
  unit: futuresSeriesUnit(contract),
45
45
  frequency: "daily",
46
46
  group: "Futures",
47
- tags: [contract.code, FUTURES_SECTOR_LABELS[contract.sector], "futures", "front month", ...CONTRACT_TAGS[contract.code] ?? []],
47
+ tags: [...new Set([contract.code, FUTURES_SECTOR_LABELS[contract.sector], ...futuresGroupTags(contract), "futures", "front month",
48
+ ...CONTRACT_TAGS[contract.code] ?? []])],
48
49
  expression: `FUT:${contract.code}`,
49
50
  }));
50
51
 
@@ -41,17 +41,24 @@ const DEFAULT_FUTURES_COLUMN_IDS = FUTURES_COLUMN_DEFS.map((column) => column.id
41
41
 
42
42
  /**
43
43
  * Extra columns only earn their width once the board is wide enough to keep a
44
- * readable contract name (24 cells or more); a narrow pane drops them instead
45
- * of clipping. The unit a price counts outranks its session change in points,
46
- * which the change in percent still gives. The previous close (the last price
47
- * less the change) goes first, then each row's quote time (the status line
48
- * dates the newest), which leaves a 1280-pixel shot room for "WTI Crude Oil
49
- * Dec 2026, rolled (Nov expires 20 Oct)".
44
+ * readable contract name: CONTRACT never gets fewer than 24 cells
45
+ * once a board can hold that much. Each threshold is the width where the
46
+ * column fits with CONTRACT still at 24, the session word (from 100 cells)
47
+ * included. The change in percent always shows, and the week's and month's
48
+ * returns come next: the unit a price counts goes after them, so a board
49
+ * fullscreen on an 80-cell terminal (78 cells) reads SYM CONTRACT LAST CHG%
50
+ * 1W, and a floating one never hides the move behind a scroll (a cent price
51
+ * still says so on itself, 280.15¢). The unit outranks the session change in
52
+ * points, which the change in percent still gives. The previous close (the
53
+ * last price less the change) goes first, then each row's quote time (the
54
+ * status line dates the newest), which leaves a 1280-pixel shot room for "WTI
55
+ * Crude Oil Dec 2026, rolled (Nov expires 20 Oct)".
50
56
  */
51
57
  const COLUMN_MIN_PANE_WIDTH: Partial<Record<FuturesColumnId, number>> = {
52
- change: 100,
53
- return1w: 108,
54
- return1m: 117,
58
+ return1w: 71,
59
+ return1m: 80,
60
+ unit: 106,
61
+ change: 117,
55
62
  returnYtd: 126,
56
63
  volume: 136,
57
64
  time: 170,
@@ -51,9 +51,9 @@ function loadTerms(symbol: string, batch: boolean): Promise<boolean> {
51
51
 
52
52
  /**
53
53
  * Each listed row's contract terms, as `quote` reads them: the unit its price
54
- * counts, the nearer month still trading once its continuous symbol has
55
- * rolled, and the day's most active month. Only the rows the board lists are asked for,
56
- * and a row whose terms have not arrived (or that has none) renders without them.
54
+ * counts and the nearer month still trading once its continuous symbol has
55
+ * rolled. Only the rows the board lists are asked for, and a row whose terms
56
+ * have not arrived (or that has none) renders without them.
57
57
  */
58
58
  export function useFuturesBoardTerms(contracts: readonly FuturesContract[], enabled: boolean): FuturesTermsMap {
59
59
  const symbolKey = contracts.map((contract) => contract.symbol).join(",");
@@ -357,7 +357,7 @@ function HelpPane({ focused, width, height }: PaneProps) {
357
357
  ],
358
358
  },
359
359
  {
360
- // Docked panes keep the saved layout and floating ones follow the pointer; the keyboard's way is Window Mode below.
360
+ // Panes in the layout keep the saved layout and floating ones follow the pointer; the keyboard's way is Window Mode below.
361
361
  label: "Layout",
362
362
  items: [
363
363
  keyEntry("layout-drag", ["Drag"], "Floating panes can be dragged by the title bar and resized from the lower-right corner."),
@@ -374,8 +374,8 @@ function HelpPane({ focused, width, height }: PaneProps) {
374
374
  ? [entry("enter-resize", windowResizeBadges, "Enter window mode to resize the focused window.")]
375
375
  : []),
376
376
  keyEntry("mode", ["m", "r"], "Switch between move and resize."),
377
- keyEntry("dock", ["d"], "Dock or float the selected window."),
378
- keyEntry("move", ["Arrows", "h/j/k/l"], "Move, resize, or choose a dock target."),
377
+ keyEntry("float", ["d"], "Float the selected window, or return it to the layout."),
378
+ keyEntry("move", ["Arrows", "h/j/k/l"], "Move, resize, or choose where it goes in the layout."),
379
379
  keyEntry("step", ["Shift"], "Use larger move and resize steps with direction keys."),
380
380
  keyEntry("cycle", ["Tab", "w"], "Cycle windows or resize handles."),
381
381
  keyEntry("commit", ["Enter", "Esc"], "Commit pending changes or exit window mode."),
@@ -61,8 +61,19 @@ import { badgeCell, badgeColumnWidth, mutedCell } from "./table-cells";
61
61
  const CAPTURE_SCOPE = "help-keybinding-capture";
62
62
  const FOOTER_ID = "help-keybindings";
63
63
  const NOTE_COLUMN_WIDTH = 26;
64
- /** Below this the note column is dropped; the footer still carries the detail. */
65
- const NOTE_COLUMN_MIN_TABLE_WIDTH = 76;
64
+ /** What the table takes besides its columns: its side padding, the gaps between columns and the scrollbar. */
65
+ const TABLE_CHROME = 5;
66
+ /** ACTION keeps at least this beside NOTE; narrower, NOTE is dropped and the footer carries the selected row's. */
67
+ const ACTION_MIN_WIDTH = 30;
68
+
69
+ /**
70
+ * Whether the NOTE column shows: only while some row has a note, and ACTION
71
+ * keeps ACTION_MIN_WIDTH cells beside it. At 80 cells an empty NOTE took 26
72
+ * while ACTION read "Change the focused pa…".
73
+ */
74
+ function showsKeybindingNotes(width: number, keyColumnWidth: number, anyNote: boolean): boolean {
75
+ return anyNote && width - TABLE_CHROME - keyColumnWidth - NOTE_COLUMN_WIDTH >= ACTION_MIN_WIDTH;
76
+ }
66
77
 
67
78
  type KeybindingColumnId = "key" | "action" | "note";
68
79
  type KeybindingColumn = DataTableColumn & { id: KeybindingColumnId };
@@ -371,13 +382,16 @@ export function KeybindingsEditor({
371
382
  () => badgeColumnWidth([...bindableRows.map((row) => row.chords), [t("Press a key")]]),
372
383
  [bindableRows],
373
384
  );
385
+ // Decided from every row, not the rows on screen, so ACTION's width holds while the table scrolls.
386
+ const anyNote = useMemo(() => bindableRows.some((row) => !!row.note), [bindableRows]);
387
+ const showNotes = showsKeybindingNotes(width, keyColumnWidth, anyNote);
374
388
  const columns = useMemo<KeybindingColumn[]>(() => [
375
389
  { id: "key", label: "KEY", width: keyColumnWidth, align: "left" },
376
390
  { id: "action", label: "ACTION", width: 20, align: "left", flexGrow: 1 },
377
- ...(width >= NOTE_COLUMN_MIN_TABLE_WIDTH
391
+ ...(showNotes
378
392
  ? [{ id: "note" as const, label: "NOTE", width: NOTE_COLUMN_WIDTH, align: "left" as const }]
379
393
  : []),
380
- ], [keyColumnWidth, width]);
394
+ ], [keyColumnWidth, showNotes]);
381
395
 
382
396
  const renderCell = useCallback((
383
397
  row: EditorRow,
@@ -145,7 +145,7 @@ export const layoutManagerModule: PluginModule = {
145
145
  ctx.registerCommand({
146
146
  id: "float-pane",
147
147
  label: "Float Pane",
148
- description: "Detach a docked pane into a floating window",
148
+ description: "Take a pane out of the layout into a floating window",
149
149
  keywords: ["float", "detach", "undock", "window", "pane"],
150
150
  category: "config",
151
151
  execute: async () => {
@@ -154,7 +154,7 @@ export const layoutManagerModule: PluginModule = {
154
154
  const { layout, termWidth, termHeight, focusedPaneId } = getStateRef();
155
155
  const focusedPane = getFocusedPane(layout, focusedPaneId);
156
156
  if (!focusedPane || !isPaneDocked(layout, focusedPane.instanceId)) {
157
- notify("Focus a docked pane to float it", { type: "info" });
157
+ notify("Focus a pane in the layout to float it", { type: "info" });
158
158
  return;
159
159
  }
160
160
 
@@ -167,9 +167,9 @@ export const layoutManagerModule: PluginModule = {
167
167
 
168
168
  ctx.registerCommand({
169
169
  id: "dock-pane",
170
- label: "Dock Pane",
171
- description: "Dock a floating pane back into the layout",
172
- keywords: ["dock", "attach", "pin", "pane"],
170
+ label: "Return to Layout",
171
+ description: "Put a floating pane back into the layout",
172
+ keywords: ["return", "layout", "tile", "attach", "pin", "pane", "dock"],
173
173
  category: "config",
174
174
  execute: async () => {
175
175
  if (!getStateRef) return;
@@ -177,7 +177,7 @@ export const layoutManagerModule: PluginModule = {
177
177
  const { layout, focusedPaneId } = getStateRef();
178
178
  const focusedPane = getFocusedPane(layout, focusedPaneId);
179
179
  if (!focusedPane || !layout.floating.some((entry) => entry.instanceId === focusedPane.instanceId)) {
180
- notify("Focus a floating pane to dock it", { type: "info" });
180
+ notify("Focus a floating pane to return it to the layout", { type: "info" });
181
181
  return;
182
182
  }
183
183
 
@@ -281,11 +281,11 @@ export const layoutManagerModule: PluginModule = {
281
281
  const focusedPane = getFocusedPane(layout, focusedPaneId);
282
282
  const dockedPaneIds = getDockedPaneIds(layout);
283
283
  if (dockedPaneIds.length < 2) {
284
- notify("Need at least 2 docked panes to swap", { type: "info" });
284
+ notify("Need at least 2 panes in the layout to swap", { type: "info" });
285
285
  return;
286
286
  }
287
287
  if (!focusedPane || !isPaneDocked(layout, focusedPane.instanceId)) {
288
- notify("Focus a docked pane to swap it", { type: "info" });
288
+ notify("Focus a pane in the layout to swap it", { type: "info" });
289
289
  return;
290
290
  }
291
291
 
@@ -6,7 +6,7 @@ import type {
6
6
  } from "../../../types/plugin";
7
7
  import type { NewsArticle, NewsQuery } from "../../../news/types";
8
8
  import {
9
- coinNewsFallbackNotice,
9
+ newsFallbackNotice,
10
10
  mapCloudNewsArticle,
11
11
  readCloudNews,
12
12
  type CloudNewsRead,
@@ -102,7 +102,7 @@ function projectNewsHeadless(
102
102
  freshness: cloudNewsFreshness(realtime),
103
103
  // A coin pair no story is filed under shows the stories that mention the coin, and says so.
104
104
  ...(response.searchedFor && args.symbols[0]
105
- ? { notes: [coinNewsFallbackNotice(parsePublicTickerKey(args.symbols[0]).symbol, response.searchedFor)] }
105
+ ? { notes: [newsFallbackNotice(parsePublicTickerKey(args.symbols[0]).symbol, response.searchedFor)] }
106
106
  // A receipt's or foreign line's stories are its company's, read from the home line.
107
107
  : response.companyFrom ? { notes: companyDataNotes(readCompanyFrom(response.companyFrom)) } : {}),
108
108
  metadata: {
@@ -7,7 +7,7 @@ import { useCallback } from "react";
7
7
  import { useDebouncedPluginPaneState, usePluginPaneState } from "../../runtime";
8
8
  import { EmptyState, PaneStatusBody, QueryBar, usePaneNoticeFooter } from "../../../components";
9
9
  import { useCompanyDataFooter } from "../../../components/layout/pane/status-footer";
10
- import { coinNewsFallbackNotice } from "../../../sources/gloomberb-cloud/news";
10
+ import { newsFallbackNotice } from "../../../sources/gloomberb-cloud/news";
11
11
  import { newsMuteSettingsDef, newsMutesApplyToFeed, useNewsMuteFilter } from "./wire/mutes";
12
12
  import { newsListEmptyCopy } from "./wire/filter-articles";
13
13
  import { NEWS_LIST_SEARCH_PLACEHOLDER, useNewsListSearch, useNewsListSearchHint } from "./wire/news/list-search";
@@ -88,11 +88,11 @@ function TickerNewsView({ width, height, focused }: { width: number; height: num
88
88
  }, [markArticleRead, popOutArticle, readableArticle]);
89
89
 
90
90
  useNewsListSearchHint("ticker-news", focused && !detailOpen, search.focusSearch);
91
- // A coin pair no story is filed under lists the stories that mention the coin; the footer says so.
91
+ // A coin pair or a future no story is filed under lists the stories that mention the coin or the commodity; the footer says so.
92
92
  const searchedFor = loaded[0]?.searchedFor;
93
93
  usePaneNoticeFooter({
94
94
  registrationId: "ticker-news-notices",
95
- notices: searchedFor && instrument ? [coinNewsFallbackNotice(instrument.symbol, searchedFor)] : [],
95
+ notices: searchedFor && instrument ? [newsFallbackNotice(instrument.symbol, searchedFor)] : [],
96
96
  focused,
97
97
  });
98
98
  useNewsArticleFooter({
@@ -52,8 +52,11 @@ const COLUMNS: readonly Column[] = [
52
52
  { id: "oi", label: "OI USD", width: 7, align: "right" },
53
53
  { id: "volume", label: "Vol 24h", width: 7, align: "right" },
54
54
  ];
55
- /** What a narrow overview gives up first: the volume, then the contract, then the premium. */
56
- const DROP_ORDER: readonly Column["id"][] = ["volume", "contract", "premium"];
55
+ /**
56
+ * What a narrow overview gives up first: the volume, then the contract, the premium, the open interest and the
57
+ * funding, so the columns left fit whole rather than squeezed into cut figures ("+0." for +0.0050%).
58
+ */
59
+ const DROP_ORDER: readonly Column["id"][] = ["volume", "contract", "premium", "oi", "funding"];
57
60
  const GAP = 2;
58
61
  const span = (columns: readonly Column[]) => columns.reduce((sum, column) => sum + column.width, 0) + GAP * (columns.length - 1);
59
62
 
@@ -252,22 +252,22 @@ function EntryDetail({ entry, width, host, status, failure }: {
252
252
  ) : null}
253
253
 
254
254
  <Box paddingTop={1} flexDirection="column">
255
- {contributes.length > 0 ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Adds" value={contributes.join(", ")} /> : null}
256
- {opensWith.length > 0 ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Opens with" value={opensWith.join(", ")} /> : null}
255
+ {contributes.length > 0 ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Adds" value={contributes.join(", ")} /> : null}
256
+ {opensWith.length > 0 ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Opens with" value={opensWith.join(", ")} /> : null}
257
257
  {/*
258
258
  * Declared by the plugin author and not enforced: plugins are not
259
259
  * sandboxed, so this is a hint about intent, not a limit. Labelled
260
260
  * "Declares" rather than "Network" so it does not read as a guarantee.
261
261
  */}
262
- {entry.hosts.length > 0 ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Declares" value={entry.hosts.join(", ")} /> : null}
263
- {entry.repo ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Source" value={`github.com/${entry.repo}`} /> : null}
264
- {entry.minGloomberb ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Requires" value={requiredGloomberb(entry.minGloomberb) ? `Gloom ${entry.minGloomberb}, this is ${VERSION}` : `Gloom ${entry.minGloomberb}`} /> : null}
265
- {entry.linked ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Linked" value={entry.directory ?? "local checkout"} /> : null}
266
- {entry.installedCommit ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Commit" value={entry.installedCommit.slice(0, 7)} /> : null}
267
- {!entry.installed && entry.availableCommit ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Pinned" value={`${entry.availableVersion ?? ""} ${entry.availableCommit.slice(0, 7)}`.trim()} /> : null}
268
- {entry.needsSetup ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Setup" value="Missing a required setting. Press s." /> : null}
269
- {entry.loadError ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Error" value={entry.loadError} /> : null}
270
- {entry.lastError && !entry.loadError ? <KeyValueRow labelWidth={10} width={rowWidth} emphasis={false} label="Last error" value={entry.lastError} /> : null}
262
+ {entry.hosts.length > 0 ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Declares" value={entry.hosts.join(", ")} /> : null}
263
+ {entry.repo ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Source" value={`github.com/${entry.repo}`} /> : null}
264
+ {entry.minGloomberb ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Requires" value={requiredGloomberb(entry.minGloomberb) ? `Gloom ${entry.minGloomberb}, this is ${VERSION}` : `Gloom ${entry.minGloomberb}`} /> : null}
265
+ {entry.linked ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Linked" value={entry.directory ?? "local checkout"} /> : null}
266
+ {entry.installedCommit ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Commit" value={entry.installedCommit.slice(0, 7)} /> : null}
267
+ {!entry.installed && entry.availableCommit ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Pinned" value={`${entry.availableVersion ?? ""} ${entry.availableCommit.slice(0, 7)}`.trim()} /> : null}
268
+ {entry.needsSetup ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Setup" value="Missing a required setting. Press s." /> : null}
269
+ {entry.loadError ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Error" value={entry.loadError} /> : null}
270
+ {entry.lastError && !entry.loadError ? <KeyValueRow labelWidth={11} width={rowWidth} emphasis={false} label="Last error" value={entry.lastError} /> : null}
271
271
  </Box>
272
272
 
273
273
  {!entry.installed && !entry.bundled && entry.repo ? (
@@ -528,7 +528,9 @@ export function renderSummarySegments(segments: PortfolioSummarySegment[], width
528
528
  <Box key={segment.id} flexDirection="row">
529
529
  {segmentIndex > 0 && <Text fg={colors.textDim}>{" "}</Text>}
530
530
  {segment.parts.map((part, partIndex) => (
531
- <Box key={`${segment.id}:${partIndex}`} flexDirection="row">
531
+ // A row too narrow for its segment cuts the muted basis ("vs Thu 5 Nov close"), never the
532
+ // label or the figure: "Avg +1." read as a different number than +1.02%.
533
+ <Box key={`${segment.id}:${partIndex}`} flexDirection="row" flexShrink={part.tone === "muted" ? 1 : 0}>
532
534
  {partIndex > 0 && <Text fg={colors.textDim}>{" "}</Text>}
533
535
  <Text
534
536
  fg={part.color ?? (part.tone === "label" || part.tone === "muted" ? colors.textDim : colors.text)}
@@ -69,6 +69,8 @@ export interface EventRow {
69
69
  /** Keep the supplied ranges and comparison inputs available in detail/export. */
70
70
  estimateInputs?: { eps?: AnalystEstimateRecord; revenue?: AnalystEstimateRecord };
71
71
  estimateGrowthMetric?: "eps" | "revenue";
72
+ /** An estimate row's growth over the year-ago figure, as a fraction, of `estimateGrowthMetric`. */
73
+ estimateGrowth?: number;
72
74
  fiscalPeriodEnd?: string;
73
75
  periodDateSource?: FinancialStatement["dateSource"];
74
76
  providerPeriodDate?: string;
@@ -341,6 +343,10 @@ export function buildEventRows(
341
343
  // quarters give it when they all agree on one.
342
344
  const feedCurrencies = new Set(earnings.map((earning) => earning.currency).filter(Boolean));
343
345
  const feedCurrency = feedCurrencies.size === 1 ? [...feedCurrencies][0] : undefined;
346
+ // So do the oldest reported quarters (before 2024), which the feed leaves unlabelled, but only where the
347
+ // company's own EPS is in that currency too: one company's EPS then reads in one unit down the table, and an
348
+ // unlabelled figure nothing else vouches for stays unlabelled.
349
+ const reportedCurrency = feedCurrency && fundamentalsEpsCurrency(financials) === feedCurrency ? feedCurrency : undefined;
344
350
  for (const [index, earning] of earnings.entries()) {
345
351
  // A pending announcement must never inherit the previous report's actuals.
346
352
  const statement = earning.epsActual == null ? undefined : statementForEarningsDate(quarterlyStatements, earning);
@@ -357,7 +363,7 @@ export function buildEventRows(
357
363
  period: statement ? quarterLabel(statement.date) : earning.fiscalPeriod ? quarterLabel(earning.fiscalPeriod) : "-",
358
364
  ...(earning.time?.trim() ? { reportTime: earning.time.trim() } : {}),
359
365
  detail: upcomingEarningsDetail(earning),
360
- epsCurrency: earning.currency ?? (earning.epsActual == null ? feedCurrency : undefined),
366
+ epsCurrency: earning.currency ?? (earning.epsActual == null ? feedCurrency : reportedCurrency),
361
367
  revenueCurrency: statement ? statement.currency ?? financials?.financialCurrency : undefined,
362
368
  qEps: earning.epsActual ?? earning.epsEstimate,
363
369
  qRevenue: statement?.totalRevenue,
@@ -386,6 +392,7 @@ export function buildEventRows(
386
392
  for (const pair of buildEstimatePairs(estimates)) {
387
393
  const isFiscal = isFiscalEstimatePeriod(pair.period);
388
394
  if (!isFiscal && isReportedQuarter(pair.date, reportedPeriodEnds)) continue;
395
+ const growth = pair.eps?.growth ?? pair.revenue?.growth;
389
396
  rows.push({
390
397
  id: `estimate:${pair.date}:${pair.period}`,
391
398
  date: pair.date,
@@ -399,6 +406,7 @@ export function buildEventRows(
399
406
  ...(pair.revenue ? { revenue: { ...pair.revenue } } : {}),
400
407
  },
401
408
  estimateGrowthMetric: pair.eps?.growth != null ? "eps" : pair.revenue?.growth != null ? "revenue" : undefined,
409
+ ...growth != null ? { estimateGrowth: growth } : {},
402
410
  epsCurrency: pair.eps?.currency,
403
411
  revenueCurrency: pair.revenue?.currency,
404
412
  qEps: isFiscal ? undefined : pair.eps?.average,
@@ -5,6 +5,7 @@ import type {
5
5
  TickerFinancials,
6
6
  } from "../../../types/financials";
7
7
  import { formatEventMetric } from "./event-model";
8
+ import { formatPercent, formatPercentRaw } from "../../../utils/format";
8
9
  import { loadEarningsCalendar } from "../earnings/data/cache";
9
10
  import { calendarEventOf, newYorkDay, withResolvedEarnings } from "../shared/earnings-calendar";
10
11
 
@@ -28,6 +29,27 @@ export const EVENT_COLUMNS = [
28
29
  { key: "detail", header: "Detail" },
29
30
  ];
30
31
 
32
+ /**
33
+ * The columns of the earnings estimates report, as its pane heads them: what corporate actions
34
+ * call Value is a reported quarter's EPS surprise or an estimate's growth over the year-ago
35
+ * figure, each in a column of its own.
36
+ */
37
+ export const EARNINGS_ESTIMATE_COLUMNS = [
38
+ ...EVENT_COLUMNS.filter((column) => column.key !== "value" && column.key !== "detail"),
39
+ {
40
+ key: "surprisePercent", header: "EPS surp", align: "right" as const,
41
+ format: (value: unknown) => value == null ? "-" : formatPercentRaw(Number(value)),
42
+ },
43
+ {
44
+ key: "estimateGrowth", header: "YoY growth", align: "right" as const,
45
+ format: (value: unknown) => value == null ? "-" : formatPercent(Number(value)),
46
+ // The text says which figure grew, as the pane does; exports keep the percent a number.
47
+ textFormat: (value: unknown, row: Record<string, unknown>) => value == null ? "-"
48
+ : `${formatPercent(Number(value))} ${row.estimateGrowthMetric === "revenue" ? "rev" : "EPS"}`,
49
+ },
50
+ { key: "detail", header: "Detail" },
51
+ ];
52
+
31
53
  export interface EventSources {
32
54
  actions: CorporateActionsData | null;
33
55
  estimates: AnalystResearchData | null;
@@ -10,7 +10,7 @@ import type {
10
10
  HeadlessRowsResult,
11
11
  } from "../../../types/plugin";
12
12
  import { buildEventRows, eventSourceNotice, type EventRow } from "./event-model";
13
- import { EVENT_COLUMNS, loadEventSources } from "./event-sources";
13
+ import { EARNINGS_ESTIMATE_COLUMNS, loadEventSources } from "./event-sources";
14
14
  import { REPORTED_DATA } from "../shared/report-freshness";
15
15
  import { EPS_BASIS_NOTE } from "../shared/earnings-report";
16
16
  import { REPORT_FILTER, REPORT_ROWS } from "../shared/headless-options";
@@ -73,7 +73,7 @@ function projectEarningsEstimatesHeadless(
73
73
  if (unmatchedReportedPeriods.length) errors.push(`No statement period identified for ${unmatchedReportedPeriods.length} reported earnings row(s); quarterly revenue is unavailable.`);
74
74
 
75
75
  return {
76
- columns: EVENT_COLUMNS,
76
+ columns: EARNINGS_ESTIMATE_COLUMNS,
77
77
  rows,
78
78
  errors: errors.length ? errors : undefined,
79
79
  metadata: {
@@ -124,7 +124,7 @@ export function createEarningsEstimatesHeadless(
124
124
  maximum: 200,
125
125
  },
126
126
  ],
127
- columns: EVENT_COLUMNS,
127
+ columns: EARNINGS_ESTIMATE_COLUMNS,
128
128
  describe: (args) => `Earnings Estimates | ${String(args.argument)}`,
129
129
  async load(args, context) {
130
130
  return projectEarningsEstimatesHeadless(
@@ -15,6 +15,7 @@ import { freeQuotesDelayMinutes, resolvePlanAccess, usePlanAccess, type PlanAcce
15
15
  import { useViewport } from "../../../react/input";
16
16
  import { type DialogApi, useOptionalDialog } from "../../../ui/dialog";
17
17
  import { promptCloudUpgrade } from "../../../account/upgrade-dialog";
18
+ import { isAuthDialogOpen, requestAuthDialog } from "../../../account/auth-dialog";
18
19
  import { type CheckoutHandoffTarget, promptCheckoutHandoff } from "../../../account/checkout-handoff";
19
20
 
20
21
  const CLOUD_UPGRADE_URL = "https://gloom.sh/cloud?upgrade=pro";
@@ -195,8 +196,14 @@ function isCloudUpgradeOptions(value: unknown): value is CloudUpgradeOptions {
195
196
  *
196
197
  * A signed-in account without Pro sees the upgrade sheet first (what Pro adds,
197
198
  * what today costs), and checkout opens only once they choose to go on, with
198
- * the checkout hand-off over the app until Pro arrives. Signed-out users get
199
- * the public Cloud page and Pro accounts the billing portal, as before.
199
+ * the checkout hand-off over the app until Pro arrives. Signed out, the
200
+ * sign-up dialog opens first, as the UPGRADE command's does, and the upgrade
201
+ * goes on once signed in, to the sheet for an account without Pro and to
202
+ * nothing for one that has it: the Cloud page it opened before left a
203
+ * terminal over SSH with no browser looking as if `$` did nothing. A press
204
+ * while the dialog is up does nothing. Only with no dialog host (an isolated
205
+ * render) does it open the public Cloud page. Pro accounts get the billing
206
+ * portal.
200
207
  */
201
208
  export function useCloudUpgradeAction(placement: string): (options?: unknown) => Promise<void> {
202
209
  const rendererHost = useRendererHost();
@@ -227,6 +234,20 @@ export function useCloudUpgradeAction(placement: string): (options?: unknown) =>
227
234
  })
228
235
  )).catch(logFailure("shared.cloud-upgrade", "Open Cloud upgrade page failed"));
229
236
  };
237
+ if (checkout.sheet !== false && !apiClient.isSignedIn()) {
238
+ // A press while the sign-up dialog is up asks for nothing new, and counts nothing.
239
+ if (isAuthDialogOpen()) return;
240
+ // Counted once, on this press: the upgrade that goes on after sign-up does not count it again. An account that
241
+ // signs in with Pro already has what the press was for, so nothing more opens.
242
+ const continueSignedIn = () => {
243
+ if (resolvePlanAccess(apiClient.getCurrentUser()).hasProAccess) return;
244
+ void openUpgradeRef.current({ ...checkout, recordIntent: false });
245
+ };
246
+ if (requestAuthDialog({ mode: "signup", onSignedIn: continueSignedIn })) {
247
+ if (checkout.recordIntent !== false) recordUpgradeIntent(checkout.placement);
248
+ return;
249
+ }
250
+ }
230
251
  if (
231
252
  checkout.sheet === false ||
232
253
  !dialog ||
@@ -236,7 +257,7 @@ export function useCloudUpgradeAction(placement: string): (options?: unknown) =>
236
257
  await openCheckout(checkout);
237
258
  return;
238
259
  }
239
- recordUpgradeIntent(checkout.placement);
260
+ if (checkout.recordIntent !== false) recordUpgradeIntent(checkout.placement);
240
261
  // Checkout is opening or just opened: a second sheet would lead nowhere.
241
262
  if (isCloudUpgradeBlocked("checkout")) return;
242
263
  const interval = await promptCloudUpgrade(dialog, {
@@ -245,6 +266,9 @@ export function useCloudUpgradeAction(placement: string): (options?: unknown) =>
245
266
  });
246
267
  if (interval) await openCheckout({ ...checkout, interval, recordIntent: false });
247
268
  }, [dialog, placement, rendererHost]);
269
+ // The sign-up dialog's continuation runs the newest action, after the sign-in re-rendered it.
270
+ const openUpgradeRef = useRef(openUpgrade);
271
+ openUpgradeRef.current = openUpgrade;
248
272
  useEffect(() => {
249
273
  cloudUpgradeOpeners.add(openUpgrade);
250
274
  return () => {