Skip to content

Proto: Rename symbol with batch changes

Created by: malomarrec

Problem to solve

Users that start using Batch Changes often struggle in writing batch changes steps (code rewrite steps) required to get to their first batch change. This increases time to value and limits the number of MAUs. Making batch changes code rewerite steps easy to develop in general is a massive problem. However, we can identify valuable subproblems to address. Symbol renaming is a frequent, valuable, well-defined sub-problem.

More in https://github.com/sourcegraph/sourcegraph/issues/32834

Measure of success

This is a spike to understand the feasibility and engineering effort required to deliver https://github.com/sourcegraph/sourcegraph/issues/32834

It is successful if we have:

  • a releasable feature, feature-flagged, with clearly defined limitations
  • using this feature allows to perform a 99% accurate symbol-rename, given target repositories match prerequisites
  • a scope of work and list of dependencies on other product areas
  • a preview video that generates significant engagement/excitement

Solution

Create a simple way for users to rename a symbol across their entire codebase, using code intelligence data.

image

This would give users an IDE-like experience of renaming symboles, but apply to all your codebase. In the long term it would create a very easy to use entrypoint into Bath Changes, increasing MAUs and our key metric # of changesets merged.

Note that this feature will be conditioned on precise code-intelligence data being available for all repositories targeted by the change.

The initial user experience will be:

  • from a popover, when hovering or clicking a symbol
  • you can navigate to a pre-filled batch change template
  • that operates the symbol rename across the repositories targeted by the on.repositoriesMatchingQuery, provided that precise code intelligence data is available

Impact on use cases

This creates an end-to-end Code health workflow, starting on the search results page, and ending with a batch change.

Delivery plan

  • Take this hackathon work and scope out work required to release it as experimental
  • RFC: pings for "rename symbol" clicks
  • Do a minimal iteration required to release it as experimental behind a feature flag
  • Record a public-facing demo video
  • Create instructions for CEs to use this in a demo flow