Skip to content

Fix Firstrade notification account overview#73

Merged
Pigbibi merged 1 commit into
mainfrom
codex/firstrade-notification-account-overview-20260605
Jun 5, 2026
Merged

Fix Firstrade notification account overview#73
Pigbibi merged 1 commit into
mainfrom
codex/firstrade-notification-account-overview-20260605

Conversation

@Pigbibi
Copy link
Copy Markdown
Contributor

@Pigbibi Pigbibi commented Jun 5, 2026

Summary

  • keep Firstrade broker-side account overview visible even when strategy dashboard text is present
  • filter duplicate account, holdings, and signal lines from strategy dashboard supplements
  • add a focused notification rendering regression test

Checks

  • PYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src:/usr/lib/python3/dist-packages python -m pytest -q tests/test_notifications_telegram.py
  • PYTHONPATH=.:../QuantPlatformKit/src:../UsEquityStrategies/src:/usr/lib/python3/dist-packages /usr/bin/python3 -m py_compile notifications/telegram.py tests/test_notifications_telegram.py
  • git diff --check

Note: full local tests/test_rebalance_service.py collection is blocked on this VPS because the available Python environments do not include all runtime test dependencies (pandas in the pytest venv, pytest in system Python). CI installs requirements.txt and should run the full suite.

@Pigbibi Pigbibi merged commit c683905 into main Jun 5, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/firstrade-notification-account-overview-20260605 branch June 5, 2026 00:58
Copy link
Copy Markdown

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

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: 249eb77b82

ℹ️ 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
"可投资现金",
"净值",
}
return any(label and label.lower() in lowered for label in metric_labels)
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 Match metric labels only at field prefixes

When dashboard_text contains a non-duplicated supplemental line that merely mentions equity/portfolio_equity (for example a small-account warning) and signal_display is empty or does not carry that same detail, this broad substring check drops the line even though the generated account overview does not recreate it. The previous behavior preserved those dashboard supplements, so the duplicate filter should only match actual metric rows such as labels at the start of the line.

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