Commit graph

305 commits

Author SHA1 Message Date
Brendan Kellam
b36de3412d
experiment: Self-serve repository indexing for public GitHub repositories (#468) 2025-08-18 15:24:40 -04:00
bkellam
6fc771a0d3 Update references to github discussions over to issues 2025-08-12 14:50:51 -04:00
Brendan Kellam
111e1c3cee
feat(ask_sb): Add headers param to config to allow users to specify custom headers (#449) 2025-08-08 14:49:00 -07:00
Brendan Kellam
a9a61e7338
fix(ask_sb): Allow unauthed generation of titles for a chat 2025-08-08 14:44:59 -07:00
Brendan Kellam
4f2644daa2
fix(ask_sb): Fix long generation times on first message in thread (#447) 2025-08-07 21:56:56 -07:00
Brendan Kellam
0773399392
feat(ask_sb): Add reasoningEffort option to openai provider (#446) 2025-08-07 17:26:51 -07:00
Brendan Kellam
6215a8e949
chore(docs): Remove dead links to terms / privacy. Also change some MIT -> FSL references. 2025-08-07 17:24:00 -07:00
Brendan Kellam
26c553c1c3
chore(ask_sb): Bump AI SDK libs (#444) 2025-08-07 13:16:53 -07:00
Brendan Kellam
a3d9711178
feat(gerrit): Multi-branch indexing support for Gerrit (#433) 2025-08-05 16:35:47 -07:00
Brendan Kellam
01dee161b3
fix(github): Fix issue with users not getting picked up in GitHub config (#428)
* fix

* changelog
2025-08-04 17:39:28 -07:00
Brendan Kellam
65d3cd9dc6
feat(ask_sb): OpenAI compatible language models (#424)
* wip

* docs + add option for api key

* feedback

* nit
2025-08-04 17:25:54 -07:00
bkellam
68107da7dc @sourcebot/mcp v1.0.4 2025-08-04 16:14:09 -07:00
Brendan Kellam
821c6ba895
fix(mcp): Remove logs interfering with the stdio transport (#429) 2025-08-04 16:12:10 -07:00
Brendan Kellam
14900e47e7
chore(ask_sb): Bump Vercel SDK to official V5 release 🎉 (#417) 2025-07-31 17:50:31 -07:00
Michael Sukkarieh
e47fdb51db
fix(repoManager): Don't fetch files for each repo on validation (#414) 2025-07-31 17:50:04 -07:00
Brendan Kellam
48269781b7
chore(ask_sb): Add PostHog telemetry event for new chat thread creation (#418) 2025-07-31 17:49:06 -07:00
Brendan Kellam
163e558b9a
fix(ask_sb): Fix '413 content too large' error (#416) 2025-07-31 16:38:10 -07:00
bkellam
a16bf886fa chore(ask_sb): add background color to right column of the tutorial dialog 2025-07-29 23:41:32 -07:00
msukkari
11b97a54d0 chat toolbar ui nits 2025-07-29 22:19:36 -07:00
msukkari
b122e0375b change link for add repo button 2025-07-29 21:30:28 -07:00
msukkari
9fb5ad353c more citation color changes: 2025-07-29 18:52:23 -07:00
msukkari
5efe6a8721 make inline citations pop 2025-07-29 18:15:48 -07:00
msukkari
f888085952 demo card sizing nit and hide scroll bars 2025-07-29 17:14:24 -07:00
Michael Sukkarieh
53edd44462
feat(ask_sb): Add back search scope requirement and other UI changes (#411)
* Revert "Remove search scope constraint"

This reverts commit e69ac0d806.

* add llm section to onboard final page

* add select all button

* add repo snapshot to agentic search and other ui nits

* refactor demo repo index cta into repo snapshop

* changelog
2025-07-29 15:50:36 -07:00
Brendan Kellam
211ad8fb12
feat(ask_sb): Improved search tool ; tools for listing / searching repos ; removed search scope constraint (#400)
* wip

* Add additional tools for repo searching and listing

* Remove search scope constraint

* Only show the selected search scopes when there is > 0

* changelog

* fix build
2025-07-29 10:41:01 -07:00
Brendan Kellam
4343b3c3d5
feat(ask_sb): Add onboarding tutorial (#408) 2025-07-28 23:46:26 -07:00
Michael Sukkarieh
45416a41d1
feat(misc): Add GitHub star toast (#409)
* github star toast

* changelog
2025-07-28 23:39:32 -07:00
dependabot[bot]
104c8a8416
chore(deps): bump next from 14.2.26 to 14.2.30 (#406)
* chore(deps): bump next from 14.2.26 to 14.2.30

Bumps [next](https://github.com/vercel/next.js) from 14.2.26 to 14.2.30.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.26...v14.2.30)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 14.2.30
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* changelog

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bkellam <bshizzle1234@gmail.com>
2025-07-28 22:05:15 -07:00
Brendan Kellam
da6e913628
chore(ask_sb): Bump AI SDK dependencies (#404)
* w

* changelog
2025-07-28 20:38:16 -07:00
msukkari
f62a492ab3 properly log zoekt index exec 2025-07-28 20:12:46 -07:00
Michael Sukkarieh
6662d20ee8
Search scope refactor (#405)
* new demo card ui

* rename search context to search scope

* rename everything to use search scope

* add changelog entry
2025-07-28 18:12:21 -07:00
msukkari
be9979f18a chore(demo): add posthog events and link to docs 2025-07-27 23:30:53 -07:00
msukkari
2ab0b988e4 limit to one search context in demo 2025-07-27 22:12:02 -07:00
Michael Sukkarieh
f720ec945d
Add demo example cards (#401)
* wip demo example path

* load demo example

* nit: format

* refactor demo cards to their own component

* ui nits

* more ui nits

* feedback
2025-07-27 21:26:56 -07:00
Michael Sukkarieh
aebd8df193
feat(search_contexts): Add ability to include/exclude connections in search contexts (#399)
* implement connection filter for search contexts

* changelog
2025-07-27 10:11:58 -07:00
Brendan Kellam
3e50469cf7
fix(web): Fix multiple writes race condition on config file watcher (#398) 2025-07-26 16:42:25 -07:00
Michael Sukkarieh
d0f9d43624
feat(ask_sb): Add search context into ask sourcebot toolbar (#397)
* new context selector

* ui nits

* move search context fetch to server

* feedback

* search context for chat suggestion, nits

* type nit

* fix minor ui nit
2025-07-26 16:16:07 -07:00
msukkari
430c0a1fe9 add env vars for google thinking config 2025-07-25 20:08:24 -07:00
Brendan Kellam
41addb50a7
fix(ask_sb): Various improvements to the references system (#396) 2025-07-25 18:34:33 -07:00
Brendan Kellam
efc9656b6e
chore(ask_sb): Allow for multiple user feedback (#395) 2025-07-25 13:21:44 -07:00
drew-u410
4e34406386
[bug] onboarding: fix infinite loop when using GCP IAP (#381)
Co-authored-by: Michael Sukkarieh <michael.sukkarieh@mail.mcgill.ca>
2025-07-25 12:03:50 -07:00
bkellam
74e37d129c fix: put selected repos at the top of the repo selector list. Aslo retain scroll position 2025-07-25 09:32:33 -07:00
bkellam
1cc23818c2 Update AI SDK dependencies 2025-07-24 16:14:59 -07:00
bkellam
732505be0e fix build 2025-07-24 12:13:06 -07:00
bkellam
e150310c98 fix: Fix chat title generation. Also improve how errors are reported 2025-07-24 12:05:39 -07:00
msukkari
d46615c4b2 add retry for config loading 2025-07-24 11:35:00 -07:00
msukkari
63d3123fa7 hide member page if not owner 2025-07-24 10:37:15 -07:00
Brendan Kellam
dbd8ef7fdb
fix: Fix issue with ambiguous references (#393) 2025-07-24 10:21:00 -07:00
msukkari
da8d49f8d9 add additional model providers 2025-07-23 16:53:43 -07:00
bkellam
f0fd44fac1 fix: Add bounds checks to codemirror code folding extension and other places to avoid crashes. 2025-07-23 16:32:39 -07:00
bkellam
ea655f4d4a fix: Add citation repairing. Also remove revision as a tool param. 2025-07-23 15:50:23 -07:00
bkellam
11099695da fix: Move search mode selection into a cookie to avoid SSR flashes 2025-07-23 14:45:55 -07:00
bkellam
78c07b814b Add sentry capture exception 2025-07-23 13:56:39 -07:00
bkellam
36ae7cfe52 Add additional debug logs. Also fix build warning about environment variables 2025-07-23 12:03:44 -07:00
Brendan Kellam
2b0dac4782
feat: Ask Sourcebot (#392)
Co-authored-by: msukkari <michael.sukkarieh@mail.mcgill.ca>
2025-07-23 11:25:15 -07:00
Brendan Kellam
efb4eb984a
fix(gitlab): Add configurable query timeout to GitLab client (#390)
* fix

* changelog
2025-07-20 11:59:15 -07:00
msukkari
eb00d72499 fix bug with anonymous access toggle 2025-07-19 16:18:58 -07:00
Michael Sukkarieh
aac1d4529e
Add anonymous access option to core (#385)
* migrate anonymous access logic out of ee

* add anonymous access toggle

* handle anon toggle properly based on perms

* add forceEnableAnonymousAccess setting

* add docs for access settings

* change forceEnableAnonymousAccess to be an env var

* add FORCE_ENABLE_ANONYMOUS_ACCESS to list in docs

* add back the enablePublicAccess setting as deprecated

* add changelog entry

* fix build errors

* add news entry for anonymous access

* feedback
2025-07-19 14:04:41 -07:00
Gabriel Dugny
9b13492cb3
chore: Misc typos (UI, docs, code...), Makefile PATH with spaces (#369)
* chore: Fix misc typos (UI, docs, code...)

* chore(dev): Support PATH with spaces in Makefile

E.g. `Application Support` on MacOS

* chore: Typos in schema v2 description

* chore: more typos

* chore(dev): Add _typos.toml
2025-07-16 11:59:01 -07:00
Brendan Kellam
38b2749580
chore: Update docs for vscode MCP GA 2025-07-15 08:53:14 -07:00
Michael Sukkarieh
173a56ab64
Revamp onboarding flow (#376)
* sign up copy nits

* first pass at new onboarding page

* wip join onboard logic

* refactor auth provider fetch logic

* add member approval and invite link flag logic

* update join request flow and remove jit logic

* onboard guard

* nits, onboard role check, invite link enabled check

* fix bg color issue in onboarding page

* refactor onboard UI

* ui nits and more onboarding resource cards

* revamp auth docs

* change member approval default behavior and updated docs

* merge prisma migrations

* add id to resource card

* feedback

* feedback

* feedback and fixed build

* settings drop down UI nit

* ui nits

* handle join when max capacity case

* add news data for member toggle

* refactor for public access case

* add iap bridge to onboard logic

* fetch member approval req and invite link enabled flag on server

* ui nits

* fix invite link enable toggle snapping issue

* ui nits

* styling and ui nits, pass in invite id from server

* add mcp resource in onboard step

* get invite link in server

* fix build issue

* refactor docs on config

* minor doc nit
2025-07-14 20:14:41 -07:00
Brendan Kellam
1384dd870e
fix(browse): Fix issue where files would sometimes never load (#365) 2025-07-14 16:07:09 -07:00
drew-u410
d9d0146c48
[indexing] make retry configurable (#377) 2025-07-14 12:31:34 -07:00
Chris Roberts
ebf6721836
Correctly build URLs to file paths containing spaces (#364)
Previously, such paths would have their spaces replaced with `/`s,
breaking external links to the file.

Fixes #249
2025-06-24 11:57:55 -07:00
Michael Sukkarieh
1c790ec169
Adds code navigation and highlighting support for Tcl (#362)
* use new tcl codemirror package

* update to new tcl version:

* add changelog entry
2025-06-21 12:10:11 -07:00
Michael Sukkarieh
4bb93c9f3e
feat(analytics): Adds analytics dashboard (#358)
* add deps

* hook up dau from audit table to analytics page

* add audit event for code nav

* analytics dashboard

* add changelog entry

* add news entry

* smaller video and news data nit

* feedback
2025-06-20 14:57:05 -07:00
Brendan Kellam
fb2ef05172
fix(invites): Fix regression to invite creation (#359) 2025-06-20 12:49:25 -07:00
msukkari
10f9f6b6a3 mcp v1.0.3 2025-06-18 11:32:00 -07:00
msukkari
a0a6ab22d8 add news entry for audit logs 2025-06-18 11:01:09 -07:00
Michael Sukkarieh
5438298d61
feat(audit-logging): Adds audit logging support (#355)
* add audit factory skeleton

* add additional audit events

* add more audit logs

* delete account join request when redeeming an invite

* add audit event for account request removed

* wip api to fetch audits

* add check for audit with public access and entitlement

* fix issues with merge

* add docs for audit logs

* add proper audit log for audit fetch and proper handling of api key hash in audit

* format nit

* feedback
2025-06-18 10:50:36 -07:00
Brendan Kellam
1d95e82b95
chore(api): Changed the search api to return raw source (instead of base64 encoding) (#356)
This PR alters the behaviour of the search api (and all apis that depend on it) to return raw source code instead of a base64 encoding. Reasoning: we are decoding it on the client in multiple different places, so it would be beneficial to decode it in a single spot.

**Note**: This is a **breaking change** to the API surface. However, since the API surface is still unofficial/unsupported, I will roll this as a patch version change. See #101
2025-06-17 15:58:04 -07:00
Brendan Kellam
22d548e171
fix(search-contexts): Fix issue where a repository would not appear in a search context if it was created after the search context was created (#354)
## Problem

If a repository is added **after** a search context (e.g., a new repository is synced from the code host), then it will never be added to the context even if it should be included. The workaround is to restart the instance.

## Solution

This PR adds a call to re-sync all search contexts whenever a connection is successfully synced. This PR adds the `@sourcebot/shared` package that contains `syncSearchContexts.ts` (previously in web) and it's dependencies (namely the entitlements system).

## Why another package?

Because the `syncSearchContexts` call is now called from:
1. `initialize.ts` in **web** - handles syncing search contexts on startup and whenever the config is modified in watch mode. This is the same as before.
2. `connectionManager.ts` in **backend** - syncs the search contexts whenever a connection is successfully synced.

## Follow-up devex work
Two things:
1. We have several very thin shared packages (i.e., `crypto`, `error`, and `logger`) that we can probably fold into this "general" shared package. `schemas` and `db` _feels_ like they should remain separate (mostly because they are "code-gen" packages).
2. When running `yarn dev`, any changes made to the shared package will only get picked if you `ctrl+c` and restart the instance. Would be nice if we have watch mode work across package dependencies in the monorepo.
2025-06-17 14:04:25 -07:00
Michael Sukkarieh
9d86052ff5
Delete account join request when redeeming an invite (#352)
* delete account join request when redeeming an invite

* fix account request fetch
2025-06-13 17:22:57 -07:00
Brendan Kellam
cf8fdd94f6
chore: Move bitbucket dependency to backend from workspace root (#351) 2025-06-13 16:53:05 -07:00
Michael Sukkarieh
4fbf8059d0
fix web build warnings (#348) 2025-06-13 10:24:25 -07:00
Brendan Kellam
5ebd07ffe1
fix: Add default debounce & staleTime to file/folder prefetching (#346) 2025-06-11 13:51:42 -07:00
Michael Sukkarieh
65d6e928b8
Fix repo column header styling (#344)
* fix repo column header styling

* add changelog entry
2025-06-11 09:34:24 -07:00
Gabriel Dugny
e423b56f42
fix(gitlab): Properly handle auth for Gitlab project avatars (#345) 2025-06-11 09:33:53 -07:00
Michael Sukkarieh
1ea377e7d6
Clean up successful and failed jobs (#343)
* clean up

* annoying log nit

* feedback
2025-06-10 18:07:07 -07:00
drew-u410
9be5522c7b
[selection] highlight clarity (#342) 2025-06-10 09:23:03 -07:00
Brendan Kellam
37ce151603
feature: basic file search (#341) 2025-06-09 12:51:35 -07:00
drew-u410
eb6d58d6d3
[search/browse] link repo name to file browser; link code image to external (#340) 2025-06-07 12:27:29 -07:00
Michael Sukkarieh
d29d3fc7f2
Added hover tooltip for long repo names in filter panel (#338)
* handle long repo names better in the UI

* changelog

* clean up hover UI

* cleanup unused logic

* simplify

* remove unused import

* changelog update
2025-06-06 13:16:19 -07:00
Michael Sukkarieh
0f3cdb7dd7
Add repo index validation (#339)
* add repo index validation

* add entry to changelog
2025-06-06 13:15:27 -07:00
Brendan Kellam
27fb5ad294
feature: File explorer (#336) 2025-06-06 12:38:16 -07:00
Michael Sukkarieh
8dc41a22b9
Fix repo images in authed instance case and add manifest json (#332)
* wip fix repo images

* fix config imports

* add manifest json

* more logos for manifest

* add properly padded icon

* support old gitlab token case, simplify getImage action, feedback

* add changelog entry

* fix build error
2025-06-06 10:50:13 -07:00
Michael Sukkarieh
397262ecf7
Adds support for encrypted license keys (#335)
* implement encrypted key logic

* cache public key

* add SOURCEBOT_PUBLIC_KEY_PATH to docs

* feedback
2025-06-05 22:18:52 -07:00
Brendan Kellam
ee88353e13
chore: Add separate login / signup screens (#331) 2025-06-04 16:42:52 -07:00
Brendan Kellam
46d7ca9ff4
feature: Add keyboard shortcuts for goto def & find all refs (#329) 2025-06-03 19:30:18 -07:00
Michael Sukkarieh
9227b3caba
Add support for GCP IAP JIT account provisioning (#330)
* initial gcp iap implementation

* gcp iap working

* add docs for gcp iap

* feedback

* changelog
2025-06-03 19:28:38 -07:00
drew-u410
749bfc28f3
[dev + copy button] add / update local dev w/docker compose; add copy button to the right of filenames (#328) 2025-06-03 08:52:59 -07:00
Brendan Kellam
91e803d7a6
fix: Improve symbol reference/definition list perf (#327) 2025-06-02 14:49:51 -07:00
Brendan Kellam
81a9ea1e59
fix: Fix symbol hover popover clipping issue (#326) 2025-06-02 13:09:47 -07:00
Brendan Kellam
8a9cdfda77
fix: Fix "Mark decorations may not be empty" issue (#325) 2025-06-02 11:22:52 -07:00
Michael Sukkarieh
3b36ffa17e
Add support for structured logs (#323)
* wip on refactoring docs

* wip

* initial structured logs impl

* structured log docs

* create logger package

* add news entry for structured logging

* add logger package to dockerfile and cleanup

* add gh workflow for catching broken links

* further wip

* fix

* further wip on docs

* review feedback

* remove logger dep from mcp package

* fix build errors

* add back auth_url warning

* fix sidebar title consistency

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>
2025-06-02 11:16:01 -07:00
Brendan Kellam
ce8d55f558
V4 docs refactor (#322) 2025-06-01 18:51:12 -07:00
msukkari
a2e06266db fix issue with new auth providers not being shown in login page 2025-05-30 11:12:00 -07:00
Brendan Kellam
65cdaaa658
fix: Fix issue with how entitlements are resolved for cloud (#319) 2025-05-28 17:35:18 -07:00
bkellam
17d47bf7a4 @sourcebot/mcp 1.0.2 2025-05-28 16:55:58 -07:00
bkellam
0568b03a80 fix: hide license settings in cloud environments 2025-05-28 16:42:59 -07:00
Michael Sukkarieh
60a3528394
V4 (#311)
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.

### Changed
- [**Breaking Change**] Authentication is now required by default. Notes:
  - When setting up your instance, email / password login will be the default authentication provider.
  - The first user that logs into the instance is given the `owner` role. ([docs](https://docs.sourcebot.dev/docs/more/roles-and-permissions)).
  - Subsequent users can request to join the instance. The `owner` can approve / deny requests to join the instance via `Settings` > `Members` > `Pending Requests`.
  - If a user is approved to join the instance, they are given the `member` role.
  - Additional login providers, including email links and SSO, can be configured with additional environment variables. ([docs](https://docs.sourcebot.dev/self-hosting/configuration/authentication)).
- 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)

### Added
- [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)
- Added collapsible filter panel. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)

### Fixed
- Improved scroll performance for large numbers of search results. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
2025-05-28 16:08:42 -07:00
msukkari
b71a28b392 fix repo failure UI extending past bounds 2025-05-22 13:36:20 -07:00
bkellam
169fc52800 @sourcebot/mcp v1.0.1 2025-05-15 13:55:39 -07:00
Brendan Kellam
1aafc228cf
feat: Generic git host support (local & remote) (#307) 2025-05-15 13:42:58 -07:00
Michael Sukkarieh
bbdd9e7903
update MCP README 2025-05-14 14:05:42 -07:00
Brendan Kellam
fd65d78475
chore: Resolve DATA_CACHE_DIR in .env.development (#306) 2025-05-12 14:42:53 -07:00
securisec
55127f7dd9
Align gitea clone_url with gitea host url. Addresses #270 (#303)
Co-authored-by: Michael Sukkarieh <michael.sukkarieh@mail.mcgill.ca>
2025-05-12 12:38:27 -07:00
Brendan Kellam
e4e36bd745
fix: Fixed issue with repositories appearing in the carousel when indexing fails on first sync (#305) 2025-05-12 12:10:20 -07:00
Michael Sukkarieh
e64f37178a
Review Agent (#298)
* push review agent implementation

* feedback

* wip integrating review agent into monorepo

* move review agent to web

* feedback

* feedback

* add rate limit throttling to octokit

* configure agent ui in app

* docs

* add review command logic and add logging for review agent to data cache dir

* fix bug with llm returning multiple reviews in single invocation

* fix doc link bug

* feedback and improved docs for review agent

* review agent doc nits

* mcp doc nit
2025-05-12 12:10:01 -07:00
bkellam
f385ee2f7b nit: update package.json of mcp with whitespace since yarn kept adding it 2025-05-12 12:08:47 -07:00
msukkari
13b7b352bd better error handling for git operations 2025-05-10 08:37:03 -07:00
smithery-ai[bot]
6cd6d69817
[packages/mcp] deployment: Dockerfile and Smithery config (#300) 2025-05-08 09:54:36 -07:00
bkellam
4917e3ecb9 Add 'add repos' button that appears in the demo site 2025-05-07 21:08:28 -07:00
Brendan Kellam
873c9ef2a4
Sourcebot MCP (#292) 2025-05-07 16:21:05 -07:00
Brendan Kellam
b280e2ddbb
fix: Fix repo carousel thrashing (#294) 2025-05-06 10:44:14 -07:00
Brendan Kellam
eb10d599f3
chore: Sourcebot REST api surface (#290) 2025-05-03 11:33:58 -07:00
Brendan Kellam
0119510ce3
docs: Add docs generation to schema build command (#284) 2025-04-30 15:41:33 -07:00
Brendan Kellam
14ce633cf0
feat: add rev:* syntax to explicitly search all branches (#281) 2025-04-30 15:38:30 -07:00
Brendan Kellam
68265accbe
Fix auth with GitHub (#288) 2025-04-30 14:22:41 -07:00
Brendan Kellam
09894a5d7d
Add exclude.readOnly and exclude.hidden to gerrit connection config (#280) 2025-04-29 12:05:19 -07:00
Brendan Kellam
ceb8b3ab2e
Embed filter selection in query params (#276) 2025-04-28 12:10:43 -07:00
Michael Sukkarieh
b6dedc78ba
Add Bitbucket support (#275)
* [wip] add bitbucket schema

* wip bitbucket support

* add support for pulling bitbucket repos and UI support for bitbucket

* fix bitbucket app password auth case

* add back support for multiple workspaces and add exclude logic

* add branches to bitbucket

* add bitbucket server support

* add docs for bitbucket and minor nits

* doc nits

* code rabbit fixes

* fix build error

* add bitbucket web ui support

* misc cleanups and fix ui issues with bitbucket connections

* add changelog entry
2025-04-25 11:22:40 -07:00
dependabot[bot]
2acb1e558f
Bump next from 14.2.25 to 14.2.26 (#271)
Bumps [next](https://github.com/vercel/next.js) from 14.2.25 to 14.2.26.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.25...v14.2.26)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 14.2.26
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-24 22:42:22 -07:00
Brendan Kellam
cfe8b8ccc8
Search contexts (#273) 2025-04-24 22:28:13 -07:00
msukkari
5ba3b4b2c7 construct gerrit gitiles webUrl properly 2025-04-11 15:14:41 -06:00
msukkari
244afeadb8 add back names in logs for repo and connection sync 2025-04-10 21:17:57 -06:00
bkellam
8b1b908c73 fix overflow bug in filter panel 2025-04-04 00:28:02 -07:00
Brendan Kellam
21bbe09fc9
Add periodic connection re-sync (#260) 2025-04-03 17:51:01 -07:00
Brendan Kellam
bbd8b221d6
Display name improvements (#259) 2025-04-02 17:50:48 -07:00
msukkari
d55bf83ac1 bump connection manager upsert timeout 2025-04-02 14:33:39 -07:00
bkellam
4f52494235 (fix) Fix issue with match highlighting not appearing when first clicking on a search result. Fixes #255 2025-04-01 16:35:00 -07:00
msukkari
e57a981030 change demo url references 2025-04-01 16:07:16 -07:00
bkellam
68344ce2f5 add demo cloud environment 2025-04-01 15:40:27 -07:00
bkellam
f8adf5974d Add back file watch for declarative config 2025-04-01 14:51:02 -07:00
bkellam
58363abbae show warning & error indicators in unauthed 2025-04-01 14:19:46 -07:00
bkellam
336e4e7f09 nit fix: use SENTRY_RELEASE env var instead of NEXT_PUBLIC_SOURCEBOT_VERSION 2025-04-01 12:15:43 -07:00
bkellam
0bb47cdc50 fix issue with array index out of bounds when accessing linkedConnections 2025-04-01 12:02:06 -07:00
bkellam
e28daf9c77 Add docs to footer 2025-04-01 09:29:00 -07:00
msukkari
6b1d7ff8a4 fix bug with env var read in client 2025-04-01 00:05:56 -07:00
Brendan Kellam
39b92b9e98
v3 effort (#158)
* SQL Database (#157)

* point zoekt to v3 branch

* bump zoekt version

* Add tenant ID concept into web app and backend (#160)

* hacked together a example of using zoekt grpc api

* provide tenant id to zoekt git indexer

* update zoekt version to point to multitenant branch

* pipe tenant id through header to zoekt

* remove incorrect submodule reference and settings typo

* update zoekt commit

* remove unused yarn script

* remove unused grpc client in web server

* remove unneeded deps and improve tenant id log

* pass tenant id when creating repo in db

* add mt yarn script

* add nocheckin comment to tenant id in v2 schema

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>

* bump zoekt version

* parallelize repo indexing (#163)

* hacked together a example of using zoekt grpc api

* provide tenant id to zoekt git indexer

* update zoekt version to point to multitenant branch

* pipe tenant id through header to zoekt

* remove incorrect submodule reference and settings typo

* update zoekt commit

* remove unused yarn script

* remove unused grpc client in web server

* remove unneeded deps and improve tenant id log

* pass tenant id when creating repo in db

* add mt yarn script

* add pol of bullmq into backend

* add better error handling and concurrency setting

* spin up redis instance in dockerfile

* cleanup transaction logic when adding repos to index queue

* add NEW index status fetch condition

* move bullmq deps to backend

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>

* Authentication (#164)

* Add Org table (#167)

* Move logout button & profile picture into settings dropdown (#172)

* Multi tenancy support in config syncer (#171)

* [wip] initial mt support in config syncer

* Move logout button & profile picture into settings dropdown (#172)

* update sync status properly and fix bug with multiple config in db case

* make config path required in single tenant mode

NOTE: deleting config/repos is currently not supported in multi tenancy case. Support for this will be added in a future PR

---------

Co-authored-by: Brendan Kellam <bshizzle1234@gmail.com>

* add tenant mode support in docker container:

* Organization switching & active org management (#173)

* updated syncedAt date after config sync:

* Migrate to postgres (#174)

* spin up postgres in docker container

* get initial pol of postgres db working in docker image

* spin up postgres server in dev case

* updated syncedAt date after config sync:

* remove unnecessary port expose in docker file

* Connection creation form (#175)

* fix issue with yarn dev startup

* init (#176)

* Add `@sourcebot/schemas` package (#177)

* Connection management (#178)

* add concept of secrets (#180)

* add @sourcebot/schemas package

* migrate things to use the schemas package

* Dockerfile support

* add secret table to schema

* Add concept of connection manager

* Rename Config->Connection

* Handle job failures

* Add join table between repo and connection

* nits

* create first version of crypto package

* add crypto package as deps to others

* forgot to add package changes

* add server action for adding and listing secrets, create test page for it

* add secrets page to nav menu

* add secret to config and support fetching it in backend

* reset secret form on successful submission

* add toast feedback for secrets form

* add instructions for adding encryption key to dev instructions

* add encryption key support in docker file

* add delete secret button

* fix nits from pr review

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>

* bump zoekt version

* enforce tenancy on search and repo listing endpoints (#181)

* enforce tenancy on search and repo listing

* remove orgId from request schemas

* adds garbage collection for repos (#182)

* refactor repo indexing logic into RepoManager

* wip cleanup stale repos

* add rest of gc logic

* set status to indexing properly

* add initial logic for staging environment

* try to move encryption key env decleration in docker file to fix build issues

* switch encryption key as build arg to se if that fixes build issues

* add deployment action for staging image

* try using mac github action runners instead

* switch to using arm64 runners on arm64 build

* change workflow names to fix trigger issue

* trigger staging actions to see if it works

* fix working directory typo and pray it doesnt push to prod

* checkout v3 when deploying staging

* try to change into the staging dir manuall

* dummy commit to trigger v3 workflows to test

* update staging deploy script to match new version in main

* reference proper image:tag in staging fly config

* update staging fly config to point to ghcr

* Connection management (#183)

* add invite system and google oauth provider (#185)

* add settings page with members list

* add invite to schema and basic create form

* add invite table

* add basic invite link copy button

* add auth invite accept case

* add non auth logic

* add google oauth provider

* fix reference to header component in connections

* add google logo to google oauth

* fix web build errors

* bump staging resources

* change staging cpu to perf

* add side bar nav in settings page

* improve styling of members page

* wip adding stripe checkout button

* wip onboarding flow

* add stripe subscription id to org

* save stripe session id and add manage subscription button in settings

* properly block access to pages if user isn't in an org

* wip add paywall

* Domain support

* Domain support (#188)

* Update Makefile to include crypto package when doing a make clean

* Add default for AUTH_URL in attempt to fix build

* attempt 2

* fix attempt #3: Do not require a encrpytion key at build time

* Fix generate script race condition

* Attempt #4

* add back paywall and also add support for incrememnting seat count on invite redemption

* prevent self invite

* action button styling in settings and toast on copy

* add ability to remove member from org

* move stripe product id to env var

* add await for blocking loop in backend

* add subscription info to billing page

* handle trial case in billing info page

* add trial duration indicator to nav bar

* check if domain starts or ends with dash

* remove unused no org component

* Generate AUTH_SECRET if not provided (#189)

* remove package lock file and fix prisma dep version

* revert dep version updates

* fix yarn.lock

* add auth and membership check to fetchSubscription

* properly handle invite redeem with no valid subscription case

* change back fetch subscription to not require org membership

* add back subscription check in invite redeem page

* Add stripe billing logic (#190)

* add side bar nav in settings page

* improve styling of members page

* wip adding stripe checkout button

* wip onboarding flow

* add stripe subscription id to org

* save stripe session id and add manage subscription button in settings

* properly block access to pages if user isn't in an org

* wip add paywall

* Domain support

* add back paywall and also add support for incrememnting seat count on invite redemption

* prevent self invite

* action button styling in settings and toast on copy

* add ability to remove member from org

* move stripe product id to env var

* add await for blocking loop in backend

* add subscription info to billing page

* handle trial case in billing info page

* add trial duration indicator to nav bar

* check if domain starts or ends with dash

* remove unused no org component

* remove package lock file and fix prisma dep version

* revert dep version updates

* fix yarn.lock

* add auth and membership check to fetchSubscription

* properly handle invite redeem with no valid subscription case

* change back fetch subscription to not require org membership

* add back subscription check in invite redeem page

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>

* fix nits

* remove providers check

* fix more nits

* change stripe init to be behind function

* fix publishible stripe key handling in docker container

* enforce owner perms (#191)

* add make owner logic, and owner perms for removal, invite, and manage subscription

* add change billing email card to billing settings

* enforce owner role in action level

* remove unused hover card component

* cleanup

* add back gitlab, gitea, and gerrit support (#184)

* add non github config definitions

* refactor github config compilation to seperate file

* add gitlab config compilation

* Connection management (#183)

* wip gitlab repo sync support

* fix gitlab zoekt metadata

* add gitea support

* add gerrit support

* Connection management (#183)

* add gerrit config compilation

* Connection management (#183)

---------

Co-authored-by: Brendan Kellam <bshizzle1234@gmail.com>

* fix apos usage in redeem page

* change csrf cookie to secure not host

* Credentials provider (#192)

* email password functionality

* feedback

* cleanup org's repos and shards if it's inactive (#194)

* add stripe subscription status and webhook

* add inactive org repo cleanup logic

* mark reactivated org connections for sync

* connections qol improvements (#195)

* add client side polling to connections list

* properly fetch repo image url

* add client polling to connection management page, and add ability to sync failed connections

* Fix build with suspense boundary

* improved fix

* add retries for 429 issues (#196)

* add connection compile retry and hard repo limit

* add more retry checks

* cleanup unused change

* address feedback

* fix build errors and add index concurrency env var

* add config upsert timeout env var

* Membership settings rework (#198)

* Add refined members list

* futher progress on members settings polish

* Remove old components

* feedback

* Magic links (#199)

* wip on magic link support

* Switch to nodemailer / resend for transactional mail

* Further cleanup

* Add stylized email using react-email

* fix

* Fix build

* db performance improvements and job resilience  (#200)

* replace upsert with seperate create many and raw update many calls

* add bulk repo status update and queue addition with priority

* add support for managed redis

* add note for changing raw sql on schema change

* remove non secret token options

* fix token examples in schema

* add better visualization for connection/repo errors and warnings (#201)

* replace upsert with seperate create many and raw update many calls

* add bulk repo status update and queue addition with priority

* add support for managed redis

* add note for changing raw sql on schema change

* add error package and use BackendException in connection manager

* handle connection failure display on web app

* add warning banner for not found orgs/repos/users

* add failure handling for gerrit

* add gitea notfound warning support

* add warning icon in connections list

* style nits

* add failed repo vis in connections list

* added retry failed repo index buttons

* move nav indicators to client with polling

* fix indicator flash issue and truncate large list results

* display error nav better

* truncate failed repo list in connection list item

* fix merge error

* fix merge bug

* add connection util file [wip]

* refactor notfound fetch logic and add missing error package to dockerfile

* move repeated logic to function and add zod schema for syncStatusMetadata

* add orgid unique constraint to repo

* revert repo compile update logic to upsert loop

* log upsert stats

* [temp] disable polling everywhere (#205)

* add health check endpoint

* Refined onboarding flow (#202)

* Redeem UX pass (#204)

* add log for health check

* fix new connection complete callback route

* add cpu split logic and only wait for postgres if we're going to connec to it

* Inline secret creation (#207)

* use docker scopes to try and improve caching

* Dummy change

* remove cpu split logic

* Add some instrumentation to web

* add posthog events on various user actions (#208)

* add page view event support

* add posthog events

* nit: remove unused import

* feedback

* fix merge error

* use staging posthog papik when building staging image

* fix other merge error and build warnings

* Add invite email (#209)

* wrap posthog provider in suspense to fix build error

* add grafana alloy config and setup (#210)

* add grafana alloy config and setup

* add basic repo prom metrics

* nits in dockerfile

* remove invalid characters when auto filling domain

* add login posthog events

* remove hard coded sourcebot.app references

* make repo garbage collection async (#211)

* add gc queue logic

* fix missing switch cases for gc status

* style org create form better with new staging domain

* change repo rm logic to be async

* simplify repo for inactive org query

* add grace period for garbage collecting repos

* make prom scrape interval 500ms

* fix typo in trial card

* onboarding tweaks

* rename some prom metrics and cleanup unused

* wipe existing repo if we've picked up a killed job to ensure good state

* Connections UX pass + query optimizations (#212)

* remove git & local schemas (#213)

* skip stripe checkout for trial + fix indexing in progress UI + additional schema validation (#214)

* add additional config validation

* wip bypass stripe checkout for trial

* fix stripe trial checkout bypass

* fix indexing in progress ui on home page

* add subscription checks, more schema validation, and fix issue with complete page

* dont display if no indexed repos

* fix skipping onboard complete check

* fix build error

* add back button in onboard connection creation flow

* Add back revision support (#215)

* fix build

* Fix bug with repository snapshot

* fix share links

* fix repo rm issue, 502 page, condition on test clock

* Make login and onboarding mobile friendly

* fix ordering of quick actions

* remove error msg dump on failed repo index job, and update indexedAt field

* Add mobile unsupported splash screne

* cherry pick fix for file links

* [Cherry Pick] Syntax reference guide (#169) (#216)

* Add .env to db gitignore

* fix case where we have repos but they're all failed for repo snapshot

* /settings/secrets page (#217)

* display domain properly in org create form

* Quick action tweaks (#218)

* revamp repo page (#220)

* wip repo table

* new repo page

* add indicator for when feedback is applied in repo page

* add repo button

* fetch connection data in one query

* fix styling

* fix (#219)

* remove / keyboard shortcut hint in search bar

* prevent switching to first page on data update and truncate long repo names in repo list

* General settings + cleanup (#221)

* General settings

* Add alert to org domain change

* First attempt at sending logs to grafana

* logs wip

* add alloy logs

* wip

* [temp] comment out loki for now

* update trial card content and add events for code host selection on onboard

* reduce scraping interval to 15s

* Add prometheus metric for pending repo indexing jobs

* switch magic link to invite code (#222)

* wip magic link codes

* pipe email to email provider properly

* remove magic link data cookie after sign in

* clean up unused imports

* dont remove cookie before we use it

* rm package-lock.json

* revert yarn files to v3 state

* switch email passing from cookie to search param

* add comment for settings dropdown auth update

* remove unused middleware file

* fix build error and warnings

* fix build error with useSearchParam not wrapped in suspense

* add sentry support to backend and webapp (#223)

* add sentry to web app

* set sentry environemnt from env var

* add sentry env replace logic in docker container

* wip add backend sentry

* add sentry to backend

* move dns to env var

* remove test exception

* Fix root domain issue on onboarding

* add setup sentry cli step to github action

* login to sentry

* fix sentry login in action

* Update grafana loki endpoint

* switch source map publish to runtime in entrypoint

* catch and rethrow simplegit exceptions

* alloy nits

* fix alloy

* backend logging (#224)

* revert grafana loki config

* fix login ui nits

* fix quick actions

* fix typo in secret creation

* fix private repo clone issue for gitlab

* add repo index timeout logic

* add posthog identify call after registeration

* various changes to add terms and security info (#225)

* add terms and security to footer

* add security card

* add demo card

* fix build error

* nit fix: center 'get in touch' on security card

* Dark theme improvements (#226)

* (fix) Fixed bug with gitlab and gitea not including hostname in the repoName

* Switch to using t3-env for env-var management (#230)

* Add missing env var

* fix build

* Centralize to using a single .env.development for development workflows (#231)

* Make billing optional (#232)

* Massage environment variables from strings to numbers (#234)

* Single tenancy & auth modes (#233)

* Add docs to this repo

* dummy change

* Declarative connection configuration (#235)

* fix build

* upgrade to next 14.2.25

* Improved database DX

* migrate to yarn v4

* Use origin from header for baseUrl of emails (instead of AUTH_URL). Also removed reference to hide scrollbars

* Remove SOURCEBOT_ENCRYPTION_KEY from build arg

* Fix issue with linking default user to org in single tenant + no-auth mode

* Fix fallback tokens (#242)

* add SECURITY_CARD_ENABLED flag

* Add repository weburl (#243)

* Random fixes and improvements (#244)

* add zoekt max wall time env var

* remove empty warning in docs

* fix reference in sh docs

* add connection manager upsert timeout env var

* Declarative connection cleanup + improvements (#245)

* change contact us footer in app to point to main contact form

* PostHog event pass (#246)

* fix typo

* Add sourcebot cloud environment prop to staging workflow

* Update generated files

* remove AUTH_URL since it unused and (likely) unnecessary

* Revert "remove AUTH_URL since it unused and (likely) unnecessary"

This reverts commit 1f4a5aed22.

* cleanup GitHub action releases (#252)

* remove alloy, change auth defaul to disabled, add settings page in me dropdown

* enforce connection management perms to owner (#253)

* enforce conneciton management perms to owner

* fix formatting

* more formatting

* naming nits

* fix var name error

* change empty repo set copy if auth is disabled

* add CONTRIBUTING.md file

* hide settings in dropdown with auth isnt enabled

* handle case where gerrit weburl is just gitiles path

* Docs overhall (#251)

* remove nocheckin

* fix build error

* remove v3 trigger from deploy staging

* fix build errors round 2

* another error fix

---------

Co-authored-by: msukkari <michael.sukkarieh@mail.mcgill.ca>
2025-03-31 22:34:42 -07:00
Brendan Kellam
998a4dd07b
make syntax reference guide keyboard shortcut hint clickable (#229) 2025-03-13 13:02:49 -07:00
msukkari
bf76cb9358 cherry pick gitignore additions into main 2025-03-07 15:04:14 -08:00
msukkari
9d1ebcefaa log addition info for public search demo 2025-03-06 15:20:30 -08:00
msukkari
9a204b9557 add sourcebot cloud card to public search demo 2025-03-05 17:27:23 -08:00
msukkari
8a94949d2d remove repo_synced event 2025-02-20 10:10:28 -08:00
dependabot[bot]
65b61155bf
Bump vitest from 2.1.4 to 2.1.9 (#186)
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 2.1.4 to 2.1.9.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v2.1.9/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 13:50:24 -08:00
msukkari
f83a4db3d6 add maxTrigramCount setting 2025-01-28 14:44:47 -08:00
Brendan Kellam
27dde3a902
Fix version upgrade toast refresh issue (#179) 2025-01-28 12:04:27 -05:00
msukkari
d20412301d change example repo filter query to use react instead of linux as example 2025-01-27 11:22:03 -08:00
Brendan Kellam
6c77278498
Syntax reference guide (#169) 2025-01-17 14:12:43 -08:00