Files
Chan/docs/IDEA/IDEA-006-chart-tv-split.md
T
jackyu66gitandCursor dbb6202325 feat(ECR-008): 拆分主站 chart_tv.js 为多模块薄门面
行为冻结物理拆分;保留 initTradingView/dispose 对外 API;无打包器。node --check 全绿。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 15:09:48 +08:00

28 lines
881 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Idea: 拆分主站巨型 chart_tv.js
## Problem
`web/static/js/app/chart_tv.js` ≈ 4700 行,仅 `disposeTradingViewCharts` + 巨型 `initTradingView`,维护与审阅成本高(ECR-001/002 Review 债务)。
## Observation
ECR-002 明确将 chart_tv 拆分列为可选且未做;后续威科夫/Live 改动都挤在同一文件。
## Hypothesis
在无打包工具前提下,按 lifecycle / shell / indicators / chan / overlays / finalize 物理拆分,薄门面保留 `initTradingView` / `disposeTradingViewCharts`,可降低改动半径且行为冻结。
## Expected Impact
主站前端可维护性提升;与 `chart_sync` / `chart_view` 边界更清晰。
## Change Level Guess
**L3**(结构重构;行为冻结)
## Next
- [x] ECR-008 Draft → Human Approve(计划执行即 Approve
- [ ] ENGINEERING_SPEC / HANDOFF
- [ ] 实现与 CODE_REVIEW