@gloom-sh/terminal 0.20.20 → 0.20.21
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.
- package/package.json +3 -1
- package/src/api-client/data.ts +1 -1
- package/src/api-client/equity-screener.ts +17 -0
- package/src/api-client/futures-curve.ts +5 -0
- package/src/api-client/market-discovery.ts +8 -0
- package/src/api-client/members.ts +2 -0
- package/src/api-client/paths.ts +3 -0
- package/src/api-client/perps.ts +20 -0
- package/src/api-client/request.ts +53 -7
- package/src/api-client/types/filings-and-calls.ts +2 -0
- package/src/app/pane-runtime/plugin-bindings.ts +6 -4
- package/src/app/pro-welcome/model.ts +15 -11
- package/src/app/pro-welcome/row.tsx +3 -3
- package/src/app/pro-welcome/use-pro-welcome.ts +2 -2
- package/src/app/runtime/startup.ts +3 -2
- package/src/app.tsx +3 -2
- package/src/capabilities/asset-data-inputs.ts +5 -0
- package/src/capabilities/factories.ts +8 -3
- package/src/capabilities/registry.ts +1 -0
- package/src/capabilities/types.ts +1 -0
- package/src/cli/commands/market.ts +68 -35
- package/src/cli/commands/options-chain.ts +2 -2
- package/src/cli/commands/overview.ts +10 -9
- package/src/cli/commands/ticker.ts +19 -4
- package/src/cli/desktop-pane-shot.ts +11 -3
- package/src/cli/export-source.ts +35 -2
- package/src/cli/glossary.ts +3 -2
- package/src/cli/helpers.ts +2 -1
- package/src/cli/history-demergers.ts +41 -10
- package/src/cli/history-rows.ts +3 -1
- package/src/cli/known-gaps.ts +21 -7
- package/src/cli/listing-arg.ts +22 -11
- package/src/cli/pane-functions/capabilities.ts +4 -9
- package/src/cli/pane-functions/catalog-snapshot.json +29 -29
- package/src/cli/pane-functions/catalog.ts +1 -18
- package/src/cli/pane-functions/data.ts +8 -4
- package/src/cli/pane-functions/financial-ratio-shot.ts +20 -5
- package/src/cli/pane-functions/freshness.ts +57 -12
- package/src/cli/pane-functions/function-help.ts +2 -2
- package/src/cli/pane-functions/headless.ts +6 -0
- package/src/cli/pane-functions/index.ts +11 -4
- package/src/cli/pane-functions/market-session.ts +25 -0
- package/src/cli/pane-functions/report-notices.ts +10 -0
- package/src/cli/pane-functions/resolver.ts +75 -3
- package/src/cli/pane-functions/screenshot-bridge.ts +1 -0
- package/src/cli/pane-functions/screenshot-data-evidence.ts +1 -0
- package/src/cli/pane-functions/screenshot-payload.ts +38 -5
- package/src/cli/pane-functions/screenshot-render.ts +20 -7
- package/src/cli/perpetual-contract.ts +14 -1
- package/src/cli/report-tables.ts +11 -2
- package/src/cli/result.ts +6 -1
- package/src/components/chart-table/layout.ts +8 -4
- package/src/components/command-bar/list/model.ts +2 -0
- package/src/components/command-bar/pane-templates/items.ts +5 -25
- package/src/components/command-bar/panel/index.tsx +7 -4
- package/src/components/command-bar/routes/root/provider-search.ts +4 -4
- package/src/components/command-bar/routes/root/results.ts +6 -2
- package/src/components/command-bar/routes/ticker-search/results.ts +19 -0
- package/src/components/command-bar/routes/ticker-search/route.ts +3 -3
- package/src/components/command-bar/routes/ticker-search/title.ts +23 -0
- package/src/components/command-bar/routing/list-state.ts +17 -5
- package/src/components/command-bar/selection-runtime.ts +3 -2
- package/src/components/command-bar/surface/index.tsx +2 -0
- package/src/components/command-bar/workflow/alert.ts +6 -4
- package/src/components/command-bar/workflow/collection-actions.ts +2 -1
- package/src/components/layout/pane/footer/index.tsx +1 -0
- package/src/components/layout/pane/footer/model.ts +20 -7
- package/src/components/layout/pane/title.ts +11 -2
- package/src/components/price-selector-dialog.tsx +8 -4
- package/src/components/ticker/badge/list.tsx +4 -3
- package/src/components/ticker/list-table-view.tsx +12 -1
- package/src/components/ui/query-bar.tsx +20 -14
- package/src/data/cached-query.ts +20 -4
- package/src/data/news-pane-snapshots.ts +2 -1
- package/src/data/plugin-cache.ts +5 -1
- package/src/data/saved-copies.ts +68 -2
- package/src/docs/snapshot.json +65 -14
- package/src/docs/topics.ts +11 -9
- package/src/i18n/es.ts +1 -0
- package/src/i18n/ja.ts +1 -0
- package/src/i18n/ko.ts +1 -0
- package/src/i18n/zh-cn.ts +1 -0
- package/src/i18n/zh-tw.ts +1 -0
- package/src/market-data/coordinator/index.ts +25 -5
- package/src/market-data/depositary-pair.ts +27 -10
- package/src/market-data/futures-roll-returns.ts +54 -7
- package/src/market-data/fx-closes.ts +14 -0
- package/src/market-data/market/futures-product-hours.ts +113 -0
- package/src/market-data/market/futures-week.ts +2 -0
- package/src/market-data/market/globex-day.ts +9 -2
- package/src/market-data/market/status.ts +32 -25
- package/src/market-data/market/venue-session.ts +18 -0
- package/src/market-data/options-alternatives.ts +49 -7
- package/src/market-data/perpetual-open-interest.ts +41 -0
- package/src/market-data/quotes/contributions.ts +4 -2
- package/src/market-data/quotes/export-identity.ts +11 -3
- package/src/market-data/quotes/freshness.ts +3 -2
- package/src/market-data/quotes/resolution.ts +9 -2
- package/src/market-data/quotes/tick-range.ts +22 -1
- package/src/market-data/quotes/time.ts +34 -4
- package/src/market-data/split-terms.ts +3 -2
- package/src/news/aggregator.ts +1 -0
- package/src/news/news-model.ts +12 -2
- package/src/news/types.ts +15 -0
- package/src/plugins/builtin/alerts/alert-engine.ts +2 -0
- package/src/plugins/builtin/alerts/cli-forms.ts +3 -2
- package/src/plugins/builtin/alerts/cli-move.ts +5 -2
- package/src/plugins/builtin/alerts/cli.ts +50 -25
- package/src/plugins/builtin/alerts/command.ts +51 -3
- package/src/plugins/builtin/alerts/event-rows.ts +1 -1
- package/src/plugins/builtin/alerts/events-pane.tsx +1 -1
- package/src/plugins/builtin/alerts/format.ts +67 -8
- package/src/plugins/builtin/alerts/headless.ts +22 -6
- package/src/plugins/builtin/alerts/index.tsx +26 -25
- package/src/plugins/builtin/alerts/move-checks.ts +1 -0
- package/src/plugins/builtin/alerts/pane.tsx +15 -6
- package/src/plugins/builtin/alerts/pro-rules.ts +9 -4
- package/src/plugins/builtin/alerts/quotes.ts +10 -5
- package/src/plugins/builtin/alerts/session.ts +28 -0
- package/src/plugins/builtin/alerts/types.ts +1 -0
- package/src/plugins/builtin/analytics/pane-model.ts +2 -1
- package/src/plugins/builtin/analytics/risk-model.ts +2 -2
- package/src/plugins/builtin/attention/headless.ts +2 -2
- package/src/plugins/builtin/attention/model.ts +7 -2
- package/src/plugins/builtin/attention/pane.tsx +2 -1
- package/src/plugins/builtin/awards/headless.ts +1 -1
- package/src/plugins/builtin/broker-trading/ticket.tsx +13 -5
- package/src/plugins/builtin/buildout/detail/company.tsx +0 -1
- package/src/plugins/builtin/buildout/detail/ui.tsx +7 -5
- package/src/plugins/builtin/buildout/model/normalizers.ts +0 -1
- package/src/plugins/builtin/buildout/model/types.ts +0 -1
- package/src/plugins/builtin/buildout/pane/index.tsx +9 -0
- package/src/plugins/builtin/buildout/pane/status.tsx +11 -0
- package/src/plugins/builtin/catalysts/headless.ts +1 -1
- package/src/plugins/builtin/chart-composer/headless.ts +14 -6
- package/src/plugins/builtin/chart-composer/pane.tsx +2 -1
- package/src/plugins/builtin/chart-composer/session-history.ts +14 -2
- package/src/plugins/builtin/chat/controller/index.ts +5 -3
- package/src/plugins/builtin/chat/controller/session-runtime.ts +18 -8
- package/src/plugins/builtin/chat/index.tsx +1 -1
- package/src/plugins/builtin/cloud/auth-actions.tsx +4 -2
- package/src/plugins/builtin/cloud/mcp-connect/dialog.tsx +4 -1
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +2 -1
- package/src/plugins/builtin/company-attention/headless.ts +2 -1
- package/src/plugins/builtin/company-kpis/headless.ts +1 -1
- package/src/plugins/builtin/correlation/headless.ts +3 -3
- package/src/plugins/builtin/correlation/history.ts +1 -0
- package/src/plugins/builtin/correlation/index.tsx +7 -5
- package/src/plugins/builtin/correlation/matrix/selection.ts +21 -3
- package/src/plugins/builtin/correlation/relationship/model.ts +5 -0
- package/src/plugins/builtin/correlation/relationship/pane.tsx +3 -2
- package/src/plugins/builtin/correlation/relationship/view-model.ts +3 -2
- package/src/plugins/builtin/credit-documents/headless.ts +1 -1
- package/src/plugins/builtin/dividend-yield/client.ts +81 -10
- package/src/plugins/builtin/dividend-yield/headless.ts +21 -10
- package/src/plugins/builtin/dividend-yield/model.ts +1 -1
- package/src/plugins/builtin/dividend-yield/pane.tsx +9 -5
- package/src/plugins/builtin/dividend-yield/ranking.ts +15 -5
- package/src/plugins/builtin/dividend-yield/reference-price.ts +3 -0
- package/src/plugins/builtin/dividend-yield/types.ts +12 -0
- package/src/plugins/builtin/dividend-yield/view.ts +30 -7
- package/src/plugins/builtin/doe/headless.ts +1 -1
- package/src/plugins/builtin/doe/pane.tsx +16 -7
- package/src/plugins/builtin/earnings-calls/data.ts +8 -5
- package/src/plugins/builtin/earnings-ripple/headless.ts +1 -1
- package/src/plugins/builtin/econ/calendar-model.ts +1 -1
- package/src/plugins/builtin/econ/index.tsx +26 -18
- package/src/plugins/builtin/equity-screener/client.ts +1 -1
- package/src/plugins/builtin/equity-screener/headless.ts +149 -31
- package/src/plugins/builtin/equity-screener/live.ts +23 -5
- package/src/plugins/builtin/equity-screener/model.ts +27 -12
- package/src/plugins/builtin/equity-screener/pane.tsx +5 -5
- package/src/plugins/builtin/exposure/headless.ts +1 -1
- package/src/plugins/builtin/exposure/holdings.ts +2 -2
- package/src/plugins/builtin/futures/index.tsx +29 -1
- package/src/plugins/builtin/futures/model.ts +93 -10
- package/src/plugins/builtin/futures/returns.ts +54 -1
- package/src/plugins/builtin/futures/table.tsx +14 -2
- package/src/plugins/builtin/futures/use-front-returns.ts +20 -3
- package/src/plugins/builtin/futures-curve/client.ts +1 -1
- package/src/plugins/builtin/futures-curve/headless.ts +9 -3
- package/src/plugins/builtin/futures-curve/model.ts +19 -5
- package/src/plugins/builtin/futures-curve/pane.tsx +12 -6
- package/src/plugins/builtin/gpu/headless.ts +1 -1
- package/src/plugins/builtin/gpu/model.ts +1 -1
- package/src/plugins/builtin/help/function-index.ts +16 -8
- package/src/plugins/builtin/help/functions-table.tsx +6 -4
- package/src/plugins/builtin/help/shortcut-model.ts +7 -2
- package/src/plugins/builtin/holders/headless.ts +16 -5
- package/src/plugins/builtin/holders/pane.tsx +43 -5
- package/src/plugins/builtin/insider/client.ts +118 -11
- package/src/plugins/builtin/insider/filing-stories.ts +36 -20
- package/src/plugins/builtin/insider/issuer.ts +5 -2
- package/src/plugins/builtin/iv-history/headless.ts +2 -0
- package/src/plugins/builtin/macro-day/client.ts +2 -3
- package/src/plugins/builtin/macro-day/comparison.ts +58 -0
- package/src/plugins/builtin/macro-day/headless.ts +47 -3
- package/src/plugins/builtin/macro-day/index.tsx +32 -9
- package/src/plugins/builtin/macro-day/model.ts +1 -1
- package/src/plugins/builtin/macro-day/pane.tsx +99 -12
- package/src/plugins/builtin/market-heatmap/index.tsx +2 -2
- package/src/plugins/builtin/market-movers/footer.ts +29 -3
- package/src/plugins/builtin/market-movers/headless.ts +12 -5
- package/src/plugins/builtin/market-movers/index.tsx +3 -3
- package/src/plugins/builtin/market-movers/session-body.tsx +6 -3
- package/src/plugins/builtin/market-valuation/detail.tsx +3 -3
- package/src/plugins/builtin/market-valuation/headless.ts +6 -6
- package/src/plugins/builtin/market-valuation/pane.tsx +2 -3
- package/src/plugins/builtin/market-valuation/view.ts +6 -8
- package/src/plugins/builtin/members/client.ts +9 -2
- package/src/plugins/builtin/members/headless.ts +8 -10
- package/src/plugins/builtin/members/model.ts +29 -17
- package/src/plugins/builtin/members/pane.tsx +10 -12
- package/src/plugins/builtin/money-markets/headless.ts +1 -1
- package/src/plugins/builtin/news/headless.ts +4 -0
- package/src/plugins/builtin/news/index.tsx +3 -1
- package/src/plugins/builtin/news/wire/industry-pane.tsx +2 -1
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +1 -1
- package/src/plugins/builtin/news/wire/persisted-articles.ts +8 -4
- package/src/plugins/builtin/notes/headless.ts +7 -0
- package/src/plugins/builtin/notes/index.tsx +1 -1
- package/src/plugins/builtin/notes/quick-notes-pane.tsx +18 -2
- package/src/plugins/builtin/options/view.tsx +7 -6
- package/src/plugins/builtin/options-positioning/headless.ts +4 -4
- package/src/plugins/builtin/options-positioning/pane.tsx +7 -3
- package/src/plugins/builtin/options-scenario/client.ts +20 -4
- package/src/plugins/builtin/options-scenario/headless.ts +1 -1
- package/src/plugins/builtin/pe-band/client.ts +5 -9
- package/src/plugins/builtin/pe-band/headless.ts +11 -13
- package/src/plugins/builtin/pe-band/model.ts +39 -60
- package/src/plugins/builtin/pe-band/pane.tsx +14 -15
- package/src/plugins/builtin/perps/equity-row.tsx +3 -1
- package/src/plugins/builtin/perps/freshness.ts +16 -9
- package/src/plugins/builtin/perps/headless.ts +4 -1
- package/src/plugins/builtin/perps/markets-section.tsx +16 -10
- package/src/plugins/builtin/perps/model.ts +33 -2
- package/src/plugins/builtin/perps/pane.tsx +3 -2
- package/src/plugins/builtin/perps/status-line.ts +12 -3
- package/src/plugins/builtin/perps/venue-markets.ts +38 -0
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +4 -3
- package/src/plugins/builtin/portfolio-list/cell-version.ts +1 -1
- package/src/plugins/builtin/portfolio-list/cli/render.ts +46 -7
- package/src/plugins/builtin/portfolio-list/headless.ts +31 -8
- package/src/plugins/builtin/portfolio-list/settings.ts +3 -0
- package/src/plugins/builtin/portfolio-list/table.tsx +7 -1
- package/src/plugins/builtin/power/headless.ts +1 -1
- package/src/plugins/builtin/realized-vol/headless.ts +1 -1
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +27 -13
- package/src/plugins/builtin/scanner/feed.ts +7 -4
- package/src/plugins/builtin/scanner/flow-pane.tsx +8 -4
- package/src/plugins/builtin/scanner/headless.ts +57 -26
- package/src/plugins/builtin/scanner/hilo-pane.tsx +6 -3
- package/src/plugins/builtin/scanner/lock-note.ts +3 -2
- package/src/plugins/builtin/scanner/us-session.ts +9 -0
- package/src/plugins/builtin/seasonality/client.ts +46 -10
- package/src/plugins/builtin/seasonality/headless.ts +29 -11
- package/src/plugins/builtin/seasonality/model.ts +101 -24
- package/src/plugins/builtin/seasonality/pane.tsx +10 -6
- package/src/plugins/builtin/sec/filing-content.ts +13 -0
- package/src/plugins/builtin/sec/index.tsx +16 -11
- package/src/plugins/builtin/sectors/client.ts +27 -5
- package/src/plugins/builtin/sectors/headless.ts +2 -1
- package/src/plugins/builtin/sectors/index.tsx +22 -10
- package/src/plugins/builtin/shared/cloud-resource.ts +3 -3
- package/src/plugins/builtin/shared/extended-print.ts +38 -0
- package/src/plugins/builtin/shared/pro-feature-wall.tsx +1 -1
- package/src/plugins/builtin/shared/report-freshness.ts +7 -3
- package/src/plugins/builtin/shared/scanner-capture.ts +16 -3
- package/src/plugins/builtin/shared/ticker-company.ts +17 -8
- package/src/plugins/builtin/shared/use-quote-board.ts +11 -4
- package/src/plugins/builtin/social-mentions/client.ts +7 -3
- package/src/plugins/builtin/social-mentions/outliers.tsx +9 -2
- package/src/plugins/builtin/thirteenf/api.ts +24 -3
- package/src/plugins/builtin/thirteenf/data.ts +21 -8
- package/src/plugins/builtin/thirteenf/headless.ts +7 -3
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +10 -3
- package/src/plugins/builtin/thirteenf/signals.ts +22 -1
- package/src/plugins/builtin/ticker-detail/adr-pair/model.ts +4 -2
- package/src/plugins/builtin/ticker-detail/financials/model.ts +7 -0
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +15 -6
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +5 -4
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +14 -5
- package/src/plugins/builtin/ticker-detail/headless.ts +32 -26
- package/src/plugins/builtin/ticker-detail/index.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +8 -3
- package/src/plugins/builtin/ticker-detail/overview/model.ts +28 -5
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +14 -1
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +9 -8
- package/src/plugins/builtin/ticker-detail/pane.tsx +16 -9
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +41 -23
- package/src/plugins/builtin/ticker-detail/quote-monitor/rows.ts +30 -13
- package/src/plugins/builtin/ticker-detail/settings.ts +9 -2
- package/src/plugins/builtin/time-sales/headless.ts +49 -13
- package/src/plugins/builtin/time-sales/model.ts +2 -2
- package/src/plugins/builtin/time-sales/window.ts +84 -10
- package/src/plugins/builtin/vol-surface/charts.tsx +4 -2
- package/src/plugins/builtin/vol-surface/events.ts +12 -5
- package/src/plugins/builtin/vol-surface/headless.ts +1 -1
- package/src/plugins/builtin/vol-surface/pane.tsx +15 -7
- package/src/plugins/builtin/world-indices/footer.ts +1 -1
- package/src/plugins/builtin/world-venue-map/chokepoint-report.ts +3 -1
- package/src/plugins/builtin/world-venue-map/headless.ts +27 -13
- package/src/plugins/builtin/yield-curve/client.ts +3 -1
- package/src/plugins/duplicates.ts +60 -0
- package/src/plugins/loader.ts +12 -3
- package/src/plugins/marketplace/model.ts +10 -1
- package/src/portfolio/column-values.ts +52 -5
- package/src/react/async-resource.ts +8 -7
- package/src/renderers/browser/bundled-plugins.ts +2 -1
- package/src/renderers/dom/build-assets.ts +20 -0
- package/src/renderers/dom/data-table/index.tsx +36 -2
- package/src/renderers/dom/es2023-array-methods.ts +57 -0
- package/src/renderers/dom/host/surface-fit.ts +64 -13
- package/src/renderers/dom/styles.css +6 -1
- package/src/renderers/electrobun/bun/external-plugins.ts +16 -6
- package/src/renderers/electrobun/shared/protocol.ts +2 -0
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +31 -7
- package/src/renderers/electrobun/view/cli-pane-shot-frame.tsx +15 -8
- package/src/renderers/electrobun/view/external-plugins.ts +1 -0
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +1 -0
- package/src/series/types.ts +1 -0
- package/src/sources/gloomberb-cloud/fred-attribution.ts +6 -5
- package/src/sources/gloomberb-cloud/index.ts +42 -5
- package/src/sources/gloomberb-cloud/news.ts +15 -2
- package/src/sources/gloomberb-cloud/normalizers.ts +9 -0
- package/src/sources/history-result.ts +2 -1
- package/src/sources/history-retention.ts +14 -2
- package/src/sources/listing-symbols.ts +1 -1
- package/src/sources/provider-router/cache.ts +32 -3
- package/src/sources/provider-router/cached-routes.ts +25 -0
- package/src/sources/provider-router/connection-health.ts +1 -0
- package/src/sources/provider-router/history.ts +2 -2
- package/src/sources/provider-router/index.ts +14 -0
- package/src/sources/provider-router/sec-filings-page.ts +25 -0
- package/src/sources/sec-edgar/content.ts +67 -36
- package/src/tickers/listing-fate.ts +28 -0
- package/src/tickers/search/home-listing.ts +3 -0
- package/src/tickers/search/index-root-lead.ts +40 -0
- package/src/tickers/terminal-codes.ts +7 -4
- package/src/time-series/base-series.ts +17 -8
- package/src/time-series/fundamentals/historical-valuation.ts +2 -2
- package/src/time-series/fundamentals/series.ts +15 -12
- package/src/time-series/history-acquisition.ts +2 -0
- package/src/time-series/market.ts +3 -1
- package/src/time-series/price-comparison.ts +3 -1
- package/src/time-series/resolve-context.ts +8 -0
- package/src/time-series/resolve.ts +50 -10
- package/src/time-series/types.ts +1 -0
- package/src/time-series/use-chart-resolution.ts +2 -2
- package/src/time-series/valuation-currency.ts +40 -12
- package/src/types/data-provider.ts +30 -1
- package/src/types/financials.ts +23 -0
- package/src/types/headless.ts +23 -0
- package/src/types/instrument.ts +1 -0
- package/src/utils/crypto-pair.ts +16 -0
- package/src/utils/exchange-announcements.ts +2 -1
- package/src/utils/exchange-notation.generated.ts +58 -1
- package/src/utils/exchanges.ts +43 -1
- package/src/utils/format.ts +37 -2
- package/src/utils/function-search.ts +38 -0
- package/src/utils/fuzzy-search.ts +10 -6
- package/src/utils/option-choice.ts +15 -0
- package/src/utils/price-history.ts +15 -1
- package/src/utils/reason-codes.ts +6 -3
- package/src/utils/trailing-dividend.ts +241 -28
|
@@ -97,7 +97,7 @@ export const awardsHeadless: HeadlessPaneDefinition<"bundle"> = {
|
|
|
97
97
|
limitations: ["Pro dataset; free accounts receive a limited preview.", "Published procurement records; source coverage varies by jurisdiction.",
|
|
98
98
|
"Currencies and prime awards, subawards and notices are separate.", "Award obligations are not revenue or remaining backlog.", "Unresolved recipients retain their legal names."] },
|
|
99
99
|
options: [
|
|
100
|
-
{ key: "tab", type: "enum", settingKey: "tab", defaultValue: "feed", values: [...AWARD_TABS
|
|
100
|
+
{ key: "tab", type: "enum", settingKey: "tab", defaultValue: "feed", values: [...AWARD_TABS, { value: "all" }], description: "Feed, company history, agencies, sectors, events, or all sections." },
|
|
101
101
|
{ key: "view", type: "enum", settingKey: "leaderView", defaultValue: "companies", values: [{ value: "companies" }, { value: "sectors" }], description: "Sectors tab: company leaders or sector totals." },
|
|
102
102
|
...FILTER_KEYS.map((key) => key === "from" || key === "to"
|
|
103
103
|
? { key, type: "string" as const, settingKey: key, placeholder: "date", description: `${key === "from" ? "Start" : "End"} of the date range, as ${DATE_OPTION_EXAMPLES}.`,
|
|
@@ -7,7 +7,8 @@ import { afterLayout, revealInScrollBox } from "../../../components/ui/reveal-in
|
|
|
7
7
|
import { useThemeColors } from "../../../theme/theme-context";
|
|
8
8
|
import type { Quote } from "../../../types/financials";
|
|
9
9
|
import { quoteAgeText } from "../../../market-data/quotes/freshness";
|
|
10
|
-
import { MISSING_VALUE, formatPercentRaw } from "../../../utils/format";
|
|
10
|
+
import { MISSING_VALUE, formatPercentRaw, formatTradeSize } from "../../../utils/format";
|
|
11
|
+
import { formatQuoteBookTime } from "../../../market-data/quotes/time";
|
|
11
12
|
import type { BrokerAccount, BrokerOrder, BrokerOrderPreview, BrokerOrderRequest, BrokerTradingCapabilities } from "../../../types/trading";
|
|
12
13
|
import { Box, ScrollBox, Text, TextAttributes, useUiCapabilities, type BoxRenderable, type ScrollBoxRenderable } from "../../../ui";
|
|
13
14
|
import { useDialogState } from "../../../ui/dialog";
|
|
@@ -137,11 +138,15 @@ function TicketNumberInput({ value, focused, onChange, ...props }: {
|
|
|
137
138
|
function DockedQuote({ quote, delayed, stale, source, updated, price, change, width }: {
|
|
138
139
|
quote?: Quote; delayed: boolean; stale?: string; source: string; updated: string; price(value: number | undefined): string; change: string; width: number;
|
|
139
140
|
}) {
|
|
141
|
+
// The book's own time, or that its source sent none, as every view of a book dates it; never the trade's.
|
|
142
|
+
const bookTime = formatQuoteBookTime(quote);
|
|
140
143
|
const c = useThemeColors();
|
|
141
144
|
const native = useUiCapabilities().nativePaneChrome;
|
|
142
|
-
const sized = (size: number | undefined) => size !== undefined && Number.isFinite(size) ? `× ${
|
|
145
|
+
const sized = (size: number | undefined) => size !== undefined && Number.isFinite(size) ? `× ${formatTradeSize(size)}` : "";
|
|
143
146
|
// Sizes drop before bid and ask leave one line.
|
|
144
|
-
const
|
|
147
|
+
const bookLine = `Bid ${price(quote?.bid)} ${sized(quote?.bidSize)} Ask ${price(quote?.ask)} ${sized(quote?.askSize)}`;
|
|
148
|
+
const showSizes = bookLine.length <= width;
|
|
149
|
+
const showTime = !!bookTime && `${bookLine} ${bookTime}`.length <= width;
|
|
145
150
|
const side = (label: string, value: number | undefined, size: number | undefined, color: string) => <Box flexDirection="row" gap={1} alignItems="baseline" flexShrink={0}>
|
|
146
151
|
<Text fg={c.textDim}>{label}</Text>
|
|
147
152
|
<Text fg={color} attributes={TextAttributes.BOLD} selectable>{price(value)}</Text>
|
|
@@ -157,6 +162,7 @@ function DockedQuote({ quote, delayed, stale, source, updated, price, change, wi
|
|
|
157
162
|
<Box flexDirection="row" gap={2}>
|
|
158
163
|
{side("Bid", quote?.bid, quote?.bidSize, c.positive)}
|
|
159
164
|
{side("Ask", quote?.ask, quote?.askSize, c.negative)}
|
|
165
|
+
{showTime ? <Text fg={c.textDim} flexShrink={0} selectable>{bookTime}</Text> : null}
|
|
160
166
|
</Box>
|
|
161
167
|
</Box>;
|
|
162
168
|
}
|
|
@@ -433,6 +439,8 @@ export function BrokerTicketView({ model: m, width, height, focused, onEdit, onA
|
|
|
433
439
|
const change = quoteChange(m.quote, tickDecimals(m.quote?.price));
|
|
434
440
|
const sourceAt = m.quote?.lastTradeTime ?? m.quote?.lastUpdated;
|
|
435
441
|
const updated = sourceAt && Number.isFinite(sourceAt) ? `${new Date(sourceAt).toISOString().slice(11, 19)} UTC` : "unknown";
|
|
442
|
+
// The book is dated apart from the trade: its own time, or that its source sent none.
|
|
443
|
+
const bookTime = formatQuoteBookTime(m.quote);
|
|
436
444
|
const delayed = m.quoteData !== "realtime" || m.quote?.dataSource !== "live";
|
|
437
445
|
const age = ticketQuoteAge(m.quote, m.now).replace(" old", "");
|
|
438
446
|
const stale = m.quote && m.quoteStale ? ticketQuoteAge(m.quote, m.now) : undefined;
|
|
@@ -443,7 +451,7 @@ export function BrokerTicketView({ model: m, width, height, focused, onEdit, onA
|
|
|
443
451
|
active={active === "account" && focused} controlRef={accountControl} width={pickerWidth} showMode />;
|
|
444
452
|
const bookSide = (label: string, size: number | undefined, value: number | undefined, color: string) => <Box flexDirection="column" paddingX={1}
|
|
445
453
|
border={["bottom"]} borderColor={color} style={native ? { borderBottom: `2px solid ${color}` } : undefined}>
|
|
446
|
-
<Text fg={c.textDim}>{`${label}${size !== undefined ? ` × ${
|
|
454
|
+
<Text fg={c.textDim}>{`${label}${size !== undefined ? ` × ${formatTradeSize(size)}` : ""}`}</Text>
|
|
447
455
|
<Text fg={color} attributes={TextAttributes.BOLD}>{quotePrice(value)}</Text>
|
|
448
456
|
</Box>;
|
|
449
457
|
const resultQuantity = (value: number | undefined) => m.resultQuantities === "unconfirmed" || !Number.isFinite(value) ? "Not confirmed" : number(value);
|
|
@@ -489,7 +497,7 @@ export function BrokerTicketView({ model: m, width, height, focused, onEdit, onA
|
|
|
489
497
|
{/* A delayed quote is the yellow clock, as in pane footers, with the detail on hover. */}
|
|
490
498
|
{delayed ? <Box flexShrink={0} title={source}><Icon name="clock" color={c.warning} /></Box> : null}
|
|
491
499
|
<Text fg={stale ? c.warning : c.textDim}>{stale ? `${m.brokerName}, ${stale}` : delayed ? `${m.brokerName} ${age}` : source}</Text>
|
|
492
|
-
<Text fg={c.textDim}>{`${updated}${m.synthetic && !wide && !narrow ? " · SYNTHETIC" : ""}`}</Text>
|
|
500
|
+
<Text fg={c.textDim}>{`${updated}${bookTime ? ` · book ${bookTime}` : ""}${m.synthetic && !wide && !narrow ? " · SYNTHETIC" : ""}`}</Text>
|
|
493
501
|
</Box>
|
|
494
502
|
</Box>
|
|
495
503
|
</Box>}
|
|
@@ -172,7 +172,6 @@ export function CompanyDetail({
|
|
|
172
172
|
{ label: "PEG", value: company.pegRatio },
|
|
173
173
|
{ label: "P/B", value: company.priceToBook },
|
|
174
174
|
{ label: "EPS", value: valueWithOriginal(company.dilutedEps, company.dilutedEpsOriginal) },
|
|
175
|
-
{ label: "Beta", value: company.beta },
|
|
176
175
|
{ label: "52W High", value: valueWithOriginal(company.high52w, company.high52wOriginal) },
|
|
177
176
|
{ label: "52W Low", value: valueWithOriginal(company.low52w, company.low52wOriginal) },
|
|
178
177
|
]}
|
|
@@ -91,10 +91,12 @@ export interface DatasetTicker {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
|
-
* The dataset's tickers, drawn one way: a chip for each the
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
94
|
+
* The dataset's tickers, drawn one way: a chip for each, as the dataset writes
|
|
95
|
+
* it (a number-only Asian listing through the venue the dataset names), and
|
|
96
|
+
* bold plain text for a number it names no venue for. A chip is never looked
|
|
97
|
+
* up or priced here: the table's own columns carry the dataset's figures, and
|
|
98
|
+
* a day move beside the symbol would carry no date, since the dataset's
|
|
99
|
+
* companies list on markets that are shut at different times.
|
|
98
100
|
*/
|
|
99
101
|
export function ListingBadges({ tickers, width, fallbackColor = colors.textBright }: {
|
|
100
102
|
tickers: readonly DatasetTicker[];
|
|
@@ -113,7 +115,7 @@ export function ListingBadges({ tickers, width, fallbackColor = colors.textBrigh
|
|
|
113
115
|
}
|
|
114
116
|
return { symbols: shown, listings: known };
|
|
115
117
|
}, [tickers]);
|
|
116
|
-
return <TickerBadgeList symbols={symbols} width={width} fallbackColor={fallbackColor} listings={listings} />;
|
|
118
|
+
return <TickerBadgeList symbols={symbols} width={width} fallbackColor={fallbackColor} listings={listings} listed />;
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
export function RelatedCompaniesLine({
|
|
@@ -206,7 +206,6 @@ function readCompany(raw: RawObject): BuildoutCompany {
|
|
|
206
206
|
priceToBook: stringField(raw, "priceToBook", "price_to_book"),
|
|
207
207
|
dilutedEps: stringField(raw, "dilutedEps", "diluted_eps"),
|
|
208
208
|
dilutedEpsOriginal: stringField(raw, "dilutedEpsOriginal", "diluted_eps_original"),
|
|
209
|
-
beta: stringField(raw, "beta"),
|
|
210
209
|
high52w: stringField(raw, "high52w", "high_52w"),
|
|
211
210
|
high52wOriginal: stringField(raw, "high52wOriginal", "high_52w_original"),
|
|
212
211
|
low52w: stringField(raw, "low52w", "low_52w"),
|
|
@@ -57,11 +57,13 @@ import {
|
|
|
57
57
|
} from "../table-model";
|
|
58
58
|
import { listingKey, tickerSearchText, tickerSymbol } from "../format";
|
|
59
59
|
import {
|
|
60
|
+
BUILDOUT_UNDATED_FIGURES,
|
|
60
61
|
activeBuildoutPage,
|
|
61
62
|
renderBuildoutPageStatus,
|
|
62
63
|
updateBuildoutFooterInfo,
|
|
63
64
|
} from "./status";
|
|
64
65
|
import { useBuildoutDataRuntime } from "../data-runtime";
|
|
66
|
+
import { useRemoteUiNode } from "../../../../remote/semantic-tree";
|
|
65
67
|
import { GEO_SCOPE_STATE_KEY } from "../../world-venue-map/scope";
|
|
66
68
|
import type { GeoScope } from "../../world-venue-map/local-layers";
|
|
67
69
|
import { boardRows, boardThemes, resolveBoardTheme, ThemeBoard, ThemeStats, themeStatRows, useThemeStepKeys } from "./themes";
|
|
@@ -368,6 +370,13 @@ export function BuildoutPane({ focused, width, height }: PaneProps) {
|
|
|
368
370
|
return hints;
|
|
369
371
|
}, [chooseOpenTarget, favoriteBusyKey, favoriteTarget, favoriteTargetKey, openTargets.length, startUpgrade, state, toggleFavoriteRow]);
|
|
370
372
|
|
|
373
|
+
// A report of the pane says what its footer says about the figures' dates.
|
|
374
|
+
useRemoteUiNode(companyTab && state.status === "ready" ? {
|
|
375
|
+
role: "report-notice",
|
|
376
|
+
label: "Undated figures",
|
|
377
|
+
getMetadata: () => ({ text: BUILDOUT_UNDATED_FIGURES, key: "undatedFigures", value: ["marketCap", "growth", "return1y"] }),
|
|
378
|
+
} : null);
|
|
379
|
+
|
|
371
380
|
usePaneFooter("buildout", () => ({
|
|
372
381
|
info: updateBuildoutFooterInfo(state, activeTab, currentList, {
|
|
373
382
|
upgradeMessage,
|
|
@@ -5,6 +5,9 @@ import type {
|
|
|
5
5
|
BuildoutTabId,
|
|
6
6
|
} from "../model/types";
|
|
7
7
|
|
|
8
|
+
/** What the dataset leaves out of the company figures, as the footer's title and a report's notice say it. */
|
|
9
|
+
export const BUILDOUT_UNDATED_FIGURES = "Market cap, growth and 1Y are undated: the dataset states no market date for market cap and 1Y and no period for growth.";
|
|
10
|
+
|
|
8
11
|
export function activeBuildoutPage(
|
|
9
12
|
state: BuildoutLoadState,
|
|
10
13
|
activeTab: BuildoutTabId,
|
|
@@ -42,6 +45,14 @@ export function updateBuildoutFooterInfo(
|
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
const info: PaneFooterSegment[] = [];
|
|
48
|
+
// The columns every company and theme row carries; the live price an open detail swaps in has its own freshness below.
|
|
49
|
+
if (activeTab === "themes" || activeTab === "companies") {
|
|
50
|
+
info.push({
|
|
51
|
+
id: "undated", capture: true, holdsPlace: true, title: BUILDOUT_UNDATED_FIGURES,
|
|
52
|
+
parts: [{ text: "cap, growth and 1Y undated", tone: "muted" }],
|
|
53
|
+
variants: [[{ text: "figures undated", tone: "muted" }]],
|
|
54
|
+
});
|
|
55
|
+
}
|
|
45
56
|
if (messages.quoteFreshness) {
|
|
46
57
|
info.push(...splitDelayedStatus({ id: "quote", parts: [{ text: messages.quoteFreshness, tone: "muted" }] }));
|
|
47
58
|
}
|
|
@@ -11,7 +11,7 @@ function definition(litigation: boolean): HeadlessPaneDefinition<"bundle"> {
|
|
|
11
11
|
freshness: { source: litigation ? "Court and agency dockets" : "Regulator, court and trade records", status: "not-a-feed", basis: "published records" },
|
|
12
12
|
argument: { kind: "ticker", optional: !litigation, description: litigation ? "Company ticker, including exchange-qualified international listings." : "Optional ticker; omit for market-wide events." },
|
|
13
13
|
options: [
|
|
14
|
-
{ key: "tab", type: "enum", values: [{ value: "calendar" }, { value: "changes" }], defaultValue: "calendar", description: "Dated events or observed revisions." },
|
|
14
|
+
{ key: "tab", type: "enum", values: [{ value: "calendar", label: litigation ? "Dockets" : "Calendar" }, { value: "changes" }], defaultValue: "calendar", description: "Dated events or observed revisions." },
|
|
15
15
|
{ key: "type", type: "enum", values: CATALYST_TYPES.map((value) => ({ value })), description: "Event type." },
|
|
16
16
|
...["agency", "country", "sector", "status"].map((key) => ({ key, type: "string" as const, description: `Filter by ${key}.` })),
|
|
17
17
|
{ key: "search", type: "string", description: "Filter by text." },
|
|
@@ -106,19 +106,22 @@ export async function loadChartPaneModel(
|
|
|
106
106
|
const instruments = new Map<string, InstrumentRef>();
|
|
107
107
|
const resolvedSeries = new Map<string, ChartSeriesSpec>();
|
|
108
108
|
// The pane extends settled bars with streamed quotes. A report has no
|
|
109
|
-
// stream, so a current window takes the latest quote once instead
|
|
109
|
+
// stream, so a current window takes the latest quote once instead, read
|
|
110
|
+
// beside the histories: a listing named with its venue does not wait for it.
|
|
110
111
|
const quoteOverrides = new Map<string, Quote>();
|
|
111
112
|
const getQuote = context.marketData.getQuote?.bind(context.marketData);
|
|
113
|
+
let quoteOverridesReady: Promise<unknown> | undefined;
|
|
112
114
|
if (getQuote && !spec.viewport.dateWindow) {
|
|
113
|
-
|
|
114
|
-
const quote = await getQuote(target.symbol, target.exchange ?? "",
|
|
115
|
-
context.refresh ? { ...target.context, cacheMode: "refresh" } : target.context).catch(logFailure("chart-composer.headless", "Load chart live quote failed", null));
|
|
115
|
+
quoteOverridesReady = Promise.all(getLiveChartQuoteTargets(spec).map(async (target) => {
|
|
116
|
+
const quote = await Promise.resolve().then(() => getQuote(target.symbol, target.exchange ?? "",
|
|
117
|
+
context.refresh ? { ...target.context, cacheMode: "refresh" } : target.context)).catch(logFailure("chart-composer.headless", "Load chart live quote failed", null));
|
|
116
118
|
if (quote) quoteOverrides.set(chartQuoteOverrideKeyForTarget(target), quote);
|
|
117
119
|
}));
|
|
118
120
|
}
|
|
119
121
|
const chart = await resolveChartSpecData(spec, {
|
|
120
122
|
dataProvider: context.marketData,
|
|
121
123
|
quoteOverrides,
|
|
124
|
+
quoteOverridesReady,
|
|
122
125
|
onSecurityData(series, data, includesHistory) {
|
|
123
126
|
const { source } = series;
|
|
124
127
|
if (source.kind !== "security") return;
|
|
@@ -174,6 +177,8 @@ export async function loadChartPaneModel(
|
|
|
174
177
|
source: "network",
|
|
175
178
|
}),
|
|
176
179
|
}, undefined, { awaitResolutionSupport: true });
|
|
180
|
+
// Settled whether or not a series waited for them, as the report was before.
|
|
181
|
+
await quoteOverridesReady;
|
|
177
182
|
spec = { ...spec, series: spec.series.map((series) => resolvedSeries.get(series.id) ?? series) };
|
|
178
183
|
const ids = new Set(spec.series.map((series) => series.id));
|
|
179
184
|
const periodCoverage = financialPeriodCoverage(spec, chart.series);
|
|
@@ -349,17 +354,20 @@ function releaseDay(value: unknown): string | null {
|
|
|
349
354
|
* Who a chart cites when each of its series names its own dataset (CBR's
|
|
350
355
|
* policy rates: `FRED series ECBDFR`); nothing, so Gloom Cloud, otherwise.
|
|
351
356
|
*/
|
|
352
|
-
function seriesAttribution(series: readonly HeadlessSeries[]): Pick<HeadlessPaneFreshness, "source" | "publisher" | "publishedAt"> {
|
|
357
|
+
function seriesAttribution(series: readonly HeadlessSeries[]): Pick<HeadlessPaneFreshness, "source" | "publisher" | "publishedAt" | "fredUpdatedAt"> {
|
|
353
358
|
const cited = series.map((entry) => (entry as HeadlessSeries & Pick<ResolvedSeries, "attribution">).attribution);
|
|
354
359
|
if (!cited.length || cited.some((attribution) => !attribution)) return {};
|
|
355
360
|
const publishers = [...new Set(cited.map((attribution) => attribution!.publisher))];
|
|
356
361
|
// The chart was published with its last series: the newest publication, when every series says when.
|
|
357
362
|
const published = cited.map((attribution) => attribution!.publishedAt);
|
|
358
363
|
const publishedAt = published.every(Boolean) ? (published as string[]).sort().at(-1) : undefined;
|
|
364
|
+
const updates = cited.flatMap((attribution) => attribution?.fredUpdatedAt ? [attribution.fredUpdatedAt] : []);
|
|
365
|
+
const fredUpdatedAt = updates.length === cited.length ? updates.sort().at(-1) : undefined;
|
|
359
366
|
return {
|
|
360
367
|
source: [...new Set(cited.map((attribution) => attribution!.source))].join(", "),
|
|
361
368
|
...(publishers.every(Boolean) ? { publisher: publishers.join(", ") } : {}),
|
|
362
|
-
|
|
369
|
+
publishedAt: publishedAt ?? null,
|
|
370
|
+
...(fredUpdatedAt ? { fredUpdatedAt } : {}),
|
|
363
371
|
};
|
|
364
372
|
}
|
|
365
373
|
|
|
@@ -1170,8 +1170,9 @@ function ChartComposerSurface({
|
|
|
1170
1170
|
&& warning.endsWith("; only matching observation times contribute."))
|
|
1171
1171
|
))
|
|
1172
1172
|
));
|
|
1173
|
+
const statusComparisonNotice = comparisonUnavailable ?? comparisonNotice;
|
|
1173
1174
|
const statusNotices = [...new Set([...(statusErrorNotice ? [statusErrorNotice] : []), ...listings.errors, ...listings.notices,
|
|
1174
|
-
...(
|
|
1175
|
+
...(statusComparisonNotice ? [statusComparisonNotice] : []), ...statusWarnings])];
|
|
1175
1176
|
usePaneNoticeFooter({
|
|
1176
1177
|
registrationId: `${footerId}:notices`,
|
|
1177
1178
|
notices: statusNotices,
|
|
@@ -15,6 +15,7 @@ import { dateOptionError, readCalendarDate } from "../../../utils/calendar-date"
|
|
|
15
15
|
import { pricePointIntegrity } from "../../../utils/price-history-integrity";
|
|
16
16
|
import { zonedDateKey, zonedWallClockToUtcMs } from "../../../utils/zoned-date-time";
|
|
17
17
|
import { fetchHistoryResult } from "../../../sources/history-result";
|
|
18
|
+
import { historyRetentionNotice, isHistoryRetentionError, type HistoryRetention } from "../../../sources/history-retention";
|
|
18
19
|
import type { PriceHistoryResult } from "../../../types/price-history";
|
|
19
20
|
|
|
20
21
|
export type IntradayRangePreset = "1D" | "1W";
|
|
@@ -207,10 +208,14 @@ export function resolveIntradayRequest(options: {
|
|
|
207
208
|
return { rangePreset, resolution, session };
|
|
208
209
|
}
|
|
209
210
|
|
|
210
|
-
function unavailableReason(symbol: string, request: IntradayRequest, kind: "empty" | "not-intraday" | "failed"): string {
|
|
211
|
+
function unavailableReason(symbol: string, request: IntradayRequest, kind: "empty" | "not-intraday" | "failed", retention?: HistoryRetention, timeZone: string | null = null): string {
|
|
211
212
|
const window = request.session
|
|
212
213
|
? `session ${request.session}`
|
|
213
214
|
: request.rangePreset === "1W" ? "the latest five sessions" : "the latest session";
|
|
215
|
+
// A session older than the source keeps at the resolution: how far back it goes, and where that day's prices are.
|
|
216
|
+
if (retention && request.session) {
|
|
217
|
+
return `${historyRetentionNotice(retention, request.resolution, timeZone)} That session's daily bar: gloom history ${symbol} --from ${request.session} --to ${request.session}.`;
|
|
218
|
+
}
|
|
214
219
|
if (kind === "failed") return `Intraday history request failed for ${symbol}. Try again.`;
|
|
215
220
|
return kind === "not-intraday"
|
|
216
221
|
? `The market-data provider did not return intraday bars for ${symbol} for ${window}.`
|
|
@@ -219,6 +224,8 @@ function unavailableReason(symbol: string, request: IntradayRequest, kind: "empt
|
|
|
219
224
|
|
|
220
225
|
interface IntradayHistoryAttempt extends PriceHistoryResult {
|
|
221
226
|
requestFailed?: true;
|
|
227
|
+
/** The session asked for is older than the source keeps at the resolution. */
|
|
228
|
+
retention?: HistoryRetention;
|
|
222
229
|
}
|
|
223
230
|
|
|
224
231
|
async function loadTrailingHistory(
|
|
@@ -255,7 +262,9 @@ async function loadHistoricalFallback(
|
|
|
255
262
|
if (request.session) {
|
|
256
263
|
const bounds = sessionUtcBounds(request.session, timeZone);
|
|
257
264
|
return await fetchHistoryResult(provider, symbol, exchange,
|
|
258
|
-
{ kind: "detail", start: bounds.start, end: bounds.end, interval: request.resolution }, context).catch(
|
|
265
|
+
{ kind: "detail", start: bounds.start, end: bounds.end, interval: request.resolution }, context).catch((error: unknown) => (
|
|
266
|
+
isHistoryRetentionError(error) ? { ...empty, retention: error.retention }
|
|
267
|
+
: logFailure("chart-composer.session-history", "Load requested intraday session failed", failed)(error))) ?? empty;
|
|
259
268
|
}
|
|
260
269
|
const end = new Date(now.getTime() - HISTORICAL_RETRY_DELAY_MS);
|
|
261
270
|
const lookbackDays = request.rangePreset === "1W" ? 35 : 8;
|
|
@@ -288,6 +297,7 @@ export async function loadIntradayWindow(options: {
|
|
|
288
297
|
options.request, options.context,
|
|
289
298
|
);
|
|
290
299
|
let requestFailed = acquisition.requestFailed === true;
|
|
300
|
+
const retention = acquisition.retention;
|
|
291
301
|
let raw = acquisition.points;
|
|
292
302
|
let window = resolveIntradaySessionWindow(raw, {
|
|
293
303
|
rangePreset: options.request.rangePreset,
|
|
@@ -334,6 +344,8 @@ export async function loadIntradayWindow(options: {
|
|
|
334
344
|
options.symbol,
|
|
335
345
|
options.request,
|
|
336
346
|
requestFailed ? "failed" : sawNonIntradayData ? "not-intraday" : "empty",
|
|
347
|
+
retention,
|
|
348
|
+
timeZone,
|
|
337
349
|
),
|
|
338
350
|
};
|
|
339
351
|
}
|
|
@@ -201,9 +201,10 @@ export class ChatController {
|
|
|
201
201
|
invalidateMentionCandidates: () => this.mentionCandidates.invalidate(),
|
|
202
202
|
});
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
/** `keepInstalledSession`: a command's, which its own session outlasts (`hydrateChatControllerSession`). */
|
|
205
|
+
attachPersistence(persistence: PluginPersistence, resume?: PluginResumeState, { keepInstalledSession = false } = {}): void {
|
|
205
206
|
this.storage.attachPersistence(persistence, resume);
|
|
206
|
-
this.hydrate();
|
|
207
|
+
this.hydrate(keepInstalledSession);
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
/**
|
|
@@ -246,11 +247,12 @@ export class ChatController {
|
|
|
246
247
|
if (changed) this.emit();
|
|
247
248
|
}
|
|
248
249
|
|
|
249
|
-
hydrate(): void {
|
|
250
|
+
hydrate(keepInstalledSession = false): void {
|
|
250
251
|
hydrateChatControllerSession({
|
|
251
252
|
session: this.session,
|
|
252
253
|
storage: this.storage,
|
|
253
254
|
syncVerificationPolling: () => this.realtime.syncVerificationPolling(),
|
|
255
|
+
keepInstalledSession,
|
|
254
256
|
});
|
|
255
257
|
}
|
|
256
258
|
|
|
@@ -36,12 +36,20 @@ interface HydrateChatControllerSessionOptions {
|
|
|
36
36
|
session: ChatControllerSessionState;
|
|
37
37
|
storage: ChatControllerStorage;
|
|
38
38
|
syncVerificationPolling: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* A command (`runtime: "command"`) runs with the session its command line
|
|
41
|
+
* resolved: GLOOMBERB_SESSION_TOKEN, or the profile's. The plugin state a
|
|
42
|
+
* command gives this chat may hold none, or another, and installing it
|
|
43
|
+
* would sign the command out midway: its quotes would come back delayed.
|
|
44
|
+
*/
|
|
45
|
+
keepInstalledSession?: boolean;
|
|
39
46
|
}
|
|
40
47
|
|
|
41
48
|
export function hydrateChatControllerSession({
|
|
42
49
|
session,
|
|
43
50
|
storage,
|
|
44
51
|
syncVerificationPolling,
|
|
52
|
+
keepInstalledSession = false,
|
|
45
53
|
}: HydrateChatControllerSessionOptions): void {
|
|
46
54
|
if (session.hydrated || !storage.hasPersistence()) return;
|
|
47
55
|
session.hydrated = true;
|
|
@@ -51,14 +59,16 @@ export function hydrateChatControllerSession({
|
|
|
51
59
|
const currentToken = apiClient.getSessionToken();
|
|
52
60
|
const currentUser = currentToken === session.sessionToken ? apiClient.getCurrentUser() : null;
|
|
53
61
|
const restoredUser = currentUser ?? (session.sessionToken ? storedSession?.user ?? null : null);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
if (!keepInstalledSession || !currentToken || currentToken === session.sessionToken) {
|
|
63
|
+
// Installing the credential already in place would discard its session
|
|
64
|
+
// check: the web app, which signs in with a cookie and stores no token,
|
|
65
|
+
// asked the server for its session a second time on every open.
|
|
66
|
+
if (currentToken !== session.sessionToken) apiClient.setSessionToken(session.sessionToken);
|
|
67
|
+
// WebSocket tokens are short-lived connection credentials. Reusing a persisted
|
|
68
|
+
// one can trap reconnects on an expired token even while the session cookie is valid.
|
|
69
|
+
apiClient.setWebSocketToken(null);
|
|
70
|
+
if (session.sessionToken && restoredUser !== apiClient.getCurrentUser()) apiClient.restoreCachedUser(restoredUser);
|
|
71
|
+
}
|
|
62
72
|
session.user = normalizeSessionUser(restoredUser);
|
|
63
73
|
session.sessionChecked = true;
|
|
64
74
|
storage.ensureChannelState(DEFAULT_CHAT_CHANNEL_ID);
|
|
@@ -175,7 +175,7 @@ export const chatModule: PluginModule = {
|
|
|
175
175
|
});
|
|
176
176
|
// Messages drawn before a plugin came in, or with one since switched off, draw its codes again.
|
|
177
177
|
for (const event of ["plugin:registered", "plugin:unregistered", "config:changed"] as const) ctx.on(event, chatFunctionsChanged);
|
|
178
|
-
chatController.attachPersistence(ctx.persistence, ctx.resume);
|
|
178
|
+
chatController.attachPersistence(ctx.persistence, ctx.resume, { keepInstalledSession: ctx.runtime === "command" });
|
|
179
179
|
chatSidebarStore.attach(ctx.persistence);
|
|
180
180
|
chatHandlePromptStore.attach(ctx.persistence);
|
|
181
181
|
disposeUnreadBadge?.();
|
|
@@ -130,17 +130,19 @@ export interface SignInWallProps {
|
|
|
130
130
|
action: string;
|
|
131
131
|
/** The session exists but the address is unconfirmed, so signing in again solves nothing. */
|
|
132
132
|
needsVerification?: boolean;
|
|
133
|
+
pro?: boolean;
|
|
133
134
|
/** One line for anything the pane still has to explain; most panes need none. */
|
|
134
135
|
hint?: string;
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
/** The account wall for a pane body that cannot render until the account is right. */
|
|
138
|
-
export function SignInWall({ placement, action, needsVerification = false, hint, width = 0, height = 0, symbol, exchange }: SignInWallProps) {
|
|
139
|
+
export function SignInWall({ placement, action, needsVerification = false, pro = false, hint, width = 0, height = 0, symbol, exchange }: SignInWallProps) {
|
|
139
140
|
const { openCommandBar } = usePluginAppActions();
|
|
140
141
|
const { nativePaneChrome } = useUiCapabilities();
|
|
141
142
|
const title = needsVerification
|
|
142
143
|
? tf("Verify your email to {action}.", { action: t(action) })
|
|
143
|
-
: tf("Sign in to {action}.", { action: t(action) })
|
|
144
|
+
: pro ? tf("Gloom Cloud Pro: Sign in to {action}.", { action: t(action) })
|
|
145
|
+
: tf("Sign in to {action}.", { action: t(action) });
|
|
144
146
|
const authenticate = (mode: AccountMode) => {
|
|
145
147
|
recordWallCtaClicked(placement, mode);
|
|
146
148
|
openAuth(openCommandBar, mode);
|
|
@@ -205,7 +205,7 @@ function McpConnectDialog({
|
|
|
205
205
|
})();
|
|
206
206
|
|
|
207
207
|
// What the key row says beside its button: the plan the key needs, or why
|
|
208
|
-
// the last attempt failed.
|
|
208
|
+
// the last attempt failed.
|
|
209
209
|
const keyNote: Status = (() => {
|
|
210
210
|
if (token || failure?.kind === "signin") return null;
|
|
211
211
|
if (failure?.kind === "offline") return { tone: "muted", text: t(failure.message) };
|
|
@@ -215,6 +215,8 @@ function McpConnectDialog({
|
|
|
215
215
|
}
|
|
216
216
|
return null;
|
|
217
217
|
})();
|
|
218
|
+
// Signed out, the plan is said before the sign-in it would lead to, so no one signs in to find it out.
|
|
219
|
+
const signedOutNote = !signedIn && !token ? t("The MCP server is part of Gloom Pro.") : null;
|
|
218
220
|
|
|
219
221
|
useDialogKeyboard((event) => {
|
|
220
222
|
if (isPlainKey(event, "c", "enter", "return")) {
|
|
@@ -289,6 +291,7 @@ function McpConnectDialog({
|
|
|
289
291
|
) : (
|
|
290
292
|
<Text fg={colors.textDim}>{t("Use a key instead")}</Text>
|
|
291
293
|
)}
|
|
294
|
+
{signedOutNote ? <Text fg={colors.textDim} wrapText>{signedOutNote}</Text> : null}
|
|
292
295
|
<Box flexDirection="row" gap={2} alignItems="center" flexWrap="wrap">
|
|
293
296
|
<Button
|
|
294
297
|
label={keyAction.label}
|
|
@@ -18,6 +18,7 @@ import { promptChoice } from "./prompts";
|
|
|
18
18
|
import { thesisStore } from "./store";
|
|
19
19
|
import { usePaneTickerIdentity } from "../../../../state/hooks/pane-ticker";
|
|
20
20
|
import { logFailure } from "../../../../utils/log-failure";
|
|
21
|
+
import { displayTickerKey } from "../../../../utils/exchanges";
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* The Thesis tab on a ticker: the theses that hold it, or the first question
|
|
@@ -103,7 +104,7 @@ export function ThesisTickerTab({ focused, width, height }: TickerResearchTabPro
|
|
|
103
104
|
return (
|
|
104
105
|
<Box flexDirection="column" paddingX={1} paddingY={1}>
|
|
105
106
|
<EmptyState
|
|
106
|
-
title={`No thesis on ${ticker.metadata.ticker} yet.`}
|
|
107
|
+
title={`No thesis on ${displayTickerKey(ticker.metadata.ticker)} yet.`}
|
|
107
108
|
message={plan.hasProAccess
|
|
108
109
|
? "Say why you own it. Pillars, kill conditions, and catalysts are drafted from that and the company data; you edit from there."
|
|
109
110
|
: "Say why you own it, then add the claims that must stay true and what would make you sell. Pro drafts them for you and reviews them against news."}
|
|
@@ -85,7 +85,8 @@ export function attentionHeadless(kind: AttentionKind): HeadlessPaneDefinition<"
|
|
|
85
85
|
options: [
|
|
86
86
|
{ key: "limit", shot: REPORT_ROWS, type: "string", defaultValue: "100", description: "Rows per REST page, up to 200 for hiring and 500 for apps." },
|
|
87
87
|
{ key: "offset", shot: REPORT_PAGE, type: "string", defaultValue: "0", description: "Continuation offset from the prior report metadata." },
|
|
88
|
-
{ key: "tab", type: "enum", settingKey: "tab", values: [
|
|
88
|
+
{ key: "tab", type: "enum", settingKey: "tab", values: [{ value: "table" }, { value: "chart" }, { value: "mix", label: kind === "apps" ? "Markets" : "Mix" }, { value: "peers", label: kind === "apps" ? "Companies" : "Peers" }, { value: "evidence" },
|
|
89
|
+
...(kind === "hiring" ? ["moves", "expansion", "anomalies", "building"].map((value) => ({ value })) : [])], defaultValue: "table",
|
|
89
90
|
description: kind === "hiring" ? "Table, dated history, role mix, peers, source evidence, moves against the company's own weeks and peers, first roles in a new country or city, place and role-family spikes, or the role families and themes whose share of new roles rose." : "Table, dated history, geographic or role mix, peers, or source evidence." },
|
|
90
91
|
...(kind === "hiring" ? [
|
|
91
92
|
{ key: "moves", type: "enum" as const, settingKey: "movesFilter", values: MOVES_FILTERS.map(({ value }) => ({ value })), defaultValue: "moves", description: "Which hiring moves the board lists: own moves, one direction, or every measured company." },
|
|
@@ -89,7 +89,7 @@ export function companyHeadless(mode: CompanyMode): HeadlessPaneDefinition<"bund
|
|
|
89
89
|
discovery: { aliases: [mode === "kpis" ? "KPIS" : "GUIDE"], dataRequirements: ["Gloom Cloud company disclosures"],
|
|
90
90
|
limitations: ["Pro dataset with a fixed latest preview on Free.", KPI_COVERAGE_NOTE, "Compare matching definition, period, currency, basis and scope.", "Fiscal labels without explicit calendar dates are retained without inferred dates."] },
|
|
91
91
|
options: [
|
|
92
|
-
{ key: "tab", type: "enum", settingKey: "tab", defaultValue: "table", values: [{ value: "table" }, { value: "chart" }, ...(mode === "guidance" ? [{ value: "history" }] : []), { value: "evidence" }], description: "The pane section to render." },
|
|
92
|
+
{ key: "tab", type: "enum", settingKey: "tab", defaultValue: "table", values: [{ value: "table", label: mode === "guidance" ? "Tracker" : "Table" }, { value: "chart" }, ...(mode === "guidance" ? [{ value: "history" }] : []), { value: "evidence" }], description: "The pane section to render." },
|
|
93
93
|
{ key: "metric", type: "string", settingKey: "metric", description: "Canonical metric ID, such as arr or subscribers.", normalize: (value) => value.trim().toLowerCase() },
|
|
94
94
|
{ key: "basis", type: "enum", values: [{ value: "reported" }, { value: "adjusted" }, { value: "constant_currency" }, { value: "organic" }], description: "Accounting basis filter (Pro)." },
|
|
95
95
|
{ key: "from", type: "string", placeholder: "date", description: `First calendar period end, as ${DATE_OPTION_EXAMPLES} (Pro).`, normalize: (value) => isoDateOption(value, "from") },
|
|
@@ -8,7 +8,7 @@ import { buildCorrelationMatrix, buildCorrelationSeries, buildGeoCorrelationSeri
|
|
|
8
8
|
import { geoSeriesToken, loadGeoCorrelationHistory } from "./geo";
|
|
9
9
|
import { buildRelationshipAnalysis, DEFAULT_RELATIONSHIP_SECOND_SYMBOL } from "./relationship/model";
|
|
10
10
|
import { paneSchemas } from "./headless-schema";
|
|
11
|
-
import { CORRELATION_RETURN_BASIS, GEO_CORRELATION_CHANGE_BASIS, loadCorrelationHistory, thinCorrelationNote, unfinishedBarFreshness } from "./history";
|
|
11
|
+
import { CORRELATION_PRICE_RETURN_NOTE, CORRELATION_RETURN_BASIS, GEO_CORRELATION_CHANGE_BASIS, loadCorrelationHistory, thinCorrelationNote, unfinishedBarFreshness } from "./history";
|
|
12
12
|
import type { HeadlessPaneContext } from "../../../types/headless";
|
|
13
13
|
import type { PricePoint } from "../../../types/financials";
|
|
14
14
|
import { newestReportTime } from "../../../utils/utc-time";
|
|
@@ -77,7 +77,7 @@ export const correlationHeadless: HeadlessPaneDefinition<"rows"> = {
|
|
|
77
77
|
return {
|
|
78
78
|
freshness: { asOf, ...unfinishedBarFreshness([...bars.values()], asOf?.slice(0, 10)) },
|
|
79
79
|
rows, unavailableSymbols,
|
|
80
|
-
|
|
80
|
+
notes: [CORRELATION_PRICE_RETURN_NOTE, ...rollNotes],
|
|
81
81
|
errors: [
|
|
82
82
|
...loaded.errors,
|
|
83
83
|
// A thin pair says which side is short of daily bars; a pair with enough returns and no value has no variance.
|
|
@@ -140,7 +140,7 @@ export const relationshipHeadless: HeadlessPaneDefinition<"series"> = {
|
|
|
140
140
|
{ key: "latestCorrelation", label: `Rolling correlation (${correlationWindow})`, value: analysis.latestCorrelation, formatted: formatNumber(analysis.latestCorrelation ?? undefined, 3) },
|
|
141
141
|
...(["beta", "alpha", "rSquared"] as const).map((key) => ({
|
|
142
142
|
// The first ticker's daily returns are regressed on the second's, so a beta says which way round it reads.
|
|
143
|
-
key, label: { beta: `${regression}: beta`, alpha: `${regression}: alpha`, rSquared: "R squared" }[key],
|
|
143
|
+
key, label: { beta: `${regression}: beta (${range} daily)`, alpha: `${regression}: alpha`, rSquared: "R squared" }[key],
|
|
144
144
|
value: analysis.stats?.[key] ?? null,
|
|
145
145
|
// Alpha is the regression intercept on daily percent returns.
|
|
146
146
|
formatted: key === "alpha" && analysis.stats ? `${formatNumber(analysis.stats.alpha, 3)}%` : formatNumber(analysis.stats?.[key], 3),
|
|
@@ -80,5 +80,6 @@ export function contradictoryBarsNote(label: string, left: number, total: number
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export const CORRELATION_RETURN_BASIS = "Local-price close-to-close returns between shared UTC dates; cash distributions and FX conversion are excluded, and exchange closing times may differ.";
|
|
83
|
+
export const CORRELATION_PRICE_RETURN_NOTE = "Price returns · no distributions or FX";
|
|
83
84
|
|
|
84
85
|
export const GEO_CORRELATION_CHANGE_BASIS = "Map series (GEO:) use the change in daily value between the same shared UTC dates, because counts such as transits can be zero.";
|
|
@@ -46,8 +46,8 @@ import {
|
|
|
46
46
|
} from "./matrix/model";
|
|
47
47
|
import { CorrelationMatrixGrid, correlationMatrixLayout, useCorrelationMatrixNavigation } from "./matrix/grid";
|
|
48
48
|
import { correlationHeadless, relationshipHeadless } from "./headless";
|
|
49
|
-
import { CORRELATION_HISTORY_RESOLUTION } from "./history";
|
|
50
|
-
import { buildMatrixPairHistory,
|
|
49
|
+
import { CORRELATION_HISTORY_RESOLUTION, CORRELATION_PRICE_RETURN_NOTE } from "./history";
|
|
50
|
+
import { buildMatrixPairHistory, matrixPaneRows } from "./matrix/selection";
|
|
51
51
|
import { MatrixPairChart } from "./matrix/pair-chart";
|
|
52
52
|
|
|
53
53
|
/** A map series' values and when they arrived; after a failed load, the error and any values kept from before. */
|
|
@@ -230,9 +230,9 @@ function CorrelationMatrixPane({ focused, width, height }: PaneProps) {
|
|
|
230
230
|
// Rows are exactly as wide as the matrix (after the one-cell inset), so the
|
|
231
231
|
// zebra and hover bands stop at the last column instead of running on.
|
|
232
232
|
const matrixRowWidth = correlationMatrixLayout(symbols, width).rowWidth;
|
|
233
|
-
const chartRows = pair ? matrixChartRows(width, height, symbols.length, matrixRowWidth) : 0;
|
|
234
233
|
const noteRows = cellNote ? wrapTextLines(cellNote, Math.max(1, width - 2)).length : 0;
|
|
235
|
-
const
|
|
234
|
+
const basisRows = wrapTextLines(CORRELATION_PRICE_RETURN_NOTE, Math.max(1, width - 2)).length;
|
|
235
|
+
const { chartRows, matrixHeight } = matrixPaneRows(width, height, symbols.length, matrixRowWidth, basisRows + noteRows, !!pair);
|
|
236
236
|
const bodyStatus = settings.symbolsError
|
|
237
237
|
? <PaneStatusBody error={settings.symbolsError} />
|
|
238
238
|
: symbols.length < 2
|
|
@@ -273,6 +273,7 @@ function CorrelationMatrixPane({ focused, width, height }: PaneProps) {
|
|
|
273
273
|
/>
|
|
274
274
|
{bodyStatus ?? (
|
|
275
275
|
<>
|
|
276
|
+
<RowNote>{CORRELATION_PRICE_RETURN_NOTE}</RowNote>
|
|
276
277
|
<CorrelationMatrixGrid
|
|
277
278
|
symbols={symbols}
|
|
278
279
|
width={width}
|
|
@@ -332,7 +333,8 @@ export const correlationModule: PluginModule = {
|
|
|
332
333
|
label: "Correlation Matrix",
|
|
333
334
|
description: "Date-aligned Pearson correlation matrix for ticker returns and map series such as GEO:HORMUZ.",
|
|
334
335
|
keywords: ["correlation", "corr", "matrix", "pearson", "returns", "covariance"],
|
|
335
|
-
shortcut: { prefix: "CORR", argPlaceholder: "tickers", argKind: "ticker-list",
|
|
336
|
+
shortcut: { prefix: "CORR", argPlaceholder: "tickers", argKind: "ticker-list",
|
|
337
|
+
keepArgToken: (token) => !!geoSeriesToken(token) || /^[A-Z]{1,5}-[A-Z](?::[A-Z0-9]+)?$/.test(token) },
|
|
336
338
|
wizard: [
|
|
337
339
|
{
|
|
338
340
|
key: "tickers",
|