Skip to content

Add refresh and quick add commands with menu integration#1

Open
devTarik wants to merge 1 commit intogittower:mainfrom
devTarik:feature/refresh-and-add-buttons
Open

Add refresh and quick add commands with menu integration#1
devTarik wants to merge 1 commit intogittower:mainfrom
devTarik:feature/refresh-and-add-buttons

Conversation

@devTarik
Copy link

@devTarik devTarik commented Jan 26, 2026

Description

Added two new commands to improve UX when working with git-flow branches:

New Features:

Refresh Overview

  • Refresh button in the view header
  • Updates the branch tree and context variables

Add Branch

  • Quick add button in the view header
  • QuickPick menu to select branch type: Feature, Release, Hotfix, Support, Bugfix
  • Automatically calls the corresponding start command

Context Menu (right-click) on branches

  • Available operations for each branch: Finish, Delete, Rename, Update
  • Operations organized in logical groups

Details:

  • ✅ Both buttons are shown only when Git Flow is initialized and installed
  • ✅ Buttons are located in the view header (view/title)
  • ✅ Context menu supports all 5 branch types
  • ✅ Backward compatible with existing functionality
Example

@devTarik
Copy link
Author

@andrei-git-tower please do a PR review

@emmanuelprecieuxargent
Copy link

Is this brand new project already stalled ?

@emmanuelprecieuxargent
Copy link

@andrei-git-tower please do a PR review

Hi, it looks like this brand new project already stalled

@andrei-git-tower
Copy link
Collaborator

Hey @emmanuelprecieuxargent and @devTarik

Apologize for the late reply here, most of our focus was on the main repo. We'll look at this PR and review it in the upcoming week.

Thank you!

Copy link
Collaborator

@FilleTP FilleTP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devTarik Nice additions overall - thanks for contributing, the context menus and quick add flow are a good UX improvement. Just a few things to clean up before merging.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file looks like a working/process document from your development workflow, it doesn't need to be included in the PR.

await updateContextVariables();
treeDataProvider.refresh();
} catch (error) {
// Silently fail if there's an error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a user-initiated action, it'd be good to surface any errors rather than silently swallowing them. The existing pattern in the extension is vscode.window.showErrorMessage(...), something like vscode.window.showErrorMessage(Failed to refresh: ${error}) would keep it consistent.


await updateContextVariables();
} catch (error) {
// Silently fail if there's an error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, we should surface any errors to the user.

// Register refresh command early so header button works immediately
const refreshCommand = vscode.commands.registerCommand('git-flow-next.refresh', async () => {
try {
console.log('git-flow-next.refresh invoked');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug log should be removed before merging

}
});
context.subscriptions.push(refreshCommand);
console.log('git-flow-next.refresh registered');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The debug log should be removed before merging

"typescript": "^4.9.4"
}
}
} No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor thing here to fix: newline missing

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.

4 participants