gloomberb 0.15.2 → 0.15.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.
- package/README.md +31 -2
- package/README.zh-CN.md +12 -2
- package/package.json +20 -21
- package/src/api-client/auth.ts +7 -1
- package/src/api-client/chat.ts +1 -2
- package/src/api-client/collections.ts +1 -13
- package/src/api-client/credit-boards.ts +67 -0
- package/src/api-client/data.ts +93 -57
- package/src/api-client/earnings.ts +80 -0
- package/src/api-client/equity-screener.ts +25 -0
- package/src/api-client/errors.ts +42 -0
- package/src/api-client/feedback.ts +1 -2
- package/src/api-client/futures-curve.ts +30 -0
- package/src/api-client/index.ts +108 -100
- package/src/api-client/ipo.ts +99 -0
- package/src/api-client/market-movers.ts +60 -0
- package/src/api-client/mna.ts +118 -0
- package/src/api-client/normalizers.ts +0 -7
- package/src/api-client/notes.ts +20 -34
- package/src/api-client/paths.ts +21 -19
- package/src/api-client/plan-access.ts +27 -0
- package/src/api-client/plan-rules.ts +87 -0
- package/src/api-client/request.ts +40 -4
- package/src/api-client/research-activity.ts +17 -1
- package/src/api-client/revenue-breakdown.ts +36 -0
- package/src/api-client/session-cookie.ts +6 -0
- package/src/api-client/social-mentions.ts +63 -0
- package/src/api-client/teams.ts +1 -26
- package/src/api-client/telemetry.ts +180 -0
- package/src/api-client/theses.ts +9 -36
- package/src/api-client/types.ts +66 -61
- package/src/api-client/views.ts +22 -49
- package/src/app/app-bootstrap-state.ts +3 -14
- package/src/app/pane-runtime/plugin-bindings.ts +21 -1
- package/src/app/runtime/broker-import.ts +5 -1
- package/src/app/runtime/desktop-menu.ts +23 -12
- package/src/app/runtime/layout-warmup.ts +2 -2
- package/src/app/runtime/plugin-bindings.ts +27 -7
- package/src/app/runtime/startup.ts +55 -1
- package/src/app/runtime/ticker-refresh.ts +6 -6
- package/src/app/runtime/update.ts +4 -2
- package/src/app.tsx +15 -1
- package/src/assets/gloomberb-logo-windows.ico +0 -0
- package/src/assets/gloomberb-logo-windows.png +0 -0
- package/src/assets/gloomberb-logo.svg +1 -73
- package/src/assets/gloomberb-mark.ico +0 -0
- package/src/assets/gloomberb-mark.svg +1 -0
- package/src/brokers/broker-portfolio-sync.ts +75 -6
- package/src/brokers/broker-ticker-sync.ts +3 -1
- package/src/brokers/cloud-broker-link.ts +26 -0
- package/src/brokers/directory.ts +56 -0
- package/src/brokers/remote-broker-adapter.ts +4 -1
- package/src/brokers/signed-in/adapter.ts +259 -0
- package/src/brokers/signed-in/catalog.ts +129 -0
- package/src/brokers/signed-in/client.ts +54 -0
- package/src/brokers/signed-in/connect.ts +69 -0
- package/src/brokers/signed-in/profile.ts +18 -0
- package/src/brokers/signed-in/sign-in-dialog.tsx +187 -0
- package/src/brokers/signed-in/sign-in.ts +178 -0
- package/src/brokers/sync-broker-instance.ts +42 -24
- package/src/capabilities/index.ts +42 -6
- package/src/cli/commands/broker.ts +49 -0
- package/src/cli/commands/market.ts +5 -0
- package/src/cli/commands/overview.ts +2 -5
- package/src/cli/commands/plugins.ts +112 -428
- package/src/cli/commands/system.ts +26 -354
- package/src/cli/commands/ticker.ts +11 -34
- package/src/cli/desktop-pane-shot-routes.ts +7 -0
- package/src/cli/desktop-pane-shot.ts +7 -27
- package/src/cli/entry.ts +20 -23
- package/src/cli/helpers.ts +5 -19
- package/src/cli/index.ts +17 -23
- package/src/cli/pane-functions/capabilities.ts +0 -4
- package/src/cli/pane-functions/catalog.ts +30 -4
- package/src/cli/pane-functions/headless.ts +1 -4
- package/src/cli/pane-functions/index.ts +0 -23
- package/src/cli/pane-functions/options.ts +8 -5
- package/src/cli/pane-functions/screenshot-evidence.ts +106 -0
- package/src/cli/pane-functions/screenshot.ts +48 -291
- package/src/cli/restore-plugins.ts +10 -2
- package/src/components/chart/composite/axis-overlays.tsx +87 -22
- package/src/components/chart/composite/composite-chart.tsx +5 -6
- package/src/components/chart/composite/downsample.ts +4 -7
- package/src/components/chart/composite/format.ts +39 -3
- package/src/components/chart/composite/interactions.ts +1 -29
- package/src/components/chart/composite/price-axis-labels.tsx +1 -4
- package/src/components/chart/composite/rasterizer.ts +1 -19
- package/src/components/chart/composite/scene.ts +7 -10
- package/src/components/chart/composite/text-renderer.ts +5 -21
- package/src/components/chart/composite/time-axis.ts +1 -4
- package/src/components/chart/composite/tools.ts +2 -1
- package/src/components/chart/core/pointer.ts +1 -4
- package/src/components/chart/curve/curve-surface.tsx +180 -48
- package/src/components/chart/curve/index.ts +3 -2
- package/src/components/chart/curve/model.ts +200 -31
- package/src/components/chart/native/chart-rasterizer.ts +1 -0
- package/src/components/chart/native/kitty/protocol.ts +1 -1
- package/src/components/chart/native/raster/crosshair.ts +1 -2
- package/src/components/chart/native/raster/placement.ts +6 -0
- package/src/components/chart/native/raster/primitives.ts +5 -9
- package/src/components/chart/native/raster/types.ts +0 -7
- package/src/components/chart/native/renderer-selection.ts +4 -4
- package/src/components/chart/native/surface/manager.ts +7 -12
- package/src/components/chart/static/chart-surface.tsx +4 -7
- package/src/components/chart/static/index.ts +0 -1
- package/src/components/chart/static/trail-chart-surface.tsx +393 -66
- package/src/components/chart/surface3d/model.ts +2 -2
- package/src/components/chart/surface3d/software.ts +2 -1
- package/src/components/chart-table/axis.ts +29 -0
- package/src/components/chart-table/header.tsx +264 -0
- package/src/components/chart-table/index.ts +14 -0
- package/src/components/chart-table/layout.ts +139 -0
- package/src/components/chart-table/selection.ts +145 -0
- package/src/components/command-bar/action-runtime.ts +1 -2
- package/src/components/command-bar/assist/inventory.ts +83 -30
- package/src/components/command-bar/assist/model.ts +4 -0
- package/src/components/command-bar/assist/runtime.ts +79 -26
- package/src/components/command-bar/commands/collection.ts +1 -6
- package/src/components/command-bar/commands/direct/index.ts +26 -2
- package/src/components/command-bar/commands/direct/runtime.ts +1 -1
- package/src/components/command-bar/commands/plugin/actions.ts +2 -1
- package/src/components/command-bar/commands/plugin/items.ts +10 -0
- package/src/components/command-bar/commands/registry.ts +23 -0
- package/src/components/command-bar/helpers.ts +0 -1
- package/src/components/command-bar/layout-items/current-layout.ts +11 -9
- package/src/components/command-bar/layout-items/types.ts +0 -1
- package/src/components/command-bar/layout-items.ts +0 -3
- package/src/components/command-bar/list/model.ts +5 -0
- package/src/components/command-bar/list/navigation.ts +2 -5
- package/src/components/command-bar/list/view.tsx +7 -7
- package/src/components/command-bar/pane-actions.ts +3 -8
- package/src/components/command-bar/pane-templates/workflow.ts +5 -1
- package/src/components/command-bar/panel/index.tsx +5 -5
- package/src/components/command-bar/panel/runtime.ts +4 -1
- package/src/components/command-bar/picker-activation.ts +14 -4
- package/src/components/command-bar/routes/root/command-items.ts +19 -1
- package/src/components/command-bar/routes/root/plugin-install.ts +304 -0
- package/src/components/command-bar/routes/root/results.ts +10 -1
- package/src/components/command-bar/routes/root/runtime.ts +12 -8
- package/src/components/command-bar/routes/root/search-report.ts +246 -0
- package/src/components/command-bar/routes/root/selection.ts +14 -5
- package/src/components/command-bar/routes/root/shortcut-items.ts +2 -0
- package/src/components/command-bar/routing/actions.ts +2 -8
- package/src/components/command-bar/routing/confirm.ts +6 -1
- package/src/components/command-bar/routing/launch-request.ts +7 -0
- package/src/components/command-bar/routing/navigation-state.ts +24 -0
- package/src/components/command-bar/selection-runtime.ts +110 -65
- package/src/components/command-bar/surface/index.tsx +116 -19
- package/src/components/command-bar/theme-picker.tsx +11 -10
- package/src/components/command-bar/view-model.ts +10 -6
- package/src/components/command-bar/workflow/body.tsx +6 -5
- package/src/components/command-bar/workflow/broker.ts +113 -76
- package/src/components/command-bar/workflow/collection-actions.ts +39 -8
- package/src/components/command-bar/workflow/coordinator.ts +19 -10
- package/src/components/command-bar/workflow/field-row.tsx +3 -3
- package/src/components/command-bar/workflow/fields.ts +14 -5
- package/src/components/command-bar/workflow/ops.ts +14 -1
- package/src/components/command-bar/workflow/submit.ts +23 -9
- package/src/components/command-bar/workflow/types.ts +3 -0
- package/src/components/data-table/export.ts +103 -6
- package/src/components/data-table/stack-view.tsx +22 -2
- package/src/components/data-table/table-pane.ts +45 -0
- package/src/components/data-table/view.tsx +24 -10
- package/src/components/feed-data-table/stack-view.tsx +47 -130
- package/src/components/index.ts +49 -5
- package/src/components/layout/header.tsx +5 -12
- package/src/components/layout/market-summary.ts +1 -2
- package/src/components/layout/missing-pane.tsx +2 -7
- package/src/components/layout/pane/header-tabs.tsx +2 -1
- package/src/components/layout/pane/header.tsx +2 -6
- package/src/components/layout/pane/pane-tabs.tsx +41 -0
- package/src/components/layout/pane/status-footer.ts +92 -0
- package/src/components/layout/shell/action-menu-overlay.tsx +3 -3
- package/src/components/layout/shell/index.tsx +6 -10
- package/src/components/layout/shell/menu.ts +1 -5
- package/src/components/layout/shell/native/surfaces.ts +3 -4
- package/src/components/layout/shell/pane/actions.ts +8 -9
- package/src/components/layout/shell/shortcuts.ts +4 -1
- package/src/components/layout/shell/window-mode/overlays.tsx +3 -2
- package/src/components/layout/status-bar.tsx +34 -47
- package/src/components/layout/titlebar-overlay.ts +3 -14
- package/src/components/layout/window-edit/status.tsx +3 -9
- package/src/components/markdown-text.tsx +306 -2
- package/src/components/market-board/index.tsx +60 -16
- package/src/components/onboarding/account-step/form-panel.tsx +2 -2
- package/src/components/onboarding/account-step/qr-panel.tsx +13 -30
- package/src/components/onboarding/account-step/signed-in-panel.tsx +2 -2
- package/src/components/onboarding/first-run-workspace.ts +8 -6
- package/src/components/onboarding/onboarding-frame.tsx +11 -15
- package/src/components/onboarding/onboarding-wizard.tsx +51 -30
- package/src/components/onboarding/portfolio-step/broker-fields-panel.tsx +2 -2
- package/src/components/onboarding/portfolio-step/broker-setup-panel.tsx +2 -2
- package/src/components/onboarding/portfolio-step/broker-sync-panel.tsx +2 -2
- package/src/components/onboarding/portfolio-step/choose-panel.tsx +2 -2
- package/src/components/onboarding/portfolio-step/positions-panel.tsx +2 -2
- package/src/components/onboarding/wizard-broker-sync.ts +122 -51
- package/src/components/onboarding/wizard-model.ts +20 -7
- package/src/components/onboarding/wizard-positions.ts +1 -1
- package/src/components/paged-rows.ts +217 -0
- package/src/components/pane-settings-dialog/field-dialogs.tsx +2 -2
- package/src/components/pane-settings-dialog.tsx +2 -2
- package/src/components/price-sparkline/model.ts +11 -8
- package/src/components/price-sparkline/view.tsx +10 -7
- package/src/components/sign-in-code-panel.tsx +128 -0
- package/src/components/sign-in-gate.tsx +8 -22
- package/src/components/speedometer-gauge/index.tsx +2 -2
- package/src/components/speedometer-gauge/model.ts +1 -4
- package/src/components/table-view-shared.tsx +0 -44
- package/src/components/ticker/badge/format.ts +0 -4
- package/src/components/ticker/list-table-view.tsx +6 -37
- package/src/components/toggle-list.tsx +2 -2
- package/src/components/ui/choice-dialog.tsx +4 -8
- package/src/components/ui/confirm-dialog.tsx +21 -1
- package/src/components/ui/data-table/hooks.ts +46 -0
- package/src/components/ui/data-table/opentui/index.tsx +21 -30
- package/src/components/ui/data-table/opentui/model.ts +0 -21
- package/src/components/ui/data-table/types.ts +20 -0
- package/src/components/ui/data-table/visible-range.ts +26 -2
- package/src/components/ui/detail-scroll-body.tsx +48 -0
- package/src/components/ui/disclosure-marker.tsx +2 -2
- package/src/components/ui/display.tsx +8 -4
- package/src/components/ui/field-grid.tsx +26 -2
- package/src/components/ui/field-ring.ts +125 -0
- package/src/components/ui/fields.tsx +65 -3
- package/src/components/ui/index.ts +18 -7
- package/src/components/ui/multi-select/dialog.tsx +3 -3
- package/src/components/ui/page-stack-view.tsx +2 -0
- package/src/components/ui/prose.tsx +52 -0
- package/src/components/ui/query-bar.tsx +37 -9
- package/src/components/ui/reveal-in-scroll-box.ts +34 -0
- package/src/components/ui/select-button.tsx +2 -2
- package/src/components/ui/split-bar.tsx +69 -0
- package/src/components/ui/stat-grid.tsx +38 -14
- package/src/components/ui/status.tsx +2 -0
- package/src/components/ui/text-prompt-dialog.tsx +128 -0
- package/src/core/app-runtime.ts +5 -0
- package/src/core/connection-health.ts +2 -4
- package/src/core/state/app/layout.ts +13 -0
- package/src/core/state/app/types.ts +16 -0
- package/src/core/state/session-persistence.ts +8 -14
- package/src/data/cached-query.ts +5 -0
- package/src/data/config/chart-settings.ts +14 -21
- package/src/data/config/layout.ts +0 -8
- package/src/data/config/store/migrations.ts +74 -141
- package/src/data/config/store/node.ts +29 -3
- package/src/data/config/store/normalize.ts +35 -63
- package/src/data/config/store/pane-state.ts +47 -0
- package/src/data/fred-series.ts +7 -18
- package/src/data/json-persistence.ts +1 -4
- package/src/data/json-ticker-repository.ts +1 -4
- package/src/i18n/es.ts +26 -5
- package/src/i18n/ja.ts +26 -5
- package/src/i18n/ko.ts +26 -5
- package/src/i18n/languages.ts +18 -0
- package/src/i18n/zh-cn.ts +26 -5
- package/src/i18n/zh-tw.ts +26 -5
- package/src/layout-marketplace/cloud.ts +11 -54
- package/src/layout-marketplace/gallery.tsx +32 -46
- package/src/layout-marketplace/linked-sync.ts +1 -2
- package/src/layout-marketplace/payload.ts +16 -19
- package/src/market-data/coordinator/chart.ts +5 -4
- package/src/market-data/coordinator/events.ts +15 -2
- package/src/market-data/coordinator/index.ts +37 -9
- package/src/market-data/coordinator/quotes.ts +2 -9
- package/src/market-data/history-session.ts +2 -9
- package/src/market-data/hooks.tsx +3 -3
- package/src/market-data/market/format.ts +26 -0
- package/src/market-data/market/freshness.ts +5 -34
- package/src/market-data/market/price-basis.ts +1 -1
- package/src/market-data/market/status.ts +1 -1
- package/src/market-data/query-store.ts +37 -31
- package/src/market-data/quotes/day-range.ts +2 -8
- package/src/market-data/quotes/freshness.ts +2 -4
- package/src/market-data/quotes/screener-live-quotes.ts +162 -0
- package/src/market-data/realized-volatility.ts +292 -0
- package/src/market-data/selectors.ts +27 -10
- package/src/market-data/snapshot-provider.ts +3 -2
- package/src/news/aggregator.ts +0 -35
- package/src/news/source-label.ts +22 -0
- package/src/news/types.ts +1 -0
- package/src/pane-settings.ts +0 -8
- package/src/plugins/absorbed.ts +33 -0
- package/src/plugins/auto-update-node.ts +114 -0
- package/src/plugins/auto-update.ts +281 -0
- package/src/plugins/builtin/account-management/form-components.tsx +8 -83
- package/src/plugins/builtin/account-management/index.tsx +26 -0
- package/src/plugins/builtin/account-management/keyboard.ts +50 -98
- package/src/plugins/builtin/account-management/model.ts +19 -53
- package/src/plugins/builtin/account-management/navigation.ts +6 -21
- package/src/plugins/builtin/account-management/pane.tsx +76 -187
- package/src/plugins/builtin/account-management/password-dialog.tsx +10 -8
- package/src/plugins/builtin/alerts/cli.ts +96 -0
- package/src/plugins/builtin/alerts/events-pane.tsx +22 -50
- package/src/plugins/builtin/alerts/history-pane.tsx +20 -59
- package/src/plugins/builtin/alerts/history.ts +1 -1
- package/src/plugins/builtin/alerts/index.tsx +2 -0
- package/src/plugins/builtin/alerts/pane.tsx +27 -65
- package/src/plugins/builtin/alerts/research-rules.ts +8 -3
- package/src/plugins/builtin/analytics/account-returns.ts +109 -0
- package/src/plugins/builtin/analytics/broker-performance.ts +4 -2
- package/src/plugins/builtin/analytics/display.ts +0 -32
- package/src/plugins/builtin/analytics/index.tsx +119 -88
- package/src/plugins/builtin/analytics/metrics.ts +0 -26
- package/src/plugins/builtin/analytics/pane-model.ts +25 -17
- package/src/plugins/builtin/analytics/risk-client.ts +11 -14
- package/src/plugins/builtin/analytics/risk-evidence.ts +45 -15
- package/src/plugins/builtin/analytics/risk-pane.tsx +134 -139
- package/src/plugins/builtin/analytics/sector-model.ts +0 -11
- package/src/plugins/builtin/analytics/view.tsx +92 -111
- package/src/plugins/builtin/backtest/client.ts +5 -6
- package/src/plugins/builtin/backtest/pane.tsx +35 -41
- package/src/plugins/builtin/backtest/rules.ts +0 -8
- package/src/plugins/builtin/bond-calculator/model.ts +0 -1
- package/src/plugins/builtin/bond-calculator/pane.tsx +8 -15
- package/src/plugins/builtin/broker-manager/detail.tsx +39 -76
- package/src/plugins/builtin/broker-manager/footer.ts +3 -3
- package/src/plugins/builtin/broker-manager/index.tsx +24 -4
- package/src/plugins/builtin/broker-manager/keyboard.ts +7 -30
- package/src/plugins/builtin/broker-manager/model.ts +4 -7
- package/src/plugins/builtin/broker-manager/pane-actions.tsx +74 -34
- package/src/plugins/builtin/broker-manager/table.ts +3 -12
- package/src/plugins/builtin/buildout/cells.tsx +34 -36
- package/src/plugins/builtin/buildout/detail/company.tsx +5 -4
- package/src/plugins/builtin/buildout/detail/site.tsx +6 -5
- package/src/plugins/builtin/buildout/detail/ui.tsx +10 -9
- package/src/plugins/builtin/buildout/format.ts +3 -8
- package/src/plugins/builtin/buildout/index.tsx +23 -0
- package/src/plugins/builtin/buildout/model/types.ts +0 -1
- package/src/plugins/builtin/buildout/pane/index.tsx +18 -40
- package/src/plugins/builtin/buildout/table-model.ts +1 -1
- package/src/plugins/builtin/builtin-plugin-meta.ts +51 -0
- package/src/plugins/builtin/cds/client.ts +33 -1
- package/src/plugins/builtin/cds/index.tsx +4 -4
- package/src/plugins/builtin/cds/model.ts +56 -10
- package/src/plugins/builtin/cds/pane.tsx +139 -49
- package/src/plugins/builtin/central-bank-rates/client.ts +5 -17
- package/src/plugins/builtin/central-bank-rates/headless.ts +1 -1
- package/src/plugins/builtin/central-bank-rates/index.tsx +1 -1
- package/src/plugins/builtin/central-bank-rates/pane.tsx +15 -20
- package/src/plugins/builtin/changelog/index.tsx +23 -105
- package/src/plugins/builtin/changelog/model.ts +2 -12
- package/src/plugins/builtin/chart-composer/catalog-inventory.ts +3 -2
- package/src/plugins/builtin/chart-composer/chart-spec.ts +1 -4
- package/src/plugins/builtin/chart-composer/data-catalog-pane.tsx +20 -71
- package/src/plugins/builtin/chart-composer/editor/controller.ts +8 -12
- package/src/plugins/builtin/chart-composer/editor.tsx +2 -2
- package/src/plugins/builtin/chart-composer/follow-binding.ts +6 -1
- package/src/plugins/builtin/chart-composer/index.tsx +6 -9
- package/src/plugins/builtin/chart-composer/pane.tsx +50 -3
- package/src/plugins/builtin/chart-composer/presets.ts +34 -0
- package/src/plugins/builtin/chart-composer/quick-add.tsx +17 -23
- package/src/plugins/builtin/chart-composer/semantic.ts +1 -0
- package/src/plugins/builtin/chart-composer/settings.ts +1 -1
- package/src/plugins/builtin/chat/channels.ts +0 -2
- package/src/plugins/builtin/chat/content/index.tsx +1 -1
- package/src/plugins/builtin/chat/content/layout-metrics.ts +3 -6
- package/src/plugins/builtin/chat/controller/fetch.ts +1 -14
- package/src/plugins/builtin/chat/controller/state.ts +4 -2
- package/src/plugins/builtin/chat/controller/utils.ts +0 -14
- package/src/plugins/builtin/chat/index.tsx +105 -0
- package/src/plugins/builtin/chat/message/desktop.tsx +22 -94
- package/src/plugins/builtin/chat/message/header.tsx +83 -0
- package/src/plugins/builtin/chat/message/profile-popover.tsx +1 -1
- package/src/plugins/builtin/chat/message/render-state.ts +10 -2
- package/src/plugins/builtin/chat/message/terminal.tsx +22 -78
- package/src/plugins/builtin/chat/pane.tsx +112 -124
- package/src/plugins/builtin/chat/sidebar.tsx +2 -18
- package/src/plugins/builtin/chat/status-widget.tsx +0 -3
- package/src/plugins/builtin/cloud/askg/executor.ts +14 -39
- package/src/plugins/builtin/cloud/askg/json.ts +31 -0
- package/src/plugins/builtin/cloud/askg/manifest.ts +1 -1
- package/src/plugins/builtin/cloud/askg/pane.tsx +10 -16
- package/src/plugins/builtin/cloud/askg/pending-question.ts +5 -27
- package/src/plugins/builtin/cloud/askg/protocol.ts +1 -15
- package/src/plugins/builtin/cloud/askg/undo.ts +4 -29
- package/src/plugins/builtin/cloud/auth-actions.tsx +28 -1
- package/src/plugins/builtin/cloud/browser.tsx +1 -7
- package/src/plugins/builtin/cloud/device-signin-dialog.tsx +64 -147
- package/src/plugins/builtin/cloud/index.tsx +2 -11
- package/src/plugins/builtin/cloud/plugin.tsx +13 -151
- package/src/plugins/builtin/cloud/team/collections-sync.ts +4 -2
- package/src/plugins/builtin/cloud/team/collections.ts +0 -4
- package/src/plugins/builtin/cloud/team/model.ts +0 -4
- package/src/plugins/builtin/cloud/team/module.tsx +0 -3
- package/src/plugins/builtin/cloud/team/pane-model.ts +0 -7
- package/src/plugins/builtin/cloud/team/pane-request.ts +5 -22
- package/src/plugins/builtin/cloud/team/pane-sections.tsx +1 -1
- package/src/plugins/builtin/cloud/team/pane-ui.tsx +15 -24
- package/src/plugins/builtin/cloud/team/pane.tsx +21 -58
- package/src/plugins/builtin/cloud/thesis/board-pane.tsx +31 -50
- package/src/plugins/builtin/cloud/thesis/detail.tsx +1 -1
- package/src/plugins/builtin/cloud/thesis/exposure.ts +1 -4
- package/src/plugins/builtin/cloud/thesis/flows.ts +8 -7
- package/src/plugins/builtin/cloud/thesis/model.ts +0 -7
- package/src/plugins/builtin/cloud/thesis/pane-request.ts +5 -22
- package/src/plugins/builtin/cloud/thesis/prompts.tsx +13 -125
- package/src/plugins/builtin/cloud/thesis/ticker-tab.tsx +1 -1
- package/src/plugins/builtin/cloud/upgrade-command.ts +1 -1
- package/src/plugins/builtin/cloud/upgrade-dialog.tsx +231 -0
- package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +2 -4
- package/src/plugins/builtin/cloud/verification-status-widget.tsx +2 -4
- package/src/plugins/builtin/cloud-tweets/footer.ts +2 -2
- package/src/plugins/builtin/cloud-tweets/index.ts +6 -0
- package/src/plugins/builtin/cloud-tweets/keyboard.ts +1 -32
- package/src/plugins/builtin/cloud-tweets/model.ts +1 -5
- package/src/plugins/builtin/cloud-tweets/pane.tsx +10 -43
- package/src/plugins/builtin/cloud-tweets/registration.ts +5 -8
- package/src/plugins/builtin/cloud-tweets/search-bar.tsx +5 -20
- package/src/plugins/builtin/cloud-tweets/table.tsx +16 -23
- package/src/plugins/builtin/composite-plugins.ts +77 -37
- package/src/plugins/builtin/congress-trades/detail.tsx +28 -81
- package/src/plugins/builtin/congress-trades/footer.ts +1 -1
- package/src/plugins/builtin/congress-trades/headless.ts +22 -45
- package/src/plugins/builtin/congress-trades/keyboard.ts +9 -78
- package/src/plugins/builtin/congress-trades/model.ts +4 -27
- package/src/plugins/builtin/congress-trades/pane.tsx +17 -38
- package/src/plugins/builtin/congress-trades/table.tsx +29 -34
- package/src/plugins/builtin/connections/pane.tsx +5 -12
- package/src/plugins/builtin/correlation/colors.ts +17 -7
- package/src/plugins/builtin/correlation/index.tsx +4 -6
- package/src/plugins/builtin/correlation/relationship/pane.tsx +6 -7
- package/src/plugins/builtin/correlation/relationship/view-model.ts +7 -18
- package/src/plugins/builtin/cot/client.ts +14 -18
- package/src/plugins/builtin/cot/index.tsx +3 -2
- package/src/plugins/builtin/cot/model.ts +13 -10
- package/src/plugins/builtin/cot/pane.tsx +70 -45
- package/src/plugins/builtin/credit-boards/cdx-pane.tsx +140 -0
- package/src/plugins/builtin/credit-boards/client.ts +108 -0
- package/src/plugins/builtin/credit-boards/headless.ts +73 -0
- package/src/plugins/builtin/credit-boards/index.tsx +62 -0
- package/src/plugins/builtin/credit-boards/model.ts +221 -0
- package/src/plugins/builtin/credit-boards/sovr-pane.tsx +144 -0
- package/src/plugins/builtin/credit-conditions/index.tsx +33 -33
- package/src/plugins/builtin/crypto-board/client.ts +11 -34
- package/src/plugins/builtin/crypto-board/index.tsx +1 -1
- package/src/plugins/builtin/crypto-board/model.ts +14 -16
- package/src/plugins/builtin/crypto-board/pane.tsx +24 -50
- package/src/plugins/builtin/custom-view/index.tsx +1 -1
- package/src/plugins/builtin/custom-view/pane.tsx +1 -1
- package/src/plugins/builtin/custom-view/view-spec.ts +9 -12
- package/src/plugins/builtin/debt-maturities/client.ts +15 -42
- package/src/plugins/builtin/debt-maturities/model.ts +96 -31
- package/src/plugins/builtin/debt-maturities/pane.tsx +196 -223
- package/src/plugins/builtin/debt-maturities/wall-bar.tsx +63 -0
- package/src/plugins/builtin/debug/index.tsx +17 -46
- package/src/plugins/builtin/dividend-yield/client.ts +13 -33
- package/src/plugins/builtin/dividend-yield/model.ts +10 -22
- package/src/plugins/builtin/dividend-yield/pane.tsx +97 -143
- package/src/plugins/builtin/dividend-yield/trailing-cash.ts +3 -3
- package/src/plugins/builtin/dividend-yield/view.ts +2 -2
- package/src/plugins/builtin/earnings/board-model.ts +197 -0
- package/src/plugins/builtin/earnings/board-table.ts +84 -0
- package/src/plugins/builtin/earnings/board.tsx +236 -0
- package/src/plugins/builtin/earnings/client.ts +97 -0
- package/src/plugins/builtin/earnings/format.ts +62 -0
- package/src/plugins/builtin/earnings/headless.ts +134 -138
- package/src/plugins/builtin/earnings/history-model.ts +174 -0
- package/src/plugins/builtin/earnings/history-table.ts +84 -0
- package/src/plugins/builtin/earnings/history.tsx +107 -0
- package/src/plugins/builtin/earnings/index.tsx +70 -270
- package/src/plugins/builtin/earnings/model.ts +0 -99
- package/src/plugins/builtin/earnings-calls/data.ts +0 -5
- package/src/plugins/builtin/earnings-calls/format.ts +2 -8
- package/src/plugins/builtin/earnings-calls/index.tsx +0 -1
- package/src/plugins/builtin/earnings-calls/pane.tsx +16 -63
- package/src/plugins/builtin/earnings-calls/transcript-view.tsx +18 -61
- package/src/plugins/builtin/econ/calendar-model.ts +34 -1
- package/src/plugins/builtin/econ/detail-view.tsx +124 -139
- package/src/plugins/builtin/econ/fred-series-map.ts +1 -5
- package/src/plugins/builtin/econ/index.tsx +51 -90
- package/src/plugins/builtin/econ-statistics/client.ts +5 -4
- package/src/plugins/builtin/econ-statistics/defs.ts +1 -1
- package/src/plugins/builtin/econ-statistics/detail.tsx +32 -104
- package/src/plugins/builtin/econ-statistics/headless.ts +28 -50
- package/src/plugins/builtin/econ-statistics/index.tsx +1 -1
- package/src/plugins/builtin/econ-statistics/pane.tsx +36 -152
- package/src/plugins/builtin/econ-statistics/stats.ts +0 -5
- package/src/plugins/builtin/econ-statistics/view.ts +2 -4
- package/src/plugins/builtin/equity-screener/client.ts +2 -2
- package/src/plugins/builtin/equity-screener/live.ts +7 -9
- package/src/plugins/builtin/equity-screener/model.ts +67 -9
- package/src/plugins/builtin/equity-screener/pane.tsx +39 -58
- package/src/plugins/builtin/equity-screener/results.ts +2 -4
- package/src/plugins/builtin/estimate-revisions/client.ts +20 -49
- package/src/plugins/builtin/estimate-revisions/pane.tsx +71 -104
- package/src/plugins/builtin/executives/data.ts +3 -8
- package/src/plugins/builtin/executives/format.ts +3 -17
- package/src/plugins/builtin/executives/pane.tsx +33 -186
- package/src/plugins/builtin/fear-greed/cache.ts +100 -0
- package/src/plugins/builtin/fear-greed/charts.tsx +258 -0
- package/src/plugins/builtin/fear-greed/data.ts +376 -0
- package/src/plugins/builtin/fear-greed/format.ts +87 -0
- package/src/plugins/builtin/fear-greed/headless.ts +85 -0
- package/src/plugins/builtin/fear-greed/index.tsx +89 -0
- package/src/plugins/builtin/fear-greed/pane.tsx +112 -0
- package/src/plugins/builtin/filing-events/feed.ts +4 -14
- package/src/plugins/builtin/filing-events/pane.tsx +7 -21
- package/src/plugins/builtin/futures/contracts.ts +55 -33
- package/src/plugins/builtin/futures/index.tsx +61 -47
- package/src/plugins/builtin/futures/model.ts +39 -17
- package/src/plugins/builtin/futures/returns.ts +132 -0
- package/src/plugins/builtin/futures/table.tsx +72 -63
- package/src/plugins/builtin/futures/use-front-returns.ts +119 -0
- package/src/plugins/builtin/futures-curve/client.ts +30 -15
- package/src/plugins/builtin/futures-curve/headless.ts +10 -4
- package/src/plugins/builtin/futures-curve/index.tsx +2 -1
- package/src/plugins/builtin/futures-curve/model.ts +133 -18
- package/src/plugins/builtin/futures-curve/pane.tsx +141 -45
- package/src/plugins/builtin/fx-matrix/index.tsx +9 -17
- package/src/plugins/builtin/help/functions-table.tsx +2 -19
- package/src/plugins/builtin/help/index.tsx +6 -26
- package/src/plugins/builtin/help/shortcut-model.ts +7 -1
- package/src/plugins/builtin/holders/headless.ts +2 -2
- package/src/plugins/builtin/holders/index.tsx +0 -1
- package/src/plugins/builtin/holders/pane.tsx +43 -83
- package/src/plugins/builtin/holders/table-model.ts +1 -15
- package/src/plugins/builtin/holders/thirteenf-match.ts +4 -3
- package/src/plugins/builtin/holders/types.ts +1 -1
- package/src/plugins/builtin/insider/index.tsx +0 -1
- package/src/plugins/builtin/ipo-calendar/client.ts +93 -0
- package/src/plugins/builtin/ipo-calendar/headless.ts +159 -0
- package/src/plugins/builtin/ipo-calendar/index.tsx +47 -0
- package/src/plugins/builtin/ipo-calendar/model.ts +341 -0
- package/src/plugins/builtin/ipo-calendar/pane.tsx +233 -0
- package/src/plugins/builtin/iv-history/index.tsx +0 -1
- package/src/plugins/builtin/iv-history/pane.tsx +7 -4
- package/src/plugins/builtin/iv-history/rank.ts +0 -7
- package/src/plugins/builtin/iv-history/screen-pane.tsx +7 -12
- package/src/plugins/builtin/jobs/headless.ts +58 -76
- package/src/plugins/builtin/jobs/index.tsx +0 -1
- package/src/plugins/builtin/jobs/model.ts +7 -15
- package/src/plugins/builtin/jobs/pane.tsx +190 -154
- package/src/plugins/builtin/jobs/share-bars.tsx +2 -2
- package/src/plugins/builtin/kelly-sizer/fields.ts +1 -1
- package/src/plugins/builtin/kelly-sizer/model.ts +1 -26
- package/src/plugins/builtin/kelly-sizer/pane.tsx +22 -67
- package/src/plugins/builtin/kelly-sizer/sections.tsx +1 -1
- package/src/plugins/builtin/kelly-sizer/state.ts +2 -2
- package/src/plugins/builtin/kelly-sizer/test-support.tsx +18 -27
- package/src/plugins/builtin/layout-manager/index.tsx +13 -50
- package/src/plugins/builtin/macro-resources.ts +15 -0
- package/src/plugins/builtin/market-halts/client.ts +114 -0
- package/src/plugins/builtin/market-halts/index.tsx +41 -0
- package/src/plugins/builtin/market-halts/model.ts +323 -0
- package/src/plugins/builtin/market-halts/pane.tsx +239 -0
- package/src/plugins/builtin/market-heatmap/data.ts +305 -0
- package/src/plugins/builtin/market-heatmap/index.tsx +447 -0
- package/src/plugins/builtin/market-movers/client.ts +30 -3
- package/src/plugins/builtin/market-movers/footer.ts +19 -0
- package/src/plugins/builtin/market-movers/headless.ts +71 -5
- package/src/plugins/builtin/market-movers/index.tsx +135 -101
- package/src/plugins/builtin/market-movers/model.ts +11 -17
- package/src/plugins/builtin/market-movers/screener.ts +2 -8
- package/src/plugins/builtin/market-movers/session-body.tsx +237 -0
- package/src/plugins/builtin/market-movers/session-table.ts +96 -0
- package/src/plugins/builtin/market-movers/session.ts +233 -0
- package/src/plugins/builtin/market-movers/table.ts +15 -15
- package/src/plugins/builtin/market-valuation/cache.ts +2 -39
- package/src/plugins/builtin/market-valuation/chart-projection.ts +11 -34
- package/src/plugins/builtin/market-valuation/client.ts +4 -5
- package/src/plugins/builtin/market-valuation/defs.ts +0 -9
- package/src/plugins/builtin/market-valuation/detail.tsx +32 -89
- package/src/plugins/builtin/market-valuation/headless.ts +31 -51
- package/src/plugins/builtin/market-valuation/index.tsx +11 -1
- package/src/plugins/builtin/market-valuation/pane.tsx +37 -179
- package/src/plugins/builtin/market-valuation/view.ts +6 -7
- package/src/plugins/builtin/market-valuation/zone-scale/index.tsx +2 -2
- package/src/plugins/builtin/mna/client.ts +143 -0
- package/src/plugins/builtin/mna/detail.tsx +297 -0
- package/src/plugins/builtin/mna/headless.ts +82 -0
- package/src/plugins/builtin/mna/index.tsx +55 -0
- package/src/plugins/builtin/mna/model.ts +208 -0
- package/src/plugins/builtin/mna/pane.tsx +432 -0
- package/src/plugins/builtin/money-markets/client.ts +5 -17
- package/src/plugins/builtin/money-markets/model.ts +20 -0
- package/src/plugins/builtin/money-markets/pane.tsx +79 -46
- package/src/plugins/builtin/news/index.tsx +13 -14
- package/src/plugins/builtin/news/wire/categories.ts +35 -12
- package/src/plugins/builtin/news/wire/feed-config.ts +4 -13
- package/src/plugins/builtin/news/wire/index.tsx +43 -27
- package/src/plugins/builtin/news/wire/industry-pane.tsx +110 -105
- package/src/plugins/builtin/news/wire/news/detail-view.tsx +8 -25
- package/src/plugins/builtin/news/wire/news/footer.ts +2 -2
- package/src/plugins/builtin/news/wire/news/preset-pane.tsx +111 -61
- package/src/plugins/builtin/news/wire/news/query-presets.ts +66 -1
- package/src/plugins/builtin/news/wire/news/table.tsx +19 -62
- package/src/plugins/builtin/news/wire/read-state.ts +3 -17
- package/src/plugins/builtin/news/wire/rss/cli.ts +47 -0
- package/src/plugins/builtin/news/wire/rss/parser.ts +0 -4
- package/src/plugins/builtin/news/wire/rss/source.ts +2 -2
- package/src/plugins/builtin/notes/cli.ts +95 -0
- package/src/plugins/builtin/notes/files.ts +145 -88
- package/src/plugins/builtin/notes/index.tsx +4 -2
- package/src/plugins/builtin/notes/migration.ts +3 -1
- package/src/plugins/builtin/notes/quick-notes-pane.tsx +24 -40
- package/src/plugins/builtin/notes/ticker-notes-tab.tsx +4 -1
- package/src/plugins/builtin/options/analytics.ts +5 -7
- package/src/plugins/builtin/options/calc-seed.ts +2 -1
- package/src/plugins/builtin/options/enrichment-client.ts +10 -19
- package/src/plugins/builtin/options/enrichment-model.ts +1 -2
- package/src/plugins/builtin/options/footer.ts +2 -2
- package/src/plugins/builtin/options/index.tsx +1 -1
- package/src/plugins/builtin/options/live-quotes.ts +1 -4
- package/src/plugins/builtin/options/table.ts +15 -15
- package/src/plugins/builtin/options/types.ts +1 -1
- package/src/plugins/builtin/options/view.tsx +31 -9
- package/src/plugins/builtin/options-calculator/binomial.ts +17 -16
- package/src/plugins/builtin/options-calculator/evidence.ts +90 -24
- package/src/plugins/builtin/options-calculator/headless.ts +2 -1
- package/src/plugins/builtin/options-calculator/model.ts +2 -207
- package/src/plugins/builtin/options-calculator/pane.tsx +11 -39
- package/src/plugins/builtin/options-calculator/surface.ts +11 -21
- package/src/plugins/builtin/options-scenario/client.ts +9 -20
- package/src/plugins/builtin/options-scenario/evidence.ts +64 -8
- package/src/plugins/builtin/options-scenario/live.ts +2 -2
- package/src/plugins/builtin/options-scenario/model.ts +18 -28
- package/src/plugins/builtin/options-scenario/pane.tsx +18 -19
- package/src/plugins/builtin/plugin-marketplace/activation.ts +70 -0
- package/src/plugins/builtin/plugin-marketplace/feed.ts +12 -0
- package/src/plugins/builtin/plugin-marketplace/index.tsx +16 -4
- package/src/plugins/builtin/plugin-marketplace/model.ts +67 -9
- package/src/plugins/builtin/plugin-marketplace/pane.tsx +67 -101
- package/src/plugins/builtin/plugin-marketplace/store.ts +19 -1
- package/src/plugins/builtin/plugin-module.ts +4 -11
- package/src/plugins/builtin/portfolio-list/account-metrics.ts +17 -15
- package/src/plugins/builtin/portfolio-list/cli/render.ts +3 -4
- package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +2 -1
- package/src/plugins/builtin/portfolio-list/column-values.ts +23 -34
- package/src/plugins/builtin/portfolio-list/index.tsx +1 -1
- package/src/plugins/builtin/portfolio-list/pane/index.tsx +19 -38
- package/src/plugins/builtin/portfolio-list/position-metrics.ts +0 -8
- package/src/plugins/builtin/portfolio-list/summary/index.tsx +20 -16
- package/src/plugins/builtin/rate-path/client.ts +7 -16
- package/src/plugins/builtin/rate-path/headless.ts +13 -9
- package/src/plugins/builtin/rate-path/model.ts +74 -17
- package/src/plugins/builtin/rate-path/pane.tsx +128 -63
- package/src/plugins/builtin/realized-vol/client.ts +13 -23
- package/src/plugins/builtin/realized-vol/evidence.ts +43 -20
- package/src/plugins/builtin/realized-vol/pane.tsx +13 -19
- package/src/plugins/builtin/relative-rotation/client.ts +9 -35
- package/src/plugins/builtin/relative-rotation/pane.tsx +46 -65
- package/src/plugins/builtin/research/analyst-model.ts +35 -32
- package/src/plugins/builtin/research/analyst-pane.tsx +124 -128
- package/src/plugins/builtin/research/corporate-actions-pane.tsx +23 -70
- package/src/plugins/builtin/research/equity-diagnostic-pane.tsx +7 -11
- package/src/plugins/builtin/research/event-sources.ts +64 -0
- package/src/plugins/builtin/research/events-headless.ts +7 -32
- package/src/plugins/builtin/research/headless.ts +11 -51
- package/src/plugins/builtin/research/index.tsx +0 -3
- package/src/plugins/builtin/research/relative-valuation-model.ts +0 -1
- package/src/plugins/builtin/research/relative-valuation-pane.tsx +50 -86
- package/src/plugins/builtin/research-search/data.ts +0 -4
- package/src/plugins/builtin/research-search/document-view.tsx +3 -9
- package/src/plugins/builtin/research-search/index.tsx +1 -0
- package/src/plugins/builtin/research-search/model.ts +4 -20
- package/src/plugins/builtin/research-search/pane.tsx +44 -131
- package/src/plugins/builtin/research-search/saved-view.tsx +10 -13
- package/src/plugins/builtin/revenue-breakdown/bars.tsx +113 -0
- package/src/plugins/builtin/revenue-breakdown/client.ts +114 -0
- package/src/plugins/builtin/revenue-breakdown/headless.ts +72 -0
- package/src/plugins/builtin/revenue-breakdown/index.tsx +58 -0
- package/src/plugins/builtin/revenue-breakdown/model.ts +157 -0
- package/src/plugins/builtin/revenue-breakdown/pane.tsx +290 -0
- package/src/plugins/builtin/risk-factors/data.ts +3 -8
- package/src/plugins/builtin/risk-factors/index.tsx +0 -1
- package/src/plugins/builtin/risk-factors/pane.tsx +29 -107
- package/src/plugins/builtin/scanner/denied.tsx +4 -16
- package/src/plugins/builtin/scanner/feed.ts +2 -2
- package/src/plugins/builtin/scanner/flow-pane.tsx +11 -18
- package/src/plugins/builtin/scanner/hilo-bars.tsx +31 -16
- package/src/plugins/builtin/scanner/hilo-model.ts +33 -0
- package/src/plugins/builtin/scanner/hilo-pane.tsx +8 -11
- package/src/plugins/builtin/scanner/index.ts +2 -3
- package/src/plugins/builtin/sec/filing-display.tsx +2 -6
- package/src/plugins/builtin/sec/index.tsx +2 -1
- package/src/plugins/builtin/sec/model.ts +8 -4
- package/src/plugins/builtin/sectors/index.tsx +19 -40
- package/src/plugins/builtin/sectors/move-bar.tsx +2 -2
- package/src/plugins/builtin/sectors/sector-model.ts +0 -5
- package/src/plugins/builtin/shared/cloud-resource.ts +56 -0
- package/src/plugins/builtin/shared/cloud-upgrade.ts +46 -11
- package/src/plugins/builtin/shared/filing-year-reader.tsx +123 -0
- package/src/plugins/builtin/shared/locked-rows.tsx +56 -0
- package/src/plugins/builtin/shared/pane-request.ts +35 -0
- package/src/plugins/builtin/shared/research-cloud-session.ts +1 -1
- package/src/plugins/builtin/shared/series-detail-chart.tsx +168 -0
- package/src/plugins/builtin/shared/series-list-detail.tsx +208 -0
- package/src/plugins/builtin/shared/stat-transform.ts +94 -0
- package/src/plugins/builtin/shared/ticker-request.ts +0 -6
- package/src/plugins/builtin/shared/trend.ts +81 -0
- package/src/plugins/builtin/shared/use-quote-board.ts +130 -4
- package/src/plugins/builtin/shared/volatility/index.ts +2 -1
- package/src/plugins/builtin/shared/volatility/options.ts +3 -3
- package/src/plugins/builtin/shared/volatility/pricing.ts +211 -0
- package/src/plugins/builtin/short-interest/client.ts +3 -12
- package/src/plugins/builtin/short-interest/index.tsx +0 -1
- package/src/plugins/builtin/short-interest/model.ts +51 -18
- package/src/plugins/builtin/short-interest/pane.tsx +64 -108
- package/src/plugins/builtin/short-interest/surface.tsx +9 -9
- package/src/plugins/builtin/short-interest/types.ts +0 -2
- package/src/plugins/builtin/short-volume/client.ts +8 -17
- package/src/plugins/builtin/short-volume/pane.tsx +28 -29
- package/src/plugins/builtin/social-mentions/client.ts +85 -0
- package/src/plugins/builtin/social-mentions/headless.ts +28 -0
- package/src/plugins/builtin/social-mentions/index.tsx +21 -0
- package/src/plugins/builtin/social-mentions/model.ts +92 -0
- package/src/plugins/builtin/social-mentions/pane.tsx +156 -0
- package/src/plugins/builtin/thirteenf/api.ts +13 -23
- package/src/plugins/builtin/thirteenf/data.ts +6 -8
- package/src/plugins/builtin/thirteenf/format.ts +3 -10
- package/src/plugins/builtin/thirteenf/headless.ts +9 -8
- package/src/plugins/builtin/thirteenf/index.tsx +0 -1
- package/src/plugins/builtin/thirteenf/model.ts +0 -31
- package/src/plugins/builtin/thirteenf/overlap-pane.tsx +12 -16
- package/src/plugins/builtin/thirteenf/pane.tsx +65 -255
- package/src/plugins/builtin/thirteenf/signals-pane.tsx +23 -44
- package/src/plugins/builtin/thirteenf/table.ts +58 -73
- package/src/plugins/builtin/thirteenf/types.ts +1 -1
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.tsx +25 -17
- package/src/plugins/builtin/ticker-detail/financials/aggregation.ts +3 -7
- package/src/plugins/builtin/ticker-detail/financials/model.ts +121 -25
- package/src/plugins/builtin/ticker-detail/financials/period-end-history.ts +41 -0
- package/src/plugins/builtin/ticker-detail/financials/ratio-table.tsx +175 -0
- package/src/plugins/builtin/ticker-detail/financials/ratios.ts +669 -0
- package/src/plugins/builtin/ticker-detail/financials/tab.tsx +198 -111
- package/src/plugins/builtin/ticker-detail/headless-schema.ts +7 -2
- package/src/plugins/builtin/ticker-detail/headless.ts +86 -9
- package/src/plugins/builtin/ticker-detail/index.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/overview/components.tsx +96 -17
- package/src/plugins/builtin/ticker-detail/overview/model.ts +108 -2
- package/src/plugins/builtin/ticker-detail/overview/pane.tsx +12 -0
- package/src/plugins/builtin/ticker-detail/overview/types.ts +21 -0
- package/src/plugins/builtin/ticker-detail/overview-tab.tsx +29 -39
- package/src/plugins/builtin/ticker-detail/pane.tsx +60 -21
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.tsx +3 -1
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.tsx +1 -1
- package/src/plugins/builtin/ticker-detail/research-tab-navigation.tsx +14 -0
- package/src/plugins/builtin/time-sales/client.ts +5 -5
- package/src/plugins/builtin/time-sales/model.ts +52 -0
- package/src/plugins/builtin/time-sales/pane.tsx +24 -19
- package/src/plugins/builtin/treasury-auctions/index.tsx +0 -1
- package/src/plugins/builtin/treasury-auctions/model.ts +3 -10
- package/src/plugins/builtin/treasury-auctions/pane.tsx +42 -101
- package/src/plugins/builtin/treasury-auctions/types.ts +0 -2
- package/src/plugins/builtin/vol-surface/client.ts +8 -22
- package/src/plugins/builtin/vol-surface/evidence.ts +45 -17
- package/src/plugins/builtin/vol-surface/model.ts +5 -8
- package/src/plugins/builtin/vol-surface/pane.tsx +24 -23
- package/src/plugins/builtin/vol-surface/raster.ts +1 -9
- package/src/plugins/builtin/vol-surface/stored.ts +3 -4
- package/src/plugins/builtin/vol-surface/surface.tsx +4 -3
- package/src/plugins/builtin/volatility/chart-model.ts +36 -0
- package/src/plugins/builtin/volatility/charts.tsx +3 -20
- package/src/plugins/builtin/volatility/client.ts +8 -16
- package/src/plugins/builtin/volatility/evidence.ts +37 -21
- package/src/plugins/builtin/volatility/index.tsx +0 -2
- package/src/plugins/builtin/volatility/model.ts +55 -0
- package/src/plugins/builtin/volatility/pane.tsx +71 -37
- package/src/plugins/builtin/world-indices/client.ts +1 -4
- package/src/plugins/builtin/world-indices/footer.ts +3 -26
- package/src/plugins/builtin/world-indices/index.tsx +8 -9
- package/src/plugins/builtin/world-indices/model.ts +0 -14
- package/src/plugins/builtin/world-indices/table.tsx +15 -73
- package/src/plugins/builtin/world-venue-map/map.tsx +2 -2
- package/src/plugins/builtin/world-venue-map/model.ts +1 -4
- package/src/plugins/builtin/world-venue-map/pane.tsx +21 -87
- package/src/plugins/builtin/yahoo/index.ts +4 -38
- package/src/plugins/builtin/yield-curve/chart.ts +100 -1
- package/src/plugins/builtin/yield-curve/headless.ts +2 -0
- package/src/plugins/builtin/yield-curve/history.ts +86 -12
- package/src/plugins/builtin/yield-curve/index.tsx +102 -27
- package/src/plugins/builtin/yield-curve/treasury-data.ts +12 -12
- package/src/plugins/bundle.ts +41 -41
- package/src/plugins/catalog-backend.ts +4 -1
- package/src/plugins/catalog-browser.ts +34 -53
- package/src/plugins/catalog-manifest.ts +10 -0
- package/src/plugins/catalog-ui.ts +9 -5
- package/src/plugins/compat.ts +216 -0
- package/src/plugins/current-target.ts +3 -9
- package/src/plugins/dependencies.ts +56 -0
- package/src/plugins/event-bus.ts +8 -3
- package/src/plugins/external-runtime.ts +0 -21
- package/src/plugins/host-link.ts +101 -49
- package/src/plugins/host-modules.ts +117 -3
- package/src/plugins/host-resolver.ts +1 -6
- package/src/plugins/installer.ts +570 -0
- package/src/plugins/loader.ts +131 -16
- package/src/plugins/manager-node.ts +28 -28
- package/src/plugins/ownership.ts +11 -12
- package/src/plugins/pane-manager/gridlock.ts +25 -8
- package/src/plugins/pane-manager.ts +1 -0
- package/src/plugins/plugin-export.ts +24 -0
- package/src/plugins/registry/contributions.ts +10 -4
- package/src/plugins/registry/index.ts +13 -12
- package/src/plugins/registry/pane-settings.ts +6 -3
- package/src/plugins/registry/shared.ts +0 -4
- package/src/plugins/registry/slots.ts +10 -13
- package/src/plugins/runtime/context.tsx +12 -34
- package/src/plugins/runtime/index.tsx +9 -9
- package/src/plugins/seed.ts +3 -7
- package/src/plugins/web-bundled.ts +3 -12
- package/src/public/__snapshots__/public-api.test.ts.snap +519 -0
- package/src/public/broker.ts +14 -9
- package/src/public/index.ts +3 -0
- package/src/public/market-data.ts +19 -2
- package/src/public/quotes.ts +4 -4
- package/src/public/react.ts +11 -6
- package/src/public/test-support.ts +10 -2
- package/src/public/time-series.ts +30 -3
- package/src/public/utils.ts +3 -4
- package/src/react/assign-ref.ts +10 -0
- package/src/react/async-resource.ts +16 -5
- package/src/react/auto-refresh.ts +97 -0
- package/src/react/plugins/plugin-slot.tsx +4 -1
- package/src/react/read-state.ts +104 -0
- package/src/react/ticker-source.ts +32 -0
- package/src/remote/controller-utils.ts +0 -4
- package/src/remote/controller.ts +18 -14
- package/src/remote/layout-helpers.ts +4 -9
- package/src/remote/resources.ts +34 -0
- package/src/remote/revision.ts +2 -15
- package/src/remote/schema.ts +1 -0
- package/src/renderers/browser/app-services.ts +1 -1
- package/src/renderers/browser/bundled-plugins.ts +8 -7
- package/src/renderers/browser/cloud-transport.ts +3 -11
- package/src/renderers/browser/config-host.ts +13 -8
- package/src/renderers/browser/http-proxy-transport.ts +17 -45
- package/src/renderers/browser/main.tsx +52 -25
- package/src/renderers/cloudflare/http-proxy.ts +14 -54
- package/src/renderers/cloudflare/worker.ts +25 -6
- package/src/renderers/electrobun/bun/application-menu/click.ts +8 -20
- package/src/renderers/electrobun/bun/application-menu/index.ts +3 -4
- package/src/renderers/electrobun/bun/context-menu/click.ts +7 -26
- package/src/renderers/electrobun/bun/context-menu/normalize.ts +4 -9
- package/src/renderers/electrobun/bun/core-capabilities.ts +16 -64
- package/src/renderers/electrobun/bun/desktop/detached-windows.ts +6 -35
- package/src/renderers/electrobun/bun/desktop/host-requests.ts +0 -9
- package/src/renderers/electrobun/bun/desktop/http-fetch.ts +15 -63
- package/src/renderers/electrobun/bun/desktop/http-stream.ts +6 -19
- package/src/renderers/electrobun/bun/desktop/initialization.ts +9 -0
- package/src/renderers/electrobun/bun/desktop/macos-dock-icon.ts +91 -0
- package/src/renderers/electrobun/bun/desktop/plugin-state.ts +0 -7
- package/src/renderers/electrobun/bun/external-plugins.ts +35 -95
- package/src/renderers/electrobun/bun/index.ts +57 -45
- package/src/renderers/electrobun/bun/menu-event.ts +17 -0
- package/src/renderers/electrobun/bun/window/controls.ts +69 -0
- package/src/renderers/electrobun/bun/window/create.ts +84 -0
- package/src/renderers/electrobun/bun/window/events.ts +49 -0
- package/src/renderers/electrobun/bun/window/windows-custom-chrome.ts +43 -0
- package/src/renderers/electrobun/bun/window/windows-icons.ts +55 -0
- package/src/renderers/electrobun/bun/window/windows-native.ts +96 -0
- package/src/renderers/electrobun/shared/protocol.ts +35 -48
- package/src/renderers/electrobun/shared/quote-event-batch.ts +3 -3
- package/src/renderers/electrobun/view/app-services.ts +1 -1
- package/src/renderers/electrobun/view/backend-rpc.ts +74 -141
- package/src/renderers/electrobun/view/broker-remote-client.ts +32 -46
- package/src/renderers/electrobun/view/build-assets.ts +61 -49
- package/src/renderers/electrobun/view/capability-stream-client.ts +5 -25
- package/src/renderers/electrobun/view/capability-subscription.ts +50 -0
- package/src/renderers/electrobun/view/cli-pane-shot-entry.tsx +35 -93
- package/src/renderers/electrobun/view/context-menu.ts +6 -7
- package/src/renderers/electrobun/view/data-table/dom.ts +1 -2
- package/src/renderers/electrobun/view/data-table/index.tsx +17 -35
- package/src/renderers/electrobun/view/data-table/row.tsx +6 -2
- package/src/renderers/electrobun/view/desktop/controls.tsx +1 -1
- package/src/renderers/electrobun/view/desktop/popover.tsx +23 -0
- package/src/renderers/electrobun/view/desktop/window/bridge.ts +4 -4
- package/src/renderers/electrobun/view/dialog-host.tsx +21 -58
- package/src/renderers/electrobun/view/dom-host-providers.tsx +64 -0
- package/src/renderers/electrobun/view/dom-ui-host.tsx +5 -21
- package/src/renderers/electrobun/view/external-plugins.ts +17 -5
- package/src/renderers/electrobun/view/fatal-screen.tsx +1 -42
- package/src/renderers/electrobun/view/host/ascii-text.ts +6 -29
- package/src/renderers/electrobun/view/host/block-glyph-canvas.tsx +1 -1
- package/src/renderers/electrobun/view/host/focus-scope.ts +1 -1
- package/src/renderers/electrobun/view/host/input.tsx +95 -163
- package/src/renderers/electrobun/view/host/mouse.ts +1 -1
- package/src/renderers/electrobun/view/host/native.ts +2 -2
- package/src/renderers/electrobun/view/host/scroll-box.tsx +1 -1
- package/src/renderers/electrobun/view/host/style.ts +1 -1
- package/src/renderers/electrobun/view/host/surface-3d.tsx +2 -2
- package/src/renderers/electrobun/view/host/tabs.tsx +1 -1
- package/src/renderers/electrobun/view/host/text.tsx +1 -1
- package/src/renderers/electrobun/view/http-fetch.ts +13 -64
- package/src/renderers/electrobun/view/input-host.tsx +20 -35
- package/src/renderers/electrobun/view/key-event.ts +7 -5
- package/src/renderers/electrobun/view/main.tsx +76 -34
- package/src/renderers/electrobun/view/native-renderer.ts +6 -1
- package/src/renderers/electrobun/view/native-stubs/backend-rpc.ts +3 -58
- package/src/renderers/electrobun/view/remote/asset-data-client.ts +3 -6
- package/src/renderers/electrobun/view/remote/backend-quote-subscription.ts +34 -38
- package/src/renderers/electrobun/view/remote/connection-health.ts +14 -32
- package/src/renderers/electrobun/view/remote/persistence.ts +32 -63
- package/src/renderers/electrobun/view/remote/quote-subscription-registry.ts +2 -5
- package/src/renderers/electrobun/view/rpc-codec.ts +18 -20
- package/src/renderers/electrobun/view/screenshot-watermark.ts +1 -1
- package/src/renderers/electrobun/view/test-utils.tsx +4 -11
- package/src/renderers/electrobun/view/toast-host.tsx +29 -87
- package/src/renderers/electrobun/view/ui-host.tsx +8 -1
- package/src/renderers/electrobun/view/update-host.ts +2 -2
- package/src/renderers/opentui/chart-surface.tsx +11 -124
- package/src/renderers/opentui/dialog-host.tsx +45 -130
- package/src/renderers/opentui/host.tsx +3 -2
- package/src/renderers/opentui/image/surface.tsx +15 -174
- package/src/renderers/opentui/kitty-services.ts +15 -0
- package/src/renderers/opentui/native-surface.ts +176 -0
- package/src/renderers/opentui/start.tsx +57 -42
- package/src/renderers/opentui/test-utils.tsx +4 -20
- package/src/renderers/opentui/toast-host.tsx +7 -95
- package/src/renderers/opentui/ui-host.tsx +87 -2
- package/src/renderers/share/chart.ts +1 -1
- package/src/renderers/share/layout-view.tsx +2 -2
- package/src/shares/api.ts +0 -5
- package/src/shares/payload.ts +13 -16
- package/src/sources/gloomberb-cloud/index.ts +14 -15
- package/src/sources/gloomberb-cloud/news.ts +8 -4
- package/src/sources/gloomberb-cloud/normalizers.ts +49 -76
- package/src/sources/history-coverage.ts +25 -84
- package/src/sources/history-result.ts +2 -0
- package/src/sources/history-retention.ts +9 -11
- package/src/sources/provider-router/batches.ts +0 -4
- package/src/sources/provider-router/brokers.ts +2 -13
- package/src/sources/provider-router/cache.ts +38 -159
- package/src/sources/provider-router/cached-routes.ts +26 -1
- package/src/sources/provider-router/financial-routes.ts +3 -10
- package/src/sources/provider-router/financials.ts +4 -3
- package/src/sources/provider-router/history.ts +20 -70
- package/src/sources/provider-router/index.ts +8 -2
- package/src/sources/provider-router/news.ts +2 -1
- package/src/sources/provider-router/primary.ts +0 -8
- package/src/sources/provider-router/quote-route.ts +2 -2
- package/src/sources/provider-router/realtime-access.ts +10 -29
- package/src/sources/provider-router/search.ts +3 -12
- package/src/sources/provider-router/test-support.ts +0 -89
- package/src/sources/sec-edgar/acceptance-time.ts +11 -0
- package/src/sources/sec-edgar/fourth-quarter.ts +179 -0
- package/src/sources/sec-edgar.ts +47 -228
- package/src/sources/yahoo-finance/financials.ts +35 -13
- package/src/sources/yahoo-finance/history.ts +22 -58
- package/src/sources/yahoo-finance/http.ts +17 -25
- package/src/sources/yahoo-finance/mappers.ts +0 -23
- package/src/sources/yahoo-finance/options.ts +36 -44
- package/src/sources/yahoo-finance/quote-summary.ts +90 -141
- package/src/sources/yahoo-finance/requests.ts +22 -12
- package/src/sources/yahoo-finance/snapshots.ts +4 -6
- package/src/sources/yahoo-finance/symbols.ts +25 -0
- package/src/sources/yahoo-finance/yahoo-chart-interval.ts +1 -1
- package/src/sources/yahoo-finance.ts +80 -188
- package/src/state/app/bootstrap.ts +5 -5
- package/src/state/app/context/index.tsx +10 -13
- package/src/state/hooks/live-streaming.ts +60 -0
- package/src/state/hooks/quote-streaming.ts +16 -57
- package/src/state/hooks/session-snapshot.ts +0 -1
- package/src/state/pane-scroll-registry.tsx +9 -0
- package/src/sync/controller.ts +3 -1
- package/src/sync/core-contributors.ts +69 -37
- package/src/sync/profile-analytics.ts +5 -2
- package/src/telemetry/crash-reports-dom.ts +74 -0
- package/src/telemetry/crash-reports-node.ts +170 -0
- package/src/telemetry/crash-reports.ts +353 -0
- package/src/telemetry/live-config.ts +19 -0
- package/src/telemetry/usage-counts-dom.ts +22 -0
- package/src/telemetry/usage-counts.ts +391 -0
- package/src/test-support/app-store.ts +21 -0
- package/src/test-support/broker.ts +80 -0
- package/src/test-support/cli-context.ts +28 -0
- package/src/test-support/cloud-api.ts +85 -0
- package/src/test-support/console.ts +40 -0
- package/src/test-support/data-provider.ts +30 -0
- package/src/test-support/headless.ts +32 -0
- package/src/test-support/network-guard.ts +35 -0
- package/src/test-support/news.ts +21 -0
- package/src/test-support/pane.tsx +42 -22
- package/src/test-support/quote-store.ts +49 -0
- package/src/test-support/renderer-host.ts +10 -0
- package/src/test-support/rpc-loopback.ts +22 -0
- package/src/test-support/temp-db.ts +19 -0
- package/src/test-support/ticker.ts +15 -0
- package/src/test-support/time-series.ts +27 -0
- package/src/theme/app-icon.ts +127 -0
- package/src/theme/color-utils.ts +2 -1
- package/src/theme/themes.ts +3 -1
- package/src/time-series/alignment.ts +4 -7
- package/src/time-series/chart-data.ts +2 -3
- package/src/time-series/forward-valuation.ts +6 -9
- package/src/time-series/fundamentals.ts +34 -96
- package/src/time-series/live-bars.ts +12 -15
- package/src/time-series/live-quotes.ts +4 -26
- package/src/time-series/market.ts +6 -9
- package/src/time-series/parsed-history-cache.ts +0 -4
- package/src/time-series/resolution.ts +35 -1
- package/src/time-series/resolve.ts +28 -20
- package/src/time-series/session-history.ts +4 -23
- package/src/time-series/spec.ts +11 -16
- package/src/time-series/studies.ts +26 -15
- package/src/time-series/transforms.ts +6 -9
- package/src/time-series/types.ts +6 -3
- package/src/types/broker.ts +10 -0
- package/src/types/config.ts +24 -2
- package/src/types/data-provider.ts +13 -1
- package/src/types/desktop-menu.ts +3 -1
- package/src/types/financials.ts +102 -20
- package/src/types/instrument.ts +2 -1
- package/src/types/plugin.ts +30 -0
- package/src/types/price-history.ts +2 -0
- package/src/types/trading.ts +21 -2
- package/src/ui/dialog-stack.ts +80 -0
- package/src/ui/dialog.tsx +33 -2
- package/src/ui/host.tsx +17 -0
- package/src/ui/index.tsx +3 -10
- package/src/ui/toast.tsx +95 -0
- package/src/updater/index.ts +472 -0
- package/src/utils/async-deadline.ts +34 -0
- package/src/utils/calendar-date.ts +20 -0
- package/src/utils/csv.ts +19 -2
- package/src/utils/datetime-format.ts +103 -6
- package/src/utils/double-escape-close.ts +1 -23
- package/src/utils/errors.ts +4 -0
- package/src/utils/exchanges.ts +10 -0
- package/src/utils/financial-statements.ts +6 -25
- package/src/utils/format.ts +6 -17
- package/src/utils/futures-generic.ts +159 -0
- package/src/utils/guards.ts +37 -0
- package/src/utils/hash.ts +17 -2
- package/src/utils/http-proxy-response.ts +122 -4
- package/src/utils/math.ts +12 -0
- package/src/utils/platform.ts +34 -0
- package/src/utils/plugin-proxy-hosts.json +1 -2
- package/src/utils/plugin-proxy-hosts.ts +3 -0
- package/src/utils/price-history-integrity.ts +5 -8
- package/src/utils/price-history.ts +36 -11
- package/src/utils/sec.ts +3 -8
- package/src/utils/semver.ts +15 -0
- package/src/utils/shortcut-labels.ts +4 -29
- package/src/utils/sort-values.ts +28 -0
- package/src/utils/statement-gaps.ts +94 -0
- package/src/utils/zoned-date-time.ts +12 -0
- package/src/api-client/askg.test.ts +0 -256
- package/src/api-client/errors.test.ts +0 -11
- package/src/api-client/index.test.ts +0 -1591
- package/src/api-client/paths.test.ts +0 -32
- package/src/api-client/request.test.ts +0 -153
- package/src/api-client/research-activity.test.ts +0 -316
- package/src/api-client/session-request-lifetime.test.ts +0 -184
- package/src/api-client/socket-health.test.ts +0 -86
- package/src/api-client/socket-lifetime.test.ts +0 -76
- package/src/api-client/socket-protocol.test.ts +0 -90
- package/src/api-client/tape-socket.test.ts +0 -44
- package/src/api-client/teams.test.ts +0 -270
- package/src/app/app-bootstrap-state.test.ts +0 -157
- package/src/app/global-shortcuts.test.tsx +0 -468
- package/src/app/keybindings/chord.test.ts +0 -131
- package/src/app/keybindings/resolve.test.ts +0 -103
- package/src/app/language-observer.test.tsx +0 -82
- package/src/app/pane-runtime/layout-placement.test.ts +0 -27
- package/src/app/pane-runtime/plugin-bindings.test.ts +0 -117
- package/src/app/pane-runtime/ticker-navigation-runtime.test.ts +0 -144
- package/src/app/pane-runtime/ticker-open-runtime.test.tsx +0 -170
- package/src/app/pane-template-dialog-wizard.test.tsx +0 -36
- package/src/app/runtime/broker-import.test.tsx +0 -89
- package/src/app/runtime/desktop-deeplink.test.ts +0 -169
- package/src/app/runtime/layout-warmup.test.ts +0 -73
- package/src/app/runtime/ticker-refresh.test.tsx +0 -115
- package/src/architecture/browser-entry-graph.test.ts +0 -97
- package/src/architecture/import-boundaries.test.ts +0 -136
- package/src/assets/gloomberb-logo.ico +0 -0
- package/src/assets/gloomberb-logo.png +0 -0
- package/src/brokers/bond-price-basis.test.ts +0 -35
- package/src/brokers/legacy-contract.test.ts +0 -51
- package/src/brokers/profile-form.test.ts +0 -71
- package/src/brokers/sync-broker-instance.test.ts +0 -599
- package/src/brokers/test-broker.ts +0 -68
- package/src/capabilities/registry.test.ts +0 -297
- package/src/cli/base-converter.test.ts +0 -16
- package/src/cli/commands/automation.ts +0 -98
- package/src/cli/commands/futures-price-precision.test.tsx +0 -65
- package/src/cli/commands/keybindings.test.ts +0 -48
- package/src/cli/commands/market-fx.test.ts +0 -77
- package/src/cli/commands/market-options.test.ts +0 -44
- package/src/cli/commands/plugins.test.ts +0 -29
- package/src/cli/commands/quote-price-basis.test.ts +0 -88
- package/src/cli/commands/ticker-financial-units.test.ts +0 -78
- package/src/cli/commands/ticker-period.test.ts +0 -62
- package/src/cli/context.test.ts +0 -63
- package/src/cli/entry.test.ts +0 -58
- package/src/cli/history-rows.test.ts +0 -47
- package/src/cli/options.test.ts +0 -45
- package/src/cli/pane-functions/cloud-session.test.ts +0 -77
- package/src/cli/pane-functions/data.test.ts +0 -17
- package/src/cli/pane-functions/discovery.test.ts +0 -36
- package/src/cli/pane-functions/dom.test.ts +0 -69
- package/src/cli/pane-functions/headless.test.ts +0 -314
- package/src/cli/pane-functions/index.test.ts +0 -266
- package/src/cli/pane-functions/intraday-shot.test.ts +0 -399
- package/src/cli/pane-functions/report.test.ts +0 -107
- package/src/cli/pane-functions/screenshot.test.ts +0 -927
- package/src/cli/registry.test.ts +0 -256
- package/src/cli/result.test.ts +0 -133
- package/src/cli/ticker-resolution.test.ts +0 -39
- package/src/cli/visible-key-values.test.ts +0 -23
- package/src/cli.test.ts +0 -437
- package/src/components/chart/composite/axis-overlays.test.tsx +0 -80
- package/src/components/chart/composite/composite-chart.test.tsx +0 -2019
- package/src/components/chart/composite/downsample.test.ts +0 -136
- package/src/components/chart/composite/format.test.ts +0 -258
- package/src/components/chart/composite/fx-precision.test.ts +0 -111
- package/src/components/chart/composite/interactions.test.ts +0 -231
- package/src/components/chart/composite/panel-series.test.ts +0 -66
- package/src/components/chart/composite/price-axis-labels.test.ts +0 -50
- package/src/components/chart/composite/price-series.test.ts +0 -39
- package/src/components/chart/composite/renderers.test.ts +0 -823
- package/src/components/chart/composite/scene-market-cursor.test.ts +0 -148
- package/src/components/chart/composite/scene.test.ts +0 -845
- package/src/components/chart/composite/scroll-surface.test.tsx +0 -153
- package/src/components/chart/composite/time-axis.test.ts +0 -281
- package/src/components/chart/composite/time-scale.test.ts +0 -88
- package/src/components/chart/composite/tools.test.ts +0 -371
- package/src/components/chart/curve/curve-surface.test.tsx +0 -53
- package/src/components/chart/curve/model.test.ts +0 -115
- package/src/components/chart/native/bitmap-support.test.ts +0 -27
- package/src/components/chart/native/kitty/index.test.ts +0 -537
- package/src/components/chart/static/chart-surface.test.tsx +0 -159
- package/src/components/chart/static/multi-line-chart-surface.tsx +0 -105
- package/src/components/chart/static/scatter-chart-surface.test.ts +0 -30
- package/src/components/chart/static/trail-chart-model.test.ts +0 -36
- package/src/components/chart/surface3d/model.test.ts +0 -117
- package/src/components/chart/surface3d/software.test.ts +0 -32
- package/src/components/command-bar/assist/inventory.test.ts +0 -93
- package/src/components/command-bar/assist/model.test.ts +0 -185
- package/src/components/command-bar/helpers.test.ts +0 -162
- package/src/components/command-bar/layout-items/current-layout.test.ts +0 -165
- package/src/components/command-bar/list/badge.test.ts +0 -54
- package/src/components/command-bar/list/model.test.ts +0 -129
- package/src/components/command-bar/list/view.test.tsx +0 -113
- package/src/components/command-bar/pane-settings.test.ts +0 -141
- package/src/components/command-bar/panel/layout.test.ts +0 -171
- package/src/components/command-bar/routes/root/results.test.ts +0 -161
- package/src/components/command-bar/routes/root/search-providers.test.tsx +0 -224
- package/src/components/command-bar/routes/root/selection.test.ts +0 -54
- package/src/components/command-bar/routes/root/shortcuts.test.ts +0 -193
- package/src/components/command-bar/routes/ticker-search/results.test.ts +0 -128
- package/src/components/command-bar/surface/assist.test.tsx +0 -341
- package/src/components/command-bar/surface/index.test.tsx +0 -1208
- package/src/components/command-bar/surface/listing-selection.test.tsx +0 -84
- package/src/components/command-bar/surface/pane.test.tsx +0 -937
- package/src/components/command-bar/surface/portfolio.test.tsx +0 -453
- package/src/components/command-bar/surface/test-harness.tsx +0 -353
- package/src/components/command-bar/view-model.test.ts +0 -228
- package/src/components/command-bar/workflow/broker.test.ts +0 -22
- package/src/components/command-bar/workflow/collection-actions.test.ts +0 -105
- package/src/components/command-bar/workflow/collection-identity.test.ts +0 -180
- package/src/components/command-bar/workflow/ops.test.ts +0 -804
- package/src/components/command-bar/workflow/route-actions.test.ts +0 -34
- package/src/components/command-bar/workflow/ticker-listing-picker.test.ts +0 -41
- package/src/components/company-logo.test.ts +0 -19
- package/src/components/data-table/export.test.ts +0 -21
- package/src/components/data-table/frozen-column.test.tsx +0 -114
- package/src/components/data-table/horizontal-navigation.test.tsx +0 -181
- package/src/components/data-table/stack-view.test.tsx +0 -226
- package/src/components/data-table/view.test.tsx +0 -343
- package/src/components/feed-data-table/stack-view.test.tsx +0 -46
- package/src/components/input-search-bar.test.tsx +0 -137
- package/src/components/layout/header.test.tsx +0 -82
- package/src/components/layout/market-summary.test.ts +0 -81
- package/src/components/layout/pane/content.test.tsx +0 -103
- package/src/components/layout/pane/cycle-order.test.ts +0 -29
- package/src/components/layout/pane/footer/current-actions.test.tsx +0 -108
- package/src/components/layout/pane/footer/index.test.tsx +0 -199
- package/src/components/layout/pane/footer/keyboard.test.ts +0 -57
- package/src/components/layout/pane/footer/notice.desktop.test.tsx +0 -57
- package/src/components/layout/pane/keyboard-scroll.test.tsx +0 -146
- package/src/components/layout/pane/sidebar.test.tsx +0 -187
- package/src/components/layout/pane/sizing.test.ts +0 -46
- package/src/components/layout/shell/index.test.tsx +0 -1377
- package/src/components/layout/shell/layout-state.test.ts +0 -33
- package/src/components/layout/shell/menu.test.ts +0 -89
- package/src/components/layout/shell/pane-occlusion.test.ts +0 -52
- package/src/components/layout/shell/ticker-link-menu.test.ts +0 -82
- package/src/components/layout/status-bar-groups.test.ts +0 -92
- package/src/components/layout/status-bar.test.tsx +0 -306
- package/src/components/layout/window-edit/mode.test.ts +0 -167
- package/src/components/metric-treemap/layout.test.ts +0 -77
- package/src/components/metric-treemap/surface.test.tsx +0 -62
- package/src/components/onboarding/first-run-workspace.test.ts +0 -81
- package/src/components/onboarding/onboarding-wizard.test.tsx +0 -1097
- package/src/components/onboarding/wizard-model.test.ts +0 -67
- package/src/components/pane-settings-dialog.test.tsx +0 -278
- package/src/components/pane-template-wizard.test.tsx +0 -51
- package/src/components/price-sparkline/model.test.ts +0 -27
- package/src/components/quote-flash.test.ts +0 -30
- package/src/components/sign-in-gate.test.tsx +0 -60
- package/src/components/table-view-shared.test.ts +0 -11
- package/src/components/ticker/badge/format.test.ts +0 -66
- package/src/components/ticker/badge/list.test.tsx +0 -84
- package/src/components/ticker/badge/text.test.tsx +0 -223
- package/src/components/ticker/list-table.test.tsx +0 -281
- package/src/components/ui/data-table/opentui/model.test.ts +0 -47
- package/src/components/ui/data-table/visible-range.test.ts +0 -29
- package/src/components/ui/display.desktop.test.tsx +0 -55
- package/src/components/ui/display.test.tsx +0 -36
- package/src/components/ui/external-link.test.tsx +0 -54
- package/src/components/ui/message-composer.test.tsx +0 -81
- package/src/components/ui/page-stack-view.test.tsx +0 -126
- package/src/components/ui/prose.desktop.test.tsx +0 -50
- package/src/components/ui/prose.test.ts +0 -22
- package/src/components/ui/row-value-cache.test.ts +0 -17
- package/src/components/ui/table-layout.test.ts +0 -108
- package/src/components/ui/tabs.test.tsx +0 -114
- package/src/components/ui/ui.test.tsx +0 -984
- package/src/components/use-pane-notice-footer.test.tsx +0 -116
- package/src/core/app-runtime.test.ts +0 -144
- package/src/core/app-services.test.ts +0 -66
- package/src/core/connection-health.test.ts +0 -143
- package/src/data/cached-query.test.ts +0 -95
- package/src/data/config/home.test.ts +0 -70
- package/src/data/config/store/index.test.ts +0 -1241
- package/src/data/memory-resource-store.test.ts +0 -24
- package/src/data/plugin-cache.test.ts +0 -46
- package/src/data/sqlite/cache.test.ts +0 -330
- package/src/data/sqlite/retry.test.ts +0 -84
- package/src/feedback/diagnostics.test.ts +0 -30
- package/src/feedback/redact.test.ts +0 -50
- package/src/feedback/screenshot.test.ts +0 -22
- package/src/i18n/index.test.ts +0 -134
- package/src/i18n/languages.test.ts +0 -34
- package/src/index.tsx +0 -6
- package/src/layout-marketplace/api.test.ts +0 -54
- package/src/layout-marketplace/cloud.test.ts +0 -154
- package/src/layout-marketplace/gallery-desktop.test.tsx +0 -216
- package/src/layout-marketplace/gallery.test.tsx +0 -149
- package/src/layout-marketplace/geometry.test.ts +0 -47
- package/src/layout-marketplace/mini-workspace.test.tsx +0 -69
- package/src/layout-marketplace/model.test.ts +0 -118
- package/src/layout-marketplace/name-dialog.tsx +0 -60
- package/src/layout-marketplace/payload.test.ts +0 -419
- package/src/market-data/coordinator/chart-session.test.ts +0 -152
- package/src/market-data/coordinator/events.test.ts +0 -68
- package/src/market-data/coordinator/fx-refresh.test.ts +0 -199
- package/src/market-data/coordinator/index.test.ts +0 -1174
- package/src/market-data/coordinator/options-sharing.test.ts +0 -79
- package/src/market-data/coordinator/subscriptions.test.ts +0 -652
- package/src/market-data/frame-scheduler.test.ts +0 -82
- package/src/market-data/history-session.test.ts +0 -151
- package/src/market-data/hooks.test.tsx +0 -263
- package/src/market-data/legacy-contract-hooks.test.tsx +0 -49
- package/src/market-data/legacy-contract.test.ts +0 -99
- package/src/market-data/market/format.test.ts +0 -284
- package/src/market-data/market/status.test.ts +0 -26
- package/src/market-data/performance.test.ts +0 -83
- package/src/market-data/portfolio-instrument.test.ts +0 -80
- package/src/market-data/published-us-sessions.test.ts +0 -65
- package/src/market-data/query-store.test.ts +0 -87
- package/src/market-data/quote-subscription-target.test.ts +0 -56
- package/src/market-data/quotes/day-range.test.ts +0 -84
- package/src/market-data/quotes/freshness.test.ts +0 -277
- package/src/market-data/quotes/observation-time.test.ts +0 -98
- package/src/market-data/quotes/price-basis.test.ts +0 -44
- package/src/market-data/quotes/resolution.test.ts +0 -612
- package/src/market-data/quotes/time.test.ts +0 -41
- package/src/market-data/request-types.test.ts +0 -110
- package/src/market-data/snapshot-contract.test.ts +0 -110
- package/src/market-data/snapshot-provider.test.ts +0 -251
- package/src/market-data/ticker-price-returns.test.ts +0 -26
- package/src/news/aggregator.test.ts +0 -596
- package/src/news/hooks.test.tsx +0 -66
- package/src/notifications/app-notifier.test.ts +0 -199
- package/src/pane-settings.test.ts +0 -38
- package/src/plugins/builtin/account-management/model.test.ts +0 -149
- package/src/plugins/builtin/account-management/navigation.test.ts +0 -27
- package/src/plugins/builtin/alerts/alert-engine.test.ts +0 -105
- package/src/plugins/builtin/alerts/events.test.ts +0 -28
- package/src/plugins/builtin/alerts/index.test.tsx +0 -459
- package/src/plugins/builtin/alerts/research.test.ts +0 -75
- package/src/plugins/builtin/analytics/broker-performance.test.ts +0 -79
- package/src/plugins/builtin/analytics/index.test.tsx +0 -657
- package/src/plugins/builtin/analytics/metrics.test.ts +0 -138
- package/src/plugins/builtin/analytics/pane-model.test.ts +0 -191
- package/src/plugins/builtin/analytics/portfolio-identity.test.tsx +0 -272
- package/src/plugins/builtin/analytics/return-window.test.ts +0 -72
- package/src/plugins/builtin/analytics/risk-client.test.ts +0 -100
- package/src/plugins/builtin/analytics/risk-evidence.test.ts +0 -123
- package/src/plugins/builtin/analytics/risk-headless.test.ts +0 -27
- package/src/plugins/builtin/analytics/risk-math.test.ts +0 -95
- package/src/plugins/builtin/analytics/risk-model.test.ts +0 -284
- package/src/plugins/builtin/analytics/sector-model.test.ts +0 -56
- package/src/plugins/builtin/analytics/sharpe-cadence.test.ts +0 -111
- package/src/plugins/builtin/backtest/engine.test.ts +0 -71
- package/src/plugins/builtin/bond-calculator/math.test.ts +0 -97
- package/src/plugins/builtin/bond-calculator/model.test.ts +0 -56
- package/src/plugins/builtin/bond-calculator/pane.test.tsx +0 -84
- package/src/plugins/builtin/broker-manager/index.test.tsx +0 -173
- package/src/plugins/builtin/broker-manager/model.test.ts +0 -145
- package/src/plugins/builtin/buildout/cells.test.tsx +0 -31
- package/src/plugins/builtin/buildout/pane/header.tsx +0 -30
- package/src/plugins/builtin/cds/client.test.ts +0 -103
- package/src/plugins/builtin/cds/headless.test.ts +0 -48
- package/src/plugins/builtin/cds/model.test.ts +0 -242
- package/src/plugins/builtin/cds/pane.test.tsx +0 -139
- package/src/plugins/builtin/central-bank-rates/model.test.ts +0 -84
- package/src/plugins/builtin/changelog/model.test.ts +0 -77
- package/src/plugins/builtin/chart-composer/catalog-inventory.test.ts +0 -105
- package/src/plugins/builtin/chart-composer/editor/model.test.ts +0 -85
- package/src/plugins/builtin/chart-composer/editor.test.tsx +0 -341
- package/src/plugins/builtin/chart-composer/financial-periods.fixture.json +0 -225
- package/src/plugins/builtin/chart-composer/follow-binding.test.tsx +0 -253
- package/src/plugins/builtin/chart-composer/headless.test.ts +0 -158
- package/src/plugins/builtin/chart-composer/loading.test.tsx +0 -134
- package/src/plugins/builtin/chart-composer/pane-share.test.ts +0 -144
- package/src/plugins/builtin/chart-composer/presets.test.ts +0 -672
- package/src/plugins/builtin/chart-composer/quick-add.test.tsx +0 -245
- package/src/plugins/builtin/chart-composer/quote-metadata.test.ts +0 -176
- package/src/plugins/builtin/chart-composer/series-catalog.test.ts +0 -104
- package/src/plugins/builtin/chart-composer/served-cadence-snapshot.test.ts +0 -161
- package/src/plugins/builtin/chart-composer/settings.test.ts +0 -200
- package/src/plugins/builtin/chart-composer/shortcuts.test.ts +0 -44
- package/src/plugins/builtin/chart-composer/use-series-catalog.test.tsx +0 -94
- package/src/plugins/builtin/chart-composer/viewport-labels.test.ts +0 -13
- package/src/plugins/builtin/chat/chat.test.tsx +0 -1481
- package/src/plugins/builtin/chat/composer-commands.test.ts +0 -30
- package/src/plugins/builtin/chat/content/composer-runtime.test.tsx +0 -144
- package/src/plugins/builtin/chat/content/mentions.test.ts +0 -74
- package/src/plugins/builtin/chat/controller/session-lifetime.test.ts +0 -182
- package/src/plugins/builtin/chat/controller/session.test.ts +0 -25
- package/src/plugins/builtin/chat/controller.test.ts +0 -1894
- package/src/plugins/builtin/chat/message/desktop.test.tsx +0 -88
- package/src/plugins/builtin/chat/message/profile-popover.test.tsx +0 -127
- package/src/plugins/builtin/chat/pane-state.test.ts +0 -31
- package/src/plugins/builtin/chat/sidebar.test.tsx +0 -830
- package/src/plugins/builtin/chat/test-harness.test.ts +0 -46
- package/src/plugins/builtin/chat/test-harness.tsx +0 -267
- package/src/plugins/builtin/cloud/askg/controller.test.ts +0 -525
- package/src/plugins/builtin/cloud/askg/conversation-store.test.ts +0 -230
- package/src/plugins/builtin/cloud/askg/executor.test.ts +0 -160
- package/src/plugins/builtin/cloud/askg/manifest.test.ts +0 -153
- package/src/plugins/builtin/cloud/askg/model.test.ts +0 -349
- package/src/plugins/builtin/cloud/askg/pane.test.tsx +0 -356
- package/src/plugins/builtin/cloud/askg/protocol.test.ts +0 -190
- package/src/plugins/builtin/cloud/askg/undo.test.ts +0 -44
- package/src/plugins/builtin/cloud/auth-model.test.ts +0 -67
- package/src/plugins/builtin/cloud/buildout-module.tsx +0 -23
- package/src/plugins/builtin/cloud/device-signin.test.ts +0 -217
- package/src/plugins/builtin/cloud/reveal-in-scroll-box.ts +0 -34
- package/src/plugins/builtin/cloud/team/collections.test.ts +0 -126
- package/src/plugins/builtin/cloud/team/model.test.ts +0 -174
- package/src/plugins/builtin/cloud/team/pane-model.test.ts +0 -114
- package/src/plugins/builtin/cloud/team/pane.test.tsx +0 -234
- package/src/plugins/builtin/cloud/team/store.test.ts +0 -231
- package/src/plugins/builtin/cloud/thesis/board-pane.test.tsx +0 -266
- package/src/plugins/builtin/cloud/thesis/model.test.ts +0 -171
- package/src/plugins/builtin/cloud-tweets/pane-share.test.ts +0 -56
- package/src/plugins/builtin/cloud-tweets/table.test.tsx +0 -125
- package/src/plugins/builtin/congress-trades/aggregates.test.ts +0 -27
- package/src/plugins/builtin/congress-trades/headless.test.ts +0 -113
- package/src/plugins/builtin/congress-trades/model.test.ts +0 -129
- package/src/plugins/builtin/connections/pane.test.tsx +0 -84
- package/src/plugins/builtin/correlation/colors.test.ts +0 -39
- package/src/plugins/builtin/correlation/compute.test.ts +0 -97
- package/src/plugins/builtin/correlation/headless.test.ts +0 -147
- package/src/plugins/builtin/correlation/index.test.tsx +0 -155
- package/src/plugins/builtin/correlation/relationship/history.test.tsx +0 -62
- package/src/plugins/builtin/correlation/relationship/layout.test.ts +0 -17
- package/src/plugins/builtin/cot/model.test.ts +0 -89
- package/src/plugins/builtin/credit-conditions/client.test.ts +0 -122
- package/src/plugins/builtin/credit-conditions/headless.test.ts +0 -35
- package/src/plugins/builtin/credit-conditions/index.test.tsx +0 -136
- package/src/plugins/builtin/credit-conditions/model.test.ts +0 -56
- package/src/plugins/builtin/crypto-board/client.test.ts +0 -51
- package/src/plugins/builtin/crypto-board/model.test.ts +0 -111
- package/src/plugins/builtin/crypto-board/pane.test.tsx +0 -130
- package/src/plugins/builtin/crypto-board/test-fixture.ts +0 -80
- package/src/plugins/builtin/custom-view/live-quotes.test.ts +0 -53
- package/src/plugins/builtin/custom-view/view-spec.test.ts +0 -134
- package/src/plugins/builtin/debt-maturities/debt-maturities.test.ts +0 -317
- package/src/plugins/builtin/dividend-yield/calendar.ts +0 -9
- package/src/plugins/builtin/dividend-yield/client.test.ts +0 -260
- package/src/plugins/builtin/dividend-yield/dividend-source-integrity.test.ts +0 -233
- package/src/plugins/builtin/dividend-yield/headless.test.ts +0 -123
- package/src/plugins/builtin/dividend-yield/pane.test.tsx +0 -351
- package/src/plugins/builtin/dividend-yield/provider-client.test.ts +0 -61
- package/src/plugins/builtin/dividend-yield/reference-price.test.ts +0 -115
- package/src/plugins/builtin/dividend-yield/view.test.ts +0 -81
- package/src/plugins/builtin/earnings/data/cache.test.ts +0 -117
- package/src/plugins/builtin/earnings/detail-model.test.ts +0 -103
- package/src/plugins/builtin/earnings/detail-model.ts +0 -165
- package/src/plugins/builtin/earnings/detail-view.tsx +0 -136
- package/src/plugins/builtin/earnings/estimate-basis.test.ts +0 -184
- package/src/plugins/builtin/earnings/estimate-fixtures.test-data.ts +0 -327
- package/src/plugins/builtin/earnings/headless.test.ts +0 -82
- package/src/plugins/builtin/earnings/model.test.ts +0 -98
- package/src/plugins/builtin/earnings/table.test.ts +0 -76
- package/src/plugins/builtin/earnings/table.ts +0 -246
- package/src/plugins/builtin/earnings-calls/data.test.ts +0 -252
- package/src/plugins/builtin/earnings-calls/headless-freshness.test.ts +0 -41
- package/src/plugins/builtin/earnings-calls/headless.test.ts +0 -258
- package/src/plugins/builtin/earnings-calls/pane.test.tsx +0 -520
- package/src/plugins/builtin/earnings-calls/prose.test.ts +0 -51
- package/src/plugins/builtin/econ/calendar-model.test.ts +0 -82
- package/src/plugins/builtin/econ/fred-cache.test.ts +0 -188
- package/src/plugins/builtin/econ/fred-client.test.ts +0 -79
- package/src/plugins/builtin/econ/index.test.tsx +0 -144
- package/src/plugins/builtin/econ-statistics/client.test.ts +0 -122
- package/src/plugins/builtin/econ-statistics/headless.test.ts +0 -54
- package/src/plugins/builtin/econ-statistics/pane.test.tsx +0 -69
- package/src/plugins/builtin/econ-statistics/transform.test.ts +0 -109
- package/src/plugins/builtin/econ-statistics/transform.ts +0 -94
- package/src/plugins/builtin/econ-statistics/trend.ts +0 -57
- package/src/plugins/builtin/econ-statistics/view.test.ts +0 -43
- package/src/plugins/builtin/equity-screener/headless.test.ts +0 -22
- package/src/plugins/builtin/equity-screener/model.test.ts +0 -116
- package/src/plugins/builtin/equity-screener/results.test.tsx +0 -44
- package/src/plugins/builtin/equity-screener/test-fixture.ts +0 -63
- package/src/plugins/builtin/estimate-revisions/model.test.ts +0 -253
- package/src/plugins/builtin/estimate-revisions/sorting.test.ts +0 -91
- package/src/plugins/builtin/executives/format.test.ts +0 -23
- package/src/plugins/builtin/executives/pane.test.tsx +0 -339
- package/src/plugins/builtin/filing-events/feed.test.ts +0 -143
- package/src/plugins/builtin/filing-events/pane.test.tsx +0 -125
- package/src/plugins/builtin/futures/model.test.ts +0 -151
- package/src/plugins/builtin/futures/pane.test.tsx +0 -219
- package/src/plugins/builtin/futures/table.test.ts +0 -155
- package/src/plugins/builtin/futures-curve/model.test.ts +0 -90
- package/src/plugins/builtin/fx-matrix/export.test.ts +0 -30
- package/src/plugins/builtin/fx-matrix/pairs.test.ts +0 -16
- package/src/plugins/builtin/fx-matrix/pane.test.tsx +0 -109
- package/src/plugins/builtin/fx-matrix/refresh.test.tsx +0 -69
- package/src/plugins/builtin/help/components.tsx +0 -44
- package/src/plugins/builtin/help/keybindings-editor.test.tsx +0 -164
- package/src/plugins/builtin/holders/headless.test.ts +0 -58
- package/src/plugins/builtin/holders/index.test.ts +0 -12
- package/src/plugins/builtin/holders/thirteenf-match.test.ts +0 -30
- package/src/plugins/builtin/insider/amendments.test.ts +0 -112
- package/src/plugins/builtin/insider/headless.test.ts +0 -136
- package/src/plugins/builtin/insider/insider-data.test.ts +0 -66
- package/src/plugins/builtin/insider/pane.test.tsx +0 -112
- package/src/plugins/builtin/iv-history/client.test.ts +0 -18
- package/src/plugins/builtin/iv-history/model.test.ts +0 -87
- package/src/plugins/builtin/jobs/model.test.ts +0 -119
- package/src/plugins/builtin/jobs/pages.test.tsx +0 -103
- package/src/plugins/builtin/kelly-sizer/index.test.tsx +0 -202
- package/src/plugins/builtin/kelly-sizer/model.test.ts +0 -158
- package/src/plugins/builtin/kelly-sizer/view.test.tsx +0 -88
- package/src/plugins/builtin/market-movers/headless.test.ts +0 -34
- package/src/plugins/builtin/market-movers/integrity.test.ts +0 -119
- package/src/plugins/builtin/market-movers/pane-research.test.tsx +0 -138
- package/src/plugins/builtin/market-movers/screener.test.ts +0 -333
- package/src/plugins/builtin/market-valuation/client.test.ts +0 -283
- package/src/plugins/builtin/market-valuation/headless.test.ts +0 -75
- package/src/plugins/builtin/market-valuation/model.test.ts +0 -405
- package/src/plugins/builtin/market-valuation/pane.test.tsx +0 -235
- package/src/plugins/builtin/market-valuation/trend.ts +0 -87
- package/src/plugins/builtin/money-markets/model.test.ts +0 -61
- package/src/plugins/builtin/news/headless.test.ts +0 -149
- package/src/plugins/builtin/news/wire/breaking/filters.test.ts +0 -99
- package/src/plugins/builtin/news/wire/breaking/notifications.test.ts +0 -204
- package/src/plugins/builtin/news/wire/breaking/pane.test.tsx +0 -128
- package/src/plugins/builtin/news/wire/breaking/pane.tsx +0 -89
- package/src/plugins/builtin/news/wire/feed-config.test.ts +0 -109
- package/src/plugins/builtin/news/wire/news/detail-view.test.tsx +0 -279
- package/src/plugins/builtin/news/wire/news/table.test.tsx +0 -223
- package/src/plugins/builtin/news/wire/read-state.test.ts +0 -37
- package/src/plugins/builtin/news/wire/rss/parser.test.ts +0 -178
- package/src/plugins/builtin/news/wire/rss/source.test.ts +0 -153
- package/src/plugins/builtin/notes/files.test.ts +0 -18
- package/src/plugins/builtin/notes/quick-notes-pane.test.tsx +0 -209
- package/src/plugins/builtin/notes/store.test.ts +0 -245
- package/src/plugins/builtin/notes/ticker-notes-tab.test.tsx +0 -350
- package/src/plugins/builtin/options/analytics.test.ts +0 -234
- package/src/plugins/builtin/options/calc-seed.test.ts +0 -130
- package/src/plugins/builtin/options/chain-integrity.test.tsx +0 -284
- package/src/plugins/builtin/options/enrichment-hook.test.tsx +0 -149
- package/src/plugins/builtin/options/enrichment.test.ts +0 -257
- package/src/plugins/builtin/options/expiry-selection.test.tsx +0 -370
- package/src/plugins/builtin/options/footer.test.ts +0 -60
- package/src/plugins/builtin/options/live-quotes.test.ts +0 -421
- package/src/plugins/builtin/options/market-reference.test.ts +0 -36
- package/src/plugins/builtin/options/table.test.ts +0 -100
- package/src/plugins/builtin/options/view.test.tsx +0 -657
- package/src/plugins/builtin/options-calculator/binomial.test.ts +0 -264
- package/src/plugins/builtin/options-calculator/boundary-integrity.test.tsx +0 -114
- package/src/plugins/builtin/options-calculator/evidence.test.ts +0 -138
- package/src/plugins/builtin/options-calculator/headless.test.ts +0 -39
- package/src/plugins/builtin/options-calculator/inputs.test.ts +0 -24
- package/src/plugins/builtin/options-calculator/model.test.ts +0 -242
- package/src/plugins/builtin/options-calculator/pane.test.tsx +0 -305
- package/src/plugins/builtin/options-calculator/surface.test.ts +0 -164
- package/src/plugins/builtin/options-scenario/client.test.ts +0 -143
- package/src/plugins/builtin/options-scenario/evidence.test.ts +0 -34
- package/src/plugins/builtin/options-scenario/live.test.ts +0 -34
- package/src/plugins/builtin/options-scenario/model.test.ts +0 -222
- package/src/plugins/builtin/options-scenario/pane.test.tsx +0 -195
- package/src/plugins/builtin/options-scenario/state.test.ts +0 -62
- package/src/plugins/builtin/plugin-marketplace/model.test.ts +0 -493
- package/src/plugins/builtin/plugin-module.test.ts +0 -101
- package/src/plugins/builtin/portfolio-list/account-metrics.test.ts +0 -243
- package/src/plugins/builtin/portfolio-list/bond-price-basis.test.ts +0 -120
- package/src/plugins/builtin/portfolio-list/cell-version.test.ts +0 -89
- package/src/plugins/builtin/portfolio-list/cli/render.test.ts +0 -261
- package/src/plugins/builtin/portfolio-list/index.test.ts +0 -248
- package/src/plugins/builtin/portfolio-list/live-valuation.test.ts +0 -94
- package/src/plugins/builtin/portfolio-list/metrics.test.ts +0 -562
- package/src/plugins/builtin/portfolio-list/mutations.test.ts +0 -200
- package/src/plugins/builtin/portfolio-list/pane/data.test.ts +0 -54
- package/src/plugins/builtin/portfolio-list/pane/index.test.tsx +0 -1835
- package/src/plugins/builtin/portfolio-list/position-cost-integrity.test.ts +0 -101
- package/src/plugins/builtin/portfolio-list/summary/index.test.ts +0 -184
- package/src/plugins/builtin/portfolio-list/summary/live-accounts.test.tsx +0 -90
- package/src/plugins/builtin/portfolio-list/use-cursor-neighbor-prefetch.test.tsx +0 -96
- package/src/plugins/builtin/portfolio-list/use-throttled-cursor-symbol.test.tsx +0 -166
- package/src/plugins/builtin/portfolio-list/use-throttled-ticker-order.test.tsx +0 -76
- package/src/plugins/builtin/rate-path/model.test.ts +0 -50
- package/src/plugins/builtin/realized-vol/chart-model.test.ts +0 -24
- package/src/plugins/builtin/realized-vol/client.test.ts +0 -193
- package/src/plugins/builtin/realized-vol/model.test.ts +0 -155
- package/src/plugins/builtin/relative-rotation/model.test.ts +0 -194
- package/src/plugins/builtin/research/analyst-headless.test.ts +0 -88
- package/src/plugins/builtin/research/analyst-model.test.ts +0 -125
- package/src/plugins/builtin/research/analyst-pane.test.tsx +0 -162
- package/src/plugins/builtin/research/corporate-actions-pane.test.tsx +0 -77
- package/src/plugins/builtin/research/equity-diagnostic-pane.test.tsx +0 -303
- package/src/plugins/builtin/research/event-model.test.ts +0 -165
- package/src/plugins/builtin/research/events-headless.test.ts +0 -43
- package/src/plugins/builtin/research/headless.test.ts +0 -111
- package/src/plugins/builtin/research/index.test.ts +0 -442
- package/src/plugins/builtin/research/relative-valuation-headless.test.ts +0 -192
- package/src/plugins/builtin/research/relative-valuation-model.test.ts +0 -49
- package/src/plugins/builtin/research/relative-valuation-pane.test.tsx +0 -99
- package/src/plugins/builtin/research-search/command-bar-search.test.ts +0 -81
- package/src/plugins/builtin/research-search/document-view.test.tsx +0 -75
- package/src/plugins/builtin/research-search/model.test.ts +0 -40
- package/src/plugins/builtin/research-search/pane.test.tsx +0 -256
- package/src/plugins/builtin/research-search/snippet.test.ts +0 -78
- package/src/plugins/builtin/risk-factors/data.test.ts +0 -63
- package/src/plugins/builtin/risk-factors/headless.test.ts +0 -40
- package/src/plugins/builtin/risk-factors/pane.test.tsx +0 -56
- package/src/plugins/builtin/risk-factors/test-fixtures.ts +0 -4
- package/src/plugins/builtin/scanner/flow-history.test.tsx +0 -138
- package/src/plugins/builtin/scanner/flow-model.test.ts +0 -180
- package/src/plugins/builtin/scanner/flow-pane.test.tsx +0 -159
- package/src/plugins/builtin/scanner/headless.test.ts +0 -121
- package/src/plugins/builtin/scanner/hilo-model.test.ts +0 -44
- package/src/plugins/builtin/sec/filing-content.test.ts +0 -57
- package/src/plugins/builtin/sec/headless.test.ts +0 -99
- package/src/plugins/builtin/sec/pane.test.tsx +0 -152
- package/src/plugins/builtin/sectors/client.test.ts +0 -228
- package/src/plugins/builtin/sectors/headless.test.ts +0 -87
- package/src/plugins/builtin/sectors/pane-cache.test.tsx +0 -78
- package/src/plugins/builtin/sectors/sector-model.test.ts +0 -119
- package/src/plugins/builtin/shared/auto-refresh.test.tsx +0 -95
- package/src/plugins/builtin/shared/auto-refresh.ts +0 -97
- package/src/plugins/builtin/shared/live-streaming.ts +0 -60
- package/src/plugins/builtin/shared/pane-footer.ts +0 -93
- package/src/plugins/builtin/shared/plan-access.test.ts +0 -69
- package/src/plugins/builtin/shared/plan-access.ts +0 -109
- package/src/plugins/builtin/shared/public-pane.test.ts +0 -12
- package/src/plugins/builtin/shared/read-state.ts +0 -104
- package/src/plugins/builtin/shared/research-cloud-session.test.tsx +0 -143
- package/src/plugins/builtin/shared/screener-live-quotes.test.ts +0 -111
- package/src/plugins/builtin/shared/screener-live-quotes.ts +0 -165
- package/src/plugins/builtin/shared/series-cache.test.ts +0 -106
- package/src/plugins/builtin/shared/table-pane.ts +0 -32
- package/src/plugins/builtin/shared/ticker-request.test.ts +0 -18
- package/src/plugins/builtin/shared/ticker-request.test.tsx +0 -137
- package/src/plugins/builtin/shared/ticker-source.ts +0 -32
- package/src/plugins/builtin/shared/ticker-surface.test.ts +0 -84
- package/src/plugins/builtin/shared/use-quote-board.test.tsx +0 -325
- package/src/plugins/builtin/shared/volatility/live-session.test.ts +0 -91
- package/src/plugins/builtin/shared/volatility/options.test.ts +0 -127
- package/src/plugins/builtin/shared/volatility/realized.test.ts +0 -201
- package/src/plugins/builtin/shared/volatility/realized.ts +0 -292
- package/src/plugins/builtin/shared/volatility/smile.test.ts +0 -209
- package/src/plugins/builtin/short-interest/client.test.ts +0 -55
- package/src/plugins/builtin/short-interest/headless.test.ts +0 -96
- package/src/plugins/builtin/short-interest/pane.test.tsx +0 -57
- package/src/plugins/builtin/short-volume/model.test.ts +0 -39
- package/src/plugins/builtin/thirteenf/api.test.ts +0 -149
- package/src/plugins/builtin/thirteenf/data.test.ts +0 -291
- package/src/plugins/builtin/thirteenf/headless.test.ts +0 -182
- package/src/plugins/builtin/thirteenf/model.test.ts +0 -230
- package/src/plugins/builtin/thirteenf/overlap.test.ts +0 -29
- package/src/plugins/builtin/thirteenf/pane.test.tsx +0 -407
- package/src/plugins/builtin/thirteenf/signals.test.ts +0 -16
- package/src/plugins/builtin/ticker-detail/chart-tab-switch.test.tsx +0 -275
- package/src/plugins/builtin/ticker-detail/data-panes/historical-price-precision.test.tsx +0 -120
- package/src/plugins/builtin/ticker-detail/data-panes/historical-prices.test.tsx +0 -41
- package/src/plugins/builtin/ticker-detail/financials/aggregation.test.ts +0 -79
- package/src/plugins/builtin/ticker-detail/financials/model.test.ts +0 -276
- package/src/plugins/builtin/ticker-detail/financials/period-integrity.test.tsx +0 -78
- package/src/plugins/builtin/ticker-detail/fund-profile.test.tsx +0 -118
- package/src/plugins/builtin/ticker-detail/headless.test.ts +0 -165
- package/src/plugins/builtin/ticker-detail/index.test.tsx +0 -850
- package/src/plugins/builtin/ticker-detail/overview/model.test.ts +0 -118
- package/src/plugins/builtin/ticker-detail/overview-return-coverage.test.tsx +0 -71
- package/src/plugins/builtin/ticker-detail/quote-monitor/card.test.tsx +0 -70
- package/src/plugins/builtin/ticker-detail/quote-monitor/index.test.tsx +0 -261
- package/src/plugins/builtin/ticker-detail/quote-monitor/retained-status.test.tsx +0 -134
- package/src/plugins/builtin/ticker-detail/quote-status.test.tsx +0 -116
- package/src/plugins/builtin/ticker-detail/quote-time-integrity.test.ts +0 -42
- package/src/plugins/builtin/ticker-research-backend-plugin.ts +0 -10
- package/src/plugins/builtin/ticker-research-plugin.ts +0 -61
- package/src/plugins/builtin/time-sales/model.test.ts +0 -83
- package/src/plugins/builtin/time-sales/snapshot-client.test.ts +0 -31
- package/src/plugins/builtin/time-sales/test-fixture.ts +0 -12
- package/src/plugins/builtin/time-sales/use-tape.test.tsx +0 -115
- package/src/plugins/builtin/treasury-auctions/cache.test.ts +0 -215
- package/src/plugins/builtin/treasury-auctions/client.test.ts +0 -207
- package/src/plugins/builtin/treasury-auctions/headless.test.ts +0 -34
- package/src/plugins/builtin/treasury-auctions/model.test.ts +0 -187
- package/src/plugins/builtin/treasury-auctions/pane.test.tsx +0 -174
- package/src/plugins/builtin/vol-surface/client.test.ts +0 -179
- package/src/plugins/builtin/vol-surface/evidence.test.ts +0 -73
- package/src/plugins/builtin/vol-surface/live.test.ts +0 -95
- package/src/plugins/builtin/vol-surface/model.test.ts +0 -243
- package/src/plugins/builtin/vol-surface/pane.test.tsx +0 -265
- package/src/plugins/builtin/vol-surface/raster.test.ts +0 -28
- package/src/plugins/builtin/vol-surface/stored.test.ts +0 -62
- package/src/plugins/builtin/volatility/chart-model.test.ts +0 -61
- package/src/plugins/builtin/volatility/client.test.ts +0 -207
- package/src/plugins/builtin/volatility/evidence.test.ts +0 -49
- package/src/plugins/builtin/volatility/headless.test.ts +0 -52
- package/src/plugins/builtin/volatility/model.test.ts +0 -152
- package/src/plugins/builtin/world-indices/headless.test.ts +0 -32
- package/src/plugins/builtin/world-indices/pane.test.tsx +0 -156
- package/src/plugins/builtin/world-venue-map/map.desktop.test.tsx +0 -45
- package/src/plugins/builtin/world-venue-map/model.test.ts +0 -85
- package/src/plugins/builtin/yield-curve/chart.test.ts +0 -23
- package/src/plugins/builtin/yield-curve/headless.test.ts +0 -40
- package/src/plugins/builtin/yield-curve/history.test.ts +0 -124
- package/src/plugins/builtin/yield-curve/pane.test.tsx +0 -140
- package/src/plugins/builtin/yield-curve/treasury-data.test.ts +0 -35
- package/src/plugins/bundle.test.ts +0 -209
- package/src/plugins/catalog-backend.test.ts +0 -47
- package/src/plugins/catalog-browser.test.ts +0 -72
- package/src/plugins/gridlock-notification.ts +0 -16
- package/src/plugins/host-contract.ts +0 -72
- package/src/plugins/host-link.test.ts +0 -133
- package/src/plugins/host-module-imports.test.ts +0 -94
- package/src/plugins/host-module-imports.ts +0 -73
- package/src/plugins/host-resolver.test.ts +0 -96
- package/src/plugins/launch-layout.test.ts +0 -131
- package/src/plugins/loader.test.ts +0 -54
- package/src/plugins/pane-manager.test.ts +0 -309
- package/src/plugins/registry/index.test.ts +0 -601
- package/src/plugins/registry/pane-settings.test.ts +0 -98
- package/src/plugins/registry/setup-command.test.ts +0 -62
- package/src/plugins/runtime/index.test.tsx +0 -328
- package/src/plugins/seed.test.ts +0 -136
- package/src/plugins/ticker-navigation.test.ts +0 -141
- package/src/public/public-api.test.ts +0 -42
- package/src/react/async-resource.test.tsx +0 -124
- package/src/react/input.test.ts +0 -182
- package/src/remote/controller.test.ts +0 -585
- package/src/remote/json-patch.test.ts +0 -31
- package/src/remote/schema.test.ts +0 -65
- package/src/remote/semantic-tree.test.tsx +0 -105
- package/src/remote/server.test.ts +0 -50
- package/src/renderers/browser/bundled-plugins.test.ts +0 -41
- package/src/renderers/browser/cloud-transport.test.ts +0 -68
- package/src/renderers/browser/config-host.test.ts +0 -70
- package/src/renderers/browser/deeplink-bridge.test.ts +0 -56
- package/src/renderers/browser/error-boundary.tsx +0 -23
- package/src/renderers/browser/http-proxy-transport.test.ts +0 -98
- package/src/renderers/browser/research-entry.test.ts +0 -32
- package/src/renderers/browser/storage.test.ts +0 -66
- package/src/renderers/cloudflare/http-proxy.test.ts +0 -122
- package/src/renderers/cloudflare/worker.test.ts +0 -155
- package/src/renderers/electrobun/bun/application-menu/click.test.ts +0 -55
- package/src/renderers/electrobun/bun/context-menu/click.test.ts +0 -67
- package/src/renderers/electrobun/bun/context-menu/normalize.test.ts +0 -52
- package/src/renderers/electrobun/bun/desktop/capability-bridge.test.ts +0 -112
- package/src/renderers/electrobun/bun/desktop/http-fetch.test.ts +0 -89
- package/src/renderers/electrobun/bun/desktop/http-stream.test.ts +0 -200
- package/src/renderers/electrobun/bun/desktop/initialization.test.ts +0 -27
- package/src/renderers/electrobun/bun/desktop/window-controls.test.ts +0 -53
- package/src/renderers/electrobun/bun/desktop/window-controls.ts +0 -75
- package/src/renderers/electrobun/bun/desktop/window-events.ts +0 -49
- package/src/renderers/electrobun/bun/desktop/window-style.ts +0 -34
- package/src/renderers/electrobun/bun/desktop/windows-custom-chrome.ts +0 -58
- package/src/renderers/electrobun/bun/desktop/windows-icons.ts +0 -70
- package/src/renderers/electrobun/bun/desktop/windows-native.ts +0 -75
- package/src/renderers/electrobun/bun/desktop/workspace/index.test.ts +0 -147
- package/src/renderers/electrobun/bun/window/frame.test.ts +0 -47
- package/src/renderers/electrobun/view/application-menu-bridge.ts +0 -12
- package/src/renderers/electrobun/view/cli-pane-shot-frame.test.tsx +0 -76
- package/src/renderers/electrobun/view/cli-pane-shot-health.test.ts +0 -25
- package/src/renderers/electrobun/view/context-menu.test.ts +0 -146
- package/src/renderers/electrobun/view/data-table/frozen-column.test.tsx +0 -73
- package/src/renderers/electrobun/view/data-table/horizontal-navigation.test.tsx +0 -82
- package/src/renderers/electrobun/view/data-table/index.test.tsx +0 -127
- package/src/renderers/electrobun/view/desktop/controls.test.tsx +0 -161
- package/src/renderers/electrobun/view/desktop/list-view.test.tsx +0 -37
- package/src/renderers/electrobun/view/desktop/window/snapshot.test.ts +0 -57
- package/src/renderers/electrobun/view/desktop-deeplink-bridge.ts +0 -10
- package/src/renderers/electrobun/view/dialog-host.test.ts +0 -25
- package/src/renderers/electrobun/view/dialog-stack.test.tsx +0 -73
- package/src/renderers/electrobun/view/external-plugins.test.ts +0 -57
- package/src/renderers/electrobun/view/history-metadata-rpc.test.ts +0 -62
- package/src/renderers/electrobun/view/host/ascii-text.test.ts +0 -48
- package/src/renderers/electrobun/view/host/box.test.tsx +0 -171
- package/src/renderers/electrobun/view/host/focus-scope.test.ts +0 -37
- package/src/renderers/electrobun/view/host/scroll-box.desktop.test.tsx +0 -46
- package/src/renderers/electrobun/view/host/style.test.ts +0 -15
- package/src/renderers/electrobun/view/host/surface-3d.test.ts +0 -33
- package/src/renderers/electrobun/view/input-host.test.tsx +0 -104
- package/src/renderers/electrobun/view/key-event.test.ts +0 -34
- package/src/renderers/electrobun/view/native-stubs/chart/kitty-support.ts +0 -19
- package/src/renderers/electrobun/view/native-stubs/chart/surface-manager.ts +0 -36
- package/src/renderers/electrobun/view/native-stubs/ibkr-native-loader.ts +0 -3
- package/src/renderers/electrobun/view/native-stubs/native-stubs.test.ts +0 -42
- package/src/renderers/electrobun/view/notes-files.ts +0 -56
- package/src/renderers/electrobun/view/remote/backend-quote-subscription.test.ts +0 -87
- package/src/renderers/electrobun/view/remote/capability-invoker.test.ts +0 -96
- package/src/renderers/electrobun/view/remote/connection-health-backend.ts +0 -19
- package/src/renderers/electrobun/view/remote/connection-health.test.ts +0 -44
- package/src/renderers/electrobun/view/remote/quote-subscription-registry.test.ts +0 -86
- package/src/renderers/electrobun/view/rpc-codec.test.ts +0 -112
- package/src/renderers/electrobun/view/screenshot-watermark.test.ts +0 -48
- package/src/renderers/electrobun/view/toast-host.test.tsx +0 -61
- package/src/renderers/opentui/chart-surface.test.tsx +0 -147
- package/src/renderers/opentui/image/loader.test.ts +0 -25
- package/src/renderers/opentui/interaction-performance.test.ts +0 -79
- package/src/renderers/opentui/terminal-media.test.ts +0 -173
- package/src/renderers/share/chart.test.ts +0 -52
- package/src/renderers/share/layout-view.test.tsx +0 -58
- package/src/renderers/share/view.test.tsx +0 -120
- package/src/shares/api.test.ts +0 -120
- package/src/shares/location.test.ts +0 -19
- package/src/shares/pane.test.ts +0 -110
- package/src/sources/asml-earnings.test.ts +0 -197
- package/src/sources/fixtures/sec-operating-expenses.json +0 -163
- package/src/sources/fixtures/shop-20251231-quarterly-summary.html +0 -1
- package/src/sources/fixtures/shop-20260630-quarterly-summary.html +0 -1
- package/src/sources/fixtures/shop-operating-provider.json +0 -141
- package/src/sources/fixtures/shop-quarterly-summary-provenance.json +0 -24
- package/src/sources/fixtures/shop-submissions-20260922.json +0 -31
- package/src/sources/gloomberb-cloud/history-coverage.test.ts +0 -119
- package/src/sources/gloomberb-cloud/history-retention.test.ts +0 -207
- package/src/sources/gloomberb-cloud/history-session.test.ts +0 -76
- package/src/sources/gloomberb-cloud/index.test.ts +0 -1116
- package/src/sources/gloomberb-cloud/normalizers.test.ts +0 -135
- package/src/sources/gloomberb-cloud/quote-metadata.test.ts +0 -50
- package/src/sources/gloomberb-cloud/valuation-observations.ts +0 -29
- package/src/sources/history-coverage.test.ts +0 -40
- package/src/sources/listing-history.ts +0 -52
- package/src/sources/provider-router/arca-cache.test.ts +0 -97
- package/src/sources/provider-router/asml-earnings-cache.test.ts +0 -158
- package/src/sources/provider-router/broker-session.test.ts +0 -52
- package/src/sources/provider-router/cache.test.ts +0 -133
- package/src/sources/provider-router/cached-financials.test.ts +0 -711
- package/src/sources/provider-router/cached-listing-identity.test.ts +0 -159
- package/src/sources/provider-router/cached-routes.test.ts +0 -232
- package/src/sources/provider-router/connection-health.test.ts +0 -28
- package/src/sources/provider-router/financials.test.ts +0 -209
- package/src/sources/provider-router/fixtures/quarterly-source-disagreements.json +0 -438
- package/src/sources/provider-router/fixtures/shop-nasdaqgs.json +0 -137
- package/src/sources/provider-router/history-boundary-cache.test.ts +0 -72
- package/src/sources/provider-router/history-calendar-cache.test.ts +0 -301
- package/src/sources/provider-router/history-exact-window.test.ts +0 -187
- package/src/sources/provider-router/history-gap-cache.test.ts +0 -84
- package/src/sources/provider-router/history-gaps.test.ts +0 -141
- package/src/sources/provider-router/history-retention.test.ts +0 -239
- package/src/sources/provider-router/history-session.test.ts +0 -138
- package/src/sources/provider-router/history.test.ts +0 -780
- package/src/sources/provider-router/index.test.ts +0 -1990
- package/src/sources/provider-router/listing-history.test.ts +0 -139
- package/src/sources/provider-router/listing-identity.test.ts +0 -128
- package/src/sources/provider-router/nasdaqgs-listing.test.ts +0 -78
- package/src/sources/provider-router/news.test.ts +0 -34
- package/src/sources/provider-router/non-company-metadata.test.ts +0 -95
- package/src/sources/provider-router/o-income-basis.test.ts +0 -64
- package/src/sources/provider-router/operating-result-cache.test.ts +0 -44
- package/src/sources/provider-router/operating-result-retry.test.ts +0 -221
- package/src/sources/provider-router/profile-enrichment.test.ts +0 -168
- package/src/sources/provider-router/quote-completion.test.ts +0 -62
- package/src/sources/provider-router/quote-domain.test.ts +0 -92
- package/src/sources/provider-router/quote-route.test.ts +0 -255
- package/src/sources/provider-router/realtime-access.test.ts +0 -22
- package/src/sources/provider-router/routing.test.ts +0 -39
- package/src/sources/provider-router/search.test.ts +0 -191
- package/src/sources/provider-router/shell-history-cache.test.ts +0 -131
- package/src/sources/provider-router/statement-history.test.ts +0 -71
- package/src/sources/provider-router/statement-observations.test.ts +0 -162
- package/src/sources/provider-router/valuation-retractions.test.ts +0 -280
- package/src/sources/reported-operating-results.test.ts +0 -286
- package/src/sources/sec-bank-revenue.test.ts +0 -79
- package/src/sources/sec-edgar-shares.fixture.json +0 -188
- package/src/sources/sec-edgar-shares.test.ts +0 -66
- package/src/sources/sec-edgar.test.ts +0 -924
- package/src/sources/sec-income-attribution.test.ts +0 -93
- package/src/sources/sec-operating-expenses.test.ts +0 -42
- package/src/sources/yahoo-finance/fixtures/aapl-final-observation.json +0 -20
- package/src/sources/yahoo-finance/history-session.test.ts +0 -120
- package/src/sources/yahoo-finance/history.test.ts +0 -47
- package/src/sources/yahoo-finance/mappers.test.ts +0 -176
- package/src/sources/yahoo-finance/options.test.ts +0 -23
- package/src/sources/yahoo-finance/requests.test.ts +0 -119
- package/src/sources/yahoo-finance/snapshots.test.ts +0 -225
- package/src/sources/yahoo-finance/symbols.test.ts +0 -18
- package/src/sources/yahoo-finance.test.ts +0 -330
- package/src/state/app/activity.test.ts +0 -54
- package/src/state/app/bootstrap.test.ts +0 -664
- package/src/state/app/context/index.test.ts +0 -604
- package/src/state/app/context/index.test.tsx +0 -347
- package/src/state/app/context/selector.test.tsx +0 -424
- package/src/state/hooks/inline-ticker-failures.test.ts +0 -77
- package/src/state/hooks/inline-tickers.test.tsx +0 -253
- package/src/state/hooks/live-ticker-financials.test.tsx +0 -120
- package/src/state/hooks/quote-streaming.test.ts +0 -44
- package/src/state/hooks/quote-streaming.test.tsx +0 -442
- package/src/state/persist-scheduler.test.ts +0 -151
- package/src/state/selectors-ui.ts +0 -47
- package/src/state/selectors.ts +0 -27
- package/src/state/session-persistence.test.ts +0 -187
- package/src/state/ticker-refresh-queue.test.ts +0 -46
- package/src/sync/auth-transition.test.ts +0 -36
- package/src/sync/controller.test.ts +0 -527
- package/src/sync/core-contributors.test.ts +0 -643
- package/src/test-support/fixtures/asml-earnings.json +0 -993
- package/src/theme/colors.test.ts +0 -85
- package/src/theme/font-scale.test.ts +0 -14
- package/src/theme/theme-context.test.tsx +0 -67
- package/src/theme/themes.test.ts +0 -100
- package/src/tickers/instrument-kind.test.ts +0 -21
- package/src/tickers/instrument-label.test.ts +0 -13
- package/src/tickers/list.test.ts +0 -17
- package/src/tickers/open-target.test.ts +0 -86
- package/src/tickers/search/index.test.ts +0 -950
- package/src/tickers/search-contract-context.test.tsx +0 -161
- package/src/tickers/search-contract-templates.test.ts +0 -83
- package/src/tickers/search-issuer-grouping.test.ts +0 -74
- package/src/tickers/search-listing-ranking.test.tsx +0 -122
- package/src/tickers/tokenizer.test.ts +0 -31
- package/src/time-series/bond-price-history.test.ts +0 -52
- package/src/time-series/calendar-month-end-resolution.test.ts +0 -106
- package/src/time-series/calendar-window-resolution.test.ts +0 -133
- package/src/time-series/chart-data.test.ts +0 -288
- package/src/time-series/date-window.test.ts +0 -113
- package/src/time-series/economic.test.ts +0 -44
- package/src/time-series/financial-history-request.test.ts +0 -20
- package/src/time-series/financial-period-coverage.test.ts +0 -37
- package/src/time-series/financial-period-gaps.test.ts +0 -128
- package/src/time-series/fixtures/q4-reported-common-income.json +0 -394
- package/src/time-series/fixtures/q4-reported-per-share.json +0 -305
- package/src/time-series/fixtures/quote-store.ts +0 -55
- package/src/time-series/forward-valuation.test.ts +0 -131
- package/src/time-series/fundamentals.test.ts +0 -592
- package/src/time-series/history-retention.test.ts +0 -141
- package/src/time-series/history-session-cache.test.ts +0 -250
- package/src/time-series/hooks.test.ts +0 -59
- package/src/time-series/legacy-contract-live.test.ts +0 -22
- package/src/time-series/live-bars.test.ts +0 -290
- package/src/time-series/live-quotes.test.ts +0 -208
- package/src/time-series/market-price-units.test.ts +0 -75
- package/src/time-series/parsed-history-identity.test.tsx +0 -142
- package/src/time-series/price-comparison.test.ts +0 -233
- package/src/time-series/price-history-integrity-window.test.ts +0 -137
- package/src/time-series/price-history-integrity.test.ts +0 -195
- package/src/time-series/q4-common-income.test.ts +0 -63
- package/src/time-series/q4-per-share.test.ts +0 -144
- package/src/time-series/realized-vol-study.test.ts +0 -189
- package/src/time-series/reporting-currency.test.ts +0 -99
- package/src/time-series/resolution.test.ts +0 -132
- package/src/time-series/resolve.test.ts +0 -2471
- package/src/time-series/sec-eps-research.test.ts +0 -55
- package/src/time-series/seed-cadence.test.tsx +0 -219
- package/src/time-series/served-cadence-consumers.test.ts +0 -52
- package/src/time-series/session-history-domain.test.ts +0 -160
- package/src/time-series/spec-studies.test.ts +0 -619
- package/src/time-series/transforms.test.ts +0 -216
- package/src/time-series/use-chart-resolution.test.tsx +0 -632
- package/src/time-series/valuation-currency.test.ts +0 -129
- package/src/time-series/valuation-denominator.test.ts +0 -240
- package/src/time-series/valuation-live-status.test.ts +0 -64
- package/src/time-series/valuation-price.test.ts +0 -267
- package/src/types/config.test.ts +0 -161
- package/src/ui/context-menu.test.ts +0 -95
- package/src/ui/qr.test.ts +0 -79
- package/src/updater/github-releases.test.ts +0 -41
- package/src/updater.test.ts +0 -561
- package/src/updater.ts +0 -480
- package/src/utils/calendar-date.test.ts +0 -18
- package/src/utils/cli-output.test.ts +0 -43
- package/src/utils/csv.test.ts +0 -13
- package/src/utils/currency-units.test.ts +0 -66
- package/src/utils/dom-screenshot.test.ts +0 -52
- package/src/utils/double-escape-close.test.ts +0 -33
- package/src/utils/earnings-result.ts +0 -35
- package/src/utils/exchange-rate-map.ts +0 -9
- package/src/utils/exchange-rate-snapshot.test.ts +0 -33
- package/src/utils/exchanges.test.ts +0 -62
- package/src/utils/external-url.test.ts +0 -32
- package/src/utils/financial-statements.test.ts +0 -211
- package/src/utils/format.test.ts +0 -61
- package/src/utils/fuzzy-search.test.ts +0 -94
- package/src/utils/fx-market-hours.test.ts +0 -28
- package/src/utils/fx-status.test.ts +0 -16
- package/src/utils/html-entities.test.ts +0 -8
- package/src/utils/inline-content-tokenizer.test.ts +0 -31
- package/src/utils/instrument-identity.test.ts +0 -26
- package/src/utils/latest-financial-period.test.ts +0 -19
- package/src/utils/link-tokenizer.test.ts +0 -27
- package/src/utils/main-thread-monitor.ts +0 -127
- package/src/utils/main-thread-stall.test.ts +0 -59
- package/src/utils/market-capitalization-consumers.test.ts +0 -59
- package/src/utils/market-capitalization.test.ts +0 -38
- package/src/utils/operating-result-aggregation.ts +0 -106
- package/src/utils/operating-result-consumers.test.ts +0 -212
- package/src/utils/operating-result.ts +0 -100
- package/src/utils/options.test.ts +0 -20
- package/src/utils/price-earnings.test.ts +0 -39
- package/src/utils/price-history.test.ts +0 -230
- package/src/utils/relative-time.ts +0 -8
- package/src/utils/reported-earnings-result.ts +0 -336
- package/src/utils/reported-money.test.ts +0 -25
- package/src/utils/reported-operating-result.ts +0 -271
- package/src/utils/save-text-file.test.ts +0 -24
- package/src/utils/sec-eps-basis.test.ts +0 -82
- package/src/utils/sec.test.ts +0 -60
- package/src/utils/semver.test.ts +0 -31
- package/src/utils/shop-operating-table.ts +0 -230
- package/src/utils/shortcut-labels.test.ts +0 -20
- package/src/utils/sort-values.test.ts +0 -11
- package/src/utils/statement-observations.ts +0 -129
- package/src/utils/throttled-fetch.test.ts +0 -186
- package/src/utils/tweet-text.test.ts +0 -13
|
@@ -1,1591 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, jest, test } from "bun:test";
|
|
2
|
-
import type { AuthUser } from "./index";
|
|
3
|
-
import { apiClient, setCloudApiFetchTransport } from "./index";
|
|
4
|
-
import { publishableMarketplaceLayout } from "../layout-marketplace/payload";
|
|
5
|
-
import { createDefaultConfig } from "../types/config";
|
|
6
|
-
import type { PaneDef } from "../types/plugin";
|
|
7
|
-
import { GloomberbCloudProvider } from "../sources/gloomberb-cloud";
|
|
8
|
-
import type { Quote } from "../types/financials";
|
|
9
|
-
import { getActiveQuoteDisplay } from "../market-data/market/status";
|
|
10
|
-
|
|
11
|
-
const originalFetch = globalThis.fetch;
|
|
12
|
-
const originalWebSocket = globalThis.WebSocket;
|
|
13
|
-
|
|
14
|
-
const verifiedUser: AuthUser = {
|
|
15
|
-
id: "user-1",
|
|
16
|
-
name: "Test User",
|
|
17
|
-
email: "test@example.com",
|
|
18
|
-
username: "test",
|
|
19
|
-
emailVerified: true,
|
|
20
|
-
image: null,
|
|
21
|
-
createdAt: "2026-03-30T00:00:00.000Z",
|
|
22
|
-
updatedAt: "2026-03-30T00:00:00.000Z",
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
function createResponse(
|
|
26
|
-
body: unknown,
|
|
27
|
-
options: { status?: number; cookies?: string[] } = {},
|
|
28
|
-
): Response {
|
|
29
|
-
const headers = {
|
|
30
|
-
getSetCookie: () => options.cookies ?? [],
|
|
31
|
-
get: (name: string) => {
|
|
32
|
-
if (name.toLowerCase() !== "set-cookie") return null;
|
|
33
|
-
return options.cookies?.[0] ?? null;
|
|
34
|
-
},
|
|
35
|
-
} as Headers;
|
|
36
|
-
|
|
37
|
-
return {
|
|
38
|
-
ok: (options.status ?? 200) >= 200 && (options.status ?? 200) < 300,
|
|
39
|
-
status: options.status ?? 200,
|
|
40
|
-
headers,
|
|
41
|
-
text: async () => JSON.stringify(body),
|
|
42
|
-
} as Response;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function mockFetch(
|
|
46
|
-
handler: (
|
|
47
|
-
input: Request | string | URL,
|
|
48
|
-
init?: RequestInit,
|
|
49
|
-
) => Response | Promise<Response>,
|
|
50
|
-
): typeof fetch {
|
|
51
|
-
return handler as unknown as typeof fetch;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
class TestWebSocket {
|
|
55
|
-
readyState: number;
|
|
56
|
-
onopen: ((event: unknown) => void) | null = null;
|
|
57
|
-
onmessage: ((event: { data: string }) => void) | null = null;
|
|
58
|
-
onclose: ((event: unknown) => void) | null = null;
|
|
59
|
-
onerror: ((event: unknown) => void) | null = null;
|
|
60
|
-
readonly sent: unknown[] = [];
|
|
61
|
-
closeCalls = 0;
|
|
62
|
-
|
|
63
|
-
constructor(
|
|
64
|
-
readonly url: string,
|
|
65
|
-
initialReadyState: number,
|
|
66
|
-
) {
|
|
67
|
-
this.readyState = initialReadyState;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
send(payload: string): void {
|
|
71
|
-
this.sent.push(JSON.parse(payload));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
close(): void {
|
|
75
|
-
this.closeCalls += 1;
|
|
76
|
-
this.readyState = 3;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
open(): void {
|
|
80
|
-
this.readyState = 1;
|
|
81
|
-
this.onopen?.({});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
receive(payload: unknown): void {
|
|
85
|
-
this.onmessage?.({ data: JSON.stringify(payload) });
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
closeWith(event: { code: number; reason: string }): void {
|
|
89
|
-
this.readyState = 3;
|
|
90
|
-
this.onclose?.(event);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function installTestWebSocket(initialReadyState = 1): TestWebSocket[] {
|
|
95
|
-
const sockets: TestWebSocket[] = [];
|
|
96
|
-
|
|
97
|
-
class InstalledTestWebSocket extends TestWebSocket {
|
|
98
|
-
static readonly OPEN = 1;
|
|
99
|
-
|
|
100
|
-
constructor(url: string) {
|
|
101
|
-
super(url, initialReadyState);
|
|
102
|
-
sockets.push(this);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
globalThis.WebSocket = InstalledTestWebSocket as unknown as typeof WebSocket;
|
|
107
|
-
return sockets;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function flushQuoteSubscriptionUpdates(): void {
|
|
111
|
-
jest.runAllTimers();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
afterEach(() => {
|
|
115
|
-
apiClient.dispose();
|
|
116
|
-
globalThis.fetch = originalFetch;
|
|
117
|
-
globalThis.WebSocket = originalWebSocket;
|
|
118
|
-
setCloudApiFetchTransport(null);
|
|
119
|
-
apiClient.setSessionToken(null);
|
|
120
|
-
apiClient.setWebSocketToken(null);
|
|
121
|
-
apiClient.setCookieSessionMode(false);
|
|
122
|
-
jest.useRealTimers();
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
test("normalizes unavailable JSON changes through REST, embedded financials, batches and quote streams", async () => {
|
|
126
|
-
const sockets = installTestWebSocket();
|
|
127
|
-
apiClient.setSessionToken("quote-wire-session");
|
|
128
|
-
apiClient.restoreCachedUser(verifiedUser);
|
|
129
|
-
const provider = new GloomberbCloudProvider();
|
|
130
|
-
const target = { symbol: "AAPL", exchange: "NASDAQ" };
|
|
131
|
-
let quote = {
|
|
132
|
-
...target, price: 100, currency: "USD", providerId: "gloomberb-cloud",
|
|
133
|
-
dataSource: "live", lastUpdated: Date.parse("2026-09-16T14:00:00Z"),
|
|
134
|
-
marketState: "REGULAR", change: Number.NaN, changePercent: Number.NaN,
|
|
135
|
-
};
|
|
136
|
-
setCloudApiFetchTransport(mockFetch((input) => {
|
|
137
|
-
const path = new URL(String(input)).pathname;
|
|
138
|
-
if (path.endsWith("/auth/session")) return createResponse({ user: verifiedUser });
|
|
139
|
-
const data = path.includes("/financials")
|
|
140
|
-
? { quote, annualStatements: [], quarterlyStatements: [], priceHistory: [] }
|
|
141
|
-
: quote;
|
|
142
|
-
return createResponse({ status: "success", data: path.endsWith("/batch")
|
|
143
|
-
? { items: [{ ...target, status: "success", data }] } : data });
|
|
144
|
-
}));
|
|
145
|
-
const seen: Quote[] = [];
|
|
146
|
-
const unsubscribe = provider.subscribeQuotes([target], (_target, value) => seen.push(value));
|
|
147
|
-
const socket = sockets[0]!;
|
|
148
|
-
socket.open();
|
|
149
|
-
try {
|
|
150
|
-
for (const [index, change] of [Number.NaN, 0, 2].entries()) {
|
|
151
|
-
quote = { ...quote, price: Number.isFinite(change) ? 100 + change : 100, change, changePercent: change };
|
|
152
|
-
// Both transports serialize NaN to null before the real client parses it.
|
|
153
|
-
socket.receive({ type: "market.quote", ...target, quote });
|
|
154
|
-
const values = [
|
|
155
|
-
await provider.getQuote(target.symbol, target.exchange),
|
|
156
|
-
(await provider.getTickerFinancials(target.symbol, target.exchange)).quote,
|
|
157
|
-
(await provider.getQuotesBatch([target]))[0]?.quote,
|
|
158
|
-
(await provider.getTickerFinancialsBatch([target]))[0]?.financials?.quote,
|
|
159
|
-
seen.at(-1),
|
|
160
|
-
];
|
|
161
|
-
expect(seen).toHaveLength(index + 1);
|
|
162
|
-
for (const value of values) {
|
|
163
|
-
expect(value).toBeDefined();
|
|
164
|
-
expect(value?.change).toBe(change);
|
|
165
|
-
expect(value?.changePercent).toBe(change);
|
|
166
|
-
expect(getActiveQuoteDisplay(value)?.change).toBe(change);
|
|
167
|
-
expect(getActiveQuoteDisplay(value)?.changePercent).toBe(change);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
} finally {
|
|
171
|
-
unsubscribe();
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
describe("apiClient layout marketplace", () => {
|
|
176
|
-
test("lists and publishes validated layouts through authenticated transport", async () => {
|
|
177
|
-
const config = createDefaultConfig("/tmp/api-layout-marketplace-test");
|
|
178
|
-
const panes = new Map(
|
|
179
|
-
config.layout.instances.map((instance) => [
|
|
180
|
-
instance.paneId,
|
|
181
|
-
{
|
|
182
|
-
id: instance.paneId,
|
|
183
|
-
name: instance.paneId,
|
|
184
|
-
component: () => null,
|
|
185
|
-
defaultPosition: "right" as const,
|
|
186
|
-
} satisfies PaneDef,
|
|
187
|
-
]),
|
|
188
|
-
);
|
|
189
|
-
const payload = publishableMarketplaceLayout(config.layout, {}, panes);
|
|
190
|
-
const entry = {
|
|
191
|
-
id: "0123456789abcdef0123456789abcdef",
|
|
192
|
-
name: "Research Desk",
|
|
193
|
-
...payload,
|
|
194
|
-
author: { username: "analyst", displayName: "Analyst" },
|
|
195
|
-
publishedAt: "2026-08-26T00:00:00.000Z",
|
|
196
|
-
};
|
|
197
|
-
const calls: Array<{ url: string; method: string; body?: unknown }> = [];
|
|
198
|
-
apiClient.setSessionToken("marketplace-session");
|
|
199
|
-
setCloudApiFetchTransport(async (url, init) => {
|
|
200
|
-
calls.push({
|
|
201
|
-
url,
|
|
202
|
-
method: init?.method ?? "GET",
|
|
203
|
-
...(typeof init?.body === "string"
|
|
204
|
-
? { body: JSON.parse(init.body) }
|
|
205
|
-
: {}),
|
|
206
|
-
});
|
|
207
|
-
const path = new URL(url).pathname;
|
|
208
|
-
return createResponse(
|
|
209
|
-
path === `/layouts/${entry.id}` || init?.method === "POST"
|
|
210
|
-
? entry
|
|
211
|
-
: { items: [entry] },
|
|
212
|
-
);
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
await expect(apiClient.listMarketplaceLayouts()).resolves.toEqual([entry]);
|
|
216
|
-
await expect(apiClient.getMarketplaceLayout(entry.id)).resolves.toEqual(
|
|
217
|
-
entry,
|
|
218
|
-
);
|
|
219
|
-
await expect(
|
|
220
|
-
apiClient.publishMarketplaceLayout(entry.name, payload),
|
|
221
|
-
).resolves.toEqual(entry);
|
|
222
|
-
|
|
223
|
-
expect(
|
|
224
|
-
calls.map((call) => [new URL(call.url).pathname, call.method]),
|
|
225
|
-
).toEqual([
|
|
226
|
-
["/layouts", "GET"],
|
|
227
|
-
[`/layouts/${entry.id}`, "GET"],
|
|
228
|
-
["/layouts", "POST"],
|
|
229
|
-
]);
|
|
230
|
-
expect(calls[2]?.body).toMatchObject({
|
|
231
|
-
name: "Research Desk",
|
|
232
|
-
schemaVersion: 2,
|
|
233
|
-
paneState: {},
|
|
234
|
-
});
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
describe("apiClient auth cookies", () => {
|
|
239
|
-
test("accepts a browser-managed api.gloom.sh cookie without exposing its value", async () => {
|
|
240
|
-
apiClient.setCookieSessionMode(true);
|
|
241
|
-
setCloudApiFetchTransport(
|
|
242
|
-
mockFetch(() => createResponse({ user: verifiedUser })),
|
|
243
|
-
);
|
|
244
|
-
|
|
245
|
-
await expect(
|
|
246
|
-
apiClient.signIn("test@example.com", "password"),
|
|
247
|
-
).resolves.toEqual(verifiedUser);
|
|
248
|
-
expect(apiClient.getSessionToken()).toBeNull();
|
|
249
|
-
expect(apiClient.isVerified()).toBe(true);
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
test("reports signed-in from the restored user when the cookie hides the raw token", async () => {
|
|
253
|
-
apiClient.setCookieSessionMode(true);
|
|
254
|
-
setCloudApiFetchTransport(
|
|
255
|
-
mockFetch(() => createResponse({ user: verifiedUser })),
|
|
256
|
-
);
|
|
257
|
-
|
|
258
|
-
expect(apiClient.isSignedIn()).toBe(false);
|
|
259
|
-
await apiClient.signIn("test@example.com", "password");
|
|
260
|
-
expect(apiClient.getSessionToken()).toBeNull();
|
|
261
|
-
expect(apiClient.isSignedIn()).toBe(true);
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
test("coalesces anonymous browser session checks and remembers the result", async () => {
|
|
265
|
-
apiClient.setCookieSessionMode(true);
|
|
266
|
-
let requests = 0;
|
|
267
|
-
let finishRequest!: () => void;
|
|
268
|
-
setCloudApiFetchTransport(async () => {
|
|
269
|
-
requests += 1;
|
|
270
|
-
await new Promise<void>((resolve) => {
|
|
271
|
-
finishRequest = resolve;
|
|
272
|
-
});
|
|
273
|
-
return createResponse({ user: null });
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
const checks = [
|
|
277
|
-
apiClient.ensureVerifiedSession(),
|
|
278
|
-
apiClient.ensureVerifiedSession(),
|
|
279
|
-
apiClient.ensureVerifiedSession(),
|
|
280
|
-
];
|
|
281
|
-
expect(requests).toBe(1);
|
|
282
|
-
finishRequest();
|
|
283
|
-
|
|
284
|
-
await expect(Promise.all(checks)).resolves.toEqual([null, null, null]);
|
|
285
|
-
await expect(apiClient.ensureVerifiedSession()).resolves.toBeNull();
|
|
286
|
-
expect(requests).toBe(1);
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* On boot a session check can leave before the persisted token is installed.
|
|
291
|
-
* Its "no session" answer must not overwrite the verified user that hydrate
|
|
292
|
-
* restored in the meantime; that exact sequence left the app authenticated
|
|
293
|
-
* for chat while every plan-gated surface reported signed out.
|
|
294
|
-
*/
|
|
295
|
-
test("a session check that predates the restored token does not wipe the restored user", async () => {
|
|
296
|
-
const seen: Array<string | null> = [];
|
|
297
|
-
let releaseFirst!: () => void;
|
|
298
|
-
setCloudApiFetchTransport(async (_url, init) => {
|
|
299
|
-
const cookie = new Headers(init?.headers).get("cookie");
|
|
300
|
-
seen.push(cookie);
|
|
301
|
-
if (seen.length === 1) {
|
|
302
|
-
await new Promise<void>((resolve) => {
|
|
303
|
-
releaseFirst = resolve;
|
|
304
|
-
});
|
|
305
|
-
return createResponse({ user: null });
|
|
306
|
-
}
|
|
307
|
-
return createResponse({ user: verifiedUser });
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
// A cookie-less check goes out first.
|
|
311
|
-
const early = apiClient.getSession();
|
|
312
|
-
expect(seen).toHaveLength(1);
|
|
313
|
-
expect(seen[0]).toBeNull();
|
|
314
|
-
|
|
315
|
-
// Hydrate installs the token and the cached user while it is in flight.
|
|
316
|
-
apiClient.setSessionToken("restored-token");
|
|
317
|
-
apiClient.restoreCachedUser(verifiedUser);
|
|
318
|
-
expect(apiClient.getCurrentUser()?.emailVerified).toBe(true);
|
|
319
|
-
|
|
320
|
-
releaseFirst();
|
|
321
|
-
await expect(early).resolves.toMatchObject({ id: verifiedUser.id });
|
|
322
|
-
|
|
323
|
-
// The stale answer was discarded and a second check went out with the real cookie.
|
|
324
|
-
expect(seen).toHaveLength(2);
|
|
325
|
-
expect(seen[1]).toContain("restored-token");
|
|
326
|
-
expect(apiClient.getCurrentUser()?.emailVerified).toBe(true);
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
test("captures secure session cookies after login and reuses them on session refresh", async () => {
|
|
330
|
-
const seenCookies: Array<string | null> = [];
|
|
331
|
-
|
|
332
|
-
globalThis.fetch = mockFetch(
|
|
333
|
-
async (_input: Request | string | URL, init?: RequestInit) => {
|
|
334
|
-
const headers = new Headers(init?.headers);
|
|
335
|
-
seenCookies.push(headers.get("Cookie"));
|
|
336
|
-
|
|
337
|
-
if (seenCookies.length === 1) {
|
|
338
|
-
return createResponse(
|
|
339
|
-
{ token: "ws-token", user: verifiedUser },
|
|
340
|
-
{
|
|
341
|
-
cookies: [
|
|
342
|
-
"__Secure-gloomberb.session_token=signed-token.value; Path=/; HttpOnly; Secure; SameSite=Lax",
|
|
343
|
-
],
|
|
344
|
-
},
|
|
345
|
-
);
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
return createResponse({ user: verifiedUser });
|
|
349
|
-
},
|
|
350
|
-
);
|
|
351
|
-
|
|
352
|
-
await apiClient.signIn("test@example.com", "password");
|
|
353
|
-
await apiClient.getSession();
|
|
354
|
-
|
|
355
|
-
expect(apiClient.getSessionToken()).toBe("signed-token.value");
|
|
356
|
-
expect(apiClient.getWebSocketToken()).toBe("ws-token");
|
|
357
|
-
expect(seenCookies).toEqual([
|
|
358
|
-
null,
|
|
359
|
-
"__Secure-gloomberb.session_token=signed-token.value",
|
|
360
|
-
]);
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
test("ignores a stale response cookie after the session credential changes", async () => {
|
|
364
|
-
let releaseResponse: (() => void) | null = null;
|
|
365
|
-
let markRequestStarted: (() => void) | null = null;
|
|
366
|
-
const requestStarted = new Promise<void>((resolve) => {
|
|
367
|
-
markRequestStarted = resolve;
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
apiClient.setSessionToken("old-session.value");
|
|
371
|
-
setCloudApiFetchTransport(async () => {
|
|
372
|
-
markRequestStarted?.();
|
|
373
|
-
await new Promise<void>((resolve) => {
|
|
374
|
-
releaseResponse = resolve;
|
|
375
|
-
});
|
|
376
|
-
return createResponse(
|
|
377
|
-
{
|
|
378
|
-
channels: [],
|
|
379
|
-
onlineCount: 0,
|
|
380
|
-
channelStates: [],
|
|
381
|
-
notifications: [],
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
cookies: [
|
|
385
|
-
"__Secure-gloomberb.session_token=old-session.value; Path=/; HttpOnly; Secure; SameSite=None",
|
|
386
|
-
],
|
|
387
|
-
},
|
|
388
|
-
);
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
const staleRequest = apiClient.getChatState();
|
|
392
|
-
await requestStarted;
|
|
393
|
-
apiClient.setSessionToken("new-session.value");
|
|
394
|
-
releaseResponse?.();
|
|
395
|
-
await staleRequest;
|
|
396
|
-
|
|
397
|
-
expect(apiClient.getSessionToken()).toBe("new-session.value");
|
|
398
|
-
});
|
|
399
|
-
|
|
400
|
-
test("uses an installed cloud API fetch transport for auth cookie capture", async () => {
|
|
401
|
-
const seenCookies: Array<string | null> = [];
|
|
402
|
-
globalThis.fetch = mockFetch(async () => {
|
|
403
|
-
throw new Error("global fetch should not be used");
|
|
404
|
-
});
|
|
405
|
-
setCloudApiFetchTransport(async (_url, init) => {
|
|
406
|
-
const headers = new Headers(init?.headers);
|
|
407
|
-
seenCookies.push(headers.get("Cookie"));
|
|
408
|
-
return createResponse(
|
|
409
|
-
{ token: "ws-token", user: verifiedUser },
|
|
410
|
-
{
|
|
411
|
-
cookies: [
|
|
412
|
-
"gloomberb.session_token=signed-token.value; Path=/; HttpOnly; SameSite=Lax",
|
|
413
|
-
],
|
|
414
|
-
},
|
|
415
|
-
);
|
|
416
|
-
});
|
|
417
|
-
|
|
418
|
-
await apiClient.signIn("test@example.com", "password");
|
|
419
|
-
|
|
420
|
-
expect(apiClient.getSessionToken()).toBe("signed-token.value");
|
|
421
|
-
expect(apiClient.getWebSocketToken()).toBe("ws-token");
|
|
422
|
-
expect(seenCookies).toEqual([null]);
|
|
423
|
-
});
|
|
424
|
-
|
|
425
|
-
test("rejects login success without a captured session cookie", async () => {
|
|
426
|
-
globalThis.fetch = mockFetch(async () =>
|
|
427
|
-
createResponse({ token: "raw-session-token", user: verifiedUser }),
|
|
428
|
-
);
|
|
429
|
-
|
|
430
|
-
await expect(
|
|
431
|
-
apiClient.signIn("test@example.com", "password"),
|
|
432
|
-
).rejects.toThrow("could not save the login session");
|
|
433
|
-
expect(apiClient.getSessionToken()).toBeNull();
|
|
434
|
-
expect(apiClient.getWebSocketToken()).toBeNull();
|
|
435
|
-
expect(apiClient.getCurrentUser()).toBeNull();
|
|
436
|
-
});
|
|
437
|
-
|
|
438
|
-
test("replays both supported cookie names when restoring a saved session token", async () => {
|
|
439
|
-
const seenCookies: Array<string | null> = [];
|
|
440
|
-
apiClient.setSessionToken("persisted-token.value");
|
|
441
|
-
|
|
442
|
-
globalThis.fetch = mockFetch(
|
|
443
|
-
async (_input: Request | string | URL, init?: RequestInit) => {
|
|
444
|
-
const headers = new Headers(init?.headers);
|
|
445
|
-
seenCookies.push(headers.get("Cookie"));
|
|
446
|
-
return createResponse({ user: verifiedUser });
|
|
447
|
-
},
|
|
448
|
-
);
|
|
449
|
-
|
|
450
|
-
await apiClient.getSession();
|
|
451
|
-
|
|
452
|
-
expect(seenCookies).toEqual([
|
|
453
|
-
"__Secure-gloomberb.session_token=persisted-token.value; gloomberb.session_token=persisted-token.value",
|
|
454
|
-
]);
|
|
455
|
-
});
|
|
456
|
-
|
|
457
|
-
test("creates a browser handoff with the captured session instead of exposing it in the URL", async () => {
|
|
458
|
-
let requestedUrl = "";
|
|
459
|
-
let requestedCookie: string | null = null;
|
|
460
|
-
apiClient.setSessionToken("desktop-session-token");
|
|
461
|
-
globalThis.fetch = mockFetch(
|
|
462
|
-
async (input: Request | string | URL, init?: RequestInit) => {
|
|
463
|
-
requestedUrl = String(input);
|
|
464
|
-
requestedCookie = new Headers(init?.headers).get("Cookie");
|
|
465
|
-
return createResponse({
|
|
466
|
-
url: "https://api.gloom.sh/cloud/auth/browser-handoff?token=opaque-one-time-token",
|
|
467
|
-
});
|
|
468
|
-
},
|
|
469
|
-
);
|
|
470
|
-
|
|
471
|
-
const handoff = await apiClient.createBrowserHandoff();
|
|
472
|
-
|
|
473
|
-
expect(new URL(requestedUrl).pathname).toBe("/cloud/auth/browser-handoff");
|
|
474
|
-
expect(requestedCookie).toBe(
|
|
475
|
-
"__Secure-gloomberb.session_token=desktop-session-token; gloomberb.session_token=desktop-session-token",
|
|
476
|
-
);
|
|
477
|
-
expect(handoff.url).toContain("token=opaque-one-time-token");
|
|
478
|
-
expect(handoff.url).not.toContain("desktop-session-token");
|
|
479
|
-
});
|
|
480
|
-
|
|
481
|
-
test("keeps cached identity when session refresh is rejected without a hard account-missing response", async () => {
|
|
482
|
-
apiClient.setSessionToken("persisted-token.value");
|
|
483
|
-
apiClient.restoreCachedUser(verifiedUser);
|
|
484
|
-
|
|
485
|
-
globalThis.fetch = mockFetch(async () =>
|
|
486
|
-
createResponse({ message: "Unauthorized" }, { status: 401 }),
|
|
487
|
-
);
|
|
488
|
-
|
|
489
|
-
await expect(apiClient.getSession()).rejects.toThrow("Unauthorized");
|
|
490
|
-
expect(apiClient.getSessionToken()).toBe("persisted-token.value");
|
|
491
|
-
expect(apiClient.getCurrentUser()).toMatchObject({
|
|
492
|
-
id: verifiedUser.id,
|
|
493
|
-
username: verifiedUser.username,
|
|
494
|
-
emailVerified: true,
|
|
495
|
-
});
|
|
496
|
-
});
|
|
497
|
-
|
|
498
|
-
test("clears cached identity when session refresh says the account no longer exists", async () => {
|
|
499
|
-
apiClient.setSessionToken("persisted-token.value");
|
|
500
|
-
apiClient.setWebSocketToken("ws-token");
|
|
501
|
-
apiClient.restoreCachedUser(verifiedUser);
|
|
502
|
-
|
|
503
|
-
globalThis.fetch = mockFetch(async () =>
|
|
504
|
-
createResponse({ code: "USER_NOT_FOUND" }, { status: 403 }),
|
|
505
|
-
);
|
|
506
|
-
|
|
507
|
-
await expect(apiClient.getSession()).resolves.toBeNull();
|
|
508
|
-
expect(apiClient.getSessionToken()).toBeNull();
|
|
509
|
-
expect(apiClient.getWebSocketToken()).toBeNull();
|
|
510
|
-
expect(apiClient.getCurrentUser()).toBeNull();
|
|
511
|
-
});
|
|
512
|
-
|
|
513
|
-
test("clears local session on explicit sign out even if the server request fails", async () => {
|
|
514
|
-
apiClient.setSessionToken("persisted-token.value");
|
|
515
|
-
apiClient.setWebSocketToken("ws-token");
|
|
516
|
-
apiClient.restoreCachedUser(verifiedUser);
|
|
517
|
-
|
|
518
|
-
globalThis.fetch = mockFetch(async () =>
|
|
519
|
-
createResponse({ message: "server unavailable" }, { status: 503 }),
|
|
520
|
-
);
|
|
521
|
-
|
|
522
|
-
await expect(apiClient.signOut()).rejects.toThrow("server unavailable");
|
|
523
|
-
expect(apiClient.getSessionToken()).toBeNull();
|
|
524
|
-
expect(apiClient.getWebSocketToken()).toBeNull();
|
|
525
|
-
expect(apiClient.getCurrentUser()).toBeNull();
|
|
526
|
-
});
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
describe("apiClient quote socket", () => {
|
|
530
|
-
test("drops a stale websocket token after socket close so reconnect can use the session token", () => {
|
|
531
|
-
const sockets = installTestWebSocket(0);
|
|
532
|
-
apiClient.setSessionToken("session-token");
|
|
533
|
-
apiClient.setWebSocketToken("stale-ws-token");
|
|
534
|
-
apiClient.restoreCachedUser(verifiedUser);
|
|
535
|
-
|
|
536
|
-
const unsubscribe = apiClient.subscribeQuotes(
|
|
537
|
-
[{ symbol: "AAPL" }],
|
|
538
|
-
() => {},
|
|
539
|
-
);
|
|
540
|
-
|
|
541
|
-
expect(sockets).toHaveLength(1);
|
|
542
|
-
expect(sockets[0]!.url).toContain("token=stale-ws-token");
|
|
543
|
-
|
|
544
|
-
sockets[0]!.closeWith({ code: 1008, reason: "Unauthorized" });
|
|
545
|
-
|
|
546
|
-
expect(apiClient.getWebSocketToken()).toBeNull();
|
|
547
|
-
expect(apiClient.getSessionToken()).toBe("session-token");
|
|
548
|
-
|
|
549
|
-
unsubscribe();
|
|
550
|
-
});
|
|
551
|
-
|
|
552
|
-
test("opens an anonymous market websocket and sends quote priority hints", () => {
|
|
553
|
-
const sockets = installTestWebSocket();
|
|
554
|
-
|
|
555
|
-
const unsubscribe = apiClient.subscribeQuotes(
|
|
556
|
-
[
|
|
557
|
-
{
|
|
558
|
-
symbol: "AAPL",
|
|
559
|
-
exchange: "NASDAQ",
|
|
560
|
-
surface: "portfolio",
|
|
561
|
-
visible: true,
|
|
562
|
-
selected: true,
|
|
563
|
-
weight: 100,
|
|
564
|
-
},
|
|
565
|
-
],
|
|
566
|
-
() => {},
|
|
567
|
-
);
|
|
568
|
-
sockets[0]!.open();
|
|
569
|
-
|
|
570
|
-
expect(sockets).toHaveLength(1);
|
|
571
|
-
expect(sockets[0]!.url).toBe("wss://api.gloom.sh/cloud/ws");
|
|
572
|
-
expect(sockets[0]!.sent).toContainEqual({
|
|
573
|
-
type: "market.subscribe",
|
|
574
|
-
symbols: [
|
|
575
|
-
{
|
|
576
|
-
symbol: "AAPL",
|
|
577
|
-
exchange: "NASDAQ",
|
|
578
|
-
surface: "portfolio",
|
|
579
|
-
visible: true,
|
|
580
|
-
selected: true,
|
|
581
|
-
weight: 100,
|
|
582
|
-
},
|
|
583
|
-
],
|
|
584
|
-
});
|
|
585
|
-
|
|
586
|
-
unsubscribe();
|
|
587
|
-
});
|
|
588
|
-
|
|
589
|
-
test("reconnects and replays quote targets when market entitlement changes", () => {
|
|
590
|
-
const sockets = installTestWebSocket();
|
|
591
|
-
apiClient.setSessionToken("session-token");
|
|
592
|
-
apiClient.restoreCachedUser({ ...verifiedUser, plan: "free" });
|
|
593
|
-
const target = {
|
|
594
|
-
symbol: "AAPL260731C00110000",
|
|
595
|
-
exchange: "OPTIONS",
|
|
596
|
-
surface: "options" as const,
|
|
597
|
-
visible: true,
|
|
598
|
-
};
|
|
599
|
-
const unsubscribe = apiClient.subscribeQuotes([target], () => {});
|
|
600
|
-
sockets[0]!.open();
|
|
601
|
-
|
|
602
|
-
apiClient.restoreCachedUser({ ...verifiedUser, plan: "pro" });
|
|
603
|
-
|
|
604
|
-
expect(sockets).toHaveLength(2);
|
|
605
|
-
expect(sockets[0]!.closeCalls).toBe(1);
|
|
606
|
-
expect(sockets[1]!.url).toContain("token=session-token");
|
|
607
|
-
sockets[1]!.open();
|
|
608
|
-
expect(sockets[1]!.sent).toContainEqual({
|
|
609
|
-
type: "market.subscribe",
|
|
610
|
-
symbols: [target],
|
|
611
|
-
});
|
|
612
|
-
unsubscribe();
|
|
613
|
-
});
|
|
614
|
-
|
|
615
|
-
test("serializes and dispatches compact OCC option quote targets", () => {
|
|
616
|
-
const sockets = installTestWebSocket();
|
|
617
|
-
const seen: Array<{ symbol: string; dataSource: string | undefined }> = [];
|
|
618
|
-
const unsubscribe = apiClient.subscribeQuotes(
|
|
619
|
-
[
|
|
620
|
-
{
|
|
621
|
-
symbol: "AAPL260731C00110000",
|
|
622
|
-
exchange: "OPTIONS",
|
|
623
|
-
surface: "options",
|
|
624
|
-
visible: true,
|
|
625
|
-
selected: true,
|
|
626
|
-
weight: 100,
|
|
627
|
-
},
|
|
628
|
-
],
|
|
629
|
-
(target, quote) => {
|
|
630
|
-
seen.push({ symbol: target.symbol, dataSource: quote.dataSource });
|
|
631
|
-
},
|
|
632
|
-
);
|
|
633
|
-
const socket = sockets[0]!;
|
|
634
|
-
socket.open();
|
|
635
|
-
|
|
636
|
-
expect(socket.sent).toContainEqual({
|
|
637
|
-
type: "market.subscribe",
|
|
638
|
-
symbols: [
|
|
639
|
-
{
|
|
640
|
-
symbol: "AAPL260731C00110000",
|
|
641
|
-
exchange: "OPTIONS",
|
|
642
|
-
surface: "options",
|
|
643
|
-
visible: true,
|
|
644
|
-
selected: true,
|
|
645
|
-
weight: 100,
|
|
646
|
-
},
|
|
647
|
-
],
|
|
648
|
-
});
|
|
649
|
-
|
|
650
|
-
socket.receive({
|
|
651
|
-
type: "market.quote",
|
|
652
|
-
symbol: "AAPL260731C00110000",
|
|
653
|
-
exchange: "OPTIONS",
|
|
654
|
-
quote: {
|
|
655
|
-
symbol: "AAPL260731C00110000",
|
|
656
|
-
providerId: "gloomberb-cloud",
|
|
657
|
-
price: 2.5,
|
|
658
|
-
currency: "USD",
|
|
659
|
-
change: 0,
|
|
660
|
-
changePercent: 0,
|
|
661
|
-
lastUpdated: 1_800_000_000_000,
|
|
662
|
-
dataSource: "live",
|
|
663
|
-
},
|
|
664
|
-
});
|
|
665
|
-
|
|
666
|
-
expect(seen).toEqual([
|
|
667
|
-
{
|
|
668
|
-
symbol: "AAPL260731C00110000",
|
|
669
|
-
dataSource: "live",
|
|
670
|
-
},
|
|
671
|
-
]);
|
|
672
|
-
unsubscribe();
|
|
673
|
-
});
|
|
674
|
-
|
|
675
|
-
test("preserves quote delivery and stale metadata from websocket messages", () => {
|
|
676
|
-
const sockets = installTestWebSocket();
|
|
677
|
-
const seen: Array<{ delivery?: string; stale?: boolean }> = [];
|
|
678
|
-
const unsubscribe = apiClient.subscribeQuotes(
|
|
679
|
-
[{ symbol: "AAPL260731C00110000", exchange: "OPTIONS" }],
|
|
680
|
-
(_target, quote) => {
|
|
681
|
-
seen.push({ delivery: quote.delivery, stale: quote.stale });
|
|
682
|
-
},
|
|
683
|
-
);
|
|
684
|
-
const socket = sockets[0]!;
|
|
685
|
-
socket.open();
|
|
686
|
-
|
|
687
|
-
socket.receive({
|
|
688
|
-
type: "market.quote",
|
|
689
|
-
symbol: "AAPL260731C00110000",
|
|
690
|
-
exchange: "OPTIONS",
|
|
691
|
-
delivery: "poll",
|
|
692
|
-
stale: true,
|
|
693
|
-
quote: {
|
|
694
|
-
symbol: "AAPL260731C00110000",
|
|
695
|
-
providerId: "gloomberb-cloud",
|
|
696
|
-
price: 2.5,
|
|
697
|
-
currency: "USD",
|
|
698
|
-
change: 0,
|
|
699
|
-
changePercent: 0,
|
|
700
|
-
lastUpdated: 1_800_000_000_000,
|
|
701
|
-
dataSource: "live",
|
|
702
|
-
},
|
|
703
|
-
});
|
|
704
|
-
|
|
705
|
-
expect(seen).toEqual([{ delivery: "poll", stale: true }]);
|
|
706
|
-
unsubscribe();
|
|
707
|
-
});
|
|
708
|
-
|
|
709
|
-
test("does not invent quote priority hints when opening a socket", () => {
|
|
710
|
-
const sockets = installTestWebSocket();
|
|
711
|
-
|
|
712
|
-
const unsubscribe = apiClient.subscribeQuotes(
|
|
713
|
-
[{ symbol: "AAPL", exchange: "NASDAQ" }],
|
|
714
|
-
() => {},
|
|
715
|
-
);
|
|
716
|
-
sockets[0]!.open();
|
|
717
|
-
|
|
718
|
-
expect(sockets[0]!.sent).toContainEqual({
|
|
719
|
-
type: "market.subscribe",
|
|
720
|
-
symbols: [{ symbol: "AAPL", exchange: "NASDAQ" }],
|
|
721
|
-
});
|
|
722
|
-
|
|
723
|
-
unsubscribe();
|
|
724
|
-
});
|
|
725
|
-
|
|
726
|
-
test("recomputes quote priority when overlapping subscriptions are removed", () => {
|
|
727
|
-
jest.useFakeTimers();
|
|
728
|
-
const sockets = installTestWebSocket();
|
|
729
|
-
const deliveredSurfaces: string[] = [];
|
|
730
|
-
const unsubscribeInline = apiClient.subscribeQuotes(
|
|
731
|
-
[
|
|
732
|
-
{
|
|
733
|
-
symbol: "AAPL",
|
|
734
|
-
exchange: "NASDAQ",
|
|
735
|
-
surface: "inline",
|
|
736
|
-
weight: 1,
|
|
737
|
-
},
|
|
738
|
-
],
|
|
739
|
-
(target) => {
|
|
740
|
-
deliveredSurfaces.push(target.surface ?? "unknown");
|
|
741
|
-
},
|
|
742
|
-
);
|
|
743
|
-
const socket = sockets[0]!;
|
|
744
|
-
socket.open();
|
|
745
|
-
flushQuoteSubscriptionUpdates();
|
|
746
|
-
socket.sent.length = 0;
|
|
747
|
-
|
|
748
|
-
const unsubscribeDetail = apiClient.subscribeQuotes(
|
|
749
|
-
[
|
|
750
|
-
{
|
|
751
|
-
symbol: "AAPL",
|
|
752
|
-
exchange: "NASDAQ",
|
|
753
|
-
surface: "detail",
|
|
754
|
-
visible: true,
|
|
755
|
-
selected: true,
|
|
756
|
-
weight: 50,
|
|
757
|
-
},
|
|
758
|
-
],
|
|
759
|
-
(target) => {
|
|
760
|
-
deliveredSurfaces.push(target.surface ?? "unknown");
|
|
761
|
-
},
|
|
762
|
-
);
|
|
763
|
-
flushQuoteSubscriptionUpdates();
|
|
764
|
-
|
|
765
|
-
expect(socket.sent.at(-1)).toEqual({
|
|
766
|
-
type: "market.subscribe",
|
|
767
|
-
symbols: [
|
|
768
|
-
{
|
|
769
|
-
symbol: "AAPL",
|
|
770
|
-
exchange: "NASDAQ",
|
|
771
|
-
surface: "detail",
|
|
772
|
-
visible: true,
|
|
773
|
-
selected: true,
|
|
774
|
-
weight: 50,
|
|
775
|
-
},
|
|
776
|
-
],
|
|
777
|
-
});
|
|
778
|
-
|
|
779
|
-
socket.receive({
|
|
780
|
-
type: "market.quote",
|
|
781
|
-
symbol: "AAPL",
|
|
782
|
-
exchange: "NASDAQ",
|
|
783
|
-
quote: { symbol: "AAPL", price: 123 },
|
|
784
|
-
});
|
|
785
|
-
expect(deliveredSurfaces).toEqual(["inline", "detail"]);
|
|
786
|
-
|
|
787
|
-
unsubscribeDetail();
|
|
788
|
-
flushQuoteSubscriptionUpdates();
|
|
789
|
-
expect(socket.sent.at(-1)).toEqual({
|
|
790
|
-
type: "market.subscribe",
|
|
791
|
-
symbols: [
|
|
792
|
-
{
|
|
793
|
-
symbol: "AAPL",
|
|
794
|
-
exchange: "NASDAQ",
|
|
795
|
-
surface: "inline",
|
|
796
|
-
weight: 1,
|
|
797
|
-
},
|
|
798
|
-
],
|
|
799
|
-
});
|
|
800
|
-
|
|
801
|
-
unsubscribeInline();
|
|
802
|
-
});
|
|
803
|
-
|
|
804
|
-
test("unsubscribes a server-side quote when queued priority updates are removed", () => {
|
|
805
|
-
jest.useFakeTimers();
|
|
806
|
-
const sockets = installTestWebSocket();
|
|
807
|
-
const unsubscribeMsft = apiClient.subscribeQuotes(
|
|
808
|
-
[{ symbol: "MSFT", exchange: "NASDAQ" }],
|
|
809
|
-
() => {},
|
|
810
|
-
);
|
|
811
|
-
const socket = sockets[0]!;
|
|
812
|
-
socket.open();
|
|
813
|
-
flushQuoteSubscriptionUpdates();
|
|
814
|
-
|
|
815
|
-
const unsubscribeInline = apiClient.subscribeQuotes(
|
|
816
|
-
[
|
|
817
|
-
{
|
|
818
|
-
symbol: "AAPL",
|
|
819
|
-
exchange: "NASDAQ",
|
|
820
|
-
surface: "inline",
|
|
821
|
-
weight: 1,
|
|
822
|
-
},
|
|
823
|
-
],
|
|
824
|
-
() => {},
|
|
825
|
-
);
|
|
826
|
-
flushQuoteSubscriptionUpdates();
|
|
827
|
-
expect(socket.sent.at(-1)).toEqual({
|
|
828
|
-
type: "market.subscribe",
|
|
829
|
-
symbols: [
|
|
830
|
-
{ symbol: "AAPL", exchange: "NASDAQ", surface: "inline", weight: 1 },
|
|
831
|
-
],
|
|
832
|
-
});
|
|
833
|
-
|
|
834
|
-
socket.sent.length = 0;
|
|
835
|
-
const unsubscribeDetail = apiClient.subscribeQuotes(
|
|
836
|
-
[
|
|
837
|
-
{
|
|
838
|
-
symbol: "AAPL",
|
|
839
|
-
exchange: "NASDAQ",
|
|
840
|
-
surface: "detail",
|
|
841
|
-
visible: true,
|
|
842
|
-
selected: true,
|
|
843
|
-
weight: 50,
|
|
844
|
-
},
|
|
845
|
-
],
|
|
846
|
-
() => {},
|
|
847
|
-
);
|
|
848
|
-
unsubscribeDetail();
|
|
849
|
-
unsubscribeInline();
|
|
850
|
-
flushQuoteSubscriptionUpdates();
|
|
851
|
-
|
|
852
|
-
expect(socket.sent).toEqual([
|
|
853
|
-
{
|
|
854
|
-
type: "market.unsubscribe",
|
|
855
|
-
symbols: [
|
|
856
|
-
{ symbol: "AAPL", exchange: "NASDAQ", surface: "inline", weight: 1 },
|
|
857
|
-
],
|
|
858
|
-
},
|
|
859
|
-
]);
|
|
860
|
-
unsubscribeMsft();
|
|
861
|
-
});
|
|
862
|
-
|
|
863
|
-
test("unsubscribes removed quote targets before subscribing replacements", () => {
|
|
864
|
-
jest.useFakeTimers();
|
|
865
|
-
const sockets = installTestWebSocket();
|
|
866
|
-
const oldTargets = Array.from({ length: 16 }, (_, index) => ({
|
|
867
|
-
symbol: `OPT${index}`,
|
|
868
|
-
exchange: "OPTIONS",
|
|
869
|
-
}));
|
|
870
|
-
const newTargets = Array.from({ length: 16 }, (_, index) => ({
|
|
871
|
-
symbol: `OPT${index + 2}`,
|
|
872
|
-
exchange: "OPTIONS",
|
|
873
|
-
}));
|
|
874
|
-
const unsubscribeOld = apiClient.subscribeQuotes(oldTargets, () => {});
|
|
875
|
-
const socket = sockets[0]!;
|
|
876
|
-
socket.open();
|
|
877
|
-
flushQuoteSubscriptionUpdates();
|
|
878
|
-
socket.sent.length = 0;
|
|
879
|
-
|
|
880
|
-
const unsubscribeNew = apiClient.subscribeQuotes(newTargets, () => {});
|
|
881
|
-
unsubscribeOld();
|
|
882
|
-
flushQuoteSubscriptionUpdates();
|
|
883
|
-
|
|
884
|
-
expect(
|
|
885
|
-
socket.sent.map((message) => (message as { type: string }).type),
|
|
886
|
-
).toEqual(["market.unsubscribe", "market.subscribe"]);
|
|
887
|
-
expect(socket.sent[0]).toMatchObject({
|
|
888
|
-
symbols: [{ symbol: "OPT0" }, { symbol: "OPT1" }],
|
|
889
|
-
});
|
|
890
|
-
expect(socket.sent[1]).toMatchObject({
|
|
891
|
-
symbols: [{ symbol: "OPT16" }, { symbol: "OPT17" }],
|
|
892
|
-
});
|
|
893
|
-
|
|
894
|
-
unsubscribeNew();
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
test("keeps an anonymous market websocket open after auth rejection", () => {
|
|
898
|
-
const seenPrices: number[] = [];
|
|
899
|
-
const sockets = installTestWebSocket();
|
|
900
|
-
|
|
901
|
-
const unsubscribe = apiClient.subscribeQuotes(
|
|
902
|
-
[{ symbol: "AAPL" }],
|
|
903
|
-
(_target, quote) => {
|
|
904
|
-
seenPrices.push(quote.price);
|
|
905
|
-
},
|
|
906
|
-
);
|
|
907
|
-
const socket = sockets[0]!;
|
|
908
|
-
socket.open();
|
|
909
|
-
socket.receive({ type: "auth.unverified" });
|
|
910
|
-
socket.receive({
|
|
911
|
-
type: "market.quote",
|
|
912
|
-
symbol: "AAPL",
|
|
913
|
-
exchange: "",
|
|
914
|
-
quote: {
|
|
915
|
-
symbol: "AAPL",
|
|
916
|
-
price: 123,
|
|
917
|
-
currency: "USD",
|
|
918
|
-
change: 0,
|
|
919
|
-
changePercent: 0,
|
|
920
|
-
lastUpdated: 1,
|
|
921
|
-
providerId: "gloomberb-cloud",
|
|
922
|
-
dataSource: "live",
|
|
923
|
-
},
|
|
924
|
-
});
|
|
925
|
-
|
|
926
|
-
expect(socket.closeCalls).toBe(0);
|
|
927
|
-
expect(seenPrices).toEqual([123]);
|
|
928
|
-
|
|
929
|
-
unsubscribe();
|
|
930
|
-
});
|
|
931
|
-
});
|
|
932
|
-
|
|
933
|
-
describe("apiClient scanner subscriptions", () => {
|
|
934
|
-
test("subscribes once for many panes, fans out, replays the snapshot, and unsubscribes last", () => {
|
|
935
|
-
const sockets = installTestWebSocket();
|
|
936
|
-
const first: unknown[] = [];
|
|
937
|
-
const second: unknown[] = [];
|
|
938
|
-
|
|
939
|
-
const unsubscribeFirst = apiClient.subscribeScanner("hilo", (event) =>
|
|
940
|
-
first.push(event),
|
|
941
|
-
);
|
|
942
|
-
const socket = sockets[0]!;
|
|
943
|
-
socket.open();
|
|
944
|
-
expect(socket.sent).toContainEqual({
|
|
945
|
-
type: "scanner.subscribe",
|
|
946
|
-
scanner: "hilo",
|
|
947
|
-
});
|
|
948
|
-
|
|
949
|
-
const payload = {
|
|
950
|
-
status: "live",
|
|
951
|
-
asOf: 1,
|
|
952
|
-
windows: {
|
|
953
|
-
s30: { highs: 1, lows: 0 },
|
|
954
|
-
m1: { highs: 2, lows: 1 },
|
|
955
|
-
m5: { highs: 3, lows: 2 },
|
|
956
|
-
},
|
|
957
|
-
highs: [],
|
|
958
|
-
lows: [],
|
|
959
|
-
};
|
|
960
|
-
socket.receive({ type: "scanner.hilo", ...payload });
|
|
961
|
-
|
|
962
|
-
// A second pane must not open a second upstream subscription, and must not
|
|
963
|
-
// wait a tick for its first frame.
|
|
964
|
-
const subscribeCount = () =>
|
|
965
|
-
socket.sent.filter((message: any) => message.type === "scanner.subscribe")
|
|
966
|
-
.length;
|
|
967
|
-
const before = subscribeCount();
|
|
968
|
-
const unsubscribeSecond = apiClient.subscribeScanner("hilo", (event) =>
|
|
969
|
-
second.push(event),
|
|
970
|
-
);
|
|
971
|
-
expect(subscribeCount()).toBe(before);
|
|
972
|
-
expect(second).toEqual([{ type: "data", payload }]);
|
|
973
|
-
|
|
974
|
-
socket.receive({ type: "scanner.hilo", ...payload, asOf: 2 });
|
|
975
|
-
expect(first).toHaveLength(2);
|
|
976
|
-
expect(second).toHaveLength(2);
|
|
977
|
-
|
|
978
|
-
unsubscribeFirst();
|
|
979
|
-
expect(socket.sent).not.toContainEqual({
|
|
980
|
-
type: "scanner.unsubscribe",
|
|
981
|
-
scanner: "hilo",
|
|
982
|
-
});
|
|
983
|
-
unsubscribeSecond();
|
|
984
|
-
expect(socket.sent).toContainEqual({
|
|
985
|
-
type: "scanner.unsubscribe",
|
|
986
|
-
scanner: "hilo",
|
|
987
|
-
});
|
|
988
|
-
});
|
|
989
|
-
|
|
990
|
-
test("replays scanner subscriptions after a reconnect and surfaces denials", () => {
|
|
991
|
-
const sockets = installTestWebSocket();
|
|
992
|
-
const seen: unknown[] = [];
|
|
993
|
-
const unsubscribe = apiClient.subscribeScanner("flow", (event) =>
|
|
994
|
-
seen.push(event),
|
|
995
|
-
);
|
|
996
|
-
|
|
997
|
-
const socket = sockets[0]!;
|
|
998
|
-
socket.open();
|
|
999
|
-
socket.receive({
|
|
1000
|
-
type: "scanner.denied",
|
|
1001
|
-
scanner: "flow",
|
|
1002
|
-
reason: "pro_required",
|
|
1003
|
-
});
|
|
1004
|
-
expect(seen).toEqual([{ type: "denied", reason: "pro_required" }]);
|
|
1005
|
-
|
|
1006
|
-
jest.useFakeTimers();
|
|
1007
|
-
socket.closeWith({ code: 1006, reason: "network" });
|
|
1008
|
-
jest.runAllTimers();
|
|
1009
|
-
const reconnected = sockets[1]!;
|
|
1010
|
-
reconnected.open();
|
|
1011
|
-
expect(reconnected.sent).toContainEqual({
|
|
1012
|
-
type: "scanner.subscribe",
|
|
1013
|
-
scanner: "flow",
|
|
1014
|
-
});
|
|
1015
|
-
|
|
1016
|
-
unsubscribe();
|
|
1017
|
-
});
|
|
1018
|
-
});
|
|
1019
|
-
|
|
1020
|
-
describe("apiClient chat timestamps", () => {
|
|
1021
|
-
test("sends the before cursor when loading older chat messages", async () => {
|
|
1022
|
-
let requestedUrl = "";
|
|
1023
|
-
globalThis.fetch = mockFetch(async (input: Request | string | URL) => {
|
|
1024
|
-
requestedUrl = String(input);
|
|
1025
|
-
return createResponse([]);
|
|
1026
|
-
});
|
|
1027
|
-
|
|
1028
|
-
await apiClient.getMessages("everyone", { limit: 50, before: "m42" });
|
|
1029
|
-
|
|
1030
|
-
const url = new URL(requestedUrl);
|
|
1031
|
-
expect(url.pathname).toBe("/chat/channels/everyone/messages");
|
|
1032
|
-
expect(url.searchParams.get("limit")).toBe("50");
|
|
1033
|
-
expect(url.searchParams.get("before")).toBe("m42");
|
|
1034
|
-
});
|
|
1035
|
-
|
|
1036
|
-
test("normalizes transcript and send-response timestamps to UTC ISO strings", async () => {
|
|
1037
|
-
const responses = [
|
|
1038
|
-
createResponse([
|
|
1039
|
-
{
|
|
1040
|
-
id: "m1",
|
|
1041
|
-
channelId: "everyone",
|
|
1042
|
-
content: "older",
|
|
1043
|
-
replyToId: null,
|
|
1044
|
-
createdAt: "2026-04-08 07:28:27.625",
|
|
1045
|
-
user: { id: "u1", username: "alice", displayName: "Alice" },
|
|
1046
|
-
replyTo: null,
|
|
1047
|
-
},
|
|
1048
|
-
]),
|
|
1049
|
-
createResponse({
|
|
1050
|
-
id: "m2",
|
|
1051
|
-
channelId: "everyone",
|
|
1052
|
-
content: "hello",
|
|
1053
|
-
replyToId: null,
|
|
1054
|
-
createdAt: "2026-04-08T07:29:27.625",
|
|
1055
|
-
user: { id: "u1", username: "alice", displayName: "Alice" },
|
|
1056
|
-
replyTo: null,
|
|
1057
|
-
}),
|
|
1058
|
-
];
|
|
1059
|
-
|
|
1060
|
-
globalThis.fetch = mockFetch(async () => responses.shift() as Response);
|
|
1061
|
-
|
|
1062
|
-
const messages = await apiClient.getMessages("everyone", { limit: 1 });
|
|
1063
|
-
const sentMessage = await apiClient.sendMessage("everyone", "hello");
|
|
1064
|
-
|
|
1065
|
-
expect(messages[0]?.createdAt).toBe("2026-04-08T07:28:27.625Z");
|
|
1066
|
-
expect(sentMessage.createdAt).toBe("2026-04-08T07:29:27.625Z");
|
|
1067
|
-
});
|
|
1068
|
-
|
|
1069
|
-
test("edits a chat message and normalizes the edit timestamp", async () => {
|
|
1070
|
-
const requests: Array<{ path: string; method: string; body: unknown }> = [];
|
|
1071
|
-
globalThis.fetch = mockFetch(
|
|
1072
|
-
async (input: Request | string | URL, init?: RequestInit) => {
|
|
1073
|
-
requests.push({
|
|
1074
|
-
path: new URL(String(input)).pathname,
|
|
1075
|
-
method: init?.method ?? "GET",
|
|
1076
|
-
body: init?.body ? JSON.parse(String(init.body)) : null,
|
|
1077
|
-
});
|
|
1078
|
-
return createResponse({
|
|
1079
|
-
id: "m2",
|
|
1080
|
-
channelId: "everyone",
|
|
1081
|
-
content: "hello edited",
|
|
1082
|
-
replyToId: null,
|
|
1083
|
-
createdAt: "2026-04-08 07:29:27.625",
|
|
1084
|
-
editedAt: "2026-04-08 07:30:27.625",
|
|
1085
|
-
user: { id: "u1", username: "alice", displayName: "Alice" },
|
|
1086
|
-
replyTo: null,
|
|
1087
|
-
});
|
|
1088
|
-
},
|
|
1089
|
-
);
|
|
1090
|
-
|
|
1091
|
-
const editedMessage = await apiClient.editMessage(
|
|
1092
|
-
"everyone",
|
|
1093
|
-
"m2",
|
|
1094
|
-
"hello edited",
|
|
1095
|
-
);
|
|
1096
|
-
|
|
1097
|
-
expect(requests).toEqual([
|
|
1098
|
-
{
|
|
1099
|
-
path: "/chat/channels/everyone/messages/m2",
|
|
1100
|
-
method: "PATCH",
|
|
1101
|
-
body: { content: "hello edited" },
|
|
1102
|
-
},
|
|
1103
|
-
]);
|
|
1104
|
-
expect(editedMessage.editedAt).toBe("2026-04-08T07:30:27.625Z");
|
|
1105
|
-
});
|
|
1106
|
-
|
|
1107
|
-
test("normalizes websocket chat timestamps before notifying listeners", async () => {
|
|
1108
|
-
const seenCreatedAts: string[] = [];
|
|
1109
|
-
const channel = apiClient.connectChannel("everyone", (message) => {
|
|
1110
|
-
seenCreatedAts.push(message.createdAt);
|
|
1111
|
-
});
|
|
1112
|
-
|
|
1113
|
-
await (apiClient as any).socket.handleSocketMessage(
|
|
1114
|
-
JSON.stringify({
|
|
1115
|
-
type: "chat.message",
|
|
1116
|
-
channelId: "everyone",
|
|
1117
|
-
data: {
|
|
1118
|
-
id: "m1",
|
|
1119
|
-
channelId: "everyone",
|
|
1120
|
-
content: "hello",
|
|
1121
|
-
replyToId: null,
|
|
1122
|
-
createdAt: "2026-04-08 07:28:27.625",
|
|
1123
|
-
user: { id: "u1", username: "alice", displayName: "Alice" },
|
|
1124
|
-
replyTo: null,
|
|
1125
|
-
},
|
|
1126
|
-
}),
|
|
1127
|
-
);
|
|
1128
|
-
|
|
1129
|
-
expect(seenCreatedAts).toEqual(["2026-04-08T07:28:27.625Z"]);
|
|
1130
|
-
channel.close();
|
|
1131
|
-
});
|
|
1132
|
-
|
|
1133
|
-
test("fetches chat state and normalizes pending notification timestamps", async () => {
|
|
1134
|
-
let requestedUrl = "";
|
|
1135
|
-
globalThis.fetch = mockFetch(async (input: Request | string | URL) => {
|
|
1136
|
-
requestedUrl = String(input);
|
|
1137
|
-
return createResponse({
|
|
1138
|
-
channels: [
|
|
1139
|
-
{
|
|
1140
|
-
id: "everyone",
|
|
1141
|
-
name: "everyone",
|
|
1142
|
-
created_at: "2026-04-08T07:00:00.000Z",
|
|
1143
|
-
},
|
|
1144
|
-
],
|
|
1145
|
-
onlineCount: 2,
|
|
1146
|
-
channelStates: [
|
|
1147
|
-
{
|
|
1148
|
-
channelId: "everyone",
|
|
1149
|
-
notificationsEnabled: true,
|
|
1150
|
-
lastReadMessageId: "m1",
|
|
1151
|
-
unreadCount: 1,
|
|
1152
|
-
},
|
|
1153
|
-
],
|
|
1154
|
-
notifications: [
|
|
1155
|
-
{
|
|
1156
|
-
id: "n1",
|
|
1157
|
-
type: "reply",
|
|
1158
|
-
channelId: "everyone",
|
|
1159
|
-
messageId: "m2",
|
|
1160
|
-
createdAt: "2026-04-08 07:30:00.000",
|
|
1161
|
-
message: {
|
|
1162
|
-
id: "m2",
|
|
1163
|
-
channelId: "everyone",
|
|
1164
|
-
content: "reply",
|
|
1165
|
-
replyToId: "m1",
|
|
1166
|
-
createdAt: "2026-04-08 07:29:00.000",
|
|
1167
|
-
user: { id: "u2", username: "bob", displayName: "Bob" },
|
|
1168
|
-
replyTo: {
|
|
1169
|
-
content: "parent",
|
|
1170
|
-
user: { id: "u1", username: "vince" },
|
|
1171
|
-
},
|
|
1172
|
-
},
|
|
1173
|
-
},
|
|
1174
|
-
],
|
|
1175
|
-
});
|
|
1176
|
-
});
|
|
1177
|
-
|
|
1178
|
-
const state = await apiClient.getChatState();
|
|
1179
|
-
|
|
1180
|
-
expect(new URL(requestedUrl).pathname).toBe("/chat/state");
|
|
1181
|
-
expect(state.onlineCount).toBe(2);
|
|
1182
|
-
expect(state.notifications[0]?.createdAt).toBe("2026-04-08T07:30:00.000Z");
|
|
1183
|
-
expect(state.notifications[0]?.message.createdAt).toBe(
|
|
1184
|
-
"2026-04-08T07:29:00.000Z",
|
|
1185
|
-
);
|
|
1186
|
-
});
|
|
1187
|
-
|
|
1188
|
-
test("updates chat channel state and marks notifications delivered", async () => {
|
|
1189
|
-
const requests: Array<{ path: string; method: string; body: unknown }> = [];
|
|
1190
|
-
const responses = [
|
|
1191
|
-
createResponse({
|
|
1192
|
-
channelId: "everyone",
|
|
1193
|
-
notificationsEnabled: true,
|
|
1194
|
-
lastReadMessageId: "m2",
|
|
1195
|
-
unreadCount: 0,
|
|
1196
|
-
}),
|
|
1197
|
-
createResponse({ delivered: 2 }),
|
|
1198
|
-
createResponse({ onlineCount: 4 }),
|
|
1199
|
-
];
|
|
1200
|
-
globalThis.fetch = mockFetch(
|
|
1201
|
-
async (input: Request | string | URL, init?: RequestInit) => {
|
|
1202
|
-
requests.push({
|
|
1203
|
-
path: new URL(String(input)).pathname,
|
|
1204
|
-
method: init?.method ?? "GET",
|
|
1205
|
-
body: init?.body ? JSON.parse(String(init.body)) : null,
|
|
1206
|
-
});
|
|
1207
|
-
return responses.shift() as Response;
|
|
1208
|
-
},
|
|
1209
|
-
);
|
|
1210
|
-
|
|
1211
|
-
await apiClient.updateChatChannelState("everyone", {
|
|
1212
|
-
notificationsEnabled: true,
|
|
1213
|
-
readThroughMessageId: "m2",
|
|
1214
|
-
});
|
|
1215
|
-
await apiClient.markChatNotificationsDelivered(["n1", "n2"]);
|
|
1216
|
-
const presence = await apiClient.getChatPresence();
|
|
1217
|
-
|
|
1218
|
-
expect(requests).toEqual([
|
|
1219
|
-
{
|
|
1220
|
-
path: "/chat/channels/everyone/state",
|
|
1221
|
-
method: "PATCH",
|
|
1222
|
-
body: { notificationsEnabled: true, readThroughMessageId: "m2" },
|
|
1223
|
-
},
|
|
1224
|
-
{
|
|
1225
|
-
path: "/chat/notifications/delivered",
|
|
1226
|
-
method: "POST",
|
|
1227
|
-
body: { notificationIds: ["n1", "n2"] },
|
|
1228
|
-
},
|
|
1229
|
-
{
|
|
1230
|
-
path: "/chat/presence",
|
|
1231
|
-
method: "GET",
|
|
1232
|
-
body: null,
|
|
1233
|
-
},
|
|
1234
|
-
]);
|
|
1235
|
-
expect(presence).toEqual({ onlineCount: 4 });
|
|
1236
|
-
});
|
|
1237
|
-
|
|
1238
|
-
test("emits websocket chat presence and notification events", async () => {
|
|
1239
|
-
const seenPresence: number[] = [];
|
|
1240
|
-
const seenNotifications: string[] = [];
|
|
1241
|
-
const unsubscribePresence = apiClient.subscribeChatPresence(
|
|
1242
|
-
(onlineCount) => {
|
|
1243
|
-
seenPresence.push(onlineCount);
|
|
1244
|
-
},
|
|
1245
|
-
);
|
|
1246
|
-
const unsubscribeNotifications = apiClient.subscribeChatNotifications(
|
|
1247
|
-
(notification) => {
|
|
1248
|
-
seenNotifications.push(
|
|
1249
|
-
`${notification.id}:${notification.message.createdAt}`,
|
|
1250
|
-
);
|
|
1251
|
-
},
|
|
1252
|
-
);
|
|
1253
|
-
|
|
1254
|
-
await (apiClient as any).socket.handleSocketMessage(
|
|
1255
|
-
JSON.stringify({
|
|
1256
|
-
type: "chat.presence",
|
|
1257
|
-
onlineCount: 5,
|
|
1258
|
-
}),
|
|
1259
|
-
);
|
|
1260
|
-
await (apiClient as any).socket.handleSocketMessage(
|
|
1261
|
-
JSON.stringify({
|
|
1262
|
-
type: "chat.notification",
|
|
1263
|
-
data: {
|
|
1264
|
-
id: "n1",
|
|
1265
|
-
type: "reply",
|
|
1266
|
-
channelId: "everyone",
|
|
1267
|
-
messageId: "m2",
|
|
1268
|
-
createdAt: "2026-04-08 07:30:00.000",
|
|
1269
|
-
message: {
|
|
1270
|
-
id: "m2",
|
|
1271
|
-
channelId: "everyone",
|
|
1272
|
-
content: "reply",
|
|
1273
|
-
replyToId: "m1",
|
|
1274
|
-
createdAt: "2026-04-08 07:29:00.000",
|
|
1275
|
-
user: { id: "u2", username: "bob", displayName: "Bob" },
|
|
1276
|
-
replyTo: {
|
|
1277
|
-
content: "parent",
|
|
1278
|
-
user: { id: "u1", username: "vince" },
|
|
1279
|
-
},
|
|
1280
|
-
},
|
|
1281
|
-
},
|
|
1282
|
-
}),
|
|
1283
|
-
);
|
|
1284
|
-
|
|
1285
|
-
expect(seenPresence).toEqual([5]);
|
|
1286
|
-
expect(seenNotifications).toEqual(["n1:2026-04-08T07:29:00.000Z"]);
|
|
1287
|
-
unsubscribePresence();
|
|
1288
|
-
unsubscribeNotifications();
|
|
1289
|
-
});
|
|
1290
|
-
});
|
|
1291
|
-
|
|
1292
|
-
describe("apiClient account profile", () => {
|
|
1293
|
-
test("updates profile fields through the account endpoint", async () => {
|
|
1294
|
-
let requestedUrl = "";
|
|
1295
|
-
let requestedBody = "";
|
|
1296
|
-
apiClient.setSessionToken("session-token");
|
|
1297
|
-
apiClient.restoreCachedUser(verifiedUser);
|
|
1298
|
-
globalThis.fetch = mockFetch(
|
|
1299
|
-
async (input: Request | string | URL, init?: RequestInit) => {
|
|
1300
|
-
requestedUrl = String(input);
|
|
1301
|
-
requestedBody = String(init?.body ?? "");
|
|
1302
|
-
return createResponse({
|
|
1303
|
-
profile: {
|
|
1304
|
-
id: verifiedUser.id,
|
|
1305
|
-
email: verifiedUser.email,
|
|
1306
|
-
emailVerified: true,
|
|
1307
|
-
plan: "pro",
|
|
1308
|
-
username: "renamed",
|
|
1309
|
-
name: "Renamed User",
|
|
1310
|
-
company: "Gloomberb",
|
|
1311
|
-
title: "Founder",
|
|
1312
|
-
bio: "Markets.",
|
|
1313
|
-
profilePublic: true,
|
|
1314
|
-
publicEmail: "public@example.com",
|
|
1315
|
-
xAccount: "vincelwt",
|
|
1316
|
-
sharedPortfolioId: "main",
|
|
1317
|
-
acceptUnknownDms: true,
|
|
1318
|
-
chatEmailNotificationsEnabled: false,
|
|
1319
|
-
updatedAt: "2026-04-01T00:00:00.000Z",
|
|
1320
|
-
},
|
|
1321
|
-
});
|
|
1322
|
-
},
|
|
1323
|
-
);
|
|
1324
|
-
|
|
1325
|
-
const profile = await apiClient.updateAccountProfile({
|
|
1326
|
-
username: "renamed",
|
|
1327
|
-
name: "Renamed User",
|
|
1328
|
-
profilePublic: true,
|
|
1329
|
-
sharedPortfolioId: "main",
|
|
1330
|
-
acceptUnknownDms: true,
|
|
1331
|
-
chatEmailNotificationsEnabled: false,
|
|
1332
|
-
});
|
|
1333
|
-
|
|
1334
|
-
expect(new URL(requestedUrl).pathname).toBe("/account/profile");
|
|
1335
|
-
expect(JSON.parse(requestedBody)).toEqual({
|
|
1336
|
-
username: "renamed",
|
|
1337
|
-
name: "Renamed User",
|
|
1338
|
-
profilePublic: true,
|
|
1339
|
-
sharedPortfolioId: "main",
|
|
1340
|
-
acceptUnknownDms: true,
|
|
1341
|
-
chatEmailNotificationsEnabled: false,
|
|
1342
|
-
});
|
|
1343
|
-
expect(profile.username).toBe("renamed");
|
|
1344
|
-
expect(apiClient.getCurrentUser()?.username).toBe("renamed");
|
|
1345
|
-
expect(apiClient.getCurrentUser()?.plan).toBe("pro");
|
|
1346
|
-
expect(apiClient.getCurrentUser()?.chatEmailNotificationsEnabled).toBe(
|
|
1347
|
-
false,
|
|
1348
|
-
);
|
|
1349
|
-
});
|
|
1350
|
-
|
|
1351
|
-
test("changes password through Better Auth", async () => {
|
|
1352
|
-
let requestedUrl = "";
|
|
1353
|
-
let requestedBody = "";
|
|
1354
|
-
apiClient.setSessionToken("session-token");
|
|
1355
|
-
globalThis.fetch = mockFetch(
|
|
1356
|
-
async (input: Request | string | URL, init?: RequestInit) => {
|
|
1357
|
-
requestedUrl = String(input);
|
|
1358
|
-
requestedBody = String(init?.body ?? "");
|
|
1359
|
-
return createResponse({ status: true });
|
|
1360
|
-
},
|
|
1361
|
-
);
|
|
1362
|
-
|
|
1363
|
-
await apiClient.changePassword("old-password", "new-password");
|
|
1364
|
-
|
|
1365
|
-
expect(new URL(requestedUrl).pathname).toBe("/auth/change-password");
|
|
1366
|
-
expect(JSON.parse(requestedBody)).toEqual({
|
|
1367
|
-
currentPassword: "old-password",
|
|
1368
|
-
newPassword: "new-password",
|
|
1369
|
-
revokeOtherSessions: false,
|
|
1370
|
-
});
|
|
1371
|
-
});
|
|
1372
|
-
});
|
|
1373
|
-
|
|
1374
|
-
describe("apiClient cloud news", () => {
|
|
1375
|
-
test("uses the existing /news route with backend ticker filters", async () => {
|
|
1376
|
-
let seenUrl = "";
|
|
1377
|
-
globalThis.fetch = mockFetch(async (input: Request | string | URL) => {
|
|
1378
|
-
seenUrl = String(input);
|
|
1379
|
-
return createResponse({ items: [], nextCursor: null });
|
|
1380
|
-
});
|
|
1381
|
-
|
|
1382
|
-
const result = await apiClient.getCloudNews({
|
|
1383
|
-
feed: "ticker",
|
|
1384
|
-
ticker: "AAPL",
|
|
1385
|
-
exchange: "NASDAQ",
|
|
1386
|
-
tickerTier: "primary",
|
|
1387
|
-
limit: 25,
|
|
1388
|
-
topics: ["earnings", "mna"],
|
|
1389
|
-
sectors: ["information_technology"],
|
|
1390
|
-
minImportance: 60,
|
|
1391
|
-
breaking: false,
|
|
1392
|
-
since: new Date("2026-04-01T00:00:00.000Z"),
|
|
1393
|
-
cursor: "cursor-1",
|
|
1394
|
-
});
|
|
1395
|
-
|
|
1396
|
-
const url = new URL(seenUrl);
|
|
1397
|
-
expect(url.pathname).toBe("/news");
|
|
1398
|
-
expect(url.searchParams.get("feed")).toBe("ticker");
|
|
1399
|
-
expect(url.searchParams.get("tickers")).toBe("AAPL:XNAS");
|
|
1400
|
-
expect(url.searchParams.get("tickerTier")).toBe("primary");
|
|
1401
|
-
expect(url.searchParams.get("limit")).toBe("25");
|
|
1402
|
-
expect(url.searchParams.get("topics")).toBe("earnings,mna");
|
|
1403
|
-
expect(url.searchParams.get("sectors")).toBe("information_technology");
|
|
1404
|
-
expect(url.searchParams.get("minImportance")).toBe("60");
|
|
1405
|
-
expect(url.searchParams.get("breaking")).toBe("false");
|
|
1406
|
-
expect(url.searchParams.get("since")).toBe("2026-04-01T00:00:00.000Z");
|
|
1407
|
-
expect(url.searchParams.get("cursor")).toBe("cursor-1");
|
|
1408
|
-
expect(result).toEqual({ items: [], nextCursor: null });
|
|
1409
|
-
});
|
|
1410
|
-
|
|
1411
|
-
test("fetches news story details from the story route", async () => {
|
|
1412
|
-
let seenUrl = "";
|
|
1413
|
-
globalThis.fetch = mockFetch(async (input: Request | string | URL) => {
|
|
1414
|
-
seenUrl = String(input);
|
|
1415
|
-
return createResponse({
|
|
1416
|
-
id: "story-1",
|
|
1417
|
-
headline: "Story headline",
|
|
1418
|
-
summary: "Story summary",
|
|
1419
|
-
category: "general",
|
|
1420
|
-
sentiment: "neutral",
|
|
1421
|
-
sectors: [],
|
|
1422
|
-
firstPublishedAt: "2026-04-01T10:00:00.000Z",
|
|
1423
|
-
lastPublishedAt: "2026-04-01T10:05:00.000Z",
|
|
1424
|
-
firstSeenAt: "2026-04-01T10:00:10.000Z",
|
|
1425
|
-
lastSeenAt: "2026-04-01T10:05:10.000Z",
|
|
1426
|
-
primaryUrl: "https://example.com/story",
|
|
1427
|
-
primarySource: "example-wire",
|
|
1428
|
-
variantCount: 2,
|
|
1429
|
-
sourceCount: 2,
|
|
1430
|
-
sources: ["example-wire"],
|
|
1431
|
-
entities: [],
|
|
1432
|
-
tickerLinks: [],
|
|
1433
|
-
items: [],
|
|
1434
|
-
});
|
|
1435
|
-
});
|
|
1436
|
-
|
|
1437
|
-
const story = await apiClient.getCloudNewsStory("story-1");
|
|
1438
|
-
|
|
1439
|
-
expect(new URL(seenUrl).pathname).toBe("/news/story-1");
|
|
1440
|
-
expect(story.id).toBe("story-1");
|
|
1441
|
-
});
|
|
1442
|
-
});
|
|
1443
|
-
|
|
1444
|
-
describe("apiClient equity diagnostic", () => {
|
|
1445
|
-
test("posts the symbol, exchange, and cache mode to the research route", async () => {
|
|
1446
|
-
let seenUrl = "";
|
|
1447
|
-
let seenInit: RequestInit | undefined;
|
|
1448
|
-
globalThis.fetch = mockFetch(
|
|
1449
|
-
async (input: Request | string | URL, init?: RequestInit) => {
|
|
1450
|
-
seenUrl = String(input);
|
|
1451
|
-
seenInit = init;
|
|
1452
|
-
return createResponse({ symbol: "AAPL", status: "complete" });
|
|
1453
|
-
},
|
|
1454
|
-
);
|
|
1455
|
-
|
|
1456
|
-
await apiClient.getCloudEquityDiagnostic(" aapl ", "NASDAQ", "refresh");
|
|
1457
|
-
|
|
1458
|
-
expect(new URL(seenUrl).pathname).toBe("/research/equity-diagnostic");
|
|
1459
|
-
expect(seenInit?.method).toBe("POST");
|
|
1460
|
-
expect(JSON.parse(String(seenInit?.body))).toEqual({
|
|
1461
|
-
symbol: "AAPL",
|
|
1462
|
-
exchange: "NASDAQ",
|
|
1463
|
-
mode: "refresh",
|
|
1464
|
-
});
|
|
1465
|
-
});
|
|
1466
|
-
|
|
1467
|
-
test("omits an unknown exchange and defaults to the cached answer", async () => {
|
|
1468
|
-
let seenInit: RequestInit | undefined;
|
|
1469
|
-
globalThis.fetch = mockFetch(
|
|
1470
|
-
async (_input: Request | string | URL, init?: RequestInit) => {
|
|
1471
|
-
seenInit = init;
|
|
1472
|
-
return createResponse({ symbol: "AAPL", status: "complete" });
|
|
1473
|
-
},
|
|
1474
|
-
);
|
|
1475
|
-
|
|
1476
|
-
await apiClient.getCloudEquityDiagnostic("AAPL");
|
|
1477
|
-
|
|
1478
|
-
expect(JSON.parse(String(seenInit?.body))).toEqual({
|
|
1479
|
-
symbol: "AAPL",
|
|
1480
|
-
mode: "cache-first",
|
|
1481
|
-
});
|
|
1482
|
-
});
|
|
1483
|
-
});
|
|
1484
|
-
|
|
1485
|
-
describe("apiClient document search", () => {
|
|
1486
|
-
test("builds the search query from filters and omits empty ones", async () => {
|
|
1487
|
-
let seenUrl = "";
|
|
1488
|
-
globalThis.fetch = mockFetch(async (input: Request | string | URL) => {
|
|
1489
|
-
seenUrl = String(input);
|
|
1490
|
-
return createResponse({
|
|
1491
|
-
hits: [],
|
|
1492
|
-
total: 0,
|
|
1493
|
-
countCapped: false,
|
|
1494
|
-
hasMore: false,
|
|
1495
|
-
nextOffset: 0,
|
|
1496
|
-
tookMs: 3,
|
|
1497
|
-
});
|
|
1498
|
-
});
|
|
1499
|
-
|
|
1500
|
-
await apiClient.searchCloudDocuments({
|
|
1501
|
-
query: " margin pressure ",
|
|
1502
|
-
tickers: [" aapl ", "msft"],
|
|
1503
|
-
docTypes: ["transcript", "filing"],
|
|
1504
|
-
sources: [],
|
|
1505
|
-
from: "2026-01-01T00:00:00.000Z",
|
|
1506
|
-
sort: "newest",
|
|
1507
|
-
limit: 40,
|
|
1508
|
-
offset: 0,
|
|
1509
|
-
});
|
|
1510
|
-
|
|
1511
|
-
const url = new URL(seenUrl);
|
|
1512
|
-
expect(url.pathname).toBe("/cloud/search");
|
|
1513
|
-
expect(url.searchParams.get("q")).toBe("margin pressure");
|
|
1514
|
-
expect(url.searchParams.get("tickers")).toBe("AAPL,MSFT");
|
|
1515
|
-
expect(url.searchParams.get("docTypes")).toBe("transcript,filing");
|
|
1516
|
-
expect(url.searchParams.get("from")).toBe("2026-01-01T00:00:00.000Z");
|
|
1517
|
-
expect(url.searchParams.get("sort")).toBe("newest");
|
|
1518
|
-
expect(url.searchParams.get("limit")).toBe("40");
|
|
1519
|
-
expect(url.searchParams.has("sources")).toBe(false);
|
|
1520
|
-
expect(url.searchParams.has("to")).toBe(false);
|
|
1521
|
-
// Offset 0 is the first page; sending it only lengthens the cache key.
|
|
1522
|
-
expect(url.searchParams.has("offset")).toBe(false);
|
|
1523
|
-
// Counting is the server default, so only opting out travels.
|
|
1524
|
-
expect(url.searchParams.has("count")).toBe(false);
|
|
1525
|
-
|
|
1526
|
-
await apiClient.searchCloudDocuments({
|
|
1527
|
-
query: "margin",
|
|
1528
|
-
limit: 3,
|
|
1529
|
-
count: false,
|
|
1530
|
-
});
|
|
1531
|
-
expect(new URL(seenUrl).searchParams.get("count")).toBe("false");
|
|
1532
|
-
});
|
|
1533
|
-
|
|
1534
|
-
test("escapes the document route segments", async () => {
|
|
1535
|
-
let seenUrl = "";
|
|
1536
|
-
globalThis.fetch = mockFetch(async (input: Request | string | URL) => {
|
|
1537
|
-
seenUrl = String(input);
|
|
1538
|
-
return createResponse({ document: { chunks: [] } });
|
|
1539
|
-
});
|
|
1540
|
-
|
|
1541
|
-
await apiClient.getCloudSearchDocument(
|
|
1542
|
-
"filing",
|
|
1543
|
-
"0000320193-26-000042/a b",
|
|
1544
|
-
);
|
|
1545
|
-
|
|
1546
|
-
expect(new URL(seenUrl).pathname).toBe(
|
|
1547
|
-
"/cloud/search/documents/filing/0000320193-26-000042%2Fa%20b",
|
|
1548
|
-
);
|
|
1549
|
-
});
|
|
1550
|
-
|
|
1551
|
-
test("accepts a saved-search write with or without an envelope", async () => {
|
|
1552
|
-
const record = {
|
|
1553
|
-
id: "saved-1",
|
|
1554
|
-
name: "margin pressure",
|
|
1555
|
-
query: "margin pressure",
|
|
1556
|
-
filters: {},
|
|
1557
|
-
alertEnabled: true,
|
|
1558
|
-
alertChannels: ["email"],
|
|
1559
|
-
lastRunAt: null,
|
|
1560
|
-
lastMatchAt: null,
|
|
1561
|
-
matchCount: 0,
|
|
1562
|
-
createdAt: "2026-05-01T00:00:00.000Z",
|
|
1563
|
-
};
|
|
1564
|
-
|
|
1565
|
-
globalThis.fetch = mockFetch(async () =>
|
|
1566
|
-
createResponse({ search: record }),
|
|
1567
|
-
);
|
|
1568
|
-
expect(
|
|
1569
|
-
(
|
|
1570
|
-
await apiClient.createCloudSavedSearch({
|
|
1571
|
-
name: record.name,
|
|
1572
|
-
query: record.query,
|
|
1573
|
-
})
|
|
1574
|
-
).id,
|
|
1575
|
-
).toBe("saved-1");
|
|
1576
|
-
|
|
1577
|
-
globalThis.fetch = mockFetch(async () => createResponse(record));
|
|
1578
|
-
expect(
|
|
1579
|
-
(
|
|
1580
|
-
await apiClient.updateCloudSavedSearch("saved-1", {
|
|
1581
|
-
alertEnabled: false,
|
|
1582
|
-
})
|
|
1583
|
-
).id,
|
|
1584
|
-
).toBe("saved-1");
|
|
1585
|
-
|
|
1586
|
-
globalThis.fetch = mockFetch(async () => createResponse({}));
|
|
1587
|
-
await expect(
|
|
1588
|
-
apiClient.updateCloudSavedSearch("saved-1", { alertEnabled: false }),
|
|
1589
|
-
).rejects.toThrow("missing a record");
|
|
1590
|
-
});
|
|
1591
|
-
});
|