Skip to content

Fix playground model selection and UI improvements - #1030

Merged
sarinali merged 6 commits into
trycua:mainfrom
sarinali:feature/playground-fixes
Feb 8, 2026
Merged

Fix playground model selection and UI improvements#1030
sarinali merged 6 commits into
trycua:mainfrom
sarinali:feature/playground-fixes

Conversation

@sarinali

@sarinali sarinali commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix model selection state propagation - update chatStateRef synchronously to prevent stale closures
  • Add user-friendly error messages when model/computer not selected
  • Persist model/computer picker changes to storage for existing chats
  • Fix new chat creation to include computer
  • Prefer running VM when initializing playground
  • Fix VM status banner to use selected computer from dropdown
  • Improve ReplayTrajectoryModal UI for compact states

Test plan

  • Change model in picker, send message, verify correct model is used
  • Create new chat from sidebar, verify it has computer set
  • Verify running VMs are selected by default over stopped ones
  • Verify VM status banner updates when selecting offline VM

🤖 Generated with Claude Code

sarinali and others added 5 commits February 6, 2026 19:05
- Update chatStateRef synchronously during render instead of in useEffect
  to prevent stale closure issues when user changes model picker
- Use ref in sendAgentRequest to always get latest model/computer
- Add user-friendly error messages when model or computer is not selected
- Persist model/computer picker changes to storage for existing chats
- Fix type errors: use status check directly instead of isVM for ComputerInfo

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
When creating a new chat from the sidebar, include the selected computer
so the chat can be used immediately without manually selecting a sandbox.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
When no VM is explicitly selected, prefer the first running VM over
the first VM in the list. This ensures the iframe displays a usable VM.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Pass the currently selected computer from the dropdown to the VM status
banner, so it updates immediately when user selects an offline sandbox.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Use smaller modal size when showing loading, empty, or no-screenshot
states instead of always using the large viewer size.

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

@sarinali is attempting to deploy a commit to the Cua Team on Vercel.

A member of the Team first needs to authorize it.

- Pass model and computer from empty state picker to chat creation
- Sync computer from global state when chat doesn't have one stored
- Ensures existing chats without stored computer use the currently
  selected computer from the dropdown

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • rabbit

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@sarinali
sarinali requested a review from ddupont808 February 6, 2026 11:24
@sarinali
sarinali merged commit 6e59ef4 into trycua:main Feb 8, 2026
2 of 4 checks passed
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.

2 participants