Skip to content

Commit 45cc344

Browse files
Fix docs links; add changelog; small nits with bottom panel when no ee key is present
1 parent 319171e commit 45cc344

File tree

16 files changed

+69
-32
lines changed

16 files changed

+69
-32
lines changed

CHANGELOG.md

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

88
## [Unreleased]
99

10+
Sourcebot V4 introduces authentication, performance improvements and code navigation. Checkout the [migration guide](https://docs.sourcebot.dev/self-hosting/upgrade/v3-to-v4-guide) for information on upgrading your instance to v4.
11+
12+
### Changed
13+
- [**Breaking Change**] Authentication is now required by default. Notes:
14+
- When setting up your instance, email / password login will be the default authentication provider.
15+
- The first user that logs into the instance is given the `owner` role. ([docs](https://docs.sourcebot.dev/docs/more/roles-and-permissions)).
16+
- Subsequent users can request to join the instance. The `owner` can approve / deny requests to join the instance via `Settings` > `Members` > `Pending Requests`.
17+
- If a user is approved to join the instance, they are given the `member` role.
18+
- Additional login providers, including email links and SSO, can be configured with additional environment variables. ([docs](https://docs.sourcebot.dev/self-hosting/configuration/authentication)).
19+
- Clicking on a search result now takes you to the `/browse` view. Files can still be previewed by clicking the "Preview" button or holding `Cmd` / `Ctrl` when clicking on a search result. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
20+
1021
### Added
11-
- [Sourcebot EE] Added code navigation (find all references / go to definition). [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
22+
- [Sourcebot EE] Added search-based code navigation, allowing you to jump between symbol definition and references when viewing source files. [Read the documentation](https://docs.sourcebot.dev/docs/search/code-navigation). [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
23+
- Added collapsible filter panel. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
1224

1325
### Fixed
1426
- Improved scroll performance for large numbers of search results. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
@@ -99,8 +111,8 @@ Sourcebot v3 is here and brings a number of structural changes to the tool's fou
99111
### Added
100112
- Added parallelized repo indexing and connection syncing via Redis & BullMQ. See the [architecture overview](https://docs.sourcebot.dev/self-hosting/overview#architecture).
101113
- Added repo indexing progress indicators in the navbar.
102-
- Added authentication support via OAuth or email/password. For instructions on enabling, see [this doc](https://docs.sourcebot.dev/self-hosting/more/authentication).
103-
- Added the following UI for managing your deployment when **[auth is enabled](https://docs.sourcebot.dev/self-hosting/more/authentication)**:
114+
- Added authentication support via OAuth or email/password. For instructions on enabling, see [this doc](https://docs.sourcebot.dev/self-hosting/configuration/authentication).
115+
- Added the following UI for managing your deployment when **[auth is enabled](https://docs.sourcebot.dev/self-hosting/configuration/authentication)**:
104116
- connection management: create and manage your JSON configs via a integrated web-editor.
105117
- secrets: import personal access tokens (PAT) into Sourcebot (AES-256 encrypted). Reference secrets in your connection config by name.
106118
- team & invite management: invite users to your instance to give them access. Configure team [roles & permissions](https://docs.sourcebot.dev/docs/more/roles-and-permissions).

docs/docs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
"pages": [
5151
"docs/search/syntax-reference",
5252
"docs/search/multi-branch-indexing",
53-
"docs/search/search-contexts",
54-
"docs/search/code-navigation"
53+
"docs/search/code-navigation",
54+
"docs/search/search-contexts"
5555
]
5656
},
5757
{

docs/docs/connections/gitea.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Next, provide the access token via the `token` property, either as an environmen
8282

8383
<Tabs>
8484
<Tab title="Environment Variable">
85-
<Note>Environment variables are only supported in a [declarative config](/self-hosting/more/declarative-config) and cannot be used in the web UI.</Note>
85+
<Note>Environment variables are only supported in a [declarative config](/self-hosting/configuration/declarative-config) and cannot be used in the web UI.</Note>
8686

8787
1. Add the `token` property to your connection config:
8888
```json
@@ -107,7 +107,7 @@ Next, provide the access token via the `token` property, either as an environmen
107107
</Tab>
108108

109109
<Tab title="Secret">
110-
<Note>Secrets are only supported when [authentication](/self-hosting/more/authentication) is enabled.</Note>
110+
<Note>Secrets are only supported when [authentication](/self-hosting/configuration/authentication) is enabled.</Note>
111111

112112
1. Navigate to **Secrets** in settings and create a new secret with your PAT:
113113

docs/docs/connections/github.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Next, provide the PAT via the `token` property, either as an environment variabl
111111

112112
<Tabs>
113113
<Tab title="Environment Variable">
114-
<Note>Environment variables are only supported in a [declarative config](/self-hosting/more/declarative-config) and cannot be used in the web UI.</Note>
114+
<Note>Environment variables are only supported in a [declarative config](/self-hosting/configuration/declarative-config) and cannot be used in the web UI.</Note>
115115

116116
1. Add the `token` property to your connection config:
117117
```json
@@ -136,7 +136,7 @@ Next, provide the PAT via the `token` property, either as an environment variabl
136136
</Tab>
137137

138138
<Tab title="Secret">
139-
<Note>Secrets are only supported when [authentication](/self-hosting/more/authentication) is enabled.</Note>
139+
<Note>Secrets are only supported when [authentication](/self-hosting/configuration/authentication) is enabled.</Note>
140140

141141
1. Navigate to **Secrets** in settings and create a new secret with your PAT:
142142

docs/docs/connections/gitlab.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Next, provide the PAT via the `token` property, either as an environment variabl
116116

117117
<Tabs>
118118
<Tab title="Environment Variable">
119-
<Note>Environment variables are only supported in a [declarative config](/self-hosting/more/declarative-config) and cannot be used in the web UI.</Note>
119+
<Note>Environment variables are only supported in a [declarative config](/self-hosting/configuration/declarative-config) and cannot be used in the web UI.</Note>
120120

121121
1. Add the `token` property to your connection config:
122122
```json
@@ -141,7 +141,7 @@ Next, provide the PAT via the `token` property, either as an environment variabl
141141
</Tab>
142142

143143
<Tab title="Secret">
144-
<Note>Secrets are only supported when [authentication](/self-hosting/more/authentication) is enabled.</Note>
144+
<Note>Secrets are only supported when [authentication](/self-hosting/configuration/authentication) is enabled.</Note>
145145

146146
1. Navigate to **Secrets** in settings and create a new secret with your PAT:
147147

docs/docs/connections/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ There are two ways to define connections:
1111

1212
<AccordionGroup>
1313
<Accordion title="Declarative configuration file">
14-
This is only supported when self-hosting, and is the default mechanism to define connections. Connections are defined in a [JSON file](/self-hosting/more/declarative-config)
14+
This is only supported when self-hosting, and is the default mechanism to define connections. Connections are defined in a [JSON file](/self-hosting/configuration/declarative-config)
1515
and the path to the file is provided through the `CONFIG_PATH` environment variable
1616
</Accordion>
1717
<Accordion title="UI connection management">
18-
This is the only way to define connections when using Sourcebot Cloud, and can be configured when self-hosting by enabling [authentication](/self-hosting/more/authentications).
18+
This is the only way to define connections when using Sourcebot Cloud, and can be configured when self-hosting by enabling [authentication](/self-hosting/configuration/authentications).
1919

2020
In this method, connections are defined and managed within the webapp:
2121

docs/docs/search/code-navigation.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: Code navigation
3-
sidebarTitle: Code navigation (EE)
3+
sidebarTitle: Code navigation
44
---
55

66
import SearchContextSchema from '/snippets/schemas/v3/searchContext.schema.mdx'
77

88
<Note>
9-
This feature is only available with an active Enterprise license. Please add your [license key](/self-hosting/license-key) to activate it.
9+
This feature is only available in [Sourcebot cloud](app.sourcebot.dev) or with an active Enterprise license when [self-hosting](/self-hosting). Please add your [license key](/self-hosting/license-key) to activate it.
1010
</Note>
1111

1212
**Code navigation** allows you to jump between symbol definition and references when viewing source files in Sourcebot. This feature is enabled **automatically** when a valid license key is present and works with all popular programming languages.

docs/docs/search/search-contexts.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Search contexts
3-
sidebarTitle: Search contexts (EE)
3+
sidebarTitle: Search contexts
44
---
55

66
import SearchContextSchema from '/snippets/schemas/v3/searchContext.schema.mdx'
@@ -16,7 +16,7 @@ A **search context** is a user-defined grouping of repositories that helps focus
1616
- `( context:project1 or context:project2 ) logger\.debug` - search for debug log calls in project1 and project2
1717

1818

19-
Search contexts are defined in the `context` object inside of a [declarative config](/self-hosting/more/declarative-config). Repositories can be included / excluded from a search context by specifying the repo's URL in either the `include` array or `exclude` array. Glob patterns are supported.
19+
Search contexts are defined in the `context` object inside of a [declarative config](/self-hosting/configuration/declarative-config). Repositories can be included / excluded from a search context by specifying the repo's URL in either the `include` array or `exclude` array. Glob patterns are supported.
2020

2121
## Example
2222

@@ -41,7 +41,7 @@ shared/
4141
├─ ...
4242
```
4343

44-
To make searching easier, we can create three search contexts in our [config.json](/self-hosting/more/declarative-config):
44+
To make searching easier, we can create three search contexts in our [config.json](/self-hosting/configuration/declarative-config):
4545
- `web`: For all frontend-related code
4646
- `backend`: For backend services and shared APIs
4747
- `pipelines`: For all CI/CD configurations

docs/self-hosting/configuration/tenancy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebarTitle: Multi tenancy
44
---
55

66
<Warning>If you're switching from single-tenant mode, delete the Sourcebot cache (the `.sourcebot` folder) before starting.</Warning>
7-
<Warning>[Authentication](/self-hosting/more/authentication) must be enabled to enable multi tenancy mode</Warning>
7+
<Warning>[Authentication](/self-hosting/configuration/authentication) must be enabled to enable multi tenancy mode</Warning>
88
Multi tenancy allows your Sourcebot deployment to have **multiple organizations**, each with their own set of members and repos. To enable multi tenancy mode, define an environment variable
99
named `SOURCEBOT_TENANCY_MODE` and set its value to `multi`. When multi tenancy mode is enabled:
1010

docs/self-hosting/upgrade/v3-to-v4-guide.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This guide will walk you through upgrading your Sourcebot deployment from v3 to
88
<Warning>
99
Please note that the following features are no longer supported in v4:
1010
- Multi-tenancy mode
11-
- Unauthorized access to a Sourcebot deployment. Authentication is now required, and unauthorized access requires an unlimited seat [enterprise license](/self-hosting/license-key)
11+
- Unauthenticated access to a Sourcebot deployment - authentication is now built in by default. Unauthenticated access to a organization can be enabled with an unlimited seat [enterprise license](/self-hosting/license-key)
1212
</Warning>
1313

1414
### If your deployment doesn't have authentication enabled

docs/snippets/bitbucket-app-password.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Tabs>
22
<Tab title="Environment Variable">
3-
<Note>Environment variables are only supported in a [declarative config](/self-hosting/more/declarative-config) and cannot be used in the web UI.</Note>
3+
<Note>Environment variables are only supported in a [declarative config](/self-hosting/configuration/declarative-config) and cannot be used in the web UI.</Note>
44

55
1. Add the `token` and `user` (username associated with the app password you created) properties to your connection config:
66
```json
@@ -27,7 +27,7 @@
2727
</Tab>
2828

2929
<Tab title="Secret">
30-
<Note>Secrets are only supported when [authentication](/self-hosting/more/authentication) is enabled.</Note>
30+
<Note>Secrets are only supported when [authentication](/self-hosting/configuration/authentication) is enabled.</Note>
3131

3232
1. Navigate to **Secrets** in settings and create a new secret with your access token:
3333

docs/snippets/bitbucket-token.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Tabs>
22
<Tab title="Environment Variable">
3-
<Note>Environment variables are only supported in a [declarative config](/self-hosting/more/declarative-config) and cannot be used in the web UI.</Note>
3+
<Note>Environment variables are only supported in a [declarative config](/self-hosting/configuration/declarative-config) and cannot be used in the web UI.</Note>
44

55
1. Add the `token` property to your connection config:
66
```json
@@ -25,7 +25,7 @@
2525
</Tab>
2626

2727
<Tab title="Secret">
28-
<Note>Secrets are only supported when [authentication](/self-hosting/more/authentication) is enabled.</Note>
28+
<Note>Secrets are only supported when [authentication](/self-hosting/configuration/authentication) is enabled.</Note>
2929

3030
1. Navigate to **Secrets** in settings and create a new secret with your PAT:
3131

packages/mcp/CHANGELOG.md

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

88
## [Unreleased]
99

10+
### Changed
11+
- Added API key support. [#311](https://github.com/sourcebot-dev/sourcebot/pull/311)
12+
1013
# [1.0.1] - 2025-05-15
1114

1215
### Changed

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

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ import { VscReferences, VscSymbolMisc } from "react-icons/vsc";
1212
import { ImperativePanelHandle } from "react-resizable-panels";
1313
import { useBrowseState } from "../hooks/useBrowseState";
1414
import { ExploreMenu } from "@/ee/features/codeNav/components/exploreMenu";
15+
import Link from "next/link";
16+
import { useDomain } from "@/hooks/useDomain";
17+
import { useRouter } from "next/navigation";
1518

1619
export const BOTTOM_PANEL_MIN_SIZE = 35;
1720
export const BOTTOM_PANEL_MAX_SIZE = 65;
21+
const CODE_NAV_DOCS_URL = "https://docs.sourcebot.dev/docs/search/code-navigation";
1822

1923
export const BottomPanel = () => {
2024
const panelRef = useRef<ImperativePanelHandle>(null);
2125
const hasCodeNavEntitlement = useHasEntitlement("code-nav");
26+
const domain = useDomain();
27+
const router = useRouter();
2228

2329
const {
2430
state: { selectedSymbolInfo, isBottomPanelCollapsed, bottomPanelSize },
@@ -92,16 +98,31 @@ export const BottomPanel = () => {
9298
id={"bottom-panel"}
9399
>
94100
{!hasCodeNavEntitlement ? (
95-
<div className="flex flex-col items-center justify-center h-full text-muted-foreground">
96-
<VscSymbolMisc className="w-6 h-6 mb-2" />
101+
<div className="flex flex-col items-center justify-center h-full text-muted-foreground gap-2">
102+
<VscSymbolMisc className="w-6 h-6" />
97103
<p className="text-sm">
98-
Code navigation is not enabled for your plan.
104+
Code navigation is not enabled for <span className="text-blue-500 hover:underline cursor-pointer" onClick={() => router.push(`/${domain}/settings/license`)}>your plan</span>.
99105
</p>
106+
107+
<Link
108+
href={CODE_NAV_DOCS_URL}
109+
target="_blank"
110+
className="text-sm text-blue-500 hover:underline"
111+
>
112+
Learn more
113+
</Link>
100114
</div>
101115
) : !selectedSymbolInfo ? (
102-
<div className="flex flex-col items-center justify-center h-full text-muted-foreground">
103-
<VscSymbolMisc className="w-6 h-6 mb-2" />
116+
<div className="flex flex-col items-center justify-center h-full text-muted-foreground gap-2">
117+
<VscSymbolMisc className="w-6 h-6" />
104118
<p className="text-sm">No symbol selected</p>
119+
<Link
120+
href={CODE_NAV_DOCS_URL}
121+
target="_blank"
122+
className="text-sm text-blue-500 hover:underline"
123+
>
124+
Learn more
125+
</Link>
105126
</div>
106127
) : (
107128
<ExploreMenu

packages/web/src/features/codeNav/actions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { isServiceError } from "@/lib/utils";
77
import { FindRelatedSymbolsResponse } from "./types";
88
import { ServiceError } from "@/lib/serviceError";
99
import { SearchResponse } from "../search/types";
10+
import { OrgRole } from "@sourcebot/db";
1011

1112
// The maximum number of matches to return from the search API.
1213
const MAX_REFERENCE_COUNT = 1000;
@@ -40,7 +41,7 @@ export const findSearchBasedSymbolReferences = async (
4041
}
4142

4243
return parseRelatedSymbolsSearchResponse(searchResult);
43-
}), /* allowSingleTenantUnauthedAccess = */ true)
44+
}, /* minRequiredRole = */ OrgRole.GUEST), /* allowSingleTenantUnauthedAccess = */ true)
4445
);
4546

4647

@@ -73,7 +74,7 @@ export const findSearchBasedSymbolDefinitions = async (
7374
}
7475

7576
return parseRelatedSymbolsSearchResponse(searchResult);
76-
}), /* allowSingleTenantUnauthedAccess = */ true)
77+
}, /* minRequiredRole = */ OrgRole.GUEST), /* allowSingleTenantUnauthedAccess = */ true)
7778
);
7879

7980
const parseRelatedSymbolsSearchResponse = (searchResult: SearchResponse) => {

packages/web/src/features/entitlements/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const isValidEntitlement = (entitlement: string): entitlement is Entitlem
2727

2828
export const entitlementsByPlan: Record<Plan, Entitlement[]> = {
2929
oss: [],
30-
"cloud:team": ["billing", "multi-tenancy", "sso"],
30+
"cloud:team": ["billing", "multi-tenancy", "sso", "code-nav"],
3131
"self-hosted:enterprise": ["search-contexts", "sso", "code-nav"],
3232
"self-hosted:enterprise-unlimited": ["search-contexts", "public-access", "sso", "code-nav"],
3333
"self-hosted:enterprise-custom": [],

0 commit comments

Comments
 (0)