Skip to content

feat(dashboard): Issue #156 MVP format with comfy-table#157

Merged
wjllance merged 21 commits into
mainfrom
feat/dashboard-mvp
Mar 5, 2026
Merged

feat(dashboard): Issue #156 MVP format with comfy-table#157
wjllance merged 21 commits into
mainfrom
feat/dashboard-mvp

Conversation

@agentx1boss

Copy link
Copy Markdown
Collaborator
  • New format_dashboard_mvp() function using comfy-table
  • --compact flag to skip RECENT TRADES section
  • Output format matches Issue Command: standx dashboard MVP - 静态显示版本 #156 spec:
    • Header with refresh time
    • TICKERS row with price changes
    • ACCOUNT row
    • POSITIONS section
    • ORDER BOOK + ACTIVE ORDERS
    • RECENT TRADES (optional with --compact)

Usage:
standx dashboard
standx dashboard --compact
standx dashboard --symbol BTCUSDT
standx dashboard --watch 5

Nova and others added 17 commits March 4, 2026 10:07
- New format_dashboard_mvp() function using comfy-table
- --compact flag to skip RECENT TRADES section
- Output format matches Issue #156 spec:
  - Header with refresh time
  - TICKERS row with price changes
  - ACCOUNT row
  - POSITIONS section
  - ORDER BOOK + ACTIVE ORDERS
  - RECENT TRADES (optional with --compact)

Usage:
  standx dashboard
  standx dashboard --compact
  standx dashboard --symbol BTCUSDT
  standx dashboard --watch 5
- Fetch recent trades from API and display in MVP format
- Fix time format (HH:MM:SS from ISO timestamp)
- Add trades to DashboardSnapshot model
Use is_buyer_taker field to determine trade direction:
- is_buyer_taker=true → BUY
- is_buyer_taker=false → SELL
- Fetch order book via get_depth API
- Show top 3 asks and bids in ORDER BOOK section
- Format: price (qty)
…ut formatting

- Consolidated dashboard command handling by removing the DashboardCommands enum.
- Enhanced the dashboard output format to dynamically adjust column width based on terminal size.
- Added support for displaying 24h change percentage in the dashboard.
- Improved the handling of symbol filtering and error management in dashboard data fetching.
- Updated the dashboard display to show order book and active orders more clearly.

This refactor aligns with the MVP format and addresses issues related to user experience and data presentation.
- Updated watch mode to default to a 5-second refresh interval when no value is provided.
- Improved dashboard output functions to return rendered strings instead of void, allowing for better handling of output.
- Adjusted time format in dashboard header to include seconds for improved clarity.
- Refactored dashboard and portfolio output functions to streamline data rendering and error handling.

These changes enhance user experience and ensure more consistent output across commands.
- Updated dashboard command to utilize WebSocket for real-time trade updates, improving responsiveness.
- Introduced a new function to format trade timestamps, ensuring consistent display of trade times.
- Refactored dashboard output to prioritize WebSocket-fed trades over API polling, enhancing performance.
- Improved overall structure of trade data handling within the dashboard.

These changes significantly enhance the user experience by providing timely trade information and clearer output formatting.
…ting

- Changed agent model from claude-4.6-opus-high-thinking to gpt-5.3-codex for improved performance.
- Introduced a new formatting function for account balance, cross-available funds, and 24h PnL to ensure consistent decimal representation.
- Updated dashboard output to utilize the new formatting function, enhancing clarity in financial data presentation.

These changes improve the accuracy and readability of account information in the dashboard.
- Modified the time formatting functions to convert timestamps to the local timezone instead of UTC, enhancing the relevance of displayed times for users.
- Updated the dashboard output to reflect the current local time, improving user experience by providing contextually accurate time information.

These changes ensure that all time-related outputs are more user-friendly and aligned with local settings.
- Updated the order display in the dashboard to include a more descriptive representation of order quantities, showing "All" for zero quantities.
- Improved the formatting of order side information for better clarity in the output.

These changes enhance the readability and user experience of the dashboard's order information.
…clarity

- Moved the display of POSITIONS and ACTIVE ORDERS to the bottom of the dashboard output for better logical flow.
- Introduced RECENT TRADES section to provide timely trade information, enhancing user experience.
- Updated formatting for clearer presentation of trade details and order information.

These changes improve the overall structure and readability of the dashboard output.
- Changed the label for the refresh time in the dashboard output from "refresh" to "REFRESH" for improved visibility and emphasis.
- This minor adjustment enhances the clarity of the dashboard display, ensuring users can easily identify the refresh time.
- Updated the dashboard output to improve the formatting of order book and recent trades sections, ensuring clearer presentation of data.
- Introduced a two-column layout for order book and recent trades when space allows, enhancing readability.
- Refactored functions for truncating text and formatting prices and quantities, improving overall output consistency.

These changes enhance the user experience by providing a more organized and visually appealing dashboard display.
- Implemented a mechanism to allow users to stop watch mode gracefully using Ctrl+C, improving user experience.
- Updated the rendering logic to ensure the output is displayed correctly before exiting, reducing flicker during updates.

These changes enhance the usability of the watch mode by providing a clear and responsive way to terminate the process.
- Updated the dashboard command to fetch recent trades with an increased limit of 7, enhancing the data available for display.
- Refactored the portfolio command to improve readability by formatting the command initialization.
- Streamlined the dashboard output formatting for better clarity and consistency in displaying trade and portfolio information.

These changes enhance the overall user experience by providing more comprehensive data and improving code readability.
@wjllance wjllance linked an issue Mar 4, 2026 that may be closed by this pull request
4 tasks
- Changed the dashboard output to display unrealized profit and loss (uPnL) instead of 24-hour profit and loss (PnL) for better clarity in financial reporting.
- This adjustment enhances the accuracy of account information presented to users, ensuring a more informative dashboard experience.
- Updated the dashboard output to include realized profit and loss (rPnL) alongside total balance and available funds for a more comprehensive financial overview.
- This change improves the clarity and usefulness of account information presented to users, ensuring they have a complete understanding of their financial status.
- Changed the dashboard title to dynamically include the current version of the StandX CLI, enhancing user awareness of the software version in use.
- This update improves the overall user experience by providing relevant version information directly within the dashboard display.

@wjllance wjllance left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM

@wjllance

wjllance commented Mar 4, 2026

Copy link
Copy Markdown
Owner

🧪 本地编译测试结果

测试环境

  • OS: Linux x86_64
  • Rust: 通过 rustup 安装
  • Branch: feat/dashboard-mvp

检查结果

检查项 状态 说明
✅ 通过 编译检查无错误
✅ 通过 代码格式符合规范
✅ 通过 静态分析无错误
✅ 通过 84 项测试全部通过

测试详情

单元测试: 68 passed

  • auth: 14 tests
  • client: 6 tests
  • config: 16 tests
  • models: 12 tests
  • output: 2 tests
  • commands: 8 tests
  • telemetry: 2 tests
  • websocket: 1 test

集成测试: 13 passed

  • CLI 命令测试
  • 市场数据命令测试
  • 输出格式测试
  • API 流程测试

E2E 测试: 2 passed, 2 ignored

  • 需要环境变量的测试已正确跳过

警告汇总(非阻塞)

共 23 个警告,均为以下类型:

  1. deprecated API (11): 已弃用,建议后续升级到
  2. unused_mut (6): 部分变量不需要
  3. dead_code/unused (6): 未使用的变量和代码

这些警告不影响功能,可在后续迭代中清理。

结论

PR 编译测试通过,可以合并

代码结构良好,测试覆盖完整,新增依赖 和 编译正常。

@wjllance

wjllance commented Mar 4, 2026

Copy link
Copy Markdown
Owner

🖥️ Dashboard 手动测试结果

测试命令及输出

1. ✅ Dashboard 基础命令

$ standx dashboard --symbols BTC-USD

输出结果:

  • ✅ Dashboard 标题正确显示版本号
  • ✅ TICKERS 区域显示 BTC-USD 价格和涨跌幅 (▲ 10.29%)
  • ✅ ORDER BOOK 显示买卖盘和 spread
  • ✅ RECENT TRADES 显示最近成交记录
  • ✅ POSITIONS 和 ACTIVE ORDERS 正确显示空状态
  • ✅ 底部显示使用提示

2. ✅ Dashboard 多币种 + 紧凑模式

$ standx dashboard --symbols BTC-USD,ETH-USD --compact

输出结果:

  • ✅ 同时显示 BTC-USD 和 ETH-USD
  • ✅ 紧凑模式正确跳过 RECENT TRADES 区域
  • ✅ 布局自适应调整

3. ✅ Portfolio 命令

$ standx portfolio

输出结果:

  • ✅ 显示 Portfolio Summary 标题
  • ✅ 显示时间戳
  • ✅ 未认证时正确提示登录

4. ✅ Dry-run 模式

$ standx dashboard --dry-run

输出结果:

  • ✅ 正确显示 dry-run 提示信息

界面评估

方面 评价
布局 清晰的分区设计,信息层次分明
数据展示 价格、涨跌幅、订单簿、成交记录完整
未认证处理 优雅降级,显示公开数据并提示登录
紧凑模式 --compact 参数工作正常
多币种 支持逗号分隔的多个交易对

发现的问题

  1. 涨跌幅符号: 当前使用 ▲ 表示上涨,建议后续添加颜色高亮(参考 Issue [Feature] Dashboard 添加颜色高亮显示(红/绿表示涨跌) #159
  2. 时间显示: 顶部的 REFRESH 时间格式为 07:40:06,建议添加时区信息

结论

Dashboard 功能工作正常,输出格式正确

  • 静态显示版本功能完整
  • 布局美观,信息展示清晰
  • 命令行参数支持完善
  • 未认证场景处理得当

@wjllance wjllance merged commit 9b6f854 into main Mar 5, 2026
6 checks passed
@wjllance wjllance deleted the feat/dashboard-mvp branch March 5, 2026 00:07
wjllance pushed a commit that referenced this pull request Mar 5, 2026
- Update version to 0.7.0-rc.1
- Add CHANGELOG entries for Dashboard MVP (#157)

Highlights:
- Complete dashboard redesign with comfy-table formatting
- Real-time order book depth display
- Recent trades panel with BUY/SELL activity
- Enhanced watch mode with graceful exit handling
- Local timezone support for timestamps
@wjllance wjllance mentioned this pull request Mar 5, 2026
4 tasks
wjllance pushed a commit that referenced this pull request Mar 5, 2026
- Update version to 0.7.0-rc.1 (Cargo.toml, version.json)
- Add CHANGELOG entries for Dashboard MVP (#157)
- Update Skill metadata (openclaw/SKILL.md, clawhub-publish/SKILL.md)
- Create RELEASE_NOTES_v0.7.0-rc.1.md
- Remove old clawhub metadata files (_meta.json, package.json)

Highlights:
- Complete dashboard redesign with comfy-table formatting
- Real-time order book depth display
- Recent trades panel with BUY/SELL activity
- Enhanced watch mode with graceful exit handling
- Local timezone support for timestamps
- Command short aliases support
wjllance pushed a commit that referenced this pull request Mar 5, 2026
- Update version to 0.7.0-rc.1 (Cargo.toml, version.json)
- Add CHANGELOG entries for Dashboard MVP (#157)
- Update Skill metadata (openclaw/SKILL.md, clawhub-publish/SKILL.md)
- Create RELEASE_NOTES_v0.7.0-rc.1.md
- Remove old clawhub metadata files (_meta.json, package.json)

Highlights:
- Complete dashboard redesign with comfy-table formatting
- Real-time order book depth display
- Recent trades panel with BUY/SELL activity
- Enhanced watch mode with graceful exit handling
- Local timezone support for timestamps
- Command short aliases support
wjllance pushed a commit that referenced this pull request Mar 5, 2026
- Update version to 0.7.0-rc.1 (Cargo.toml, version.json)
- Add CHANGELOG entries for Dashboard MVP (#157)
- Update Skill metadata (openclaw/SKILL.md, clawhub-publish/SKILL.md)
- Create RELEASE_NOTES_v0.7.0-rc.1.md
- Remove old clawhub metadata files (_meta.json, package.json)

Highlights:
- Complete dashboard redesign with comfy-table formatting
- Real-time order book depth display
- Recent trades panel with BUY/SELL activity
- Enhanced watch mode with graceful exit handling
- Local timezone support for timestamps
- Command short aliases support
wjllance pushed a commit that referenced this pull request Mar 5, 2026
- Update version to 0.7.0-rc.1 (Cargo.toml, version.json)
- Add CHANGELOG entries for Dashboard MVP (#157)
- Update Skill metadata (openclaw/SKILL.md, clawhub-publish/SKILL.md)
- Create RELEASE_NOTES_v0.7.0-rc.1.md
- Remove old clawhub metadata files (_meta.json, package.json)

Highlights:
- Complete dashboard redesign with comfy-table formatting
- Real-time order book depth display
- Recent trades panel with BUY/SELL activity
- Enhanced watch mode with graceful exit handling
- Local timezone support for timestamps
- Command short aliases support
@wjllance wjllance mentioned this pull request Mar 5, 2026
5 tasks
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.

Command: standx dashboard MVP - 静态显示版本

3 participants