docs(readme): source preview images from live frontend and real CLI plot#33
Merged
Merged
Conversation
- 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].
There was a problem hiding this comment.
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.mdto 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 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. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 real600519.SHbacktest through the API; the ECharts result card (candlestick + MA/Boll/Volume/RSI/MACD/KDJ + buy-sell markers) is element-cropped and auto-trimmed via Pillowdocs/assets/backtest-preview.png- copied directly fromreport/600519_macd_20260519_123947/backtest_result.png, the actual matplotlib multi-panel output ofpython unified_backtest_framework.py run --strategy macd --symbols 600519.SH --plotscripts/capture_frontend_previews.py- Playwright driver for future re-capturesscripts/render_readme_preview.py- synthetic renderer, superseded by real capturesactions/workflows/ci.yml/badge.svg?branch=maindocs/assets/architecture-overview.svgto V6 layered diagramValidation
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 touchednpm --prefix frontend run build- frontend source unchangeddocker compose config- docker files unchangedRisk Notes
Docs-only change. No production code, API contracts, or test logic modified.
Screenshots or Artifacts
Dashboard view (live Vue frontend)
Backtest Workbench (live frontend, real 600519.SH backtest)
CLI backtest plot