Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Maintained the sidebar scroll position when navigating between chats instead of resetting to the top. [#1411](https://github.com/sourcebot-dev/sourcebot/pull/1411)
- Upgraded `nodemailer` to `^9.0.1`. [#1356](https://github.com/sourcebot-dev/sourcebot/pull/1356)
- Upgraded `@opentelemetry/core` to `^2.8.0`. [#1413](https://github.com/sourcebot-dev/sourcebot/pull/1413)
- [EE] Fixed connector setup dialogs to add scrolling when connector setup content goes out of view.

## [5.0.4] - 2026-06-18

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ type PendingConnectorServer = {
discoveredOAuthScopes: string[];
};

const scrollableConnectorDialogContentClassName = "flex max-h-[calc(100dvh-2rem)] flex-col overflow-hidden";
const scrollableConnectorDialogBodyClassName = "min-h-0 overflow-y-auto py-4 pr-1";

interface OAuthScopesInputProps {
discoveredOAuthScopes: string[];
selectedOAuthScopes: string[];
Expand Down Expand Up @@ -146,7 +149,7 @@ function OAuthScopesInput({
placeholder="Search scopes"
className="h-9"
/>
<div className="max-h-56 overflow-y-auto rounded-md border">
<div className="max-h-56 overflow-y-auto overscroll-contain rounded-md border">
{filteredOAuthScopes.length > 0 ? (
filteredOAuthScopes.map((scope) => (
<div
Expand Down Expand Up @@ -864,14 +867,14 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback

{/* Add connector dialog */}
<Dialog open={isCreateDialogOpen} onOpenChange={handleCreateDialogOpenChange}>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogContent className={cn(scrollableConnectorDialogContentClassName, "sm:max-w-md")}>
<DialogHeader className="shrink-0">
<DialogTitle>Add Connector</DialogTitle>
<DialogDescription>
Add a workspace-approved connector that members can use with Ask Sourcebot.
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
<div className={cn(scrollableConnectorDialogBodyClassName, "space-y-4")}>
<div className="space-y-2">
<Label htmlFor="mcp-configuration-name">Name</Label>
<Input
Expand All @@ -891,7 +894,7 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback
/>
</div>
</div>
<DialogFooter className="sm:justify-between">
<DialogFooter className="shrink-0 sm:justify-between">
<Button variant="outline" onClick={handleCloseCreateDialog}>Cancel</Button>
<Button onClick={handleCreate} disabled={isCreating || !newServerName.trim() || !newServerUrl.trim()}>
{isCreating && <Loader2 className="h-4 w-4 mr-2 animate-spin" />}
Expand All @@ -910,14 +913,14 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback

setIsOAuthScopeSelectionDialogOpen(true);
}}>
<DialogContent className="sm:max-w-lg">
<DialogHeader>
<DialogContent className={cn(scrollableConnectorDialogContentClassName, "sm:max-w-lg")}>
<DialogHeader className="shrink-0">
<DialogTitle>OAuth Scopes</DialogTitle>
<DialogDescription>
Choose the OAuth scopes Sourcebot should request for this connector.
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
<div className={cn(scrollableConnectorDialogBodyClassName, "space-y-4")}>
{pendingOAuthScopeSelectionServer && (
<div className="rounded-md border bg-muted/40 p-3">
<p className="text-sm font-medium truncate">{pendingOAuthScopeSelectionServer.name}</p>
Expand All @@ -933,7 +936,7 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback
onCustomOAuthScopeInputChange={setCustomOAuthScopeInput}
/>
</div>
<DialogFooter className="sm:justify-between">
<DialogFooter className="shrink-0 sm:justify-between">
<Button variant="outline" onClick={handleCloseOAuthScopeSelectionDialog}>Cancel</Button>
<Button onClick={handleCreateDynamicOAuthServer} disabled={isCreating}>
{isCreating && <Loader2 className="h-4 w-4 mr-2 animate-spin" />}
Expand All @@ -950,14 +953,14 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback
return;
}
}}>
<DialogContent className="sm:max-w-lg">
<DialogHeader>
<DialogContent className={cn(scrollableConnectorDialogContentClassName, "sm:max-w-lg")}>
<DialogHeader className="shrink-0">
<DialogTitle>Edit OAuth Scopes</DialogTitle>
<DialogDescription>
Changing OAuth scopes clears saved member authorizations so users can reconnect with the updated scopes.
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
<div className={cn(scrollableConnectorDialogBodyClassName, "space-y-4")}>
{serverToEditOAuthScopes && (
<div className="rounded-md border bg-muted/40 p-3">
<p className="text-sm font-medium truncate">{serverToEditOAuthScopes.name}</p>
Expand All @@ -982,7 +985,7 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback
</div>
)}
</div>
<DialogFooter className="sm:justify-between">
<DialogFooter className="shrink-0 sm:justify-between">
<Button variant="outline" onClick={handleCloseEditOAuthScopesDialog}>Cancel</Button>
<Button onClick={handleUpdateOAuthScopes} disabled={isUpdatingOAuthScopes}>
{isUpdatingOAuthScopes && <Loader2 className="h-4 w-4 mr-2 animate-spin" />}
Expand All @@ -1001,9 +1004,11 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback

setIsClientCredentialsDialogOpen(true);
}}>
<DialogContent className="sm:max-w-lg">
<DialogHeader>
<DialogContent className={cn(scrollableConnectorDialogContentClassName, "sm:max-w-lg")}>
<DialogHeader className="shrink-0">
<DialogTitle>OAuth Client Credentials Required</DialogTitle>
</DialogHeader>
<div className={cn(scrollableConnectorDialogBodyClassName, "space-y-4")}>
<DialogDescription asChild>
<div className="text-sm text-muted-foreground">
<Markdown
Expand Down Expand Up @@ -1041,8 +1046,6 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback
</Markdown>
</div>
</DialogDescription>
</DialogHeader>
<div className="space-y-4 py-4">
{pendingClientCredentialsServer && (
<div className="rounded-md border bg-muted/40 p-3">
<p className="text-sm font-medium truncate">{pendingClientCredentialsServer.name}</p>
Expand Down Expand Up @@ -1079,7 +1082,7 @@ export function WorkspaceAskAgentPage({ callbackStatus, callbackServer, callback
onCustomOAuthScopeInputChange={setCustomOAuthScopeInput}
/>
</div>
<DialogFooter className="sm:justify-between">
<DialogFooter className="shrink-0 sm:justify-between">
<Button variant="outline" onClick={handleCloseClientCredentialsDialog}>Cancel</Button>
<Button
onClick={handleCreateStaticOAuthServer}
Expand Down
Loading