Skip to content

Conversation

@PotatoZhou
Copy link
Contributor

📝 Pull Request Template

1. Related Issue

Closes #517

2. Type of Change (select one)

Type of Change: Bug Fix

3. Description

Add previousStrategyIds state to track strategy changes and Automatically select new strategies when detected

4. Testing

  • I have tested this locally.
  • I have updated or added relevant tests.

5. Checklist

@vcfgv
Copy link
Collaborator

vcfgv commented Dec 10, 2025

Thank you for your continuous contributions! We really appreciate your consistency and effort recently. Feel free to join our Discord server if you need real-time communication or just want to chat.

@PotatoZhou
Copy link
Contributor Author

Thank you for your continuous contributions! We really appreciate your consistency and effort recently. Feel free to join our Discord server if you need real-time communication or just want to chat.

Just joined, looking forward to helping out more :)

@DigHuang
Copy link
Contributor

Thanks for the PR!

Regarding the implementation, I'd prefer not to introduce an internal state like previousStrategyIds to track changes. Instead, we should rely on Routing as the single source of truth for the currently selected strategy.

Suggested approach:

Ensure the selected strategy is always derived from the URL (e.g., /strategies/:strategyId).

When a new strategy is created, simply trigger a navigation to the new route (redirect to the new strategyId).

This approach keeps the state management cleaner and avoids synchronization issues between local state and the UI.

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.

Strategy list does not auto-select the newly created strategy

3 participants