Code AI platform with Code Search & Cody
Go to file
Felix Kling a4ff8b0040
web: Consolidate server and client side feature flag overrides (#57663)
It turned out that we have two different ways of overriding feature
flags:
- `?feat=foo` overrides the feature flag on the server for this request
- `?feature-flag-key=foo&feature-flag-value=true` overrides the feature
  flag on the client side only and persists the setting in local storage

This commit does three things:

1. It consolidates the two systems. `feature-flag-{key,value}` have been
   removed in favor of `feat`. The client side logic will now use the
   same parameter. An additional prefix has been added, `~` to indicate
   the client to remove the override.
2. The header logic for GraphQL queries has been reworked to include
   headers for overridden feature flags. This ensures that the server
   uses the same overrides as the client.
3. The developer settings dialog and navbar entry now feature a reload
   button which appends `flag` to the current URL for overridden feature
   flags and reloads the page. Additionally the keyboard shortcut for
   reloading the page (`Mod-r`) is hijacked to perform the same action.
   NOTE: Unlike the first two, this functionality is only available in
   development builds.
2023-10-20 12:34:19 +02:00
.aspect bzl: update skylib, bazellib, rules_js, rules_rust (#57622) 2023-10-16 11:51:29 +00:00
.buildkite update reference to #discuss-dev-experience channel (#57661) 2023-10-17 10:11:23 +00:00
.github Chore: remove old issue templates (#57710) 2023-10-18 18:42:09 +00:00
.vscode use esbuild for building client/vscode (#57447) 2023-10-08 14:05:37 +09:00
client web: Consolidate server and client side feature flag overrides (#57663) 2023-10-20 12:34:19 +02:00
cmd security: Update access token format (#56772) 2023-10-20 11:29:07 +01:00
dev sg: fix sg wolfi image builds (#57760) 2023-10-20 09:02:08 +00:00
doc Search: enable repo:has.topic() for GitLab (#57649) 2023-10-19 20:46:56 +00:00
docker-images Java queries for local navigation (#57620) 2023-10-20 08:07:33 +01:00
internal web: Consolidate server and client side feature flag overrides (#57663) 2023-10-20 12:34:19 +02:00
lib logger: update log lib and remove use of description (#57690) 2023-10-18 17:29:08 +02:00
migrations Search: enable repo:has.topic() for GitLab (#57649) 2023-10-19 20:46:56 +00:00
monitoring monitoring/telemetry: un-hide panels, improve docstrings (#57740) 2023-10-19 12:52:21 -07:00
schema Remove unused field in site config (#57734) 2023-10-19 23:36:47 +02:00
src-tauri Chore: move app scripts out of enterprise (#57388) 2023-10-05 17:52:58 +00:00
testing bzl: bump oci_rules to 1.3.4 (#57013) 2023-09-26 10:23:30 +02:00
third_party local: fix issues when cross-compiling syntax-highlighter to produce a container image on Mac machines (#55969) 2023-08-22 12:46:43 +02:00
third-party-licenses chore: update third-party licenses (#57611) 2023-10-18 15:16:13 +00:00
ui/assets Enable bazel for web-sveltekit and make it available in production builds (#55177) 2023-10-16 14:15:59 +02:00
windows/installer/cody call it "Cody" not "Cody AI" (#56863) 2023-09-21 08:49:02 -05:00
wolfi-images deps: update exporter packages (#57698) 2023-10-18 15:58:40 +00:00
wolfi-packages Bump p4-fusion to version of our fork (#57751) 2023-10-20 01:50:44 +02:00
.bazel_fix_commands.json bazel: add command sets that uses bazel under the hood (#48460) 2023-03-02 11:31:51 +01:00
.bazelignore bazelignore storybook static files (#57501) 2023-10-10 09:00:30 +09:00
.bazeliskrc build: update to Aspect CLI 5.5.4 (#54468) 2023-06-29 22:44:05 -07:00
.bazelrc bzl: update skylib, bazellib, rules_js, rules_rust (#57622) 2023-10-16 11:51:29 +00:00
.bazelversion Update bazel to 6.1.1 (#50472) 2023-04-11 10:51:21 +02:00
.browserslistrc web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.dockerignore web: migrate from yarn to pnpm (#46143) 2023-01-11 19:50:09 -08:00
.editorconfig proto: Add editorconfig to ident using two spaces (#57281) 2023-10-03 00:39:42 +00:00
.eslintignore bazel: implement custom ESLint Bazel rule (#52062) 2023-05-22 04:05:45 -07:00
.eslintrc.js Enable bazel for web-sveltekit and make it available in production builds (#55177) 2023-10-16 14:15:59 +02:00
.gitattributes github: show bazel diff again (#54719) 2023-07-07 16:43:45 +00:00
.gitignore rename {webpack => web}.manifest.json (#57449) 2023-10-07 14:02:41 -10:00
.graphqlrc.yml
.hadolint.yaml bump comby version to 1.7.1 (#35830) 2022-05-20 20:12:01 -07:00
.mailmap mailmap: add entries for Eric and Renovate (#50966) 2023-04-25 09:42:22 +02:00
.mocharc.js build: still need BAZEL_BINDIR for webpack_bundle custom rule (#48796) 2023-03-07 20:02:11 -08:00
.npmrc pnpm: remove update notifier message (#51630) 2023-05-10 08:53:39 +02:00
.percy.yml ci: percy defer snapshots upload (#54116) 2023-06-25 18:57:49 -07:00
.pre-commit-config.yaml local: exclude generated files from pre-commit (#57761) 2023-10-20 08:19:40 +00:00
.prettierignore Enable bazel for web-sveltekit and make it available in production builds (#55177) 2023-10-16 14:15:59 +02:00
.stylelintignore rework plugin structure and implement frontside blogpost (#46883) 2023-02-15 11:49:51 +02:00
.stylelintrc.json web: drop bootstrap depenedency (#41401) 2022-09-07 03:11:26 -07:00
.tool-versions go: update to 1.20.10 (#57525) 2023-10-12 14:13:46 +02:00
.trivyignore
babel.config.jest.js bazel: fix the web application bundle in Bazel (#50383) 2023-04-10 21:16:12 -07:00
babel.config.js bazel: fix the web application bundle in Bazel (#50383) 2023-04-10 21:16:12 -07:00
BUILD.bazel migrate to storybook 7 (#57437) 2023-10-07 21:55:42 +00:00
CHANGELOG.app.md update code references to "Sourcegraph App" -> "Cody App" (#56747) 2023-09-19 12:31:12 -10:00
CHANGELOG.md Search: enable repo:has.topic() for GitLab (#57649) 2023-10-19 20:46:56 +00:00
CODENOTIFY nix: update pnpm hash (#51512) 2023-05-05 12:51:59 +00:00
CONTRIBUTING.md enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00
deps.bzl chore: Delete cmd/sitemap (unused code) (#57361) 2023-10-20 14:16:43 +08:00
doc.go
eslint-relative-formatter.js bazel: implement custom ESLint Bazel rule (#52062) 2023-05-22 04:05:45 -07:00
flake.lock nix: use go1.21 (#57422) 2023-10-06 18:09:02 +02:00
flake.nix nix: separate nixpkgs-unstable pin from nixpkgs pin for static binaries (#56959) 2023-09-22 17:12:18 +00:00
gen.go chore: Update go-mockgen (#44305) 2022-11-11 19:24:00 +00:00
go.mod chore: Delete cmd/sitemap (unused code) (#57361) 2023-10-20 14:16:43 +08:00
go.sum chore: Delete cmd/sitemap (unused code) (#57361) 2023-10-20 14:16:43 +08:00
graphql-schema-linter.config.js
gulpfile.js Enable bazel for web-sveltekit and make it available in production builds (#55177) 2023-10-16 14:15:59 +02:00
jest.config.base.js bazel: wildcard jest tests (#49282) 2023-03-17 03:38:49 -07:00
jest.config.js
jest.snapshot-resolver.js bazel: wildcard jest tests (#49282) 2023-03-17 03:38:49 -07:00
LICENSE relicense all paths other than MIT licensed code, client/cody*, jetbrains, VS code, and browser extension to enterprise (#53345) (#53345) 2023-06-13 10:28:11 -07:00
LICENSE.enterprise
linter_deps.bzl bzl: port go compiler directives linter from sg lint to nogo (#54485) 2023-06-30 14:31:15 +02:00
mockgen.temp.yaml repoupdater: Remove endpoints for external services (#57441) 2023-10-09 13:48:07 +00:00
mockgen.test.yaml gitserver: Introduce subpackages 2023-10-04 21:16:24 +02:00
mockgen.yaml mocks: Reorganize mock definitions into multiple files (#36967) 2022-06-27 20:59:16 +00:00
nogo_config.json gitserver: Replace P4Exec endpoint with properly typed and individually tested RPC calls (#57247) 2023-10-09 15:06:49 +02:00
package.json remove storybook addon-docs (#57497) 2023-10-09 13:24:32 -10:00
pnpm-lock.yaml Enable bazel for web-sveltekit and make it available in production builds (#55177) 2023-10-16 14:15:59 +02:00
pnpm-workspace.yaml cody: development branch (#49761) 2023-03-23 20:41:11 +01:00
postcss.config.js
prettier.config.js clean up Cody CSS to increase shareability and improve display in web app (#50279) 2023-04-03 12:29:05 -07:00
README.md relicense all paths other than MIT licensed code, client/cody*, jetbrains, VS code, and browser extension to enterprise (#53345) (#53345) 2023-06-13 10:28:11 -07:00
renovate.json Require approval to run Renovate (#57608) 2023-10-18 20:36:53 +02:00
SECURITY.md
service-catalog.yaml lib/servicecatalog: init to distribute catalog (#46999) 2023-01-26 17:22:27 -08:00
sg.config.yaml Enable bazel for web-sveltekit and make it available in production builds (#55177) 2023-10-16 14:15:59 +02:00
shell.nix nix: do not manage bazel on MacOS (#57423) 2023-10-06 16:11:34 +00:00
sonar-project.properties Use Buildkite to run Sonarcloud (#54875) 2023-07-21 12:16:03 -04:00
stamp_tags.bzl Switch to OCI/Wolfi based image (#52693) 2023-06-02 12:12:52 +02:00
svgo.config.js
tsconfig.all.json remove cody code that was moved to separate cody repo (#54729) 2023-07-10 00:31:47 -10:00
tsconfig.base.json web: fix pnpm-lock issue (#47478) 2023-02-09 22:04:31 -08:00
tsconfig.eslint.json web: fix pnpm-lock issue (#47478) 2023-02-09 22:04:31 -08:00
WORKSPACE bzl: update skylib, bazellib, rules_js, rules_rust (#57622) 2023-10-16 11:51:29 +00:00

DocsContributingTwitterDiscord

Build status Scorecard Latest release Discord Contributors


Sourcegraph makes it easy to read, write, and fix code—even in big, complex codebases.

  • Code search: Search all of your repositories across all branches and all code hosts.
  • Code intelligence: Navigate code, find references, see code owners, trace history, and more.
  • Fix and refactor: Roll out large-scale changes to many repositories at once and track big migrations.

Getting started



Development

Refer to the Developing Sourcegraph guide to get started.

Documentation

The doc directory has additional documentation for developing and understanding Sourcegraph:

License

This repository contains primarily non-OSS-licensed files, and some OSS licensed files (for example, IDE extensions). We maintain one repository rather than two separate repositories mainly for development convenience.

See the LICENSE for an explanation of how files are licensed.