Skip to content

Improve consistency in Sourcegraph's frontend codebase

Created by: taylorsperry

Problem to solve

Quarterly DevX surveys regularly identify "codebase inconsistency" as a main contributor to poor developer experience at Sourcegraph. It makes it difficult for teams to iterate quickly, complicates the debugging process, and bloats CI/CD time.

A more consistent client codebase will:

  • Reduce mental overhead for engineers by standardizing file structure, naming conventions, patterns, and conventions
  • Make it easier to find, implement, and update reusable components
  • Enable us to automate wide-ranging changes and migrate technologies quickly
  • Empower teammates to work outside their domain area (and jump into new ones)
  • Improve onboarding so that new teammates can have an impact faster

Measure of success

  • There's one answer to every question: Codebase conventions are documented in the handbook, as is the long-term vision for our tech stack, tooling, and libraries.
  • All major ongoing migrations are complete.
  • We see fewer comments about codebase complexity in the quarterly DevX surveys.

Solution summary

  • Define React component file structure, naming conventions, and organization for reusable modules.
  • Track and complete ongoing migrations, improve tooling for future migrations, and identify next priority migrations
  • Set up linters and component generators that enforce consistency

Artifacts:

What specific customers are we iterating on the problem and solution with?

Internal Sourcegraph developers

Impact on use cases

Delivery plan

  • TODO