@gloom-sh/terminal 0.19.5 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/LICENSE +0 -4
  2. package/package.json +6 -5
  3. package/patches/@opentui%2Fcore@0.3.2.patch +86 -25
  4. package/patches/electrobun-devkit@2.0.5.patch +148 -0
  5. package/src/api-client/bond-trades.ts +59 -0
  6. package/src/api-client/data.ts +21 -0
  7. package/src/api-client/equity-screener.ts +23 -0
  8. package/src/api-client/index.ts +2 -0
  9. package/src/api-client/types/account.ts +86 -0
  10. package/src/api-client/types/assist.ts +32 -0
  11. package/src/api-client/types/auth.ts +63 -0
  12. package/src/api-client/types/billing.ts +54 -0
  13. package/src/api-client/types/chat.ts +180 -0
  14. package/src/api-client/types/congress.ts +107 -0
  15. package/src/api-client/types/credit.ts +110 -0
  16. package/src/api-client/types/econ.ts +158 -0
  17. package/src/api-client/types/equity-diagnostic.ts +73 -0
  18. package/src/api-client/types/filings-and-calls.ts +350 -0
  19. package/src/api-client/types/index.ts +25 -0
  20. package/src/api-client/types/jobs.ts +147 -0
  21. package/src/api-client/types/market.ts +122 -0
  22. package/src/api-client/types/news.ts +91 -0
  23. package/src/api-client/types/notes-and-theses.ts +172 -0
  24. package/src/api-client/types/quotes.ts +28 -0
  25. package/src/api-client/types/scanners.ts +125 -0
  26. package/src/api-client/types/screener.ts +65 -0
  27. package/src/api-client/types/search.ts +107 -0
  28. package/src/api-client/types/sync.ts +14 -0
  29. package/src/api-client/types/team-collections.ts +43 -0
  30. package/src/api-client/types/team-views.ts +32 -0
  31. package/src/api-client/types/teams.ts +135 -0
  32. package/src/api-client/types/ticker-data.ts +57 -0
  33. package/src/api-client/types/tweets.ts +59 -0
  34. package/src/api-client/types/world-venues.ts +23 -0
  35. package/src/app/pane-runtime/index.tsx +2 -0
  36. package/src/app/pane-runtime/plugin-bindings.ts +10 -1
  37. package/src/app/runtime/desktop-deeplink.ts +41 -6
  38. package/src/app/star-prompt/status-line.tsx +1 -1
  39. package/src/app.tsx +64 -23
  40. package/src/architecture/ui-tokens-allowlist.json +0 -8
  41. package/src/cli/commands/market.ts +149 -10
  42. package/src/cli/commands/search.ts +21 -3
  43. package/src/cli/commands/ticker.ts +90 -36
  44. package/src/cli/desktop-pane-shot-browser.ts +69 -3
  45. package/src/cli/glossary.ts +3 -3
  46. package/src/cli/known-gaps.ts +8 -0
  47. package/src/cli/listing-arg.ts +12 -0
  48. package/src/cli/pane-functions/capabilities.ts +2 -0
  49. package/src/cli/pane-functions/catalog.ts +25 -5
  50. package/src/cli/pane-functions/function-help.ts +8 -5
  51. package/src/cli/pane-functions/headless.ts +4 -3
  52. package/src/cli/pane-functions/resolver.ts +75 -2
  53. package/src/cli/quote-answer.ts +9 -0
  54. package/src/cli/symbol-list.ts +54 -2
  55. package/src/cli/symbol-rows.ts +14 -2
  56. package/src/cli/ticker-resolution.ts +89 -20
  57. package/src/components/chart/composite/axis-overlays.tsx +60 -27
  58. package/src/components/chart/composite/composite-chart.tsx +118 -63
  59. package/src/components/chart/composite/cursor-source.ts +111 -0
  60. package/src/components/chart/composite/format.ts +168 -6
  61. package/src/components/chart/composite/legend.tsx +8 -4
  62. package/src/components/chart/composite/panel-labels.ts +20 -1
  63. package/src/components/chart/composite/panel-surface.tsx +201 -92
  64. package/src/components/chart/composite/price-axis-labels.tsx +92 -46
  65. package/src/components/chart/composite/price-series.ts +31 -8
  66. package/src/components/chart/composite/scene.ts +154 -59
  67. package/src/components/chart/composite/series-axis-tags.tsx +4 -2
  68. package/src/components/chart/composite/time-axis.ts +13 -5
  69. package/src/components/chart/composite/time-scale.ts +211 -56
  70. package/src/components/chart/composite/types.ts +11 -1
  71. package/src/components/chart/composite/use-composite-chart-keyboard.ts +43 -14
  72. package/src/components/chart/curve/curve-surface.tsx +5 -2
  73. package/src/components/chart/curve/model.ts +4 -1
  74. package/src/components/chart/native/use-bitmap-metrics.ts +81 -0
  75. package/src/components/chart/static/series.ts +3 -0
  76. package/src/components/command-bar/commands/collection-list.ts +81 -0
  77. package/src/components/command-bar/commands/direct/index.ts +6 -0
  78. package/src/components/command-bar/commands/registry.ts +8 -0
  79. package/src/components/command-bar/layout-items/current-layout.ts +22 -1
  80. package/src/components/command-bar/layout-items/focused-pane.ts +22 -1
  81. package/src/components/command-bar/pane-templates/items.ts +19 -3
  82. package/src/components/command-bar/pane-templates/workflow.ts +5 -0
  83. package/src/components/command-bar/routes/root/results.ts +23 -3
  84. package/src/components/command-bar/routes/root/selection.ts +4 -2
  85. package/src/components/command-bar/routes/root/shortcut-feedback.ts +1 -1
  86. package/src/components/command-bar/routes/root/shortcut-items.ts +3 -4
  87. package/src/components/command-bar/routes/root/shortcuts.ts +58 -14
  88. package/src/components/command-bar/routes/root/ticker-first.ts +32 -0
  89. package/src/components/command-bar/surface/environment.ts +2 -0
  90. package/src/components/command-bar/view-model.ts +7 -0
  91. package/src/components/command-bar/workflow/ops.ts +2 -1
  92. package/src/components/command-bar/workflow/tickers.ts +20 -0
  93. package/src/components/data-table/export.ts +4 -1
  94. package/src/components/layout/detached-pane-shell.tsx +10 -37
  95. package/src/components/layout/double-escape-close.ts +90 -0
  96. package/src/components/layout/header.tsx +3 -2
  97. package/src/components/layout/market-summary.ts +6 -3
  98. package/src/components/layout/pane/footer/index.tsx +2 -6
  99. package/src/components/layout/pane/footer/model.ts +6 -12
  100. package/src/components/layout/shell/active-drag.ts +53 -11
  101. package/src/components/layout/shell/drag/magnets.ts +128 -19
  102. package/src/components/layout/shell/menu.ts +15 -1
  103. package/src/components/layout/shell/pane/actions.ts +10 -2
  104. package/src/components/layout/shell/pane/management-shortcuts.ts +13 -51
  105. package/src/components/layout/shell/ticker-link-menu.ts +12 -3
  106. package/src/components/layout/status-bar.tsx +24 -78
  107. package/src/components/layout/status-widget-space.ts +5 -5
  108. package/src/components/onboarding/onboarding-keyboard.ts +5 -1
  109. package/src/components/onboarding/onboarding-wizard.tsx +15 -4
  110. package/src/components/onboarding/portfolio-step/positions-panel.tsx +9 -6
  111. package/src/components/onboarding/use-onboarding-progress.ts +20 -1
  112. package/src/components/price-sparkline/view.tsx +14 -6
  113. package/src/components/ticker/badge/index.tsx +8 -4
  114. package/src/components/ticker/badge/list.tsx +23 -7
  115. package/src/components/ui/column-grid.tsx +8 -2
  116. package/src/components/ui/data-table/index.tsx +5 -1
  117. package/src/components/ui/data-table/opentui/model.ts +4 -1
  118. package/src/components/ui/data-table/render-cell.ts +19 -0
  119. package/src/components/ui/delayed-mark.tsx +59 -7
  120. package/src/components/ui/icon.tsx +1 -8
  121. package/src/components/ui/menu.tsx +6 -1
  122. package/src/components/ui/tabs.tsx +5 -2
  123. package/src/core/state/app/layout.ts +18 -3
  124. package/src/core/state/app/state.ts +2 -0
  125. package/src/core/state/app/types.ts +5 -0
  126. package/src/data/config/layout.ts +3 -0
  127. package/src/data/config/store/normalize.ts +39 -4
  128. package/src/i18n/es.ts +13 -3
  129. package/src/i18n/ja.ts +13 -3
  130. package/src/i18n/ko.ts +13 -3
  131. package/src/i18n/zh-cn.ts +13 -3
  132. package/src/i18n/zh-tw.ts +13 -3
  133. package/src/layout/pane-manager/floating-placement.ts +7 -4
  134. package/src/layout/pane-manager/floating.ts +5 -2
  135. package/src/market-data/bond-funds.ts +19 -0
  136. package/src/market-data/futures-contract.ts +14 -3
  137. package/src/market-data/market/freshness.ts +18 -0
  138. package/src/market-data/market/status.ts +15 -2
  139. package/src/plugins/builtin/bond-calculator/headless.ts +2 -1
  140. package/src/plugins/builtin/bond-calculator/index.tsx +1 -1
  141. package/src/plugins/builtin/bond-calculator/model.ts +14 -5
  142. package/src/plugins/builtin/bond-calculator/pane.tsx +1 -1
  143. package/src/plugins/builtin/buildout/cells.tsx +25 -45
  144. package/src/plugins/builtin/buildout/detail/company.tsx +3 -3
  145. package/src/plugins/builtin/buildout/detail/index.tsx +1 -1
  146. package/src/plugins/builtin/buildout/detail/intel.tsx +4 -7
  147. package/src/plugins/builtin/buildout/detail/site.tsx +4 -4
  148. package/src/plugins/builtin/buildout/detail/ui.tsx +39 -38
  149. package/src/plugins/builtin/buildout/format.ts +23 -1
  150. package/src/plugins/builtin/buildout/model/types.ts +1 -0
  151. package/src/plugins/builtin/buildout/pane/index.tsx +2 -8
  152. package/src/plugins/builtin/buildout/table-model.ts +12 -4
  153. package/src/plugins/builtin/cds/headless.ts +1 -0
  154. package/src/plugins/builtin/cds/index.tsx +1 -1
  155. package/src/plugins/builtin/chat/content/composer.tsx +21 -27
  156. package/src/plugins/builtin/chat/content/index.tsx +31 -3
  157. package/src/plugins/builtin/chat/content/shortcuts.ts +4 -2
  158. package/src/plugins/builtin/chat/content/snapshot.ts +0 -3
  159. package/src/plugins/builtin/cloud/auth-actions.tsx +51 -23
  160. package/src/plugins/builtin/cloud/plugin.tsx +2 -0
  161. package/src/plugins/builtin/cloud/trial-offer-status-widget.tsx +3 -3
  162. package/src/plugins/builtin/cloud/upgrade-status-widget.tsx +44 -12
  163. package/src/plugins/builtin/congress-trades/model.ts +2 -1
  164. package/src/plugins/builtin/congress-trades/pane.tsx +3 -0
  165. package/src/plugins/builtin/correlation/headless.ts +3 -2
  166. package/src/plugins/builtin/crypto-board/pane.tsx +5 -4
  167. package/src/plugins/builtin/custom-view/index.tsx +1 -1
  168. package/src/plugins/builtin/custom-view/loader.ts +85 -8
  169. package/src/plugins/builtin/custom-view/view-spec.ts +28 -0
  170. package/src/plugins/builtin/debt-maturities/headless.ts +11 -2
  171. package/src/plugins/builtin/debt-maturities/model.ts +66 -0
  172. package/src/plugins/builtin/debt-maturities/pane.tsx +23 -4
  173. package/src/plugins/builtin/earnings-ripple/pane.tsx +1 -1
  174. package/src/plugins/builtin/econ/calendar-model.ts +28 -6
  175. package/src/plugins/builtin/equity-screener/client.ts +1 -1
  176. package/src/plugins/builtin/equity-screener/criterion-editor.tsx +16 -19
  177. package/src/plugins/builtin/equity-screener/headless.ts +37 -3
  178. package/src/plugins/builtin/equity-screener/ideas.ts +67 -3
  179. package/src/plugins/builtin/equity-screener/model.ts +238 -27
  180. package/src/plugins/builtin/equity-screener/pane.tsx +88 -18
  181. package/src/plugins/builtin/equity-screener/screen-check.ts +7 -4
  182. package/src/plugins/builtin/equity-screener/watchlist.ts +33 -0
  183. package/src/plugins/builtin/executives/format.ts +5 -4
  184. package/src/plugins/builtin/executives/pane.tsx +1 -1
  185. package/src/plugins/builtin/futures-curve/client.ts +19 -0
  186. package/src/plugins/builtin/futures-curve/headless.ts +52 -13
  187. package/src/plugins/builtin/futures-curve/index.tsx +1 -1
  188. package/src/plugins/builtin/futures-curve/model.ts +77 -6
  189. package/src/plugins/builtin/futures-curve/pane.tsx +19 -3
  190. package/src/plugins/builtin/help/index.tsx +55 -1
  191. package/src/plugins/builtin/insider/model.ts +30 -2
  192. package/src/plugins/builtin/jobs/model.ts +2 -2
  193. package/src/plugins/builtin/macro-day/client.ts +41 -0
  194. package/src/plugins/builtin/macro-day/headless.ts +19 -9
  195. package/src/plugins/builtin/macro-day/model.ts +3 -1
  196. package/src/plugins/builtin/market-movers/index.tsx +4 -3
  197. package/src/plugins/builtin/mna/distress/headless.ts +1 -0
  198. package/src/plugins/builtin/mna/model.ts +2 -2
  199. package/src/plugins/builtin/notes/files.ts +2 -0
  200. package/src/plugins/builtin/notes/owner.tsx +20 -1
  201. package/src/plugins/builtin/notes/quick-notes-pane.tsx +22 -4
  202. package/src/plugins/builtin/notes/store.ts +6 -1
  203. package/src/plugins/builtin/perps/pane.tsx +3 -1
  204. package/src/plugins/builtin/portfolio-list/cli/bulk-symbols.ts +17 -0
  205. package/src/plugins/builtin/portfolio-list/cli/portfolio-command.ts +2 -1
  206. package/src/plugins/builtin/portfolio-list/cli/watchlist-command.ts +2 -1
  207. package/src/plugins/builtin/portfolio-list/header.tsx +1 -1
  208. package/src/plugins/builtin/rate-path/headless.ts +24 -10
  209. package/src/plugins/builtin/research/corporate-actions-pane.tsx +29 -25
  210. package/src/plugins/builtin/research/event-model.ts +10 -3
  211. package/src/plugins/builtin/research/events-headless.ts +20 -2
  212. package/src/plugins/builtin/sec/fund-facts.ts +17 -1
  213. package/src/plugins/builtin/sec/index.tsx +1 -1
  214. package/src/plugins/builtin/series-inventory.ts +1 -0
  215. package/src/plugins/builtin/shared/earnings-report.ts +7 -2
  216. package/src/plugins/builtin/shared/members-menu.tsx +103 -38
  217. package/src/plugins/builtin/shared/use-quote-board.ts +85 -46
  218. package/src/plugins/builtin/short-interest/headless.ts +1 -1
  219. package/src/plugins/builtin/short-interest/model.ts +15 -6
  220. package/src/plugins/builtin/short-interest/publications-model.ts +22 -1
  221. package/src/plugins/builtin/short-interest/publications-pane.tsx +13 -4
  222. package/src/plugins/builtin/short-interest/types.ts +2 -0
  223. package/src/plugins/builtin/short-interest/watch-model.ts +1 -1
  224. package/src/plugins/builtin/thirteenf/overlap-pane.tsx +3 -0
  225. package/src/plugins/builtin/thirteenf/pane.tsx +3 -0
  226. package/src/plugins/builtin/ticker-detail/overview/model.ts +5 -3
  227. package/src/plugins/builtin/ticker-detail/overview-tab.tsx +4 -4
  228. package/src/plugins/builtin/time-sales/pane.tsx +3 -2
  229. package/src/plugins/builtin/trace-bonds/client.ts +7 -4
  230. package/src/plugins/builtin/trace-bonds/detail.tsx +198 -0
  231. package/src/plugins/builtin/trace-bonds/headless.ts +62 -4
  232. package/src/plugins/builtin/trace-bonds/history.ts +155 -0
  233. package/src/plugins/builtin/trace-bonds/index.tsx +1 -1
  234. package/src/plugins/builtin/trace-bonds/pane.tsx +64 -5
  235. package/src/plugins/builtin/volatility/client.ts +6 -1
  236. package/src/plugins/builtin/volatility/headless.ts +0 -1
  237. package/src/plugins/builtin/yield-curve/curves.ts +15 -0
  238. package/src/plugins/builtin/yield-curve/headless.ts +6 -1
  239. package/src/plugins/builtin/yield-curve/index.tsx +5 -8
  240. package/src/plugins/host-modules.ts +22 -3
  241. package/src/plugins/host-smoke.ts +6 -3
  242. package/src/plugins/installer.ts +16 -3
  243. package/src/plugins/plugin-names.ts +11 -2
  244. package/src/portfolio/collection-name.ts +19 -0
  245. package/src/remote/controller.ts +9 -2
  246. package/src/remote/schema.ts +2 -1
  247. package/src/renderers/browser/http-proxy-transport.ts +78 -8
  248. package/src/renderers/cloudflare/http-proxy.ts +73 -3
  249. package/src/renderers/cloudflare/proxy-session.ts +47 -24
  250. package/src/renderers/cloudflare/worker.ts +44 -4
  251. package/src/renderers/desktop/geometry.ts +279 -0
  252. package/src/renderers/desktop/screen-setup.ts +246 -0
  253. package/src/renderers/desktop/sequential-window-host.ts +179 -0
  254. package/src/renderers/desktop/test-utils.ts +71 -0
  255. package/src/renderers/desktop/window-controller.ts +433 -0
  256. package/src/renderers/desktop/window-host.ts +70 -0
  257. package/src/renderers/desktop/window-layouts.ts +630 -0
  258. package/src/renderers/dom/data-frames.ts +15 -4
  259. package/src/renderers/dom/desktop/icons.tsx +0 -2
  260. package/src/renderers/dom/styles.css +0 -3
  261. package/src/renderers/electrobun/bun/application-menu/click.ts +1 -0
  262. package/src/renderers/electrobun/bun/application-menu/index.ts +4 -1
  263. package/src/renderers/electrobun/bun/desktop/backend-requests.ts +19 -8
  264. package/src/renderers/electrobun/bun/desktop/backend.ts +320 -19
  265. package/src/renderers/electrobun/bun/desktop/detached-windows.ts +83 -61
  266. package/src/renderers/electrobun/bun/desktop/host-requests.ts +4 -14
  267. package/src/renderers/electrobun/bun/desktop/initialization.ts +30 -11
  268. package/src/renderers/electrobun/bun/desktop/install-records.ts +59 -0
  269. package/src/renderers/electrobun/bun/desktop/installer-folder.ts +208 -592
  270. package/src/renderers/electrobun/bun/desktop/macos-objc.ts +14 -0
  271. package/src/renderers/electrobun/bun/desktop/screen-setup-file.ts +55 -0
  272. package/src/renderers/electrobun/bun/desktop/state-broadcaster.ts +44 -8
  273. package/src/renderers/electrobun/bun/desktop/update.ts +1 -1
  274. package/src/renderers/electrobun/bun/desktop/workspace/index.ts +298 -97
  275. package/src/renderers/electrobun/bun/desktop/workspace/requests.ts +44 -6
  276. package/src/renderers/electrobun/bun/index.ts +22 -109
  277. package/src/renderers/electrobun/bun/window/create.ts +23 -3
  278. package/src/renderers/electrobun/bun/window/electrobun-window-host.ts +306 -0
  279. package/src/renderers/electrobun/bun/window/events.ts +4 -4
  280. package/src/renderers/electrobun/bun/window/focus.ts +0 -25
  281. package/src/renderers/electrobun/bun/window/frame.ts +2 -1
  282. package/src/renderers/electrobun/bun/window/native-min-size.ts +322 -0
  283. package/src/renderers/electrobun/bun/window/remembered-frame.ts +4 -82
  284. package/src/renderers/electrobun/shared/protocol.ts +44 -2
  285. package/src/renderers/electrobun/view/backend-rpc.ts +16 -1
  286. package/src/renderers/electrobun/view/desktop/window/bridge.ts +63 -3
  287. package/src/renderers/electrobun/view/main.tsx +13 -7
  288. package/src/series/fred-argument.ts +17 -0
  289. package/src/sources/gloomberb-cloud/index.ts +5 -7
  290. package/src/sources/provider-router/batches.ts +18 -3
  291. package/src/sources/provider-router/financial-routes.ts +7 -1
  292. package/src/sources/provider-router/financials.ts +18 -4
  293. package/src/state/app/context/index.tsx +16 -2
  294. package/src/state/desktop-windows.ts +63 -0
  295. package/src/sync/other-window-tabs.ts +62 -0
  296. package/src/tickers/company-name-listing.ts +23 -3
  297. package/src/tickers/listing-fate.ts +147 -1
  298. package/src/tickers/terminal-codes.ts +5 -0
  299. package/src/time-series/types.ts +6 -0
  300. package/src/types/config.ts +10 -1
  301. package/src/types/data-provider.ts +14 -0
  302. package/src/types/desktop-window.ts +71 -2
  303. package/src/types/financials.ts +19 -3
  304. package/src/types/headless.ts +21 -0
  305. package/src/types/plugin.ts +6 -0
  306. package/src/ui/index.tsx +14 -13
  307. package/src/ui/same-props.ts +58 -0
  308. package/src/utils/cli-output.ts +33 -4
  309. package/src/utils/double-escape-close.ts +38 -16
  310. package/src/utils/format.ts +30 -5
  311. package/src/utils/futures-generic.ts +12 -0
  312. package/src/utils/http-proxy-upstream.ts +6 -2
  313. package/src/utils/plugin-proxy-hosts.json +0 -4
  314. package/src/utils/plugin-proxy-hosts.ts +22 -0
  315. package/src/utils/price-earnings.ts +18 -0
  316. package/src/utils/sec-filings.ts +7 -1
  317. package/patches/electrobun@1.18.1.patch +0 -633
  318. package/src/api-client/types.ts +0 -2441
@@ -11,6 +11,7 @@ import {
11
11
  } from "../../../state/app/context";
12
12
  import { scheduleConfigSave } from "../../../state/config-save-scheduler";
13
13
  import { commands } from "../commands/registry";
14
+ import { getDesktopWindows } from "../../../state/desktop-windows";
14
15
  import type { ThemePickerHandle } from "../theme-picker";
15
16
  import type { ListScreenState } from "../list/model";
16
17
 
@@ -97,6 +98,7 @@ export function useCommandBarEnvironment() {
97
98
  () => commands.filter((command) => {
98
99
  if (command.id === "cycle-chart-renderer") return !nativePaneChrome;
99
100
  if (command.id === "minimize-window" || command.id === "maximize-window") return drawsWindowControls;
101
+ if (command.id === "new-window") return getDesktopWindows() !== null;
100
102
  return true;
101
103
  }),
102
104
  [drawsWindowControls, nativePaneChrome],
@@ -192,6 +192,12 @@ const EXACT_MATCH_SECTION_PRIORITY = -150;
192
192
  * so it sits under an exact symbol and above the AI's guess.
193
193
  */
194
194
  const DID_YOU_MEAN_SECTION_PRIORITY = -120;
195
+ /**
196
+ * The offer to add a list pasted into the bar (`Add 12 symbols to a
197
+ * watchlist`): what the user put in, so it sits above the AI's reading of it.
198
+ */
199
+ export const PASTED_LIST_CATEGORY = "Pasted list";
200
+ const PASTED_LIST_SECTION_PRIORITY = -110;
195
201
  /**
196
202
  * The AI leads the rest even though it is the slowest source (~600ms+): it
197
203
  * translates the sentence the user typed into commands, which is the answer to
@@ -219,6 +225,7 @@ function getCategoryPriority(category: string, options?: CommandBarSectionOption
219
225
  if (normalized === "exact match") return EXACT_MATCH_SECTION_PRIORITY;
220
226
  if (normalized === "did you mean") return DID_YOU_MEAN_SECTION_PRIORITY;
221
227
  if (category === PLUGIN_INSTALL_CATEGORY) return PLUGIN_INSTALL_SECTION_PRIORITY;
228
+ if (category === PASTED_LIST_CATEGORY) return PASTED_LIST_SECTION_PRIORITY;
222
229
  if (normalized === "instruments") return INSTRUMENTS_SECTION_PRIORITY;
223
230
  if (normalized === "suggested") return SUGGESTED_SECTION_PRIORITY;
224
231
  if (sectionOrder === "app-first") {
@@ -170,7 +170,8 @@ async function resolvePaneTemplateOptions(
170
170
  const rawInput = resolvedOptions?.arg ?? resolvedOptions?.values?.tickers ?? "";
171
171
  const symbols = !String(rawInput).trim() && template.shortcut?.openWithoutArg
172
172
  ? []
173
- : await resolveTickerListInput(rawInput, baseContext.activeCollectionId, deps, template.shortcut?.keepArgToken);
173
+ : await resolveTickerListInput(rawInput, baseContext.activeCollectionId, deps, template.shortcut?.keepArgToken,
174
+ { maximum: template.headless?.argument.maximum });
174
175
  resolvedOptions = {
175
176
  ...resolvedOptions,
176
177
  arg: rawInput,
@@ -4,6 +4,7 @@ import type { AppAction, AppState } from "../../../state/app/context";
4
4
  import type { AppTickerRepositoryPort } from "../../../core/app-service-ports";
5
5
  import type { PluginRegistry } from "../../../plugins/registry";
6
6
  import { isManualPortfolio } from "../../../portfolio/mutations";
7
+ import { findNamedCollection, readWatchlistArgument } from "../../../portfolio/collection-name";
7
8
  import type { DataProvider } from "../../../types/data-provider";
8
9
  import type { Portfolio, TickerRecord, Watchlist } from "../../../types/ticker";
9
10
  import { AmbiguousTickerError, resolveTickerSearch, upsertTickerFromSearchResult } from "../../../tickers/search";
@@ -260,12 +261,31 @@ export async function applyCollectionMembershipChange(
260
261
  return result;
261
262
  }
262
263
 
264
+ /** How a function reads a list argument that names a watchlist: at most `maximum` symbols, its note pushed to `notes`. */
265
+ export interface TickerListReading {
266
+ maximum?: number;
267
+ notes?: string[];
268
+ }
269
+
263
270
  export async function resolveTickerListInput(
264
271
  rawInput: string,
265
272
  collectionId: string | null,
266
273
  deps: SharedWorkflowDeps,
267
274
  keepToken?: (token: string) => boolean,
275
+ reading?: TickerListReading,
268
276
  ): Promise<string[]> {
277
+ // A watchlist's name stands for its symbols, as `fn` reads it (`SIW HY3`), with the note saying so.
278
+ const state = deps.getState();
279
+ const watchlist = /[,;\n]/.test(rawInput) ? null : findNamedCollection(state.config.watchlists, rawInput);
280
+ const members = watchlist
281
+ ? [...state.tickers.values()].filter((ticker) => ticker.metadata.watchlists.includes(watchlist.id)).map((ticker) => ticker.metadata.ticker)
282
+ : [];
283
+ if (watchlist && members.length > 0) {
284
+ const read = readWatchlistArgument(rawInput, watchlist, members, reading?.maximum);
285
+ reading?.notes?.push(read.note);
286
+ return read.symbols;
287
+ }
288
+
269
289
  const tokens = parseTickerListInput(rawInput);
270
290
  const symbols: string[] = [];
271
291
  const seen = new Set<string>();
@@ -1,5 +1,6 @@
1
1
  import type { DataTableCell, DataTableColumn, DataTableProps } from "../ui";
2
2
  import { serializeCsv } from "../../utils/csv";
3
+ import { figureColumnCells } from "../ui/data-table/render-cell";
3
4
  import {
4
5
  BLANK_DISPLAY as BLANK,
5
6
  DISPLAY_PLACEHOLDER as PLACEHOLDER,
@@ -56,9 +57,11 @@ export function createDataTableCsv<
56
57
  renderSectionHeader,
57
58
  getExportMetadata,
58
59
  }: Pick<DataTableProps<T, C>, "columns" | "items" | "renderCell" | "renderSectionHeader" | "getExportMetadata">): string {
60
+ // A pane that exports a table it does not draw (all its columns) reads the figures as the table draws them.
61
+ const cell = figureColumnCells(renderCell);
59
62
  const cells = items.flatMap((item, index) => {
60
63
  if (renderSectionHeader?.(item, index)) return [];
61
- return [columns.map((column) => renderCell(item, column, index, { selected: false }))];
64
+ return [columns.map((column) => cell(item, column, index, { selected: false }))];
62
65
  });
63
66
  // A column drawn only as graphics (a bar, a sparkline) has no value to export.
64
67
  const exported = columns.flatMap((column, index) => (
@@ -19,13 +19,7 @@ import { getPaneDisplayTitle } from "./pane/title";
19
19
  import { TITLEBAR_OVERLAY_HEIGHT_PX, getTitlebarLeadingInset } from "./titlebar-overlay";
20
20
  import { useWindowFullscreen } from "./window-fullscreen";
21
21
  import { WindowControls, WINDOWS_CONTROL_GROUP_WIDTH_PX } from "./window-controls";
22
- import {
23
- armDoubleEscapeClose,
24
- createDoubleEscapeCloseState,
25
- offerEscapeTowardClose,
26
- resetDoubleEscapeClose,
27
- takeDoubleEscapeClose,
28
- } from "../../utils/double-escape-close";
22
+ import { useDoubleEscapeClose } from "./double-escape-close";
29
23
  import { contextMenuDivider, type ContextMenuItem } from "../../types/context-menu";
30
24
  import { useKeybindings } from "../../app/keybindings";
31
25
  import { useDialogState } from "../../ui/dialog";
@@ -61,7 +55,6 @@ export function DetachedPaneShell({ pluginRegistry, desktopWindowBridge }: Detac
61
55
  const config = usePaneAppConfig();
62
56
  const paneState = useAppSelector((state) => state.paneState);
63
57
  const inputCaptured = useAppSelector((state) => state.inputCaptured);
64
- const doubleEscapeCloseRef = useRef(createDoubleEscapeCloseState());
65
58
  // A key held down, or a trigger with no repeat flag, runs each action once.
66
59
  const [shots] = useState(createOneShots);
67
60
  const keybindings = useKeybindings();
@@ -132,35 +125,15 @@ export function DetachedPaneShell({ pluginRegistry, desktopWindowBridge }: Detac
132
125
  };
133
126
  }, [focusPane]);
134
127
 
135
- useShortcut((event) => {
136
- const doubleEscapeState = doubleEscapeCloseRef.current;
137
- const isEscape = event.name === "escape" || event.name === "esc";
138
- if (isEscape) {
139
- if (takeDoubleEscapeClose(doubleEscapeState, desktopWindowBridge.paneId, Date.now())) {
140
- event.preventDefault();
141
- event.stopPropagation();
142
- if (!locked) fireAndForget(desktopWindowBridge.closeDetachedPane?.(desktopWindowBridge.paneId), "desktop.closeDetachedPane");
143
- }
144
- return;
145
- }
146
-
147
- resetDoubleEscapeClose(doubleEscapeState);
148
- }, { phase: "before" });
149
-
150
- const armDoubleEscape = () => {
151
- armDoubleEscapeClose(doubleEscapeCloseRef.current, desktopWindowBridge.paneId, Date.now());
152
- };
153
-
154
- // A pane that uses an Esc to leave an empty field may still count it.
155
- useShortcut((event) => {
156
- if (event.name !== "escape" && event.name !== "esc") return;
157
- offerEscapeTowardClose(event, armDoubleEscape);
158
- }, { phase: "before", allowEditable: true });
159
-
160
- useShortcut((event) => {
161
- if (event.name !== "escape" && event.name !== "esc") return;
162
- armDoubleEscape();
163
- }, { phase: "idle" });
128
+ useDoubleEscapeClose({
129
+ targetId: desktopWindowBridge.paneId,
130
+ overlayOpen: dialogOpen || menuState !== null,
131
+ editing: inputCaptured,
132
+ close: () => {
133
+ if (!locked) fireAndForget(desktopWindowBridge.closeDetachedPane?.(desktopWindowBridge.paneId), "desktop.closeDetachedPane");
134
+ return true;
135
+ },
136
+ });
164
137
 
165
138
  const closePane = useCallback(() => {
166
139
  if (locked) {
@@ -0,0 +1,90 @@
1
+ import { useEffect, useRef } from "react";
2
+ import { useBeforeShortcut, useShortcut, type KeyEventLike } from "../../react/input";
3
+ import {
4
+ armDoubleEscapeClose,
5
+ createDoubleEscapeCloseState,
6
+ isEscapeKeptFromClosing,
7
+ offerEscapeTowardClose,
8
+ resetDoubleEscapeClose,
9
+ takeDoubleEscapeClose,
10
+ } from "../../utils/double-escape-close";
11
+
12
+ function isEscapeKey(event: KeyEventLike): boolean {
13
+ return event.name === "escape" || event.name === "esc";
14
+ }
15
+
16
+ interface DoubleEscapeCloseOptions {
17
+ /** The pane a pair of Esc presses closes. */
18
+ targetId: string | null;
19
+ /** A menu, dialog or other overlay is open: its Esc is its own. */
20
+ overlayOpen: boolean;
21
+ /** The pane is editing (input capture): its Esc counts only when the pane counts it. */
22
+ editing: boolean;
23
+ /** A drag is under way: Esc cancels it. */
24
+ dragging?: () => boolean;
25
+ /** Closes the target; false when nothing was closed and the Esc goes on to the pane. */
26
+ close(): boolean;
27
+ }
28
+
29
+ /**
30
+ * Esc Esc closes the focused pane, even one that could still go back: every
31
+ * Esc is the first half of a pair, whatever the pane did with it. Kept out:
32
+ *
33
+ * - an Esc in a text field, or while the pane is editing, unless the pane
34
+ * counts it because nothing typed is left behind (an empty composer);
35
+ * - an Esc while a menu, dialog or overlay is open, and one that closes a
36
+ * menu or popover of the pane's own (`keepEscapeFromClosing`);
37
+ * - a held Esc, which closes one pane: the shortcut registry drops its
38
+ * repeats, and a stream without the flag cools down in `arm`.
39
+ *
40
+ * A surface that takes Esc in a scoped `before` handler (onboarding, a form,
41
+ * key capture) runs ahead of the arming and so never counts.
42
+ */
43
+ export function useDoubleEscapeClose({ targetId, overlayOpen, editing, dragging, close }: DoubleEscapeCloseOptions): void {
44
+ const stateRef = useRef(createDoubleEscapeCloseState());
45
+ const live = useRef({ targetId, overlayOpen });
46
+ live.current = { targetId, overlayOpen };
47
+
48
+ useEffect(() => {
49
+ if (overlayOpen) resetDoubleEscapeClose(stateRef.current);
50
+ }, [overlayOpen]);
51
+
52
+ // Before any handler, so one in any phase or scope can count or keep its Esc.
53
+ useBeforeShortcut((event) => {
54
+ const state = stateRef.current;
55
+ if (!isEscapeKey(event)) {
56
+ resetDoubleEscapeClose(state);
57
+ return;
58
+ }
59
+ const at = Date.now();
60
+ offerEscapeTowardClose(event, {
61
+ count: () => {
62
+ if (!live.current.overlayOpen) armDoubleEscapeClose(state, live.current.targetId, at);
63
+ },
64
+ keep: () => resetDoubleEscapeClose(state),
65
+ });
66
+ });
67
+
68
+ // The second Esc of a pair closes before anything else sees it, so a pane
69
+ // with more to go back through still closes. Not in a text field.
70
+ useShortcut((event) => {
71
+ if (!isEscapeKey(event) || overlayOpen || editing || dragging?.()) return;
72
+ if (takeDoubleEscapeClose(stateRef.current, targetId, Date.now()) && close()) {
73
+ event.preventDefault();
74
+ event.stopPropagation();
75
+ }
76
+ }, { phase: "capture" });
77
+
78
+ // The first: after the scoped surfaces that own their Esc (onboarding, a
79
+ // form, key capture), so theirs never counts, and before the pane.
80
+ useShortcut((event) => {
81
+ if (!isEscapeKey(event)) return;
82
+ const state = stateRef.current;
83
+ if (overlayOpen || dragging?.()) {
84
+ resetDoubleEscapeClose(state);
85
+ return;
86
+ }
87
+ if (editing || isEscapeKeptFromClosing(event)) return;
88
+ armDoubleEscapeClose(state, targetId, Date.now());
89
+ }, { phase: "before" });
90
+ }
@@ -769,8 +769,9 @@ function HeaderMarketSummary({ nativePaneChrome, width }: { nativePaneChrome: bo
769
769
  available: width,
770
770
  baseCurrencyWidth: displayWidth(summary.baseCurrencyLabel) + 1,
771
771
  countdownWidth: summary.marketLabel.length - summary.marketLabelShort.length,
772
- // A delayed SPY keeps its mark: the two fit, or give way, together. Once the
773
- // rest of the cluster is gone, it gives up its move rather than give way.
772
+ // A delayed SPY carries its mark only while the status bar does not say the
773
+ // delay. Then the two fit, or give way, together, and once the rest of the
774
+ // cluster is gone SPY gives up its move rather than give way.
774
775
  spyWidth: summary.spyText.length + 1 + (summary.spyDelayMinutes != null ? delayedMarkWidth(summary.spyDelayMinutes, nativePaneChrome) + 1 : 0),
775
776
  spyMoveWidth: summary.spyDelayMinutes != null ? summary.spyText.length - summary.spyPriceText.length : 0,
776
777
  stateWidth: summary.marketLabelShort ? summary.marketLabelShort.length + 1 : 0,
@@ -12,7 +12,7 @@ import { formatPercentRaw } from "../../utils/format";
12
12
  import { formatMarketPriceWithCurrency, liveQuoteFormatOptions } from "../../market-data/market/format";
13
13
  import { getSessionMoveDisplay, marketStateColor, marketStateCountdown, marketStateLabel } from "../../market-data/market/status";
14
14
  import type { Quote } from "../../types/financials";
15
- import { useFreeQuoteDelay } from "../../api-client/plan-access";
15
+ import { useDelayedMarkMinutes } from "../ui/delayed-mark";
16
16
 
17
17
  /**
18
18
  * SPY rides the shared feed. The snapshot poll only runs while the feed has
@@ -45,7 +45,10 @@ export interface MarketSummary {
45
45
  spyText: string;
46
46
  /** `spyText` without its move (`SPY $762.43`), for a delayed SPY in a header too narrow for both and the mark. */
47
47
  spyPriceText: string;
48
- /** Minutes SPY's price is late for this account (signed out or free), drawn as the delayed mark beside it; null when live. */
48
+ /**
49
+ * Minutes SPY's price is late for this account (signed out or free), drawn as the delayed
50
+ * mark beside it; null when live, and while the status bar's delayed note says it for the app.
51
+ */
49
52
  spyDelayMinutes: number | null;
50
53
  }
51
54
 
@@ -151,7 +154,7 @@ export function useMarketSummary(): MarketSummary {
151
154
  }, [appActive]);
152
155
 
153
156
  const { spyColor, spyPriceText, spyText } = spySummary(spyQuote, colors);
154
- const spyDelayMinutes = useFreeQuoteDelay(spyQuote);
157
+ const spyDelayMinutes = useDelayedMarkMinutes(spyQuote);
155
158
 
156
159
  const mktCountdown = mktState ? marketStateCountdown(mktState, now) : null;
157
160
  const marketLabelShort = mktState ? t(marketStateLabel(mktState)) : "";
@@ -81,12 +81,10 @@ function terminalSegmentKey(segment: PaneFooterSegment, focused: boolean): strin
81
81
  : "";
82
82
  }
83
83
 
84
- /** Columns an icon segment keeps when hints crowd the footer: the icon, and on the desktop its `iconText` after it. */
84
+ /** Columns an icon segment keeps when hints crowd the footer. */
85
85
  function iconSegmentReserve(segment: PaneFooterSegment, focused: boolean, nativePaneChrome: boolean): number {
86
86
  if (!segment.icon) return 0;
87
- return nativePaneChrome
88
- ? 3 + (segment.iconText ? segment.iconText.length + 1 : 0)
89
- : Math.max(3, 1 + terminalSegmentKey(segment, focused).length);
87
+ return nativePaneChrome ? 3 : Math.max(3, 1 + terminalSegmentKey(segment, focused).length);
90
88
  }
91
89
 
92
90
  function SegmentView({ segment, focused }: { segment: PaneFooterSegment; focused: boolean }) {
@@ -127,7 +125,6 @@ function SegmentView({ segment, focused }: { segment: PaneFooterSegment; focused
127
125
  data-icon={segment.icon}
128
126
  >
129
127
  <Icon name={segment.icon} size={14} color={segment.disabled ? colors.textMuted : footerToneColor(segment.parts[0] ?? { text: "" })} />
130
- {segment.iconText ? <Text fg={colors.textMuted} selectable={false} data-gloom-role="pane-footer-icon-text">{segment.iconText}</Text> : null}
131
128
  </Box>
132
129
  );
133
130
  }
@@ -144,7 +141,6 @@ function SegmentView({ segment, focused }: { segment: PaneFooterSegment; focused
144
141
  disabled={!interactive}
145
142
  color={segment.disabled ? colors.textMuted : footerToneColor(segment.parts[0] ?? { text: "" })}
146
143
  onPress={() => segment.onPress?.()}
147
- text={segment.iconText}
148
144
  />
149
145
  );
150
146
  }
@@ -30,12 +30,6 @@ export interface PaneFooterSegment {
30
30
  * data a source delivers late: build it with {@link delayedFooterSegment}.
31
31
  */
32
32
  icon?: "warning" | "clock";
33
- /**
34
- * A few characters the desktop draws after `icon`, in the footer's muted
35
- * tone, so the segment reads without hovering: a delay's `15m`. The
36
- * terminal's `parts` already carry it (`◷15m`).
37
- */
38
- iconText?: string;
39
33
  /**
40
34
  * The segment only dates the pane's data (`as of 2026-10-05`). A `gloomberb
41
35
  * shot` whose status line already dates that data leaves it out, so the
@@ -89,11 +83,12 @@ export interface PaneFooterSegment {
89
83
  const DELAYED_FOOTER_GLYPH = "◷";
90
84
 
91
85
  /**
92
- * The footer's one form for data a source delivers late: a yellow clock and
93
- * the delay (`15m`) on the desktop, with `detail` in its tooltip, and the
94
- * clock with the delay (`◷15m`) in the terminal, which has no tooltip, so it
95
- * takes a few cells rather than a phrase. Without a known delay the desktop
96
- * draws the clock alone. `onPress` makes it a button, such as an upgrade.
86
+ * The footer's one form for data a source delivers late: a yellow clock with
87
+ * `detail` in its tooltip on the desktop and the web, and the clock with the
88
+ * delay (`◷15m`) in the terminal, which has no tooltip, so it takes a few
89
+ * cells rather than a phrase. The clock alone keeps the delay from repeating
90
+ * in every pane: the status bar's delayed note spells out the account's
91
+ * (`◷ 15m delayed`). `onPress` makes it a button, such as an upgrade.
97
92
  */
98
93
  export function delayedFooterSegment({
99
94
  id,
@@ -116,7 +111,6 @@ export function delayedFooterSegment({
116
111
  label: detail,
117
112
  title: detail,
118
113
  parts: [{ text: `${DELAYED_FOOTER_GLYPH}${delay ?? ""}`, tone: "warning" }],
119
- ...(delay ? { iconText: delay } : {}),
120
114
  ...(onPress ? { onPress } : {}),
121
115
  ...(quoteStatus ? { quoteStatus } : {}),
122
116
  };
@@ -32,11 +32,14 @@ import {
32
32
  import type { ShellDragRuntimeState, ShellMouseEvent } from "./drag/runtime";
33
33
  import type { WindowEditState } from "../window-edit/mode";
34
34
  import {
35
+ createMagnetGlide,
35
36
  createMagnetPace,
37
+ NO_GLIDE,
36
38
  NO_LATCH,
37
39
  snapMovedRect,
38
40
  snapResizedRect,
39
41
  type MagnetDistances,
42
+ type MagnetGlide,
40
43
  type MagnetLatch,
41
44
  type MagnetPace,
42
45
  } from "./drag/magnets";
@@ -111,7 +114,9 @@ export function useShellActiveDrag({
111
114
  // the edges its magnets hold, with the other panes' rects they hold to, the
112
115
  // join it is holding still for, and on the desktop where the pointer has
113
116
  // been lately (the magnets wait for it to slow down) with the check that
114
- // catches once it rests.
117
+ // catches once it rests, and where the pane is drawn against where the
118
+ // pointer puts it, with the frame that moves it there while the pointer is
119
+ // still.
115
120
  const memoRef = useRef<{
116
121
  drag: unknown;
117
122
  baseRect: FloatingRect | null;
@@ -121,10 +126,15 @@ export function useShellActiveDrag({
121
126
  magnetTargets: LayoutBounds[] | null;
122
127
  join: PendingJoin | null;
123
128
  pace: MagnetPace;
124
- }>({ drag: null, baseRect: null, dropKey: null, drop: null, latch: NO_LATCH, magnetTargets: null, join: null, pace: createMagnetPace() });
129
+ glide: MagnetGlide;
130
+ }>({
131
+ drag: null, baseRect: null, dropKey: null, drop: null, latch: NO_LATCH, magnetTargets: null, join: null,
132
+ pace: createMagnetPace(), glide: createMagnetGlide(),
133
+ });
125
134
  useEffect(() => () => {
126
135
  dropPendingJoin(memoRef.current);
127
136
  memoRef.current.pace.reset();
137
+ memoRef.current.glide.reset();
128
138
  }, []);
129
139
  // The handler as it is now, for the rest check to run again.
130
140
  const handleRef = useRef<(event: ShellMouseEvent) => void>(() => {});
@@ -152,6 +162,7 @@ export function useShellActiveDrag({
152
162
  memo.latch = NO_LATCH;
153
163
  memo.magnetTargets = null;
154
164
  memo.pace.reset();
165
+ memo.glide.reset();
155
166
  dropPendingJoin(memo);
156
167
  }
157
168
  // Any later event supersedes the rest check of an earlier move.
@@ -169,9 +180,9 @@ export function useShellActiveDrag({
169
180
  };
170
181
  const magnetsOff = event.modifiers?.alt === true;
171
182
  const magnetArea = { x: 0, y: 0, width, height: contentHeight };
172
- // Desktop: while the pointer travels, a moving pane follows it exactly;
173
- // its magnets catch once it slows down near a line, or rests there (the
174
- // rest check runs the last move again once the pointer has stopped). What
183
+ // Desktop: past the travel speed a release lands the pane where the
184
+ // pointer puts it, its magnets left out (the rest check runs the last move
185
+ // again once the pointer has stopped, so a release then catches). What
175
186
  // they hold to still follows every move, so it rests where it would have.
176
187
  const travelling = () => {
177
188
  if (!nativePaneChrome || drag.type !== "pane-drag") return false;
@@ -179,14 +190,40 @@ export function useShellActiveDrag({
179
190
  const rest = event.type === "drag" ? () => { if (dragRef.current === drag) handleRef.current(event); } : undefined;
180
191
  return memo.pace.travelling({ t: performance.now(), x: preciseX, y: preciseShellY }, magnetDistances, rest);
181
192
  };
182
- const snapMove = (paneId: string, rect: FloatingRect): FloatingRect => {
193
+ // Where a move lands the pane (`rect`), and where its magnets hold it as
194
+ // the pointer slows down (`snapped`).
195
+ const snapMove = (paneId: string, rect: FloatingRect): { rect: FloatingRect; snapped: FloatingRect } => {
183
196
  if (magnetsOff) {
184
197
  memo.latch = NO_LATCH;
185
- return rect;
198
+ return { rect, snapped: rect };
186
199
  }
187
200
  const snapped = snapMovedRect(rect, magnetTargets(paneId), magnetArea, magnetDistances, memo.latch);
188
201
  memo.latch = snapped.latch;
189
- return travelling() ? rect : snapped.rect;
202
+ return { rect: travelling() ? rect : snapped.rect, snapped: snapped.rect };
203
+ };
204
+ // Desktop: the moving pane is drawn under the pointer while it moves, and
205
+ // where its magnets hold it once the pointer slows down to place it,
206
+ // gliding between the two (the frames after the pointer stops carry the
207
+ // glide on). The terminal draws where a release would land it.
208
+ const drawMove = (paneId: string, free: FloatingRect, moved: { rect: FloatingRect; snapped: FloatingRect }) => {
209
+ if (!nativePaneChrome) {
210
+ updateDragFloatingRect({ paneId, rect: moved.rect });
211
+ return;
212
+ }
213
+ const { snapped } = moved;
214
+ let drawn: { x: number; y: number } | null = null;
215
+ memo.glide.follow(() => {
216
+ const now = performance.now();
217
+ const placing = memo.pace.placing(now, magnetDistances);
218
+ const target = placing ? { x: snapped.x - free.x, y: snapped.y - free.y } : NO_GLIDE;
219
+ const offset = memo.glide.step(now, target);
220
+ // A frame that moves nothing (the pointer still, the glide at rest) restyles nothing.
221
+ if (!drawn || drawn.x !== offset.x || drawn.y !== offset.y) {
222
+ drawn = offset;
223
+ updateDragFloatingRect({ paneId, rect: { ...free, x: free.x + offset.x, y: free.y + offset.y } });
224
+ }
225
+ return placing && memo.glide.settled(target);
226
+ });
190
227
  };
191
228
  const snapResize = (paneId: string, rect: FloatingRect, edges: { x: -1 | 0 | 1; y: -1 | 0 | 1 }): FloatingRect => {
192
229
  if (magnetsOff) {
@@ -221,6 +258,7 @@ export function useShellActiveDrag({
221
258
  if (event.type === "drag-cancel") {
222
259
  // The window lost focus or the system took the pointer: put everything back.
223
260
  dropPendingJoin(memo);
261
+ memo.glide.reset();
224
262
  cancelActiveDrag();
225
263
  event.stopPropagation();
226
264
  event.preventDefault();
@@ -248,6 +286,7 @@ export function useShellActiveDrag({
248
286
  }
249
287
  } else if (drag.type === "pane-drag") {
250
288
  if (!isMeaningfulPaneDrag(drag.startX, drag.startY, preciseX, preciseShellY, dragThreshold)) {
289
+ memo.glide.reset();
251
290
  updateDockPreview(null);
252
291
  if (drag.mode === "floating") {
253
292
  updateDragFloatingRect({ paneId: drag.paneId, rect: drag.origRect });
@@ -257,8 +296,10 @@ export function useShellActiveDrag({
257
296
  return;
258
297
  }
259
298
 
260
- const nextRect = snapMove(drag.paneId, resolvePaneDragFloatingRect(drag, dragBaseRect()!, drawX, drawShellY, width, contentHeight));
261
- updateDragFloatingRect({ paneId: drag.paneId, rect: nextRect });
299
+ const freeRect = resolvePaneDragFloatingRect(drag, dragBaseRect()!, drawX, drawShellY, width, contentHeight);
300
+ const moved = snapMove(drag.paneId, freeRect);
301
+ const nextRect = moved.rect;
302
+ drawMove(drag.paneId, freeRect, moved);
262
303
 
263
304
  // Over a title bar it would be a tab there; pushed against a docked
264
305
  // pane's edge it would join the dock on that side.
@@ -325,6 +366,7 @@ export function useShellActiveDrag({
325
366
 
326
367
  if (event.type === "up" || event.type === "drag-end") {
327
368
  dropPendingJoin(memo);
369
+ memo.glide.reset();
328
370
  if (drag.type === "divider") {
329
371
  if (live.get().divider) {
330
372
  const nextLayout = resizeSplitAtPath(baseLayout, drag.path, dividerRatioAt(preciseX, preciseShellY));
@@ -343,7 +385,7 @@ export function useShellActiveDrag({
343
385
  // A click on a stack's tab shows that pane.
344
386
  if (drag.mode === "docked") focusPane(drag.paneId);
345
387
  } else {
346
- const releaseRect = snapMove(drag.paneId, resolvePaneDragFloatingRect(drag, dragBaseRect()!, preciseX, preciseShellY, width, contentHeight));
388
+ const releaseRect = snapMove(drag.paneId, resolvePaneDragFloatingRect(drag, dragBaseRect()!, preciseX, preciseShellY, width, contentHeight)).rect;
347
389
  const nextLayout = finalizePaneDragRelease(baseLayout, drag.paneId, releaseRect, live.get().dockPreview);
348
390
  if (windowMode) {
349
391
  updateWindowModePreviewLayout(nextLayout, drag.paneId);