feat: [issue #1199 PR1] add settings field help dialog infrastructure - #1204
Conversation
🤖 自动审查报告
📁 修改的文件
🧠 AI 代码审查意见结论Ready to Merge 结构化审查结果必要性
关联性
类型
描述完整性
风险级别
必改项无。 建议项无。本次 PR 描述清晰,实现完善,测试充分,无障碍考虑周全,且文档完整,无需额外建议。
|
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过。本 PR 对应 #1199 的设置项帮助体系 PR1,能改善设置页字段说明的可维护性和用户理解成本。
- 是否有对应 issue:有,Refs #1199。
- PR 类型:feat(包含 test),新增设置帮助弹窗/元数据基础设施,并补充对应测试。
- description 完整性:不完整。验证、兼容性、回滚说明整体较完整,但缺少新增 LLM/provider/model 示例的官方来源、当前 LiteLLM/运行时兼容证据,以及
docs/CHANGELOG.md中非本 PR 条目的范围说明。 - 是否可直接合入:不可。CI 已通过,
mergeable_state=blocked本身不作为阻断;当前阻断点是外部模型/API 语义证据不足,以及 changelog 范围漂移需要收敛。
主要问题
- [Compatibility blocker]
apps/dsa-web/src/locales/settingsHelp.ts、src/core/config_registry.py:本 PR 在设置帮助中新增了 LITELLM_MODEL / LLM_CHANNELS 的用户可执行语义和具体模型示例,例如 provider/model 格式、DeepSeek/Gemini/Ollama 示例等。结构化检测也标记了外部模型/API 与运行时配置相关风险。PR 描述声明“第三方模型 / API 兼容语义:None”,但当前证据未看到官方来源链接、当前锁定 LiteLLM/运行时兼容验证,或这些示例仅为占位/既有文档同步的明确依据。风险是设置页帮助会成为用户配置依据,一旦模型名、provider 前缀或兼容窗口不准确,会误导用户产生运行时失败。建议补充官方来源与兼容验证,或把示例收敛为非版本化占位并明确不代表可用性背书。 - [Process blocker]
docs/CHANGELOG.md:按 AGENTS.md,用户可见能力变化需要更新docs/CHANGELOG.md,且[Unreleased]应保持扁平条目;但当前 changelog 改动包含大量与本 PR 设置帮助基础设施无关的条目,例如 Webhook、EventMonitor、Anspire、MiniMax、agent_weak、README 同步等内容。风险是 release note 把其他 PR/既有变更重新归入本 PR,造成发布说明漂移和并发冲突。建议只保留本 PR 实际引入的设置帮助、相关测试和本次 CI 稳定性修复条目,或在 PR 中明确这些条目确由本 PR 引入。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
关于帮助信息和具体模型示例的说明:当前帮助内容不是凭空写,基本来自 .env.example、docs/full-guide.md、docs/LLM_CONFIG_GUIDE.md、docs/llm-providers.md、docs/bot/feishu-bot-config.md、docs/deploy-webui-cloud.md 本质上是将文档内容优化并写入对应的配置项帮助窗口中; 如果只是使用占位符,虽然没有问题,但失去了示例和帮助用户的用途;
|
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过。对应 #1199 的设置项帮助体系 PR1,能降低配置项理解成本并为后续扩展提供基础设施。
- 是否有对应 issue:有,Refs #1199。
- PR 类型:feat + test。新增设置帮助元数据、前端帮助弹窗,并补充后端/API/前端测试。
- description 完整性:不完整。验证、兼容性、回滚说明较完整,但 LLM/provider/model 示例与 LiteLLM 相关用户可执行语义缺少明确来源和兼容性验证说明。
- 是否可直接合入:不可。CI 已通过,
mergeable_state=blocked本身不作为阻断;当前阻断点是外部模型/API 配置帮助文案的事实来源与兼容性证据不足。
主要问题
- [Compatibility blocker]
apps/dsa-web/src/locales/settingsHelp.ts、src/core/config_registry.py:本 PR 新增了 LITELLM_MODEL / LLM_CHANNELS 的用户可执行帮助语义和具体示例,例如 provider/model 格式、DeepSeek/Gemini/Ollama 示例、渠道优先级说明等。虽然 PR 描述声明“不修改第三方模型调用语义”,但这些内容会直接指导用户在 Web 设置页填写模型、provider、Base URL 相关配置;结构化检测也已标记外部模型/API 与运行时配置风险。当前描述没有给出对应官方来源链接、当前锁定 LiteLLM/运行时兼容验证、以及旧配置/错误示例的回退说明。风险是用户按帮助弹窗填写后可能保存不可用或不兼容的模型配置。建议补齐具体来源与验证证据,或将示例收敛为仓库内已验证、已文档化的通用格式。 - [Process blocker]
docs/CHANGELOG.md已按 AGENTS.md 更新,但本次是用户可见的设置页交互与帮助体系变更,除 changelog 外未看到对应docs/*专题文档说明新增帮助元数据字段、首批覆盖范围、后续维护来源或文案同步规则。已有通用配置文档可以作为事实源,但本次新增的 in-app help 维护语义尚未说明,后续 PR2/PR3 扩展时容易出现文案漂移。建议补一段轻量专题说明或在现有设置/WebUI 文档中说明维护边界。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
已经补充和修改 PR 描述,增加 docs/settings-help.md 文档 |
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过。对应 #1199 的设置项帮助体系 PR1,能降低设置页配置项理解成本并为后续扩展提供基础设施。
- 是否有对应 issue:有,Refs #1199。
- PR 类型:feat(兼具 docs/test),新增设置帮助元数据、前端帮助弹窗和对应文档/测试。
- description 完整性:不完整。验证、兼容性、回滚说明整体充分,但缺少本 PR 新暴露
WEBUI_HOST可编辑入口后“保存不会动态重绑当前 WebUI 监听地址、需要重启生效”的用户提示/验证说明。 - 是否可直接合入:不可。CI 已通过,
mergeable_state=blocked本身不作为阻断;当前阻断点是WEBUI_HOST被新增为可编辑配置后存在运行时生效语义误导。
主要问题
- [Correctness blocker]
src/core/config_registry.py、apps/dsa-web/src/locales/settingsHelp.ts、src/services/system_config_service.py:本 PR 新增注册并展示WEBUI_HOST,帮助文案说明它控制 WebUI 监听地址、云服务器/外部访问通常使用0.0.0.0。但当前服务监听地址是在进程启动时传给uvicorn.run的,设置页保存只会写入.env并重载配置对象,不会让已运行的 WebUI/API 进程重新 bind host。现有_build_explainability_warnings只覆盖部分启动期配置,未覆盖WEBUI_HOST,测试也未验证该提示。风险是用户在 Web 设置页保存WEBUI_HOST=0.0.0.0后看到“配置已更新/已重载”,但公网/局域网访问仍不会生效,直到重启进程。建议要么本 PR 暂不暴露该字段,要么将WEBUI_HOST明确纳入启动期配置提示,在帮助文案和保存 warning 中说明需重启,并补对应回归测试;WEBUI_PORT已有类似旧模式,本 PR 不应继续扩大这个误导面。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
针对 WEBUI_HOST 指出的 correctness blocker,已补充启动期配置说明与保存 warning:
另外,同 commit 中也修正了设置页保存成功 toast 的可读性问题:
|
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过。本 PR 对应 #1199 的设置项帮助体系 PR1,能降低设置页配置理解成本并建立后续扩展基础设施。
- 是否有对应 issue:有,Refs #1199。
- PR 类型:feat(兼具 docs/test),新增设置帮助元数据、前端帮助弹窗、维护文档和相关测试。
- description 完整性:不完整。验证、兼容性、回滚说明整体充分,但 LLM/provider/model 示例仍缺少官方来源链接与当前 LiteLLM/运行时兼容证据。
- 是否可直接合入:不可。
docker-build仍在进行中,且 LLM 帮助文案中的用户可执行模型/provider 示例还存在兼容性证据缺口。
主要问题
- [Compatibility blocker]
apps/dsa-web/src/locales/settingsHelp.ts、src/core/config_registry.py:设置帮助中直接展示了LITELLM_MODEL/LLM_CHANNELS的 provider/model 格式、DeepSeek/Gemini/Ollama 示例、Base URL 配置方式和渠道优先级说明。这些内容会指导用户填写运行时配置;结构化检测也标记了外部模型/API 兼容风险。PR 描述已说明不修改运行时调用逻辑,也给出了仓库内事实源,但仍未附对应官方来源链接、当前锁定 LiteLLM/运行时兼容验证证据。按仓库 AGENTS.md 对配置语义、三方依赖和用户可见能力的要求,这部分需要补齐来源或收窄为不承诺具体可用性的占位示例后再合入。 - [Process blocker] 当前 CI 仍未全部完成:
docker-build状态为in_progress。根据仓库验证矩阵,docker-build属于阻断项;即使backend-gate、web-gate、ai-governance已通过,也应等待该检查完成后再判断最终可合入性。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
我们当前的帮助说明来源于具体的文档解释,我们的项目并没有第三方的官方说明和文档,我们自己的文档即为官方文档;
|
ZhuLinsen
left a comment
There was a problem hiding this comment.
跟进结论
- 结论:部分接受 + PR 描述已补充“不修改运行时调用逻辑”和仓库内事实源,通用 LLM 渠道/优先级语义可以收缩为既有模式延续,但设置页新增的具体模型示例仍是用户可执行配置提示,证据还不够闭环。
- 是否仍有阻断:有 + CI 已全部通过且
mergeable_state=blocked不单独构成阻断,但 LLM 帮助文案中具体 provider/model 示例仍缺少可追溯来源或兼容性说明,可能误导用户按当前 UI 示例直接配置不可用模型。
说明
apps/dsa-web/src/locales/settingsHelp.ts:LITELLM_MODEL帮助文案直接推荐deepseek/deepseek-v4-flash、gemini/gemini-3.1-pro-preview、ollama/qwen3:8b,这些不是单纯内部字段说明,而是设置页里会指导用户填写的具体运行时值;当前讨论只说明“同步自仓库既有事实源”,还没有证明这些具体模型名在当前 LiteLLM/项目运行时下仍可用。src/core/config_registry.py与前端帮助文案共同把LITELLM_MODEL/LLM_CHANNELS作为首批帮助元数据暴露给系统配置 API 和 Web 设置页;因此这里的风险应收窄为“新增 UI 帮助语义中的具体外部模型示例缺少来源/兼容证据”,而不是继续笼统说 PR 修改了第三方调用逻辑。WEBUI_HOST争议点目前可以关闭:最新快照中的apps/dsa-web/src/locales/settingsHelp.ts已明确写出设置页保存只写入.env并重载配置对象,不会让当前进程重新绑定监听地址,且提示修改后需要重启进程、容器或服务管理器。- 当前 CI 状态为 success;
ai-governance、backend-gate、docker-build、web-gate均已通过。当前阻断不来自 CI,也不来自分支保护状态。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过。本 PR 对应 #1199 的设置项帮助系统 PR1,新增 schema 元数据、前端帮助弹窗和维护文档,有明确用户价值。
- 是否有对应 issue:有,Refs #1199。
- PR 类型:feat + docs + test,核心是新增设置帮助基础设施,同时补充文档与测试。
- description 完整性:完整。已说明范围、验证命令、兼容性、外部模型/API 示例来源、运行时配置不迁移不清理,以及 revert 级回滚方案,符合本仓库 AGENTS.md 对用户可见变更、文档和 CHANGELOG 的要求。
- 是否可直接合入:不可。当前结构化事实显示 PR 与目标分支存在冲突,需先解决冲突后再确认 CI 结果;除冲突外,未发现新的明确阻断性实现问题。
主要问题
- [Process blocker] 当前 merge 状态为存在冲突,当前不能直接合并。CI 已通过,但冲突解决后可能改变最终 diff,需要在 resolved 后重新确认受影响文件与 CI 状态。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
Resolve natural-language stock-name candidates through deterministic local partial matches before invoking the broader name resolver. This keeps common aliases like 茅台 on the fast local path and prevents offline CI from waiting on AkShare network fallback. Guard the async dispatcher test with an assertion that AkShare fallback is not called for the local alias case.
The schedule-time provider failure test could fail when SCHEDULE_TIME was present in the process environment before importing main. In that case _INITIAL_PROCESS_ENV marks it as an explicit override, the provider returns the env value, and ConfigManager.read_config_map is never called, so the expected RuntimeError is not raised. Patch _INITIAL_PROCESS_ENV in the test to model the intended no-process-override scenario and keep the assertion independent of the shell environment used by scripts/ci_gate.sh.
Trap keyboard focus inside the settings help dialog while it is open and return focus to the trigger on close. Keep the backdrop click target out of the tab order and cover the focus loop behavior in the settings field test.
bee9e35 to
c832f40
Compare
已经解决冲突,并提交 |
ZhuLinsen
left a comment
There was a problem hiding this comment.
评审结论
- 必要性:通过,本 PR 对应 #1199 的设置项帮助基础设施,能降低 Web 设置页配置理解成本并为后续覆盖更多字段铺底。
- 是否有对应 issue:有,Refs #1199。
- PR 类型:feat(兼具 docs/test),新增配置帮助元数据、前端帮助弹窗、维护文档和对应测试。
- description 完整性:完整,已说明范围、验证结果、兼容性、外部模型/API 示例来源、运行时配置不迁移不清理,以及 revert 级回滚方案,符合 AGENTS.md 对用户可见变更、文档与 CHANGELOG 的要求。
- 是否可直接合入:可,当前 CI 为 success,冲突已解决;
mergeable_state=blocked仅表示分支保护/权限限制,不单独构成阻断。
🤖 此回复由 OpenReview Bot 自动生成,仅供参考。如有疑问请 @维护者。
…structure (ZhuLinsen#1204) * feat: add settings field help infrastructure * fix: avoid online fallback in bot name routing test Resolve natural-language stock-name candidates through deterministic local partial matches before invoking the broader name resolver. This keeps common aliases like 茅台 on the fast local path and prevents offline CI from waiting on AkShare network fallback. Guard the async dispatcher test with an assertion that AkShare fallback is not called for the local alias case. * test: isolate schedule time provider failure case The schedule-time provider failure test could fail when SCHEDULE_TIME was present in the process environment before importing main. In that case _INITIAL_PROCESS_ENV marks it as an explicit override, the provider returns the env value, and ConfigManager.read_config_map is never called, so the expected RuntimeError is not raised. Patch _INITIAL_PROCESS_ENV in the test to model the intended no-process-override scenario and keep the assertion independent of the shell environment used by scripts/ci_gate.sh. * fix: improve settings help dialog accessibility Trap keyboard focus inside the settings help dialog while it is open and return focus to the trigger on close. Keep the backdrop click target out of the tab order and cover the focus loop behavior in the settings field test. * feat: add help entry and multilingual support for system settings page * feat: add maintenance guidelines for settings help documentation * fix: clarify WebUI bind settings and toast visibility * chore: remove trailing blank line from settings help
…structure (ZhuLinsen#1204) * feat: add settings field help infrastructure * fix: avoid online fallback in bot name routing test Resolve natural-language stock-name candidates through deterministic local partial matches before invoking the broader name resolver. This keeps common aliases like 茅台 on the fast local path and prevents offline CI from waiting on AkShare network fallback. Guard the async dispatcher test with an assertion that AkShare fallback is not called for the local alias case. * test: isolate schedule time provider failure case The schedule-time provider failure test could fail when SCHEDULE_TIME was present in the process environment before importing main. In that case _INITIAL_PROCESS_ENV marks it as an explicit override, the provider returns the env value, and ConfigManager.read_config_map is never called, so the expected RuntimeError is not raised. Patch _INITIAL_PROCESS_ENV in the test to model the intended no-process-override scenario and keep the assertion independent of the shell environment used by scripts/ci_gate.sh. * fix: improve settings help dialog accessibility Trap keyboard focus inside the settings help dialog while it is open and return focus to the trigger on close. Keep the backdrop click target out of the tab order and cover the focus loop behavior in the settings field test. * feat: add help entry and multilingual support for system settings page * feat: add maintenance guidelines for settings help documentation * fix: clarify WebUI bind settings and toast visibility * chore: remove trailing blank line from settings help
…structure (ZhuLinsen#1204) * feat: add settings field help infrastructure * fix: avoid online fallback in bot name routing test Resolve natural-language stock-name candidates through deterministic local partial matches before invoking the broader name resolver. This keeps common aliases like 茅台 on the fast local path and prevents offline CI from waiting on AkShare network fallback. Guard the async dispatcher test with an assertion that AkShare fallback is not called for the local alias case. * test: isolate schedule time provider failure case The schedule-time provider failure test could fail when SCHEDULE_TIME was present in the process environment before importing main. In that case _INITIAL_PROCESS_ENV marks it as an explicit override, the provider returns the env value, and ConfigManager.read_config_map is never called, so the expected RuntimeError is not raised. Patch _INITIAL_PROCESS_ENV in the test to model the intended no-process-override scenario and keep the assertion independent of the shell environment used by scripts/ci_gate.sh. * fix: improve settings help dialog accessibility Trap keyboard focus inside the settings help dialog while it is open and return focus to the trigger on close. Keep the backdrop click target out of the tab order and cover the focus loop behavior in the settings field test. * feat: add help entry and multilingual support for system settings page * feat: add maintenance guidelines for settings help documentation * fix: clarify WebUI bind settings and toast visibility * chore: remove trailing blank line from settings help
…structure (ZhuLinsen#1204) * feat: add settings field help infrastructure * fix: avoid online fallback in bot name routing test Resolve natural-language stock-name candidates through deterministic local partial matches before invoking the broader name resolver. This keeps common aliases like 茅台 on the fast local path and prevents offline CI from waiting on AkShare network fallback. Guard the async dispatcher test with an assertion that AkShare fallback is not called for the local alias case. * test: isolate schedule time provider failure case The schedule-time provider failure test could fail when SCHEDULE_TIME was present in the process environment before importing main. In that case _INITIAL_PROCESS_ENV marks it as an explicit override, the provider returns the env value, and ConfigManager.read_config_map is never called, so the expected RuntimeError is not raised. Patch _INITIAL_PROCESS_ENV in the test to model the intended no-process-override scenario and keep the assertion independent of the shell environment used by scripts/ci_gate.sh. * fix: improve settings help dialog accessibility Trap keyboard focus inside the settings help dialog while it is open and return focus to the trigger on close. Keep the backdrop click target out of the tab order and cover the focus loop behavior in the settings field test. * feat: add help entry and multilingual support for system settings page * feat: add maintenance guidelines for settings help documentation * fix: clarify WebUI bind settings and toast visibility * chore: remove trailing blank line from settings help
PR Type
Background And Problem
当前设置页的配置项主要依赖短描述和外部文档。用户在配置股票列表、LLM 模型、通知渠道、WebUI 监听地址等字段时,无法在页面内直接查看完整说明、配置样
例、影响范围和注意事项。
Issue #1199 希望建设一套可维护的设置项帮助系统,而不是继续依赖 hover tooltip。短说明应常驻展示,详细说明通过 help icon 按需打开,并为后续多语言扩
展预留结构。
本 PR 实现 #1199 中建议 PR 划分的 PR1:基础设施与首批样例。
说明:
.env.example、docs/full-guide.md、docs/LLM_CONFIG_GUIDE.md、docs/llm-providers.md、docs/bot/ feishu-bot-config.md、docs/deploy-webui-cloud.md等。docs/settings-help.md,用于约束后续 PR2/PR3 扩展配置帮助时的事实源、字段语义、安全边界和多语言同步规则。Scope Of Change
本 PR 主要修改以下范围:
后端配置 schema
help_key、examples、docs、warning_codes。STOCK_LIST、LITELLM_MODEL、LLM_CHANNELS、FEISHU_WEBHOOK_URL、WEBUI_HOST。Web 前端设置页
SettingsHelpButton帮助按钮和统一帮助弹窗。SettingsField,设置项标题旁显示 help icon。settingsHelplocale 结构,当前默认中文,预留英文内容结构。文档与变更记录
docs/settings-help.md,说明设置帮助元数据字段、首批覆盖范围、事实源优先级、敏感示例规则和中英文案同步边界。docs/CHANGELOG.md的[Unreleased]扁平条目。测试
_INITIAL_PROCESS_ENV,避免受外部SCHEDULE_TIME环境变量影响。Issue Link
Refs #1199
本 PR 覆盖 issue 中的 PR1 范围;PR2/PR3 的全量配置覆盖和模块级帮助将后续继续补齐。
Verification Commands And Results
实际执行过的验证命令:
关键输出/结论:
Compatibility And Risk
兼容性影响:
潜在风险:
第三方模型 / API 兼容语义:
运行时配置保存 / 清理 / 迁移:
Rollback Plan
如需回滚,直接 revert this PR 即可。该 PR 不包含数据库迁移,不改写用户 .env,不需要额外配置或数据回滚。
EXTRACT_PROMPT Change (if applicable)
未修改 src/services/image_stock_extractor.py 中的 EXTRACT_PROMPT。
展开 / Expand: Full EXTRACT_PROMPT
N/A
Checklist
docs/CHANGELOG.md;README.md仅在首页级信息变化时更新,细节优先写入docs/*.md/ If user-visible changes are included, relevant docs anddocs/CHANGELOG.mdare updated;README.mdis updated only for homepage-level changes, with details kept indocs/*.md