mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 08:53:36 +00:00
refactor: sanitize featureId for worktree paths across multiple handlers
- Updated createDiffsHandler, createFileDiffHandler, createInfoHandler, createStatusHandler, and auto-mode service to sanitize featureId when constructing worktree paths. - Ensured consistent handling of featureId to prevent issues with invalid characters in branch names. - Added branchName support in UI components to enhance feature visibility and management. This change improves the robustness of worktree operations and enhances user experience by ensuring valid paths are used throughout the application.
This commit is contained in:
@@ -28,6 +28,8 @@ interface AgentOutputModalProps {
|
||||
onNumberKeyPress?: (key: string) => void;
|
||||
/** Project path - if not provided, falls back to window.__currentProject for backward compatibility */
|
||||
projectPath?: string;
|
||||
/** Branch name for the feature worktree - used when viewing changes */
|
||||
branchName?: string;
|
||||
}
|
||||
|
||||
type ViewMode = 'summary' | 'parsed' | 'raw' | 'changes';
|
||||
@@ -40,6 +42,7 @@ export function AgentOutputModal({
|
||||
featureStatus,
|
||||
onNumberKeyPress,
|
||||
projectPath: projectPathProp,
|
||||
branchName,
|
||||
}: AgentOutputModalProps) {
|
||||
const isBacklogPlan = featureId.startsWith('backlog-plan:');
|
||||
const [output, setOutput] = useState<string>('');
|
||||
@@ -433,7 +436,7 @@ export function AgentOutputModal({
|
||||
{projectPath ? (
|
||||
<GitDiffPanel
|
||||
projectPath={projectPath}
|
||||
featureId={featureId}
|
||||
featureId={branchName || featureId}
|
||||
compact={false}
|
||||
useWorktrees={useWorktrees}
|
||||
className="border-0 rounded-lg"
|
||||
|
||||
Reference in New Issue
Block a user