Skip to content

main branch has an empty name in branch_infos, so branch checkout main cannot address it #7411

Description

@Altranovo

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

The default branch's name is the empty string on the server, so it cannot be checked out by the name the UI displays.

$ flutterflow ai branch checkout main
Checkout refused: No branch named "main" under main project blank-phighh. Available: , dsl-i18n-test2, dsl-i18n-test

Note the leading empty element in Available:. The CLI renders the same branch with brackets elsewhere to paper over the missing name:

$ flutterflow ai branch list

  • [main] (LWLfxTScy4wTUkuwdEk7)

$ flutterflow ai branch current
(none)

The UI and the API disagree. The builder's project popover displays, as plain text:

Project: Altranovo
Project ID: blank-phighh
Branch: main
Environment: Production

So the UI states the branch is named main, while the API has no branch by that name. A user who reads the UI and types what it says gets a refusal.

There is a workaround, but it is not discoverable — nothing in the error message or in --help suggests that the empty string is a valid branch name:

$ flutterflow ai branch checkout "" --force
Now on "" (project_id=blank-phighh, head=XwObyew1xsmdFep57Mjl).

Expected Behavior

main should be addressable as main, matching what the builder UI displays.

Failing that, the CLI should map main onto the empty-named default branch, and branch current should print main rather than (none).

At minimum, the refusal message should not list an empty string as an available branch without explaining that it is the default branch and how to select it.

Steps to Reproduce

  1. In a workspace created with flutterflow ai init, run:
    flutterflow ai branch list
    Observe that the default branch is rendered as [main] with brackets.
  2. Run:
    flutterflow ai branch current
    Observe (none) while the builder UI shows "Branch: main".
  3. Run:
    flutterflow ai branch checkout main
    Observe: Checkout refused: No branch named "main" ... Available: , dsl-i18n-test2, dsl-i18n-test
    Note the empty first element in the list of available branches.
  4. Run:
    flutterflow ai branch checkout "" --force
    Observe that this succeeds, confirming the default branch's name is the empty string.
  5. Open the project popover in the builder and observe that it displays "Branch: main".

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

ITEelsn1z4pNj7xH1brUd8JFqwMwGkQ5a7sviu5+FBQaI+PvE+wxPuOlXFdvWOqHdG9YPGKLkn4KzNLwieD1N8E3IS6sfqpI/6ptUxDjUk66aJSWDpewQmpAM8FRFX6+37ukkCN4XcZsdFpg3UOIHPOQa3qCf9qOYwx5e6fDbOY=

Visual documentation

Image Image

Environment

- FlutterFlow version: 
- Platform:
- Browser name and version:
- Operating system and version affected:

Additional Information

  • FlutterFlow v7.0.72 (released August 19, 2026), Flutter 3.38.6
  • FlutterFlow AI CLI (flutterflow), run from Terminal.app on macOS
  • Project: blank-phighh ("Altranovo")
  • Builder used in Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageA potential issue that has not been confirmed as a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions