Skip to content

Auto-create dev branch on first Edit; restrict modal to self-managed#9406

Closed
ericpgreen2 wants to merge 1 commit into
mainfrom
ericgreen/restrict-edit-branch-modal
Closed

Auto-create dev branch on first Edit; restrict modal to self-managed#9406
ericpgreen2 wants to merge 1 commit into
mainfrom
ericgreen/restrict-edit-branch-modal

Conversation

@ericpgreen2
Copy link
Copy Markdown
Contributor

  • For Rill-managed projects, EditBranchDialog never opens. With zero owned dev branches, the Edit button auto-creates one named after the email's local part and routes into the edit session. With one or more, it routes to the user's most-recently-updated owned branch.
  • For self-managed projects, the same zero-branch auto-create kicks in. With one or more, the existing modal opens (status quo).
  • Adds useOwnDevDeployments (TanStack combine) so EditButton and EditBranchDialog share one source of truth for the user's editable dev deployments.
  • Adds deriveDefaultBranchName(email) in branch-utils.ts — lowercased for cross-platform safety, periods replaced with hyphens, leading/trailing -./ trimmed.
  • Cross-user branch-name collisions (gRPC AlreadyExists) fall back to opening the dialog with the name pre-filled rather than silently appending a suffix.

Preemptive polish on cloud editing while it's still flagged behind cloudEditing.

Closes GEN-728.

Note: the "one dev branch per user on Rill-managed" rule is a UI convention, not a server constraint — rill project deployment create will still let a CLI user create multiple. The UI defensively picks the most-recently-updated owned branch when multiple exist; backend enforcement is intentionally out of scope here.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

For Rill-managed projects, never show `EditBranchDialog`: auto-create on
zero owned dev branches and route to the user's branch on one or more.
For self-managed, same auto-create on zero, existing modal otherwise.
@ericpgreen2 ericpgreen2 self-assigned this May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant