Skip to content

v0.11.0

Changes since v0.10.4

Breaking Changes & Migration

Changes since v0.10.4

Breaking Changes & Migration

  • Single package and complete workbench: Only @363045841yyt/klinechart is published; KlineWorkbench is the single UI entry, internal packages are no longer published separately, and runtime code, types, and page assets ship with the product. The full product includes AGPL script modules under AGPL-3.0-or-later. Migration: install only this package, import advanced Agent APIs from the /agent subpath, and drop direct dependencies on internal packages such as klinechart-core. (#337)
  • Market data sources are registered: Hosts register sources through createMarketDataHost and inject marketDataContext; controllers no longer accept bar arrays or requesters, and history, incremental, trade, and cross-symbol requests share one repository. Migration: remove bars / requester arguments from controllers, register sources, and inject the context when mounting. (#337)
  • Renderer extensions use the Layer contract: RendererPlugin and its manager are removed; third-party rendering registers through Layer / Scene. A Layer is identified by a concrete paneId, while pane matching, visibility, z-ordering, and error isolation move into Scene. Migration: implement Layer<RenderContext> and mount it through the new layer registration API. (#277, 364c671a)
  • Indicators are instances and scripts: Indicators run per instance; IndicatorScheduler, chart.getIndicatorScheduler(), the legacy worker protocol, and indicatorResultState are removed; indicator identity is unified on displayName; builtin indicators ship as script definitions. Migration: manage indicators through the instance API and register custom indicators with defineIndicator. (dafac705, c9287382, 20a88946)
  • Legends render through the DOM: Indicator titles, params, and values are rendered by a DOM renderer; CanvasLegendOptions is renamed to LegendOptions; LegendRenderMode changes from canvas to dom; legend CRUD and projection consolidate into LegendManager. Migration: replace the type name and enum value, and route custom legends through LegendManager. (0236d804, 63fe3cf5)
  • Chart options and view contracts: mainPriceAxisRangeMode replaces disableMainPaneVerticalScroll; futureScreens is removed and future space is derived from the viewport (one screen by default, retaining the last two data slots); comparison symbols merge into the main chart with comparisonState.specs as the only writable source, and Chart.setSymbols rejects multiple primary symbols; SemanticChartConfig and the ./semantic subpath are removed. Migration: rewrite price-axis and comparison calls for the new options and delete references to removed exports and subpaths. (95320ef3, 1dc9d8e8, fe076b1d, 45221f49)
  • Runtime and license: engines requires Node >=26.0.0; the license moves from MIT to Apache-2.0, and the full product includes AGPL-3.0-or-later modules. Migration: upgrade builds and CI to Node 26 and review the license and third-party notices. (#338, 07c69710)
  • Agent contracts: agent-runtime upgrades to Pi 1.0.2 with sessions managed by pi-durable; RuntimeToolRegistry is renamed to RuntimeToolCatalog; ask_user's selectedLabels is renamed to selectedValues; lookupInstrumentsBySymbol now returns a string table. Migration: update import names and field names, and parse query results by the new return type. (540ad152, 9ce1a85c, f2b34440)

Features

  • AI Agent workbench: A built-in Agent panel that docks on either side, with multiple provider profiles and a cross-provider model pool, a conversation drawer and message editing, a tool enablement center, market/indicator/drawing tools, web search with citations, a code interpreter, and OS-level secure storage for desktop API keys. (#139, #142, 6701706a, 438dec4c, 25637861)
  • Indicator script engine: TypeScript indicator scripts on QuickJS with defineIndicator, defineLibrary, one Plot/Fill API, request.security cross-period data, and the Timeframe enum. Builtin indicators ship as scripts, and the script workspace adds user libraries, multiple tabs, folders, search, save, and run, plus a detached editor window, completion/hover/navigation/rename language service, and theme-aware colors. (#316, #320, #333)
  • Drawings: Sub-pane and timeshare drawings, multi-select/marquee/batch editing/copy, channel composites with midpoint handles, OHLC magnet, a global lock, visibility toggles and bulk deletion, continuous drawing, chart-wide undo and redo, style templates and inline text editing, and a 2000-drawing cap. (#147, f885ae08, 3bb4f1aa, 30c2a3cc, cefad692)
  • Legend and indicator management: Legend CRUD, projection, and actions unify in core; the K-line legend shows change amount and percent; indicators can be hidden/shown with settings, and the main legend collapses with a hover toolbar. (#339, 6fc58ccf, 67dbf764)
  • Chart interactions: Wheel zoom and A/L/% shortcuts on the price axis (remembered per pane), pan inertia, pointer-anchored smooth zoom, chart-wide dashed crosshair guides, trading-calendar future space, bar-close countdown and trend-colored last price, five-day timeshare with a back action, and timeshare area gradient with a previous-close line. (#281, 7594b38a, 41c60511, 3246144c, #136)
  • Market data: Capability-routed sources, live bar subscriptions and an aggregated trade stream, updateBars realtime writes, bar aggregation alignment with a 4-hour period, the local MT5 terminal, THS daily bars, chart display timezone, a right axis that fits visible extrema, and a standalone Footprint display mode built on aggregated trades (price rows, Delta, imbalance). (7db93f70, 330fec55, 6fa91120, bbc79641, 52618ec2)
  • Interface and workbench: Design Token v2 with a keyboard-shortcut system, selectable theme presets, a reworked light mode, layout-document persistence and layout management, native frame screenshots, a command palette, a toolbar GitHub entry with build metadata, and footer and branding details. (#313, 5ddb9b0a, ac25ef93, 34fa503d, cf6f43b6)

Fixes

  • No more blurry candles: Canvas2D and WebGL candle rectangles project through the same physical-pixel boundary rule and use the frame-derived candle width, staying pixel-aligned while zooming and scrolling. (2639bf7e, 49ffb3d0)
  • Realtime updates no longer interrupt interaction: Tail writes carry a change kind, so incremental and appended bars no longer reset the crosshair index or an in-flight drag. (3cf1c544)
  • Panning survives layout changes: A drag session ends only on explicit pointer lifecycle events, so a shrinking plot container no longer aborts the pan. (8deb06e1)
  • Indicator presentation params restored: Indicators that declare default presentation options (such as BOLL) draw again, while the price range still uses calculation parameters only. (8c63472d)
  • Dialogs and menus: Fixes dialog layering and positioning, popup flipping at viewport edges, clipped dropdown trigger descenders, and outside-click closing. (b252eeef, 63cfa8ec, 86260d25)
  • Backend parity: WebGL and WebGPU segment rendering match, sub-pane crosshair labels and time-axis sizing commit inside the paint frame, and empty frames clear correctly. (ae937e31, 46de69a8, ba92cf4c)
  • Crosshair label contrast: All three crosshair labels use dedicated tokens, lifting dark-mode contrast to 8.79:1. (4e1d611e)
  • Zoom and future-space bounds: Zoom anchors to the pointer slot and keeps its position across the history and future regions instead of snapping back to the data edge. (ee586a0d, 1dc9d8e8)
  • Workbench layout: Aligns the header row and toolbar spacing, stops clipping the grid background, and gives legends a translucent background with unified pane bounds. (3bb3b00c, e1955e7a)
  • Agent panel: In the compact layout the launcher column no longer occludes the price axis, and tool failures are classified with capped result height. (346db0e0, ab6f75f7)

Architecture & Refactoring

  • Rendering pipeline: Layer is the single Scene paint contract, the main band can present a visible GPU surface directly, and frame content versioning skips unchanged work. (98f6f935, df8841d0)
  • Persistence: Chart and Agent settings, view workspaces, layouts, watchlist, and aggregation sources share the localStorage / IndexedDB primitives, and schedule() takes a lazy value function. (b5429778, a3448304)

Performance

  • Draw-call batching: Circles, rects, rounded rects, and anchor rings share one instance layout, and adjacent shapes batch even across colors; opaque strokes expand to triangles instead of running a full-frame stencil cover per polyline; same-color bars become one instanced rects batch. In a measured scene of 4096 shapes, 128 lines, and 256 off-screen objects, the whole layer costs 2 draws and 1 submit with every off-screen object culled, and on redraw the lines hit the geometry cache with zero geometry builds and zero uploads. (5f2fed75, ebbee425, 52f49bb8)
  • Imperative submission, one composition per target: Layers submit incremental primitives only; Scene gives each paint target one composer that runs one offscreen render and one full-target copy at frame end, so cost scales with targets instead of layers, and batches covering less than 6% of the target go straight to Canvas. WebGPU folds 7 command buffers into one queue.submit, cutting P50 from 0.025 ms to 0.003 ms (8.33×). (5f2fed75, 65c45586)
  • Offscreen batching for text: A batch containing text is replayed once by Canvas as a whole, removing the N offscreen renders and N+1 full-canvas copies that used to be paid per text run, so composition count no longer grows with text count. (24c53703)
  • Direct GPU surface: Main-band geometry writes straight into the visible GPU canvas, dropping the full-canvas drawImage on the Canvas side; WebGPU renders the canvas's current texture with no multisample target or resolve. (bcafd8be, e2031dec)
  • Analytic distance-field anti-aliasing: Target-level 4× MSAA is off; lines, circles, rounded rects, and rect batches compute coverage from distance in the fragment shader, removing 4× sampling resolve and bandwidth for the whole target while keeping 1px lines crisp at any DPR. (851e8d1b, 8695a95e)
  • Geometry and buffer reuse: Indicator lines and fill bands keep world coordinates, so scrolling and price-axis zoom only change uniforms; the cache is bucketed by half a screen and a pure scroll hits it wholesale, while fill-band Path2D is reused by reference. Unchanged wide-line geometry is not rebuilt and uploads compare by float32 bits; bar world and screen buffers only grow across frames, only visible bars are written, and at minimum zoom the body and wick merge into one bar. (a5d08d74, 6ca57eeb, 70c214e5)
  • Unchanged frames are skipped: Frame content is versioned by value, so a hit skips prepare, clear, and paint while reusing K-line and Ichimoku geometry; indicator implementations load on demand, plot bounds are indexed by block for visible ranges, and off-range drawings are culled before projection. On WebGPU, 10k Ichimoku bars go from 116 FPS to 185–200 FPS and jank drops from 63.7% to 8.0% / 0.2%. (df8841d0, be5afd3c, 219ace9f)
  • Market loading: Now that aggregation is part of series identity, ordinary K-line loads no longer pull H1/D1 from MT5 for resampling. (560674e8)

Documentation

  • README rewrite: Covers single-package installation, data source registration, indicator scripts, architecture, and performance data. (9c7605e8, d127dd56)
  • Data source and design docs: Adds MT5 and THS source guides plus the rendering pipeline, layout data flow, indicator instance, and script contribution guides. (4003be0c, 3af04742)

On this page