Skip to content

Consider splitting up SQLEditorNav (780 lines, complexity 229) #48194

Open

Description

@vishalkelur28-cyber

Chore

Describe the chore

Ran ArchSetu (a static analysis tool I built) against Supabase. SQLEditorNav() in apps/studio/components/layouts/SQLEditorLayout/SQLEditorNavV2/SQLEditorNav.tsx:50 is 780 lines long with a cyclomatic complexity of 229, making it one of the largest single components in the Studio codebase. Given how central the SQL editor is to the product, it's probably worth splitting into smaller pieces before it grows further.

Additional context

Full report with everything else ArchSetu flagged: https://www.archsetu.com/r/supabase/supabase

Best,
Vishal

Activity

  1. coderabbitai commented on Jul 22, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #43560 - chore - stabilize and make e2e tests faster - part 2 [closed]
    #43569 - chore - make database e2e tests run in parallel and more stable [closed]
    #43634 - chore: Fix vulnerable packages [closed]
    #47399 - Chore/cleanup studio deps [merged]
    #47975 - chore: Test build [open]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. added
    external-issue
    on Jul 22, 2026
  3. Hardik180704 commented on Jul 28, 2026

    @Hardik180704

    Hi! I’d like to work on this issue.

    My plan is to keep the refactor behavior-preserving and split SQLEditorNav incrementally rather than rewriting it. I’ll first map its current responsibilities and existing test coverage, then extract cohesive pieces such as navigation/header UI, actions, and state-derived sections while keeping orchestration in the parent component. I’ll avoid unrelated styling or behavior changes and add or update focused tests where the extracted boundaries need coverage.

    Before I start, does this scope align with how the maintainers would like the component divided, or are there specific boundaries you’d prefer?

  4. added
    frontend
    pr-opened
    and removed on Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    external-issuefrontendpr-opened

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions