Skip to content

fix: remove hardcoded productName in workspace commands#588

Open
yk2012 wants to merge 2 commits intomasterfrom
fix/workspace-hardcoded-productname
Open

fix: remove hardcoded productName in workspace commands#588
yk2012 wants to merge 2 commits intomasterfrom
fix/workspace-hardcoded-productname

Conversation

@yk2012
Copy link
Contributor

@yk2012 yk2012 commented Dec 29, 2025

  • Add productName parameter to worktree utility functions (listWorktrees, createWorktree, deleteWorktree, generateWorkspaceName, addToGitExclude, getWorktreeFromPath, mergeWorktree)
  • Update workspace commands (create, list, delete, complete) to pass productName from context
  • Update nodeBridge handlers to pass context.productName to worktree functions
  • Fix hardcoded '.neovate-workspaces' to use dynamic '.{productName}-workspaces'
  • Fix hardcoded error messages to use context.productName instead of 'neo'
  • Update WorkspaceList component to accept and use productName prop

This ensures workspace functionality works correctly regardless of the productName value (e.g., 'neo', 'neovate', or any other name).

- Add productName parameter to worktree utility functions (listWorktrees, createWorktree, deleteWorktree, generateWorkspaceName, addToGitExclude, getWorktreeFromPath, mergeWorktree)
- Update workspace commands (create, list, delete, complete) to pass productName from context
- Update nodeBridge handlers to pass context.productName to worktree functions
- Fix hardcoded '.neovate-workspaces' to use dynamic '.{productName}-workspaces'
- Fix hardcoded error messages to use context.productName instead of 'neo'
- Update WorkspaceList component to accept and use productName prop

This ensures workspace functionality works correctly regardless of the productName value (e.g., 'neo', 'neovate', or any other name).
@augmentcode
Copy link

augmentcode bot commented Dec 29, 2025

🤖 Augment PR Summary

Summary: This PR removes hardcoded workspace/product identifiers so workspace commands work with any configured productName.

Changes:

  • Plumbs productName through worktree utilities (list/create/delete/merge, name generation, git exclude, and path detection).
  • Updates CLI workspace commands (create/list/delete/complete) to pass context.productName into worktree helpers.
  • Updates NodeBridge workspace handlers to forward context.productName to the same worktree helpers.
  • Replaces hardcoded .neovate-workspaces usage with .{productName}-workspaces paths.
  • Improves user-facing messaging to avoid hardcoded neo in several places.

Technical Notes: Worktree discovery now filters Git worktrees by a product-specific workspace directory name, so consistent normalization of productName matters across entrypoints.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

src/worktree.ts Outdated
if (!worktree) {
throw new Error(
`Workspace '${name}' not found. Use 'neo workspace list' to see active workspaces.`,
`Workspace '${name}' not found. Use workspace list to see active workspaces.`,
Copy link

Choose a reason for hiding this comment

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

deleteWorktree now throws Use workspace list... without including the CLI prefix, which can make the guidance ambiguous when multiple products/CLIs exist. Since productName is already a parameter, consider including it in this user-facing message for consistency with the other errors.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

export function WorkspaceList({
worktrees,
verbose,
productName = 'neo',
Copy link

Choose a reason for hiding this comment

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

WorkspaceSuccessMessage still prints neo workspace complete in its “Next steps” output, so users running a different productName will see incorrect instructions. Consider plumbing productName into that message as well to fully remove hardcoding.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

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.

2 participants