Skip to content

Feature: Add decision limit selector (5/10/20/50 options) #639

@xqliu

Description

@xqliu

Feature Request

Description

Add a dropdown selector to allow users to choose how many decision records to display in the Web UI.

Problem Statement

Currently, the system only displays the most recent 5 decision records (approximately 15 minutes of history). Users cannot review longer periods of AI decision history through the Web UI, which is especially problematic when:

  • Remote server access is not available
  • Accessing from mobile devices or tablets
  • Users need to analyze AI trading patterns over longer periods

Proposed Solution

Add a dropdown selector with options: 5 / 10 / 20 / 50 records.

Time Coverage

Records Time Coverage Use Case
5 15 minutes Quick status check (default)
10 30 minutes Short-term review
20 1 hour Medium-term analysis
50 2.5 hours Deep pattern analysis

Implementation Details

Backend Changes

  • Add limit query parameter to /api/decisions/latest endpoint
  • Default: 5 (maintains current behavior)
  • Max: 50 (prevents excessive data loading)
  • Fully backward compatible

Frontend Changes

  • Add dropdown selector UI component
  • Persist user selection in localStorage
  • Update API calls with selected limit

User Benefits

  1. Better monitoring: Review AI decisions over longer periods
  2. Pattern analysis: Identify trends in AI trading behavior
  3. Mobile-friendly: No need for SSH access to server logs
  4. Flexible: Users can choose their preferred view

Backward Compatibility

Fully backward compatible - API defaults to 5 when parameter is not provided

Performance Impact

  • Minimal: ~50-100KB additional data for 50 records
  • No noticeable impact on loading time

Priority

Medium - Enhances user experience without affecting core functionality

Related PR

Will be linked once PR is created

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions