Skip to content
Snippets Groups Projects

batches: hide "Create" button on search results unless enabled

Merged Warren Gifford requested to merge kr/no-create-when-disabled into main

Created by: courier-new

Closes https://github.com/sourcegraph/sourcegraph/issues/40612.

Just adds an additional site settings check to only show the "Create Batch Change" button on the search results page if the instance has batch changes enabled in its configuration. Since we changed the default for the experimental flag batchChangesExecutionEnabled to true for beta, the condition to show this button was evaluating to true even if the entire instance didn't have batch changes enabled.

I could use this as an opportunity to launch into a big, pedantic lecture about how the *correct* solution is to redesign our settings matrix to not allow such impossible states (e.g. where batch changes is disabled and simultaneously server-side execution is enabled), but I don't think this is a battle anyone can reasonably fight at this point. :sweat_smile:

Test plan

Manually verified:

batchChanges.enabled experimentalFeatures.batchChangesExecution Button present?
true true :white_check_mark:
false true :x:
true false :x:
true unset (= true) :white_check_mark:

App preview:

Check out the client app preview documentation to learn more.

Merge request reports

Merged by avatar (Apr 22, 2025 12:44am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading