Skip to content

Commit d6cc934

Browse files
authored
Merge branch 'main' into michael/sou-220-bug-unable-to-clone-public-gitlab-repos-from-gitlabcom-with
2 parents bd962d9 + 47ec6e8 commit d6cc934

File tree

11 files changed

+57
-32
lines changed

11 files changed

+57
-32
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
- Added dialog when no authentication provider is configured. [#744](https://github.com/sourcebot-dev/sourcebot/pull/744)
12+
13+
### Fixed
14+
- Fixed "Invalid line number XXX in 21-line document" error when a invalid highlight range is passed to the file viewer. [#745](https://github.com/sourcebot-dev/sourcebot/pull/745)
15+
- Fixed visual nit where ask sb search scope selector would render long repository names poorly. [#747](https://github.com/sourcebot-dev/sourcebot/pull/747)
16+
- Fixed visual nit where long search previews in ask sb would take up a lot of space. [#747](https://github.com/sourcebot-dev/sourcebot/pull/747)
17+
18+
## [4.10.11] - 2026-01-16
19+
1020
### Fixed
1121
- Fixed issue with filtering on generic git repo indexed from http/https [#742](https://github.com/sourcebot-dev/sourcebot/pull/742)
1222
- Fixed auth error when trying to sync public gitlab.com project with no token [#748](https://github.com/sourcebot-dev/sourcebot/pull/748)
23+
- Fixed "Ranges must be added sorted by `from` position and `startSide`" error when browsing certain files. [#743](https://github.com/sourcebot-dev/sourcebot/pull/743)
1324

1425
## [4.10.10] - 2026-01-16
1526

packages/shared/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// This file is auto-generated by .github/workflows/release-sourcebot.yml
2-
export const SOURCEBOT_VERSION = "v4.10.10";
2+
export const SOURCEBOT_VERSION = "v4.10.11";

packages/web/src/app/[domain]/browse/[...path]/components/pureCodePreviewPanel.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ export const PureCodePreviewPanel = ({
114114
const doc = editorRef.state.doc;
115115
const { start, end } = highlightRange;
116116

117+
if (start.lineNumber > doc.lines || end.lineNumber > doc.lines) {
118+
console.warn(`Highlight range is out of bounds: start.lineNumber=${start.lineNumber}, end.lineNumber=${end.lineNumber}, doc.lines=${doc.lines}`);
119+
return;
120+
}
121+
117122
const from = doc.line(start.lineNumber).from;
118123
const to = doc.line(end.lineNumber).to;
119124
const selection = EditorSelection.range(from, to);

packages/web/src/app/[domain]/browse/[...path]/components/rangeHighlightingExtension.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export const rangeHighlightingExtension = (range: BrowseHighlightRange) => State
1616
create(state) {
1717
const { start, end } = range;
1818

19+
if (start.lineNumber > state.doc.lines || end.lineNumber > state.doc.lines) {
20+
console.warn(`Highlight range is out of bounds: start.lineNumber=${start.lineNumber}, end.lineNumber=${end.lineNumber}, doc.lines=${state.doc.lines}`);
21+
return Decoration.none;
22+
}
23+
1924
if ('column' in start && 'column' in end) {
2025
const from = state.doc.line(start.lineNumber).from + start.column - 1;
2126
const to = state.doc.line(end.lineNumber).from + end.column - 1;
@@ -25,14 +30,14 @@ export const rangeHighlightingExtension = (range: BrowseHighlightRange) => State
2530
decorations.push(markDecoration.range(from, to));
2631
}
2732

28-
return Decoration.set(decorations);
33+
return Decoration.set(decorations, /* sort = */ true);
2934
} else {
3035
const decorations: Range<Decoration>[] = [];
3136
for (let line = start.lineNumber; line <= end.lineNumber; line++) {
3237
decorations.push(lineDecoration.range(state.doc.line(line).from));
3338
}
3439

35-
return Decoration.set(decorations);
40+
return Decoration.set(decorations, /* sort = */ true);
3641
}
3742
},
3843
update(deco, tr) {

packages/web/src/app/components/authMethodSelector.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { DividerSet } from "@/app/components/dividerSet";
99
import { ProviderButton } from "@/app/components/providerButton";
1010
import { AuthSecurityNotice } from "@/app/components/authSecurityNotice";
1111
import type { IdentityProviderMetadata } from "@/lib/identityProviders";
12+
import Link from "next/link";
1213

1314
interface AuthMethodSelectorProps {
1415
providers: IdentityProviderMetadata[];
@@ -44,6 +45,15 @@ export const AuthMethodSelector = ({
4445
const hasCredentials = providers.some(p => p.purpose === "sso" && p.id === "credentials");
4546
const hasMagicLink = providers.some(p => p.purpose === "sso" && p.id === "nodemailer");
4647

48+
if (oauthProviders.length === 0 && !hasCredentials && !hasMagicLink) {
49+
return (
50+
<div className="flex flex-col items-center justify-center w-full gap-2">
51+
<p className="text-center font-medium">No authentication methods available. Please contact your administrator to configure authentication.</p>
52+
<Link href="https://docs.sourcebot.dev/docs/configuration/auth/overview" target="_blank" rel="noopener" className="text-link hover:underline">Learn more</Link>
53+
</div>
54+
)
55+
}
56+
4757
return (
4858
<>
4959
<AuthSecurityNotice closable={securityNoticeClosable} />

packages/web/src/ee/features/codeNav/components/symbolHoverPopup/symbolHoverTargetsExtension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const symbolHoverTargetsExtension = StateField.define<DecorationSet>({
7474
}
7575
},
7676
});
77-
return Decoration.set(decorations);
77+
return Decoration.set(decorations, /* sort = */ true);
7878
},
7979
update(deco, tr) {
8080
return deco.map(tr.changes);

packages/web/src/features/chat/components/chatBox/searchScopeSelector.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -320,23 +320,17 @@ export const SearchScopeSelector = forwardRef<
320320
>
321321
<CheckIcon className="h-4 w-4" />
322322
</div>
323-
<div className="flex items-center gap-2 flex-1">
323+
<div className="flex flex-row items-center gap-2 w-full overflow-hidden">
324324
<SearchScopeIcon searchScope={item} />
325-
<div className="flex flex-col flex-1">
326-
<div className="flex items-center gap-2">
327-
<span className="font-medium">
328-
{item.name}
329-
</span>
330-
{item.type === 'reposet' && (
331-
<Badge
332-
variant="default"
333-
className="text-[10px] px-1.5 py-0 h-4 bg-primary text-primary-foreground"
334-
>
335-
{item.repoCount} repo{item.repoCount === 1 ? '' : 's'}
336-
</Badge>
337-
)}
338-
</div>
339-
</div>
325+
<p className="font-medium truncate-start">{item.name}</p>
326+
{item.type === 'reposet' && (
327+
<Badge
328+
variant="default"
329+
className="text-[10px] px-1.5 py-0 h-4 bg-primary text-primary-foreground"
330+
>
331+
{item.repoCount} repo{item.repoCount === 1 ? '' : 's'}
332+
</Badge>
333+
)}
340334
</div>
341335
</div>
342336
);

packages/web/src/features/chat/components/chatThread/codeFoldingExtension.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,7 @@ const createDecorations = (state: EditorState, foldingState: FoldingState): Deco
342342
decorations.push(decoration.range(from, to));
343343
});
344344

345-
// Sort decorations by their 'from' position to ensure proper ordering
346-
decorations.sort((a, b) => a.from - b.from);
347-
348-
return Decoration.set(decorations);
345+
return Decoration.set(decorations, /* sort = */ true);
349346
};
350347

351348
// Combined StateField that manages both folding state and decorations

packages/web/src/features/chat/components/chatThread/referencedFileSourceListItem.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,7 @@ const ReferencedFileSourceListItem = ({
156156
}
157157
}
158158

159-
decorations.sort((a, b) => a.from - b.from);
160-
return Decoration.set(decorations);
159+
return Decoration.set(decorations, /* sort = */ true);
161160
},
162161
update(deco, tr) {
163162
return deco.map(tr.changes);

packages/web/src/features/chat/components/chatThread/tools/shared.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const ToolHeader = ({ isLoading, isError, isExpanded, label, Icon, onExpa
9090
<div
9191
tabIndex={0}
9292
className={cn(
93-
"flex flex-row items-center gap-2 group w-fit select-none",
93+
"flex flex-row items-center gap-2 group select-none",
9494
{
9595
'hover:text-foreground cursor-pointer': !isLoading,
9696
},
@@ -107,16 +107,20 @@ export const ToolHeader = ({ isLoading, isError, isExpanded, label, Icon, onExpa
107107
}}
108108
>
109109
{isLoading ? (
110-
<Loader2 className="w-4 h-4 animate-spin" />
110+
<Loader2 className="w-4 h-4 animate-spin flex-shrink-0" />
111111
) : (
112-
<Icon className="h-4 w-4" />
112+
<Icon className="h-4 w-4 flex-shrink-0" />
113113
)}
114-
<span className={cn("text-sm font-medium",
114+
<span
115+
className={cn("text-sm font-medium line-clamp-2",
115116
{
116117
'animate-pulse': isLoading,
117118
'text-destructive': isError,
118119
}
119-
)}>{label}</span>
120+
)}
121+
>
122+
{label}
123+
</span>
120124
{!isLoading && (
121125
<div className="opacity-0 group-hover:opacity-100 transition-opacity">
122126
{isExpanded ? (

0 commit comments

Comments
 (0)