Skip to content

🦙 Bug - TinaCMS Dependency - Saving edits in TinaCMS fails when auto-generated branch name already exists #2407

@KostaMadorsky

Description

@KostaMadorsky

Requested by: @KostaMadorsky via YakShaver.ai 🦬
cc: @KostaMadorsky, @Marxoz, @PothieuG, @Freego1783

Hi Team!

  🟥  Watch the video (1 min 53 sec)

  Url from screen share: https://www.ssw.com.au/rules/admin/rules/fundamentals-of-prompt-engineering

Pain

When editing rules in Rules V3 (TinaCMS) and saving changes to a new branch, the system automatically generates a default branch name. If that branch name already exists, the save operation fails with a generic "Branch operation failed" error that provides no actionable information. This leads to repeated failures with no clear guidance. The system should display a clear, descriptive error message indicating that the branch already exists. I would also be great to prevent branch name collisions by generating unique branch names (e.g. including username and timestamp).

Acceptance Criteria

  1. When saving changes to a new branch, the system must not fail silently due to an existing branch name.
  2. If an auto-generated branch name already exists, the user is shown a clear and descriptive error message stating that the branch already exists.
  3. (Nice to have) the system generates a unique default branch name to avoid collisions (e.g. including authenticated user name and a unique suffix). Having user name on the branch name automatically, would make it easier to search for PRs later on in GitHub.
  4. The error message must guide the user on how to resolve the issue (e.g. rename branch, retry with a new branch).
  5. User can successfully save changes after the branch name conflict is handled.

Reproduce Steps

  1. Log in to Rules V3 (TinaCMS).
  2. Open an existing rule in the editor.
  3. Make a small change to the content.
  4. Click Save and choose to save in a new branch.
  5. Allow the system to use the default auto-generated branch name.
  6. If a branch with that name already exists, observe that the save fails with a generic "Branch operation failed" error.

Screenshot

Screenshot
Figure: Saving edits creates a new branch that fails because the default branch name already exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions