refactor: update graph view actions to include onViewDetails and remove onViewBranch

- Added onViewDetails callback to handle feature detail viewing.
- Removed onViewBranch functionality and associated UI elements for a cleaner interface.
This commit is contained in:
James
2025-12-22 19:18:52 -05:00
parent 4dd00a98e4
commit cc0405cf27
4 changed files with 14 additions and 29 deletions

View File

@@ -14,10 +14,10 @@ export interface TaskNodeData extends Feature {
isDimmed?: boolean;
// Action callbacks
onViewLogs?: () => void;
onViewDetails?: () => void;
onStartTask?: () => void;
onStopTask?: () => void;
onResumeTask?: () => void;
onViewBranch?: () => void;
}
export type TaskNode = Node<TaskNodeData, 'task'>;
@@ -30,10 +30,10 @@ export type DependencyEdge = Edge<{
export interface NodeActionCallbacks {
onViewLogs?: (featureId: string) => void;
onViewDetails?: (featureId: string) => void;
onStartTask?: (featureId: string) => void;
onStopTask?: (featureId: string) => void;
onResumeTask?: (featureId: string) => void;
onViewBranch?: (featureId: string) => void;
}
interface UseGraphNodesProps {
@@ -94,6 +94,9 @@ export function useGraphNodes({
onViewLogs: actionCallbacks?.onViewLogs
? () => actionCallbacks.onViewLogs!(feature.id)
: undefined,
onViewDetails: actionCallbacks?.onViewDetails
? () => actionCallbacks.onViewDetails!(feature.id)
: undefined,
onStartTask: actionCallbacks?.onStartTask
? () => actionCallbacks.onStartTask!(feature.id)
: undefined,
@@ -103,9 +106,6 @@ export function useGraphNodes({
onResumeTask: actionCallbacks?.onResumeTask
? () => actionCallbacks.onResumeTask!(feature.id)
: undefined,
onViewBranch: actionCallbacks?.onViewBranch
? () => actionCallbacks.onViewBranch!(feature.id)
: undefined,
},
};