Skip to content

refactor: optimize scene prompt formatting and selection sync logic#143

Merged
tptpp merged 1 commit intomainfrom
feat/product-experience-optimize
Mar 5, 2026
Merged

refactor: optimize scene prompt formatting and selection sync logic#143
tptpp merged 1 commit intomainfrom
feat/product-experience-optimize

Conversation

@yhjun1026
Copy link
Collaborator

Summary

  • Extract scene separator as variable for better code readability in agent_chat.py
  • Improve scene selection synchronization logic in tab-scenes.tsx to avoid unnecessary state updates
  • Add smart detection for server/client scene synchronization to prevent race conditions

Changes

  • agent_chat.py: Refactored scene prompt formatting by extracting \n\n---\n\n as a named variable
  • tab-scenes.tsx: Enhanced scene selection sync logic with conditions to check for new scenes from server and avoid overriding local unsynchronized changes

Test Plan

  • Verified scene creation flow works correctly
  • Tested scene selection persistence across app reloads
  • Confirmed no state update loops in scene management

- Extract scene separator as variable for better readability
- Improve scene selection sync to avoid unnecessary state updates
- Add smart detection for server/client scene synchronization
Copy link
Collaborator

@tptpp tptpp left a comment

Choose a reason for hiding this comment

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

R+

@tptpp tptpp merged commit f2ee219 into main Mar 5, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants