Skip to content

fix: wire up auto_open_panel to AgentPanel starts_open() - #13

Merged
lukemarsden merged 1 commit into
mainfrom
fix/agent-panel-auto-open
Feb 26, 2026
Merged

fix: wire up auto_open_panel to AgentPanel starts_open()#13
lukemarsden merged 1 commit into
mainfrom
fix/agent-panel-auto-open

Conversation

@lukemarsden

Copy link
Copy Markdown

Summary

  • The auto_open_panel agent setting existed but was never wired to Panel::starts_open()
  • Default starts_open() returns false, so the agent panel never auto-opened in fresh containers
  • This adds a 4-line override that checks AgentSettings::get_global(cx).auto_open_panel

Context

Fresh spectask containers have "auto_open_panel": true in settings but no saved workspace state, so the panel stayed closed on boot.

Test plan

  • Syntactically correct (follows same pattern as ProjectPanel's starts_open)
  • Needs Zed rebuild + deploy to verify visually

🤖 Generated with Claude Code

The `auto_open_panel` agent setting existed in settings but was never
connected to the Panel trait's `starts_open()` method. The default
implementation returns false, so the agent panel never auto-opened
on workspace creation regardless of the setting value.

This was masked by workspace state restoration in persistent sessions
but breaks fresh containers (like spectask desktops) where there's
no saved workspace state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lukemarsden
lukemarsden merged commit edd27f4 into main Feb 26, 2026
lukemarsden pushed a commit that referenced this pull request Apr 9, 2026
)

When atlas tiles are rapidly allocated and freed (e.g. watching a shared
screen in Collab), a texture can become unreferenced and be removed
while GPU uploads for it are still pending. On the next frame,
`flush_uploads` indexes into the now-empty texture slot and panics:

```
  thread 'main' panicked at crates/gpui_wgpu/src/wgpu_atlas.rs:231:40:
  texture must exist...

  #11 core::option::expect_failed
  #12 gpui_wgpu::wgpu_atlas::WgpuAtlas::before_frame
  #13 gpui_wgpu::wgpu_renderer::WgpuRenderer::draw
```

This change drains pending uploads for a texture when it becomes
unreferenced in `remove`, and skips uploads for missing textures in
`flush_uploads` as a safety net.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable


Release Notes:

- Fixed occasional crashes when viewing a screen share
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.

1 participant