fix(tarko-agent-ui): display environment input on session creation#1667
Merged
fix(tarko-agent-ui): display environment input on session creation#1667
Conversation
- Modified EnvironmentInputHandler to bypass shouldUpdatePanelContent check for first environment_input - Ensures initialization screenshots from createSession are displayed in workspace - Maintains existing browser_vision_control panel behavior
✅ Deploy Preview for tarko ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for agent-tars-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
- Move isFirstEnvironmentInput check before adding message to messagesAtom - Ensures correct detection of first environment_input during session creation - Removes debug statements
…etting - Add detailed logging to understand why panel content is not being set - Check conditions and values during environment input processing
…ronment screenshot - Check if environment_input has set browser_vision_control panel before auto-selecting files - Preserve environment screenshot display during session creation - Add logging to track panel content decisions
…ing environment screenshot" This reverts commit 7112c2e.
…control - Add required source field and arguments structure for BrowserControlRenderer - Include _extra.currentScreenshot with image URL for screenshot display - Ensure panel content matches expected format for extractBrowserControlData
- First environment input uses simple 'image' type instead of 'browser_vision_control' - Only use browser_vision_control renderer for updating existing browser panels - Remove debugger statements and simplify conditional logic - Separate handling for initialization vs browser control updates
- Log panel content object before setting - Add timeout check to verify content was actually set - Debug sessionPanelContentAtom state changes
…ent panel content - createSessionAction only auto-selects files if no panel content was set by initialization events - setActiveSessionAction preserves existing panel content when no files are available - Add logging to track panel content preservation decisions - Ensure environment input panel content is not cleared by file auto-selection logic
- Remove all console.log debug statements - Remove setTimeout debug code - Keep only essential logic for environment input display - Maintain minimal changes approach
- Remove file auto-selection modifications from createSessionAction - Remove panel content protection from setActiveSessionAction - These changes were not related to the core environment input display issue - Keep only the essential EnvironmentInputHandler fixes
- Remove confusing shouldUpdate variable with redundant conditions - Use clear if-else-if chain for different scenarios: 1. First environment input -> simple image type 2. Existing browser_vision_control -> update it 3. Other cases -> check shouldUpdatePanelContent - Eliminate duplicate condition checks
- Extract common panel properties into basePanelContent object - Combine browser_vision_control conditions to avoid duplication - Single set() call instead of multiple identical ones - Reduce code from ~70 lines to ~45 lines while maintaining same logic
- Check if panel content already exists before auto-selecting files - Only auto-select files when no panel content was set by events - This preserves environment input screenshots after browser refresh - Fixes issue where environment screenshots disappeared on page reload
ZhaoHeh
approved these changes
Sep 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix issue where Environment Input from
/api/v1/sessions/createwas not displaying in Workspace. ModifiedEnvironmentInputHandlerto bypassshouldUpdatePanelContentcheck for first environment_input events, ensuring initialization screenshots are properly shown during session creation while maintaining existingbrowser_vision_controlpanel behavior.Checklist