Bug Description
When Lens.open('path') is called for a file that's already open in a tab, it switches to that tab but doesn't reload the content from disk. If the tab content was modified (e.g., via Studio.setContent()), the stale content persists.
Steps to Reproduce
Lens.open('~/file.js') - opens file
Studio.setContent('test') - modify content
Lens.open('~/file.js') - returns success but content still 'test'
Expected Behavior
Lens.open() should either:
- Always reload from disk (current behavior for new files)
- Add a
force parameter: Lens.open('path', {reload: true})
- Check if disk content differs from tab content and prompt/reload
Current Workaround
Studio.close() // Close current tab
Lens.open('~/file.js') // Now loads fresh
Impact
- Confusing for AI agents who expect open() to give fresh content
- Can cause edits to wrong version of file
Bug Description
When
Lens.open('path')is called for a file that's already open in a tab, it switches to that tab but doesn't reload the content from disk. If the tab content was modified (e.g., viaStudio.setContent()), the stale content persists.Steps to Reproduce
Lens.open('~/file.js')- opens fileStudio.setContent('test')- modify contentLens.open('~/file.js')- returns success but content still 'test'Expected Behavior
Lens.open()should either:forceparameter:Lens.open('path', {reload: true})Current Workaround
Impact