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.

@PotatoZhou PotatoZhou changed the title fix(frontend): auto-select newly created strategy in sidebar [WIP] fix(frontend): auto-select newly created strategy in sidebar Dec 12, 2025
* 'main' of github.com:PotatoZhou/valuecell:
  chore: temporarily switch to TradingView for all stock data rendering (#572)
  feat: enhance model validation and API key input UI (#571)
  fix(tracker): split useEffect hooks avoid resend, and dynamically retrieve tracker user_id (#569)
  feat: add TradingView plugin to display the index and stock information (#511)
@PotatoZhou PotatoZhou changed the title [WIP] fix(frontend): auto-select newly created strategy in sidebar fix(frontend): auto-select newly created strategy in sidebar Dec 15, 2025
@PotatoZhou PotatoZhou closed this Dec 16, 2025
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