intfoo
865e75fc8b
fix(index): 修复 PR #46 四个阻断项
...
阻断项1: 前端 TypeScript 类型扩展
- MonitorRule.asset_type 加 'index' (api.ts:517)
- screenerStrategies 参数加 'index' (api.ts:1412)
- klineMinute 响应 asset_type 去重 (api.ts:1296)
阻断项2: 指数监控独立评估
- _evaluate_monitors 股票早期 return 降级为 stock_ready 标志
仅跳过股票轮, ETF/指数轮独立判断数据新鲜度
- 纯指数行情/自选场景下指数规则可正常触发
阻断项3: 核心指数模式不截断分区
- _process_full_market_records 按 index_mode 条件分支:
mode=all (完整 CN_Index) → flush 覆盖; mode=core (部分标的) → merge 不截断
- merge_live_enriched_asset 对 index 正确更新 _index_enriched_cache
阻断项4: Free 档额度分批
- _fetch_watchlist_quotes 用 resolve_limit + chunked 按 capability batch 上限分批
- 失败批次跳过不整轮退出, 已有股票实时刷新不受影响
- 复用进程级共享限速器 sleep_between_batches
测试: +7 测试覆盖 4 个阻断项核心场景
2026-07-28 21:13:10 +08:00
intfoo
76202e0937
fix(index): 前端指数分钟K降级与文案资产中立化
...
- StockIntradayChart 指数不显示「获取分钟K/重新获取」按钮, 改静态提示
(指数分钟K仅实时读取, 后端 sync_minute_single 显式拒绝落库)
- api.ts klineMinute 响应类型加 asset_type 可选字段
- RuleEditor/Monitor 文案: 默认规则名/徽标/placeholder/报错/空状态
"个股信号(监控)→信号(监控)" "指定股票→指定标的" "股票→标的"
2026-07-26 19:59:30 +08:00
intfoo
3e6f9bcfb7
fix(index): 后端分钟K隔离加固与规则资产类型纠正
...
- kline.sync_minute_single 对指数 symbol 显式 400 (防污染 kline_minute)
- kline.sync_minute 全市场 universe 剔除指数 symbol
- kline.get_minute 响应新增 asset_type 字段 (3 处 return)
- monitor_rules._reconcile_index_asset_type 纠正误存为 stock 的指数规则
(应用于 save_rule/list_rules/_sync_engine, 混合池不动)
- 文案资产中立化: "个股信号→信号" "指定股票→指定标的" (options label + 校验报错)
- 测试: reconcile 5 断言 + sync_minute_single 拒指数 400 + 分时报错断言同步
2026-07-26 19:59:10 +08:00
intfoo
4d069cc10f
feat: 指数(asset_type=index)前端接入 — 自选/监控规则/分析页
...
- 自选: 搜索含指数+徽标; 板块筛选豁免非股票行; 分时列指数降级
- 监控: RuleEditor 指数资产选项 (仅 signal/price, 隐藏涨停/分时信号); 规则列表指数徽标
- 分析: StockFinancialSearch assetTypes prop; StockAnalysis 搜索开放指数
2026-07-26 18:35:54 +08:00
intfoo
ed4355e0ea
feat: 指数(asset_type=index)后端接入 — 数据路由/自选enriched/监控指数轮/隔离防污染
...
- 数据路由: get_name_map 合并指数维表; get_enriched_latest_asset("index") 缓存+flush/merge 分支; daily-batch 按资产分组
- 自选: watchlist_enriched 指数分支 + 行级 asset_type 标注
- 监控: MonitorRuleEngine 第三轮指数评估 (signal/price); 指数实时焐热复刻 ETF flush; Free档自选实时资产分流; 规则校验 (禁 strategy/market/ladder/分时信号)
- 隔离: _resolve_universe 过滤指数防污染股票日K/分钟K; 指数轮 reset_strategy_results=False; 策略/回测/screener 零改动
- AI 分析: prompt 指数无财务文案
2026-07-26 18:35:31 +08:00
intfoo
99b0c6cb35
fix(index-quotes): compute change_pct for custom data source
...
Custom data source realtime quotes were missing change_pct because _build_index_quotes only kept pre-existing columns. TickFlow path computes it in _fetch_full_market_quotes, but custom source path bypasses that computation.
- _build_index_quotes computes change_pct/change_amount from last_price/prev_close when not provided by the source
- guards prev_close=0 (Polars produces inf, invalid JSON)
- aligns with TickFlow path and _fallback_index_quotes_from_daily
2026-07-24 11:35:19 +08:00
intfoo
a15d0468cc
feat(data-source): expose custom source timeout & request param names in UI
...
- backend: pass timeout through DatasetConfigIn / _config_to_dict / _sanitize_dataset
(previously a hand-set YAML timeout was silently wiped on UI save, resetting to 30s)
- frontend: add per-dataset timeout input; collapsible 请求参数字段映射 with
symbols/start/end_param (non-realtime) + asset_type/freq_param (minute);
rename 字段映射 -> 响应参数字段映射; chevron at title end; realtime empty-state hint
- test: timeout config round-trip (custom value persists, default 30 not emitted)
- docs: document timeout in custom-data-source.md
2026-07-23 16:22:18 +08:00
intfoo
d9a77a534a
fix(minute): 承接 #122 review 三处阻断问题整改 + resolver 异常边界加固
2026-07-19 16:00:22 +08:00
intfoo
91e16db547
fix(layout): 修复 None 档+自定义实时源用户侧边栏指数行情不显示
...
承接 #121 review: Layout.tsx:631 的 !isNoneTier 一刀切判定与同文件
546 行实时行情开关判据不一致, 导致 None 档+自定义实时源用户监控页
放行、实时开关可用, 但侧边栏指数行情卡片不渲染。后端
/api/intraday/indices 从缓存读取不调 TickFlow, 对该用户有数据,
纯前端拦截导致 UI 体验不一致。
将 !isNoneTier 改为 (!isNoneTier || !!realtimeProviderName),
与实时行情开关判据对齐。
2026-07-19 13:35:36 +08:00
intfoo
4c85f99633
fix(minute): 自定义分钟数据源用户单股补拉/监控页整改 (承接 #121 review)
2026-07-19 13:35:35 +08:00
intfoo and shy3130
e2ffde99d5
fix(minute,monitoring): 自定义数据源用户单股补拉/监控页打通 ( #121 )
...
承接 #126 : 能力探测已补 KLINE_MINUTE_BATCH, 但两处取数/UI 仍按 TickFlow
档位拦截, 配了自定义分钟/实时源的 None 档用户依旧被挡。
- kline_sync.fetch_minute_single: 与 sync_minute_batch 一致, 先查
preferences.get_minute_data_provider(), 非 tickflow 且自定义源有
minute dataset 时走 custom provider, 避免分时图首次打开(本地无数据)
补拉返回空。
- Monitoring.tsx: None 档但配了自定义实时源时, 后端
is_realtime_allowed(realtime_mode=full_market) 仍返回 True。
以 quoteStatus.realtime_allowed 作为最终判据, 不再用 isNoneTier
一刀切拦截实时监控页。
Co-authored-by: shy3130 <shy3130@users.noreply.github.com >
2026-07-19 13:26:52 +08:00