Move branch-name AI config into Git AI Author Advanced; surface rename failures#4725
Open
brennanb2025 wants to merge 6 commits into
Open
Move branch-name AI config into Git AI Author Advanced; surface rename failures#4725brennanb2025 wants to merge 6 commits into
brennanb2025 wants to merge 6 commits into
Conversation
…e failures Relocate the branch-name model picker and prompt editor out of the Auto-Name From First Message row's Advanced collapsible and into the Git AI Author customization section as a "Branch Names" group, alongside Commit Messages and Pull Requests. Rename that section to "Advanced". The Auto-Name row in Git settings is now just the on/off toggle. Add a "rename failed" worktree badge: when the auto-rename generation step fails (no agent configured, env prep failed, or generation failed), persist the error on worktree meta and show a red AlertCircle badge with the error in its tooltip, instead of a perpetual "rename pending". Co-authored-by: Orca <help@stably.ai>
A transient branch-name generation failure raises the rename-failed badge, but the worktree isn't settled, so a later event re-probes. If that event reached a benign terminal state (user pushed the branch, renamed it, or it became ineligible) the badge stuck forever. Clear it on those benign stops, skip raising it on user-canceled generation, and make the main-process setRenameError clear idempotent so benign skips don't churn the renderer. Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Contributor
There was a problem hiding this comment.
Reviewed changes — moves branch-name model/prompt controls into the Git AI Author → Advanced section alongside commit and PR controls, and adds a "rename failed" badge when auto-branch-name generation fails.
- Relocate branch-name AI config — the branch-name model picker and prompt editor move from a hidden collapsible inside Auto-Name From First Message into a new Branch Names group in
CommitMessageAiPane's Advanced section, reusing the same per-operation model + thinking-effort + prompt controls.AutoRenameBranchFromWorkSettingis now just an on/off toggle with a pointer to where the tuning lives. - Remove dead branch-prompt plumbing —
GitPaneandSettingsdrop thehasUnsavedBranchPromptChangesstate,onBranchPromptDirtyChange,branchPromptDiscardSignal, andwriteSourceControlAiSettingsprops. Branch-prompt dirty state folds into the commit pane's existing unsaved-changes signal. - Surface rename failures in WorktreeCard — a new
firstAgentMessageRenameErrorfield onWorktree/WorktreeMetais set on real generation failures (no agent configured, env prep failed, generation failed — but not user-canceled) and cleared on success, manual rename, or when a worktree that earlier hit a transient failure later settles benignly.WorktreeCardrenders a redAlertCircle"rename failed" badge with the error in its tooltip, taking priority over "rename pending." - Update settings search — branch-name model/prompt search entries move from
auto-rename-branch-searchintocommit-message-ai-search, and the "Commit and PR customization" search entry is renamed to "Advanced" with expanded keywords.
✅ No new issues found.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
The auto-name on/off toggle lived in the Git settings list, separated from Git AI Author even though it functionally depends on it — the rename hook runs through the same agent and bails with "Enable Git AI Author..." when that feature is off. Co-locate the toggle as a top-level row in the Git AI Author pane (gated on it being enabled), above the Advanced group where its model/prompt tuning already lives. Deletes the now-orphaned AutoRenameBranchFromWorkSetting component and moves its search identity entry from the Git pane's search set into the Git AI Author pane's, so an auto-name search surfaces the Enable row when the feature is off. Co-authored-by: Orca <help@stably.ai>
Contributor
There was a problem hiding this comment.
Reviewed changes — moves the auto-name toggle from AutoRenameBranchFromWorkSetting into an inline SearchableSetting in CommitMessageAiPane, deletes the now-orphaned component, and removes the branch-prompt dirty-state plumbing from GitPane and Settings.
- Delete
AutoRenameBranchFromWorkSetting— the entire component (~419 SLOC) is removed. Its model/prompt controls were already rehomed under Advanced → Branch Names in prior commits; its toggle is now inlined inCommitMessageAiPane. - Add inline auto-name toggle to
CommitMessageAiPane— rendered as a top-level row directly above Advanced when Git AI Author is enabled. The copy points to Advanced → Branch Names for tuning. Hidden when Git AI Author is off; searching for "auto-name" surfaces the Enable row instead. - Remove branch-prompt plumbing from
GitPaneandSettings—hasUnsavedBranchPromptChanges,onBranchPromptDirtyChange,branchPromptDiscardSignal,writeSourceControlAiSettings, andshouldShowAutoRenameBranchSettingare all removed.CommitMessageAiPanenow owns all prompt dirty-state tracking. - Consolidate search entries —
AUTO_RENAME_BRANCH_PARENT_SEARCH_ENTRYis imported bycommit-message-ai-search.ts.AUTO_RENAME_BRANCH_ADVANCED_SEARCH_ENTRIESandAUTO_RENAME_BRANCH_SEARCH_ENTRIESremoved fromauto-rename-branch-search.ts. Renamed "Commit and PR customization" → "Advanced" in both search entries and UI labels.
✅ No new issues found.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
The Branch Names prompt editor used space-y-2 without py-2, so it hugged the group's divide-y divider unlike the model row above it and the commit/PR prompt editors. Add py-2 to match. Co-authored-by: Orca <help@stably.ai>
The commit and PR prompt editors in the Git AI Author Advanced groups label theirs just "Prompt"; the branch-name editor said "Branch name prompt". Use "Prompt" too since the group heading already says Branch Names. Co-authored-by: Orca <help@stably.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Two related improvements to the auto branch-rename feature and its settings, motivated by a workspace getting stuck on a perpetual "rename pending" badge after the branch-name generation agent (codex) failed silently.
1. Auto-name settings consolidated under Git AI Author
The per-branch-name model picker and prompt editor were buried in the Advanced collapsible of the "Auto-Name From First Message" row in Git settings — hard to discover, and disconnected from the equivalent commit/PR controls. The on/off toggle also sat in the Git settings list, separate from Git AI Author even though auto-name functionally requires it (the rename hook runs through the same agent and bails with "Enable Git AI Author…" when it's off).
AutoRenameBranchFromWorkSettingcomponent and moved its settings-search identity into the Git AI Author pane's search set (so an auto-name search surfaces the Enable row when the feature is off). Removed the now-dead branch-prompt dirty-state plumbing fromGitPane/Settings(it folds into the commit pane's existing unsaved-changes signal).2. "rename failed" badge
Today, when auto-rename fails, nothing surfaces — the worktree just shows "rename pending" forever.
firstAgentMessageRenameErrorfield on worktree meta, set by the auto-rename hook only on real generation failures (no agent configured / env prep failed / generation failed). Benign skips (branch already pushed, not a creature name, etc.) are unaffected.WorktreeCardshows a redAlertCircle"rename failed" badge with the error message in its tooltip when the field is set, otherwise the existing "rename pending" badge.Testing
pnpm typecheck:web✓pnpm typecheck:node✓first-work-branch-rename,CommitMessageAiPane,GitPane,worktreesstore): all greenGitPane.Review & validation
no distinct unique branch name) that didn't clear — also fixed. Both reviewers returned clean in the final round. Also added an idempotent guard to the main-processsetRenameErrorso benign skips that clear a never-set error don't churn the renderer.pnpm typecheckandpnpm lintclean.Notes
Made with Orca 🐋