Skip to content

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 21 Jul 14:43
· 1066 commits to main since this release

相比 v0.8.14 的变更 / Changes since v0.8.14

✨ 新功能 / Features

  • SSOT Core 层响应式内核 — 基于长期开发经验打造的零外部依赖 push-based 响应式系统。完整迁移路线:

    • 基础设施:signal / computed / effect / batch 响应式原语(packages/core/src/foundation/reactivity/signal.ts),零外部依赖,支持批量原子更新与自动依赖追踪
    • 核心设计原则:单一可信源(每段状态有且仅有一个 writable signal)、自动推导(派生值存放于 computed(),禁止手写 syncXxx())、读写分离(外部消费 ReadonlySignal,内部通过 Action 方法操作 WritableSignal,TypeScript 编译时强制边界)、Effect 隔离(DOM/WebGL 副作用仅在 effect() 中执行)、批量原子更新(batch() 合并多次变更成一次通知周期)
    • 子状态模块:完成 settings、mode、pane、drawing、theme、indicators、data、zoom、viewport、interaction、comparison、subPane、marker、renderer、options 共 15 个模块的 SSOT 化,消除所有手工同步路径与 passthrough 层
    • 参考实现:packages/core/src/engine/state/viewportState.ts、packages/core/src/engine/state/stateKernel.ts

    SSOT Core Reactive Kernel — A zero-dependency push-based reactive system built from long-term development experience. Full migration scope:

    • Primitives: signal / computed / effect / batch (packages/core/src/foundation/reactivity/signal.ts), zero external deps, batched atomic updates, automatic dependency tracking
    • Design Principles: Single Source of Truth (exactly one writable signal per state fragment), Automatic Derivation (derived values in computed(), no hand-written syncXxx()), Read/Write Separation (external ReadonlySignal, internal mutations through Actions on WritableSignal, TypeScript-enforced boundary at compile time), Effect Isolation (DOM/WebGL side effects in effect() only), Batched Atomic Updates (batch() coalesces multiple writes into one notification cycle)
    • Modules Migrated: All 15 sub-state modules — settings, mode, pane, drawing, theme, indicators, data, zoom, viewport, interaction, comparison, subPane, marker, renderer, options — converted to SSOT pattern; all manual sync paths and passthrough layers eliminated
    • Reference: packages/core/src/engine/state/viewportState.ts, packages/core/src/engine/state/stateKernel.ts
  • WebGPU 渲染后端 — 单路径场景渲染器 + WebGPU 后端 + FrameTransaction 响应式框架
    WebGPU Render Backend — Single-path scene renderer + WebGPU backend + FrameTransaction reactivity (#102)

  • 自定义 K 线数据类型字段 — 支持 K 线数据自定义扩展字段
    Custom K-line Data Fields — Support custom extension fields on K-line data (#98)

  • 自定义 Legend 模板插槽 (Vue) — <template #legend-{indicatorName}> 支持完全自定义指标图例
    Custom Legend Template Slot (Vue) — <template #legend-{indicatorName}> for fully custom indicator legends

  • 自适应 Tooltip — 智能拐角定位,首次悬停锁定角位,指针离开自动复位
    Adaptive Tooltip — Smart corner positioning, lock on first hover, reset on pointer leave

  • 可折叠设置面板 (Vue) / Collapsible Settings Sections (Vue)

  • 开源许可页面 (Vue) — Settings 中新增开源致谢 / Open-Source Credits Page in Settings

  • Vite 代理配置 — preview 模式下代理 /api/stock → :8000,/api/public → :8080
    Vite Proxy Config — Proxy /api/stock → :8000, /api/public → :8080 in preview mode

  • 增量加载提示延迟 — 等待批量请求完成后再显示加载提示
    Deferred Load Hint — Wait until batch of requests finishes before showing incremental load hint

🚀 性能优化 / Performance

  • yAxis/leftYAxis 分层渲染 — 拆分为 static + overlay 两层,减少重绘面积
    Layered yAxis/leftYAxis — Split into static + overlay layers to reduce repaint area

🏗️ 架构与重构 / Architecture & Refactoring

  • stockCode → symbol — 跨资产(股票、ETF、期货、加密货币、商品)命名统一
    stockCode → symbol — Cross-asset naming unification (equity, ETF, futures, crypto, commodities)
  • 分时状态合并 — 分时状态收敛为单一快照对象 / Timeshare State Consolidation — Single snapshot object
  • 接口去重 — 消除 IndicatorDependencies / SubPaneContext 接口重复
    Interface Dedup — Eliminate IndicatorDependencies / SubPaneContext duplication
  • Signal 化 — pendingIndicatorDataUpdate 迁移为 Signal / Signal Migration — pendingIndicatorDataUpdate converted to Signal
  • 消除延迟写模式 — 移除 deferred scroll-write 模式及陈旧 scrollLeft 状态
    Eliminate Deferred Writes — Removed deferred scroll-write pattern and stale scrollLeft
  • Data 子系统提取 — DataBuffer、DataFetchers 提取为独立子系统
    Data Subsystem Extraction — DataBuffer, DataFetchers as standalone subsystems
  • fragment 化 README 生成系统 / Fragment-based README Generation System
  • ESLint + oxlint 基础设施 — 新增 import 排序规则 / ESLint + oxlint with import ordering rules

🐛 Bug 修复 / Fixes

  • 缩放交互信号时序 — 修复 zoom interaction 信号时序问题 + 原子性审计
    Zoom Signal Timing — Fix zoom interaction timing hazards + atomicity audit (#97)
  • 主题闪烁 — 同步解析 theme 消除挂载时 light-dark 闪烁
    Theme Flicker — Resolve theme synchronously to eliminate light-dark flicker on mount (#96)
  • 十字光标价格标签 — 每帧在 Y 轴绘制十字光标价格标签 / Crosshair Price Label — Draw on y-axis every frame
  • 边缘 K 线跳过 — findNearestBar 跳过裁剪边缘的 K 线柱 / Edge Bar Skip — Skip clipped edge bars in findNearestBar
  • Tooltip 锁定重置 — 指针移至 tooltip 时防止锁定复位 / Tooltip Lock Reset — Prevent reset on pointer move to tooltip
  • K 线颜色计算 — 修复涨/跌/停 K 线柱和成交量柱颜色计算
    Candle Color Calc — Fix up/down/unchanged candle and volume bar colors
  • Float32Array 类型安全 — 添加索引访问非空断言 / Float32Array Safety — Add non-null assertions
  • 增量加载状态同步 — 消除增量加载流程中的陈旧状态同步
    Incremental Load Sync — Eliminate stale state sync in incremental loading flow
  • 分时模式下指标禁用 — 切换到分时模式时正确禁用主/副图指标
    Timeshare Indicator Disable — Properly disable main/sub indicators in time-share mode
  • 分时几何修复 — 修复分时 geometry、基线、多市场交易时段
    Timeshare Geometry — Fix geometry, baseline, and multi-market sessions
  • frameVisibleRange — 为十字光标碰撞检测正确闭合 / Properly sealed for crosshair hit-test
  • visibleRange 裁剪 — 在 StateKernel SSOT 中裁剪可见范围 / visibleRange Clamp — In StateKernel SSOT
  • 深度 SSE 路径 — 修复 /api/binance 深度 SSE 连接路径 / Depth SSE Path — Fix /api/binance path
  • 设置透传 — 运行时 settings 配置现在正确生效 / Settings Passthrough — Honor explicit runtime settings
  • Legend ohlc 字段 — 重命名 ohlc 插槽字段为 currentBar,去除 LegendOhlcRow 导出
    Legend ohlc Field — Renamed to currentBar, dropped LegendOhlcRow export

📚 文档 / Documentation

  • 渲染管线文档 — 合并为单一 SSOT (docs/rendering-pipeline.md),废弃旧文档
    Rendering Pipeline — Consolidated into single SSOT, deprecated old docs
  • GPU 像素对齐原则 — 记录到 Lessons Learned / GPU Pixel Alignment — Added to Lessons Learned
  • 多后端渲染 — 新增 WebGPU/WebGL/Canvas2D 三后端说明
    Multi-backend Rendering — Documented WebGPU, WebGL, Canvas2D backends
  • 状态核迁移计划 — docs/state-kernel-migration-plan.md / State Kernel Migration Plan

🔧 杂项 / Misc

  • CI: Node 20 → Node 24 迁移 / Migrate to Node 24 (actions/deploy-pages@v5)
  • 各 alpha 版本迭代 / Alpha releases: v0.9.0-alpha.0 ~ v0.9.0-alpha.6

文件变更 / File Stats: 569 files changed, 31,529 insertions, 11,048 deletions