Skip to content

Commit 7bfb48c

Browse files
committed
Fix scrolling in extension configuration modal
When installing a dev extension with long installation instructions, the configuration modal would overflow and users couldn't scroll to see the full content or interact with buttons at the bottom. This fix adds a ScrollHandle to the ConfigureContextServerModal and passes it to the Modal component, enabling the built-in modal scrolling capability. This ensures all content remains accessible regardless of length. Fixes #42342
1 parent 2bcfc12 commit 7bfb48c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/agent_ui/src/agent_configuration/configure_context_server_modal.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use anyhow::{Context as _, Result};
77
use context_server::{ContextServerCommand, ContextServerId};
88
use editor::{Editor, EditorElement, EditorStyle};
99
use gpui::{
10-
AsyncWindowContext, DismissEvent, Entity, EventEmitter, FocusHandle, Focusable, Task,
10+
AsyncWindowContext, DismissEvent, Entity, EventEmitter, FocusHandle, Focusable, ScrollHandle, Task,
1111
TextStyle, TextStyleRefinement, UnderlineStyle, WeakEntity, prelude::*,
1212
};
1313
use language::{Language, LanguageRegistry};
@@ -252,6 +252,7 @@ pub struct ConfigureContextServerModal {
252252
source: ConfigurationSource,
253253
state: State,
254254
original_server_id: Option<ContextServerId>,
255+
scroll_handle: ScrollHandle,
255256
}
256257

257258
impl ConfigureContextServerModal {
@@ -361,6 +362,7 @@ impl ConfigureContextServerModal {
361362
window,
362363
cx,
363364
),
365+
scroll_handle: ScrollHandle::new(),
364366
})
365367
})
366368
})
@@ -696,7 +698,7 @@ impl Render for ConfigureContextServerModal {
696698
this.focus_handle(cx).focus(window);
697699
}))
698700
.child(
699-
Modal::new("configure-context-server", None)
701+
Modal::new("configure-context-server", Some(self.scroll_handle.clone()))
700702
.header(self.render_modal_header())
701703
.section(
702704
Section::new()

0 commit comments

Comments
 (0)