v0.11.0-alpha.8
Changes since v0.11.0-alpha.7
Features
- Third-party renderer registration (breaking): Adds Controller-level Layer operations (register, query, remove, enable toggle, request render) plus plugin render capabilities, opens registration names to third-party strings, shares one
ChartRendererAccessbetween controllers and plugins, and makes Scene the release owner of mounted Layers. - Price axis wheel zoom with cursor anchor: Routes wheel events by target inside core and compensates the center shift in PriceScale's native scale space, so linear, logarithmic, and percent scales share one anchor rule;
Chart.scalePricegains an optional anchor parameter. - Unified movable price axis settings menu: Consolidates axis controls into an upward-opening menu with current-mode checkmarks and left/right placement, refits the vertical range to visible highs and lows on reset while preserving the selected scale and range mode, and drops axis controls from the chart settings dialog.
- Hover axis-type shortcuts: Shows A/L/% shortcuts above the price axis button on hover, reusing the existing menu commands and hiding again when the pointer leaves the axis.
- Selectable theme presets: Adds selectable theme presets (visual palettes plus visual themes) that apply and persist on click and re-render the chart while the dialog stays open, adjusting colours only.
- Drawing template toolbar menu: Saves and applies drawing style templates from the canvas toolbar, reusing the per-kind IndexedDB template contract, writing only shared colour fields through
updateBatch, and offering save for a single selection. - Drawing copy: Adds a canvas toolbar button and a
drawings_copyagent tool that copy the current single or multi selection through one shared core entry, keeping kind, style, labels, and params, offsetting 16px right and 48px down with edge flipping, and recording the batch as one undo step. - Drawing visibility and bulk deletion: Adds drawing visibility toggles wired into agent history plus toolbar entries for bulk deletion and a dashed box-selection icon.
- Continuous drawing toggle and magnet toolbar (breaking): Adds a continuous-drawing toggle beside the magnet switch so finishing a drawing keeps the current tool, wires the three magnet modes into the left toolbar, and makes strong snapping unconditionally pick the nearest OHLC price, removing
MAGNET_RADIUS_STRONG. - Session-aware bar countdown: Resolves the registered market session so intraday bars step across trading intervals, skip breaks, and clip at the close while daily bars end at the last session close, and adds a
showLastPriceCountdownsetting (on by default) that stops deriving text and second-level refreshes when disabled. - Trading-calendar future space: Adds the
projectTradingTimestamppure function driven byMarketSessionConfig.tradingDays, renders future-region ticks and vertical grid from the calendar, falls back toT/T+1/T+2relative slots without one, shares the extrapolation entry across crosshair and drawing anchors, registers the MT5 session, and anchors zoom to the pointer slot across views. - Future-space panning and crosshair extrapolation: Lets the crosshair snap to future slots by trailing step, opens scroll bounds by the future screens, and stops zoom from snapping back to the data edge.
Fixes
- Pane region binding for shared GPU backends:
FramePaintnow carries a SurfaceRegion and the backend, letting Scene bind the region before dispatching each batch and pass the clear flag, keeping overlay batches atclear: false. - Continuous repaint while dragging drawings: Adds a committed drawing canvas per pane so the formal layer reuses projection and pixels while the session layer consumes drag overrides, previews, and marquee selection.
- Locked price range on symbol switch: Atomically commits the new symbol and clears the manual range when the primary symbol identity changes, refitting the automatic range on the first valid frame.
- Main legend configuration: Drives main-legend configuration through chart options instead of the removed
updateRendererConfig, so both legend layers read one options snapshot per frame. - Last price label follows the active scale: Formats the last price label with the shared display-semantics resolver used by ticks and the crosshair tag.
- Unknown asset class filtered out: Treats
unknownasset classes as unfiltered through a singleisFilterableAssetClasspredicate shared by registry, router, and protocol, so not-yet-normalized symbols no longer fail routing. - Crosshair label contrast: Renders all three crosshair labels from their dedicated tokens, lifting dark-mode contrast to 8.79:1.
- MT5 trading-calendar extrapolation: Registers the MT5 session against the forex (24/5) profile so future-region extrapolation, crosshair tags, and grid no longer break on the MT5 link.
- Horizontal anchors carried futureOffset: Strips
futureOffsetfrom horizontal commands so future-slot drops create horizontal lines by price. - Crosshair hidden while drawing: Keeps hover updates during drawing and renders both guides dashed so placement stays visible.
- Blank default K-line tooltip: Starts hidden, evaluates visibility once at setup, and re-evaluates on data changes.
- Android WebView system theme: Follows the system colour scheme inside Android WebView hosts.
- Dropdown trigger text clipping: Raises the trigger line-height to 1.4 so the ellipsis box no longer cuts the glyph descenders.
- Missing domain error code constants: Adds the missing error-code constant objects referenced by scale, footprint, AVWAP, indicator, heatmap, MTF, chart type, replay, and depth call sites.
Architecture & Refactoring
- Layer as the single Scene paint contract (breaking): Generic
Layer<TFrame>/Scene<TFrame>, concretepaneIdinstead ofpaneRole, frame context passed directly toLayer.paint, and pane matching, visibility, role filtering, z-ordering, and per-Layer error isolation moved up intocreateScene. - Retire RendererPlugin (breaking): Removes the
RendererPlugincontract and its manager/adapter layer, converting roughly 70 renderer factories plus indicator scales to nativeLayer<RenderContext>with a singleindicatorRendererLayer.tsseam and injected state reads. - Viewport-derived future space (breaking): Removes the
futureScreenschart option in favour of reactive geometry that derives content width, scroll bounds, and future slot counts while retaining the final two data slots, and narrows the default future area from three screens to one. - Centralized chart view transitions (breaking): Resolves period and comparison views through one decision so comparison commands preserve timeshare mode, rewrites geometry, price-axis, and pointer orchestration, and changes
Chart.applyRenderStateto acceptzoomLevelorkWidth/slotWidthwhilesetSymbolsrejects multiple primary symbols. - Hit-test geometry in foundation/geometry (breaking): Adds a business-agnostic
foundation/geometryas the single home for 2D value types and pure predicates, rewiring the duplicated hit-test kernels and renamingScreenPointtoPoint. - Drawing template domain in core: Moves template persistence into core behind one shared state source, splits style and label resolution, and extracts
DrawingTemplateMenufor both the canvas toolbar and the settings dialog. - Provider module semantic layout: Restructures the data layer into the
types.ts + impl/layout and replaces magic strings inpackages/core/src/datawith named constants. - Single-source builtin provider registration: Centralizes the builtin source list in core behind semantic subpaths, makes the web-component entry force-import builtin sources so tree-shaking cannot empty the registry, and declares static capabilities to unblock headless bootstrap.
- Centralized drawing tool and magnet constants: Publishes
DrawingToolandMagnetModetables from the drawing contract and derives the types from them. - Countdown time unified into frame input: Reads the clock once per derive from an injectable Clock and ships
remainingMsandcountdownTextin the snapshot, keying frame dedupe on the derived text and renewing the timer in the frame transaction's side-effect phase. - Frame content versioning: Compares primary and interaction layer content versions by value in the derive phase and skips prepare, clear, and paint on a hit, reusing cached geometry to repaint only the overlay, with
preserveDrawingBufferenabled for WebGL. - Vue composable extraction: Extracts the inlined default tooltip into
useKLineTooltipand interaction subscriptions intouseInteractionBridge, both unsubscribing and disconnecting observers on teardown. - Shared toolbar button styles: Extracts
control-button.cssas the single definition of toolbar control appearance while keeping the--dropdown-trigger-*theming hook, and derives the toolbar shadow from a UI token. - Unified hover hints on BaseTooltip: Renders toolbar and agent header hints through BaseTooltip for themeable, consistent tooltips, and adds an
ariaLabelprop to Dropdown.
Performance
- Retained layer geometry and frame skipping: Retains candle and Ichimoku geometry by key and skips unchanged frames via content versions, cutting geometry preparation P50 from 0.3-6.9ms to 0.00ms, geometryBuildCount from 600 to 1, and WebGPU ichimoku jank from 63.7% to 8.0%/0.2%.
- Single-source future slot math: Extracts
futureBarCountso the three future-slot call sites share one physical-pixel implementation.
Engineering
- Horizontal scrolling in BaseTabs: Always maps the wheel to
scrollLeftwhen the tab bar overflows, passes it through at the edges, and runs the drag on the document. - Shared test fixtures and assertions: Extracts shared chart mounts, bar fixtures, and scroll-container doubles, converts legend, chart DPR, price-axis, future-space, and magnet cases to table-driven or shared-factory suites, and removes duplicated assertions and
as unknown ascasts. - Split over-fat renderer tests: Splits oversized renderer test files and shares a Layer store double.
- Dependency bumps: Bumps
viteto 8.3.1 andvitestto 5.0.2. - Formatting and import order: Applies Biome import sorting and formatting, fixes the agent-runtime tsconfig path mapping style, and replaces the hardcoded toolbar shadow colour.
Documentation
- New design decision docs: Documents theme presets, unknown asset-class filtering, data-layer module layout, drawing copy, the drawing session layer, frame content versioning, frame countdown time, future-space defaults and data slots, session-aware last-price countdown, relative future-slot labels, the price axis menu and wheel zoom, the retired RendererPlugin contract, Scene pane-region binding, and chart view transitions.
- Rendering pipeline doc: Adds a third-party Layer and indicator registration section with the runtime contract and integration example.
- Manual testing in the PR flow: Requires manual user testing between contributions instead of E2E and visual regression tests.
- Data source and architecture docs: Updates the architecture doc and the BaoStock/MT5 data-source guides to match the provider semantic layout.