Skip to content

Unify Firstrade Telegram notifications#10

Merged
Pigbibi merged 1 commit into
mainfrom
firstrade-unified-notifications
May 23, 2026
Merged

Unify Firstrade Telegram notifications#10
Pigbibi merged 1 commit into
mainfrom
firstrade-unified-notifications

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Firstrade Telegram notifications were still receiving raw strategy translation keys in some paths, so messages could include signal_blend_* codes, parameter strings, duplicated dashboard signal rows, and untranslated small-account warning text.

This PR routes strategy evaluation through the platform translator, expands Firstrade's i18n keys to match the US-equity strategy notifications used by other platforms, and renders structured status/signal annotations into compact localized lines. Dashboard signal rows are suppressed when the dedicated signal block is present, so the account/holding dashboard stays readable while the small-account warning is preserved as a separate bullet.

Validation

  • .venv/bin/python -m pytest tests/test_rebalance_service.py -q
  • .venv/bin/python -m pytest tests/test_request_handling.py -q
  • .venv/bin/python -m py_compile application/rebalance_service.py notifications/telegram.py main.py
  • .venv/bin/python -m pytest -q

@Pigbibi Pigbibi merged commit 0fb5e18 into main May 23, 2026
1 check passed
@Pigbibi Pigbibi deleted the firstrade-unified-notifications branch May 23, 2026 04:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 933d44f2dd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread notifications/telegram.py
Comment on lines +299 to +300
if has_signal_display and _is_dashboard_signal_line(line):
continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve small-account warnings from dashboard text

When signal_display is non-empty, this branch removes every dashboard line classified as a signal line, including lines containing small account warning / 小账户提示. If a strategy emits the warning only in dashboard_text (and not as a | detail in signal_display), the warning is dropped entirely and never re-added by _format_signal_lines, so users can miss an important account-size warning.

Useful? React with 👍 / 👎.

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