Skip to content

fix(ui): simplify strategy display — markets only, clean i18n - #174

Merged
Pigbibi merged 2 commits into
mainfrom
fix/strategy-display-meta-text
Jul 7, 2026
Merged

fix(ui): simplify strategy display — markets only, clean i18n#174
Pigbibi merged 2 commits into
mainfrom
fix/strategy-display-meta-text

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

问题

策略下拉框下方的提示文字显示了一堆原始技术字段:

lifecycle_stage: runtime_enabled
runtime_enabled: true
can_switch_live: true
allowed_execution_modes: live, paper, dry_run
domains: 美股 / 港股

这些信息对最终用户无价值,且全是硬编码英文,与中文 UI 不一致。

下拉选项中 disabled/blocked 策略也显示 [blocked live](有拼写错误)和 [disabled] 等技术标签。

改动

函数 之前 之后
strategyDisplayMetaText 显示 8 个技术字段(英文) 只显示市场:支持市场:美股 / 港股
strategyChoiceLabel 纳斯达克增长收益 [disabled] 纳斯达克增长收益(美股)
文案 zh 该账号仅显示 {domains} 策略 支持市场:{domains}
文案 en This account only shows {domains} strategies Markets: {domains}
strategyBlockedLiveReason() 47 行函数 已删除(死代码)

净删除 47 行,新增 8 行。

🤖 Generated with Claude Code

Problem: strategyDisplayMetaText showed raw technical fields
(lifecycle_stage, runtime_enabled, can_switch_live, blocked_live_reason,
allowed_execution_modes, latest_evidence_status, plugin_gate_status) in
hardcoded English below the strategy dropdown. Useless for end users and
inconsistent with the Chinese UI.

Also strategyChoiceLabel used cryptic tags like [blocked live] (typo)
and [disabled] in the dropdown.

Changes:
- strategyDisplayMetaText: just show supported markets via t("strategyMeta")
- strategyChoiceLabel: show domain label (eg. 美股) instead of [blocked live]/[disabled]
- strategyMeta i18n: zh → "支持市场:{domains}", en → "Markets: {domains}"
- Remove dead strategyBlockedLiveReason() function (47 lines)

Co-Authored-By: Claude <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🤖 Codex PR Review

⚠️ Human review required: The Codex review could not be completed.

No Codex service URL or API key configured. Set CODEX_AUDIT_SERVICE_URL, ANTHROPIC_API_KEY, or OPENAI_API_KEY.

Please ensure a human reviewer checks this PR before merging.

Co-Authored-By: Claude <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pigbibi
Pigbibi merged commit 7a37ed9 into main Jul 7, 2026
8 checks passed
@Pigbibi
Pigbibi deleted the fix/strategy-display-meta-text branch July 7, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant