Skip to content

docs(readme): source preview images from live frontend and real CLI plot#33

Merged
magic-alt merged 2 commits into
mainfrom
fix/readme-real-cli-frontend-previews
May 21, 2026
Merged

docs(readme): source preview images from live frontend and real CLI plot#33
magic-alt merged 2 commits into
mainfrom
fix/readme-real-cli-frontend-previews

Conversation

@magic-alt
Copy link
Copy Markdown
Owner

@magic-alt magic-alt commented May 21, 2026

Summary

Replace all synthesized/mock README preview images with real captures from the running platform:

  • docs/assets/web-console-dashboard.png - Playwright (headless Chromium) screenshot of the live Vue3 Dashboard view (docker compose up -d api frontend)
  • docs/assets/web-console-backtest.png - Playwright screenshot of the Backtest Workbench after running a real 600519.SH backtest through the API; the ECharts result card (candlestick + MA/Boll/Volume/RSI/MACD/KDJ + buy-sell markers) is element-cropped and auto-trimmed via Pillow
  • docs/assets/backtest-preview.png - copied directly from report/600519_macd_20260519_123947/backtest_result.png, the actual matplotlib multi-panel output of python unified_backtest_framework.py run --strategy macd --symbols 600519.SH --plot
  • Add scripts/capture_frontend_previews.py - Playwright driver for future re-captures
  • Remove scripts/render_readme_preview.py - synthetic renderer, superseded by real captures
  • Fix README CI badge URL to actions/workflows/ci.yml/badge.svg?branch=main
  • Update docs/assets/architecture-overview.svg to V6 layered diagram

Validation

  • python -m pytest tests/ -v --tb=short - 1279 passed, 35 skipped (local CI exit 0)
  • python -m mkdocs build --strict - docs-only, no nav/config touched
  • npm --prefix frontend run build - frontend source unchanged
  • docker compose config - docker files unchanged

Risk Notes

Docs-only change. No production code, API contracts, or test logic modified.

Screenshots or Artifacts

Dashboard view (live Vue frontend)

Dashboard

Backtest Workbench (live frontend, real 600519.SH backtest)

Backtest Workbench

CLI backtest plot

CLI plot

magic-alt added 2 commits May 21, 2026 09:29
- Rename '5-Second Preview' to 'Platform at a Glance' (heading now matches what the section actually shows).

- Add scripts/render_readme_preview.py to rebuild backtest-preview / web-console-dashboard / web-console-backtest PNGs from the real one_click_demo artifacts.

- Redraw docs/assets/architecture-overview.svg to match the V6 layered architecture (Plugin SDK -> SPI -> Engines/Adapters -> Runtimes -> Kernel).

- Fix README CI Status badge URL to the canonical actions/workflows/ci.yml/badge.svg form pinned to main.

- Drop obsolete docs/assets/{web-console-dashboard,web-console-backtest}.svg and demo-workflow.gif (superseded by PNGs).
- Replace synthetic matplotlib previews with real screenshots of the
  running Vue console (Dashboard + Backtest Workbench) captured via
  Playwright + Chromium from the live Docker stack
  (docker compose up -d api frontend).
- Replace docs/assets/backtest-preview.png with the actual
  `unified_backtest_framework.py run --strategy macd --symbols 600519.SH --plot`
  matplotlib output (real CLI plot, no synthesized visuals).
- Add scripts/capture_frontend_previews.py — runs a real 600519.SH
  backtest in the Backtest Workbench and screenshots Dashboard + the
  populated result card, with Pillow trailing-blank auto-cropping.
- Remove scripts/render_readme_preview.py — synthetic renderer
  superseded by real captures.
- Rewrite README "Platform at a Glance" intro and captions to name the
  real capture commands; update CHANGELOG [Unreleased].
Copilot AI review requested due to automatic review settings May 21, 2026 01:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the repository’s README previews to use real artifacts (live Vue frontend screenshots + real CLI plot output) instead of synthetic SVG mockups, and refreshes the architecture diagram accordingly.

Changes:

  • Add a Playwright-based script to capture real web-console screenshots into docs/assets/.
  • Update README.md to reference the new PNG previews and fix the CI badge URL.
  • Refresh the architecture SVG and remove obsolete synthetic preview SVG assets; record changes in CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/capture_frontend_previews.py New Playwright script to capture live frontend screenshots for README previews.
README.md Switch README previews to real PNG screenshots/CLI plot; update CI badge and section copy.
docs/assets/architecture-overview.svg Redraw/expand architecture diagram to match the V6 layered model.
docs/assets/web-console-dashboard.svg Remove obsolete synthetic dashboard preview asset.
docs/assets/web-console-backtest.svg Remove obsolete synthetic backtest preview asset.
CHANGELOG.md Document the README preview tooling/content changes and asset removals.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

try:
from playwright.sync_api import sync_playwright
except ImportError:
print("playwright not installed. Run: python -m pip install playwright && python -m playwright install chromium")
Comment thread CHANGELOG.md
Comment on lines +7 to +9
### Added
- Docs/Tooling: add `scripts/capture_frontend_previews.py` — a Playwright + Chromium driver that opens the live Docker frontend (`docker compose up -d api frontend`), runs a real `600519.SH` backtest in the Backtest Workbench, and writes `docs/assets/web-console-dashboard.png` and `docs/assets/web-console-backtest.png` straight from the running Vue console. Trailing blank padding is auto-cropped via Pillow.

@magic-alt magic-alt changed the title Fix/readme real cli frontend previews docs(readme): source preview images from live frontend and real CLI plot May 21, 2026
@magic-alt magic-alt merged commit e9a3410 into main May 21, 2026
14 checks passed
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.

2 participants