Skip to content

Commit 72be168

Browse files
brendan-kellamclaudemsukkarijsourcebot
authored
v5 (#1097) (#1106)
* Layout v2 (#1097) * wip * remove unused hook * Add collapse sidebar button * refactor settings into sidebar as a override context * chat thread styling * notification dot * improved rendering * fix light mode * imporved api key page * add chats page * not found nit * guest sidebar footer * add tooltip for sidebar collapse button * nit * onboard nit * fix permission sync banner * what's new * profile settings * home view settings * general settings * remove shadow * changelog * feedback * Lighthouse (#1109) * wip on service ping * add concept of License to the database and wire it into the enitlements system * wip on e2e checkout flow * basic card to display current plan * store activation code at rest * add manage subscription button * wip on lighthouse client * wip on lighthouse client * remove the concept of a plan and just rely on entitlements at the app layer * fix sidebar * add temporary refresh license button * clarified org availability design * entitlements naming nit * remove concept of a GUEST user * remove anonymous-access entitlement * change offline license to support optional seats * handle license validation for all paths * refactor some actions * add explicit service ping calls to user <> organization update paths * fix refresh bug with sidebar * add billing details card * fix invite redemption when user already a member User was hitting a unique constraint on UserToOrg(orgId, userId) when redeeming an invite, because onCreateUser auto-joins new signups in self-serve mode and redeemInvite then tried to create the same row. Make the insert idempotent via upsert so the downstream AccountRequest and invite cleanup still runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * wip on license card * further wip on license card / activaction code card * add recent invoices UI * nit on seats terminology * feat(web): surface subscription cancellation on license card Adds cancelAt to the License model and the lighthouse ping schema, and renders "Cancels on <date>" on the current plan card when there's no upcoming renewal. Prefers "Next renewal" when Stripe still has an upcoming invoice — so subscriptions scheduled to end after the next billing cycle keep showing the renewal row. Also makes nextRenewalAt / nextRenewalAmount nullable to match the lighthouse response, and guards new Date() against null in servicePing. Adds a CLAUDE.md under the lighthouse feature folder pointing at the service repo so the two schemas stay in lockstep. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(web): add offline license card to settings Renders a dedicated card for offline (SOURCEBOT_EE_LICENSE_KEY) licenses showing the license id, seat cap, and expiry. When an offline license is present, the page skips the online license lookup entirely to mirror the precedence in entitlements.ts. Also adds a header row with a mailto link to support and an "All plans" shortcut to the public pricing page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(web): banner system for license + permission sync Introduces a priority-ordered, single-slot banner system under (app)/components/banners/. A server-side resolver picks the highest-priority banner that matches the current context (role, license state, offline license, permission-sync status) and renders it through a shared BannerShell that handles per-day dismissal via cookies. Banners included: - License expired (everyone, non-dismissible, role-aware copy) - License expiry heads-up (owner, dismissible, 14d window, uses formatDistance for relative copy) - Invoice past due (owner, non-dismissible) - Permission sync pending (everyone, non-dismissible, migrated from the prior standalone component through BannerShell) Precedence mirrors entitlements.ts: offline license is the sole source of truth when present, so online billing state is ignored. Also splits getValidOfflineLicense into a decode-only path so getOfflineLicenseMetadata can surface expired licenses to the UI. Includes bannerResolver.test.ts covering priority, audience filtering, dismissal filtering, offline/online expiry rules, and permission sync. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * handle failure case where lighthouse cannot be reached * chore(web): mirror lighthouse trial + checkout schema changes Adds trialEnd to the ping response schema and installId / requestTrial to the checkout request schema so types match the lighthouse service. createCheckoutSession passes the instance's SOURCEBOT_INSTALL_ID and defaults requestTrial to false (the existing "upgrade" button is not a trial path). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(web): trial banner + plumbing Adds a trial banner to the owner-facing banner stack and the surrounding plumbing: - Schema: License.trialEnd, License.hasPaymentMethod, Org.trialUsedAt (durable flag that survives license deactivation). Two migrations. - servicePing persists trialEnd / hasPaymentMethod and flips Org.trialUsedAt on first trial sync. - Trial banner (owner, dismissible, priority 25): title uses formatDistance ("Your trial ends in 10 days"); copy + action branch on hasPaymentMethod. With-PM variant links to /settings/license; no-PM variant opens the Stripe portal via a new OpenBillingPortalButton (LoadingButton + createPortalSession). - currentPlanCard gains a "Trial ends on" fallback column for the trial-without-PM case (where nextRenewalAt is null). - activationCodeCard accepts isTrialEligible and flips its checkout button from "Purchase a license" to "Start a free trial" when the org hasn't trialed yet, passing requestTrial through to the checkout endpoint. - Types mirror the new lighthouse fields (trialEnd, hasPaymentMethod) and the checkout request additions (installId, requestTrial). Side-trips to Stripe (portal, checkout) now append ?refresh=true so the license resyncs on return; trial-checkout also appends ?trial_used=true so Org.trialUsedAt flips immediately (closes the UX gap between checkout completion and activation-code entry). page.tsx handles both params, preserves any other query params, and redirects to a clean URL. Also: fetchWithRetry now only retries 5xx, 408, and 429 — 4xx errors (e.g. TRIAL_ALREADY_USED at 409) propagate immediately instead of retrying pointlessly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * add badges to invoice cards * add basic billing docs * refactor(lighthouse): throw ServiceErrorException on ping failure syncWithLighthouse previously swallowed ping errors with a log and early return, which masked real problems. Flip the model: on a lighthouse ServiceError response, throw ServiceErrorException. The sew() middleware already knows how to marshal that into an API response for user-initiated paths. Callers fall into two camps: - Propagate (user-initiated): activateLicense and refreshLicense. The existing try/catch in activateLicense now correctly rolls back the license row when lighthouse rejects the activation code; refreshLicense lets the throw propagate so the UI surfaces a toast. - Swallow explicitly (background / side-effect): license page load, the 24h cron, user-approval, and signup paths all wrap with `.catch(() => { /* ignore */ })`. These happen as a side effect of other successful operations; a ping failure shouldn't block them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feedback * fix tests --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(v5): License reactivation flow (#1201) * wip on reactivation flow * add banner for license bound to another instance error case * add posthog group plumbing * chore: Use <Link> instead of <a> in default sidebar * feat(v5): Navigation progress bar (#1204) * s * changelog * sidebar tooltips * checkout success modal * update license server domain * fix changelog * fix migrations * fix banner apperance * feat(v5): Setup wizard (#1212) * bump setup-sourcebot wizard pacakge version * Upsell dialog (#1220) * wip on upsell dialog * rename to upsell dialog * use dynamic prices * further polish w.r.t., how we hydrate the client with offer information * feedback * render recent repos in sidebar (#1226) * [v5] chore(web): Ask upsell gating (#1224) * change CTA text for upsell dialog to be dependent on role * add AUTH_URL setup to setup-sourcebot cli * [v5] feat(web): Add integrated changelog system (#1227) * [v5] chore(web): add dau/wau/mau tracking (#1228) * [v5] feat(web): Add trial offer at end of onboarding (#1229) * style nit * chore: Update changelog update badge * chore: fix sidebar for small width screens * chore(web): Change analytics page to show upsell dialog * chore(web): Add posthog events for upsell * chore(web): Subtle color adjustment for light mode * [v5] feat(web): Add MCP settings page (#1231) * chore(web): Add hostname to service ping * move upgrade toast into a banner * banner nit * chore(web): Update plan name 'Enterprise' to 'Pro' * chore(web): Update activation code text to use upsell dialog * improve upsell behaviour during onboarding * chore(web): Allow user to modify checkout email in upsell dialog * chore(web): hide anonymous access setting during onboarding * chore(web): Update pricing table to use 'free' instead of 'community' * feat(setup-wizard): improve setup wizard UX and Docker conflict handling (#1232) * chore(web): v5 license / upsell UX polish (#1233) * chore(web): Change the default role assignment to `Owner` for organizations on the free tier (#1234) * s * update tooltip copy * changelog * feedback * chore(web): use neutral title in post-checkout activation dialog (#1235) Swap "Finalizing your purchase" for "Activating your license" so the copy reads correctly for both paid checkouts and trial starts (the same dialog drives both flows). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * chore(web): Fix offers loading skeleton bug * feat(web): show warning when on a trial without a payment method (#1236) * chore(web): update invite member placeholder email (#1237) * chore(web): license page UI nits (#1238) * [v5] chore(web): Use existing stripe customer id for checkout sessions when applicable (#1239) * s * feedback * docs: v5 docs updates (#1244) * [v5] feat(web): Add usage information for yearly subs (#1245) * schema * feat * lint & fix tests * update lighthouse endpoint to deployments.sourcebot.dev * ask mcp integration (#1209) * Add ask MCP server integration * Merge MCP user server credentials * Inject Prisma into MCP OAuth provider * Scope MCP user server queries * Add org-approved MCP servers * feat(web): add workspace MCP configuration * fix(web): allow MCP cleanup without OAuth entitlement * feat(web): improve MCP server add flow * fix(web): check DCR for prefab MCP servers * feat(web): support static OAuth MCP credentials * feat(web): add more prefab MCP servers * fix(web): use official Atlassian MCP icons * fix(web): use Atlassian prefab MCP server * feat(web): connect approved MCP servers from chat * feat(web): redesign MCP servers settings page Rework the MCP servers page with a cleaner, more compact layout: - Split servers into Connected / Suggested sections - Add search bar with All / Connected filter tabs - Compact card design with smaller favicons, stripped URLs, quieter status indicators - Move Reconnect into three-dot overflow menu alongside new Disconnect option - Add disconnectMcpServer server action to remove a user's MCP credentials - Extract useConnectMcp hook for shared connect/reconnect logic * Rename MCP settings to Ask Agent connectors * feat(web): redesign workspace Ask Agent settings page Redesign the workspace Ask Agent page with card-based layout, 3-stat strip, connector rows with status indicators, kebab menu, and Connect button with OAuth flow. Extract shared ConnectorRowInfo component for reuse between workspace and account settings pages. * feat(web): add workspace connector config link to chat toolbar Add "Configure connectors" link to the chat toolbar's Connectors submenu, pointing to /settings/workspaceAskAgent for workspace-level connector management. Keep existing "Manage connectors" link to /settings/accountAskAgent for personal connector setup. * Add MCP connector tool metadata * feat(web): redesign MCP tools list as compact clickable badges Replace the full-card tool list with a compact badge grid. Clicking a badge reveals that tool's detail panel inline; only one detail is visible at a time. Also remove the focus ring from the tools trigger button. * refactor(web): extract shared ConnectorCard component Unify the duplicated card layout between AccountConnectedConnectorCard and WorkspaceConnectorCard into a single ConnectorCard component that owns the Collapsible state, Card shell, ConnectorRowInfo, and tool disclosure wiring. The divergent parts (status badge, action buttons) are passed as ReactNode slots. * Fix Ask approval turn progress state * Add MCP connector usage counters * Address MCP review feedback * Remove workspace Ask Agent connector summary cards * Add PostHog prefab MCP server * Add Ask MCP PostHog metrics * Add Ask MCP tool call analytics * Add Ask MCP connector lifecycle analytics * Fix v5 rebase follow-ups * Clean up Ask MCP deployment references * Move EE MCP feature under chat * Simplify static MCP OAuth HTTPS guard * docs: v5 docs updates (#1244) * [v5] feat(web): Add usage information for yearly subs (#1245) * schema * feat * fix build errors after merge * fix bug where Ask doesn't load if we dont have a license key * refactor(web): clean up MCP OAuth provider * Prisma Migrations * Address various review feedback --------- Co-authored-by: Jack Minnetian <270441393+BlueBottleLatte@users.noreply.github.com> Co-authored-by: Michael Sukkarieh <michael.sukkarieh@mail.mcgill.ca> * Remove mcp server name entirely from post hog events (url remains) * changelog * feat(web): move ask and mcp to ee (#1247) * fix linting issue * feat(web): track AI provider and model type in ask_message_sent (#1248) * Add docs for the connectors feature * fix for claude opus 4.8 * chore(web): rename "Ask Agent" to "Ask Sourcebot" in settings UI (#1253) * feat(web): Slack-specific OAuth credentials copy in the connectors dialog (#1254) * Fix permission syncing (#1255) * fix(web): hide workspace connectors menu item from non-owners (#1256) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: make yearly seat usage bar proportional for overage (#1251) * chore(web): Filter out -zsh invoices * fix(web): fire analytics event when a workspace MCP connector is removed (#1257) * fix(web): clean up failed Ask MCP connections * feat(web): add prefab MCP connector presets * remove useless tests * feat(web): show redirect URL on a new line in default static connector description (#1258) * fix(web): Fix issue where sign-in with a SSO provider would fail after upsell without a resatrt * fix(web): prevent top banner from hiding the chat prompt (#1259) * fix(web): prevent top banner from pushing the chat prompt off-screen Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feedback --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Brendan Kellam <brendan@sourcebot.dev> * feat(web): restore scroll position when browsing files (#1261) The code preview panel now persists the scroll position per file/revision to sessionStorage and restores it on mount. Restoration is skipped when a highlight_range query param is present so the existing highlight scroll-into-view takes precedence. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: set git safe.directory at system level for non-root container users (#1262) Switches the safe.directory "*" config from --global (only written to /root/.gitconfig) to --system (/etc/gitconfig) so it applies regardless of which user runs git. The image intentionally sets no USER directive and can be run as an arbitrary --user, where the global config was never read, leaving the "dubious ownership" error unfixed. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(web): Fix issue with userScopedPrismaClientExtension (#1260) * feat(web): clean up Ask chat box toolbar (#1263) * fix(web): don't grey out the Add connector button while creating (#1265) * chore: remove embedded Postgres, Redis, secrets from Docker image (#1264) * chore: remove embedded Postgres and Redis from the Docker image As of v5, Sourcebot no longer ships an embedded Postgres or Redis. External instances are now required via DATABASE_URL and REDIS_URL. - Dockerfile: drop postgresql16/redis packages, DATABASE_DATA_DIR/ REDIS_DATA_DIR env, postgres/redis users, and /run/postgresql setup - entrypoint.sh: hard-fail with guidance when DATABASE_URL/REDIS_URL are unset; remove embedded init/startup blocks - supervisord.conf: remove the redis program - docs: mark DATABASE_URL/REDIS_URL required, drop data-dir vars, document the breaking change and data migration in the v4-to-v5 guide - CHANGELOG: note the breaking change Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: point CHANGELOG entry at PR #1264 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * changelog * docs: expand v4-to-v5 guide; require AUTH_SECRET and SOURCEBOT_ENCRYPTION_KEY - entrypoint.sh: require AUTH_SECRET and SOURCEBOT_ENCRYPTION_KEY explicitly (no auto-generation, no plaintext file loading); hard-fail with migration guidance and warn if the legacy plaintext files linger - v4-to-v5 guide: document the secrets, role-management, and external Postgres/Redis breaking changes with per-item migration steps - environment-variables: mark both secrets required - roles-and-permissions: add default-role-by-plan table - CHANGELOG: update breaking-change entries Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs nit * changelog nit * final nits --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(web): graceful error and loading states for billing/offers surfaces (#1267) * feat(web): graceful error and loading states for billing/offers surfaces Replace silent `null` returns with recoverable error states when the offers fetch fails, across onboarding, the upsell dialog/panel, and feature gates: - Onboarding trial step: reframe the error copy and add a "View pricing" link. - UpsellDialog / UpsellPanel: shared UpsellLoadError fallback with a retry, Status page link, and role-aware copy (owners get an outbound-access hint to deployments.sourcebot.dev + Learn more; members are routed to their admin). - UpsellPanel: add a `loadingVariant` prop so full-area feature gates render a centered spinner while the in-flow license card keeps its skeleton. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * nit --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add support for MCP scopes & tool permissions (#1266) * Add scopes as part of the prisma schema * Add MCP OAuth scope discovery and selection * Refactor MCP scopes into configurable entries * Refactor MCP server tool data table * Add MCP server tool permissions * Cache MCP tool definitions in Redis * Auto-save MCP tool permission changes * Avoid expensive tool fetch after updating tool permissions. Just update react query cache instead * deduplicate some code for cleanliness * Squash prisma migrations. Update redis cache for mcp tools to be per user, 1h time out * update prisma migrations * Update mcpScope to be referred to as mcpOAuthScope across the codebase * Add documentation for scopes and permissions * Update docs to say Ask Sourcebot --------- Co-authored-by: Jack Minnetian <270441393+BlueBottleLatte@users.noreply.github.com> * Fix issues blocking build (#1269) Fix issues blocking build * feat(setup-wizard): clearer written-files summary and org/user validation (#1272) * bump setup-sourcebot package version * fix(web): strip HTML tags iteratively in MCP tool metadata sanitizer (#1273) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Michael Sukkarieh <michael.sukkarieh@mail.mcgill.ca> Co-authored-by: Jack Minnetian <270441393+BlueBottleLatte@users.noreply.github.com> Co-authored-by: jsourcebot <270441393+jsourcebot@users.noreply.github.com>
1 parent 740bcc9 commit 72be168

510 files changed

Lines changed: 34254 additions & 6137 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,5 @@ SOURCEBOT_TELEMETRY_DISABLED=true # Disables telemetry collection
7171
NODE_ENV=development
7272

7373
DEBUG_WRITE_CHAT_MESSAGES_TO_FILE=true
74+
75+
SOURCEBOT_LIGHTHOUSE_URL=http://localhost:3003

.github/workflows/release-mcp.yml

Lines changed: 0 additions & 157 deletions
This file was deleted.

AGENTS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ Standard dev commands are documented in `CONTRIBUTING.md` and `package.json`. Ke
3535
- **Build deps only:** `yarn build:deps` (builds shared packages: schemas, db, shared, query-language)
3636
- **DB migrations:** `yarn dev:prisma:migrate:dev`
3737

38-
### Deprecated Packages
39-
40-
- **`packages/mcp`** - This standalone MCP package is deprecated. Do NOT modify it. MCP functionality is now handled by the web package at `packages/web/src/features/mcp/`.
41-
4238
### Non-obvious Caveats
4339

4440
- **Docker must be running** before `yarn dev`. Start it with `docker compose -f docker-compose-dev.yml up -d`. The backend will fail to connect to Redis/PostgreSQL otherwise.

CHANGELOG.md

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

88
## [Unreleased]
99

10+
Checkout the [migration guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide) for details on upgrading your instance to v5.
11+
12+
### Changed
13+
- [**Breaking Change**] Changed the default role assignment to `Owner` for organizations on the free tier. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
14+
- [**Breaking Change**] Relicensed Ask Sourcebot and MCP under ee. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
15+
- [**Breaking Change**] Removed the embedded Postgres and Redis from the Docker image. External Postgres and Redis are now required: set `DATABASE_URL` and `REDIS_URL`, or deploy with the provided `docker-compose.yml`. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
16+
- [**Breaking Change**] Sourcebot no longer auto-generates `AUTH_SECRET` and `SOURCEBOT_ENCRYPTION_KEY`, nor reads them from the plaintext files it previously wrote to the data volume; both must now be set explicitly as environment variables. See the [v4 to v5 guide](https://docs.sourcebot.dev/docs/upgrade/v4-to-v5-guide). [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
17+
- Redesigned the app layout with a new collapsible sidebar navigation, replacing the previous top navigation bar. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
18+
- Expired offline license keys no longer crash the process. An expired key now degrades to the unlicensed state. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
19+
- Improved the `setup-sourcebot` wizard: prompts for a setup directory, clarifies that secrets are stored locally in `.env`, switches multi-select to Tab, hides "No results" until a real search runs, and detects/cleans up conflicting Docker deployments and volumes before starting. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
20+
21+
### Added
22+
- Added ask connectors: connect 3rd party MCP servers to your ask agent. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
23+
- Added progress bar when navigating between pages. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
24+
- Added a integrated changelog into the sidebar. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
25+
- Added scroll position restoration when viewing files in the code browser, so returning to a previously viewed file restores your scroll position. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
26+
27+
### Fixed
28+
- Fixed git "dubious ownership" errors when the container runs as a non-root user by setting `safe.directory` at the system level instead of the global (root-only) level. [#1106](https://github.com/sourcebot-dev/sourcebot/pull/1106)
29+
1030
## [4.17.4] - 2026-05-30
1131

1232
### Changed
@@ -23,6 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2343
- [EE] Fixed Bitbucket Cloud account-driven permission sync after Atlassian's CHANGE-2770 removed `GET /2.0/user/permissions/repositories`. [#1217](https://github.com/sourcebot-dev/sourcebot/pull/1217)
2444
- Fixed issue where session invalidation (signout, user deletion, removal from org) was not reflected by `/api/auth/session`. [#1219](https://github.com/sourcebot-dev/sourcebot/pull/1219)
2545
- [EE] Fixed issue where an OAuth account-linking attempt without a valid signed-in session would silently create an orphan User row instead of rejecting the request. [#1221](https://github.com/sourcebot-dev/sourcebot/pull/1221)
46+
2647
## [4.17.2] - 2026-05-16
2748

2849
### Added
@@ -1026,7 +1047,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10261047

10271048
### Added
10281049
- Added audit logging. [#355](https://github.com/sourcebot-dev/sourcebot/pull/355)
1029-
<!-- @NOTE: this release includes a API change that affects the MCP package (@sourcebot/mcp). On release, bump the MCP package's version and delete this message. -->
10301050

10311051
### Fixed
10321052
- Delete account join request when redeeming an invite. [#352](https://github.com/sourcebot-dev/sourcebot/pull/352)

CLAUDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ if (condition) doSomething();
6363
- Events fired from multiple sources (web app, MCP server, API) must NOT use the `wa_` prefix (e.g., `ask_message_sent`, `tool_used`).
6464
- Multi-source events should include a `source` property to identify the origin (e.g., `'sourcebot-web-client'`, `'sourcebot-mcp-server'`, `'sourcebot-ask-agent'`).
6565

66+
## Conditional ClassNames
67+
68+
Use `cn()` from `@/lib/utils` for conditional classNames instead of template literal interpolation:
69+
70+
```tsx
71+
// Correct
72+
className={cn("border-b transition-colors", isActive ? "border-foreground" : "border-transparent")}
73+
74+
// Incorrect
75+
className={`border-b transition-colors ${isActive ? "border-foreground" : "border-transparent"}`}
76+
```
77+
6678
## Tailwind CSS
6779

6880
Use Tailwind color classes directly instead of CSS variable syntax:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Then restart the dev server. Components that re-render will be highlighted in th
131131
- Keep pull requests small and focused
132132
- Explain the issue and why your change fixes it
133133
- Before adding new functionality, ensure it doesn't already exist elsewhere in the codebase
134-
- Update `CHANGELOG.md` with an entry under `[Unreleased]` linking to your PR. New entries should be placed at the bottom of their section. If your change touches `packages/mcp`, update `packages/mcp/CHANGELOG.md` instead.
134+
- Update `CHANGELOG.md` with an entry under `[Unreleased]` linking to your PR. New entries should be placed at the bottom of their section.
135135

136136
### UI Changes
137137

Dockerfile

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ ENV NODE_ENV=production
163163
ENV NEXT_TELEMETRY_DISABLED=1
164164
ENV DATA_DIR=/data
165165
ENV DATA_CACHE_DIR=$DATA_DIR/.sourcebot
166-
ENV DATABASE_DATA_DIR=$DATA_CACHE_DIR/db
167-
ENV REDIS_DATA_DIR=$DATA_CACHE_DIR/redis
168166
ENV SOURCEBOT_PUBLIC_KEY_PATH=/app/public.pem
169167
# PAPIK = Project API Key
170168
# Note that this key does not need to be kept secret, so it's not
@@ -180,7 +178,7 @@ ENV SOURCEBOT_LOG_LEVEL=info
180178
# ENV SOURCEBOT_TELEMETRY_DISABLED=1
181179

182180
# Configure dependencies
183-
RUN apk add --no-cache git ca-certificates bind-tools tini jansson wget supervisor uuidgen curl perl jq redis postgresql16 postgresql16-contrib openssl util-linux unzip && \
181+
RUN apk add --no-cache git ca-certificates bind-tools tini jansson wget supervisor uuidgen curl perl jq openssl util-linux unzip && \
184182
apk upgrade --no-cache
185183

186184
# Remove npm (unused — we use Yarn). The Node.js base image bundles npm
@@ -200,8 +198,6 @@ ARG GID=1500
200198
# The container can be run as root (default) or as sourcebot user using docker run --user
201199
RUN addgroup -g $GID sourcebot && \
202200
adduser -D -u $UID -h /app -S sourcebot && \
203-
adduser sourcebot postgres && \
204-
adduser sourcebot redis && \
205201
chown -R sourcebot /app && \
206202
adduser sourcebot node && \
207203
mkdir /var/log/sourcebot && \
@@ -250,12 +246,7 @@ COPY --chown=sourcebot:sourcebot --from=shared-libs-builder /app/packages/shared
250246
COPY --chown=sourcebot:sourcebot --from=shared-libs-builder /app/packages/queryLanguage ./packages/queryLanguage
251247

252248
# Fixes git "dubious ownership" issues when the volume is mounted with different permissions to the container.
253-
RUN git config --global safe.directory "*"
254-
255-
# Configure the database
256-
RUN mkdir -p /run/postgresql && \
257-
chown -R postgres:postgres /run/postgresql && \
258-
chmod 775 /run/postgresql
249+
RUN git config --system safe.directory "*"
259250

260251
# Make app directory accessible to both root and sourcebot user
261252
RUN chown -R sourcebot /app \

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ clean:
3737
packages/db/dist \
3838
packages/schemas/node_modules \
3939
packages/schemas/dist \
40-
packages/mcp/node_modules \
41-
packages/mcp/dist \
4240
packages/shared/node_modules \
4341
packages/shared/dist \
4442
.sourcebot

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ services:
1515
volumes:
1616
- ./config.json:/data/config.json
1717
- sourcebot_data:/data
18+
env_file:
19+
- path: .env
20+
required: false
1821
environment:
1922
- CONFIG_PATH=/data/config.json
2023
- AUTH_URL=${AUTH_URL:-http://localhost:3000}
2124
- AUTH_SECRET=${AUTH_SECRET:-000000000000000000000000000000000} # CHANGEME: generate via `openssl rand -base64 33`
2225
- SOURCEBOT_ENCRYPTION_KEY=${SOURCEBOT_ENCRYPTION_KEY:-000000000000000000000000000000000} # CHANGEME: generate via `openssl rand -base64 24`
2326
- DATABASE_URL=${DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/postgres} # CHANGEME
2427
- REDIS_URL=${REDIS_URL:-redis://redis:6379} # CHANGEME
25-
- SOURCEBOT_EE_LICENSE_KEY=${SOURCEBOT_EE_LICENSE_KEY:-}
2628

2729
# For the full list of environment variables see:
2830
# https://docs.sourcebot.dev/docs/configuration/environment-variables

docs/api-reference/sourcebot-public.openapi.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,8 +1147,7 @@
11471147
"type": "string",
11481148
"enum": [
11491149
"OWNER",
1150-
"MEMBER",
1151-
"GUEST"
1150+
"MEMBER"
11521151
]
11531152
},
11541153
"createdAt": {
@@ -2290,7 +2289,7 @@
22902289
"summary": "Get a user",
22912290
"description": "Fetches profile details for a single organization member by `userId`. Only organization owners can access this endpoint.",
22922291
"x-mint": {
2293-
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/license-key) to activate it.\n</Note>"
2292+
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/activating-a-subscription) to activate it.\n</Note>"
22942293
},
22952294
"parameters": [
22962295
{
@@ -2365,7 +2364,7 @@
23652364
"summary": "Delete a user",
23662365
"description": "Permanently deletes a user and all associated records. Only organization owners can delete other users.",
23672366
"x-mint": {
2368-
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/license-key) to activate it.\n</Note>"
2367+
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/activating-a-subscription) to activate it.\n</Note>"
23692368
},
23702369
"parameters": [
23712370
{
@@ -2442,7 +2441,7 @@
24422441
"summary": "List users",
24432442
"description": "Returns all members of the organization. Only organization owners can access this endpoint.",
24442443
"x-mint": {
2445-
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/license-key) to activate it.\n</Note>"
2444+
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/activating-a-subscription) to activate it.\n</Note>"
24462445
},
24472446
"responses": {
24482447
"200": {
@@ -2487,7 +2486,7 @@
24872486
"summary": "List audit records",
24882487
"description": "Returns a paginated list of audit log entries. Only organization owners can access this endpoint.",
24892488
"x-mint": {
2490-
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/license-key) to activate it.\n</Note>"
2489+
"content": "<Note>\nThis API is only available with an active Enterprise license. Please add your [license key](/docs/activating-a-subscription) to activate it.\n</Note>"
24912490
},
24922491
"parameters": [
24932492
{

0 commit comments

Comments
 (0)