Fix orphaned features when deleting worktrees (#820)

* Changes from fix/orphaned-features

* fix: Handle feature migration failures and improve UI accessibility

* feat: Add event emission for worktree deletion and feature migration

* fix: Handle OpenCode model errors and prevent duplicate model IDs

* feat: Add summary dialog and async verify with loading state

* fix: Add type attributes to buttons and improve OpenCode model selection

* fix: Add null checks for onVerify callback and opencode model selection
This commit is contained in:
gsxdsm
2026-02-28 15:42:10 -08:00
parent 1680d9307b
commit 2d5f76a336
29 changed files with 838 additions and 85 deletions

View File

@@ -133,6 +133,7 @@ export function BoardView() {
getPrimaryWorktreeBranch,
setPipelineConfig,
featureTemplates,
defaultSortNewestCardOnTop,
} = useAppStore(
useShallow((state) => ({
currentProject: state.currentProject,
@@ -152,6 +153,7 @@ export function BoardView() {
getPrimaryWorktreeBranch: state.getPrimaryWorktreeBranch,
setPipelineConfig: state.setPipelineConfig,
featureTemplates: state.featureTemplates,
defaultSortNewestCardOnTop: state.defaultSortNewestCardOnTop,
}))
);
// Also get keyboard shortcuts for the add feature shortcut
@@ -1458,6 +1460,11 @@ export function BoardView() {
]
);
// Use background hook for visual settings (background image, opacity, etc.)
const { backgroundSettings, backgroundImageStyle } = useBoardBackground({
currentProject,
});
// Use column features hook
const { getColumnFeatures, completedFeatures } = useBoardColumnFeatures({
features: hookFeatures,
@@ -1467,6 +1474,7 @@ export function BoardView() {
currentWorktreePath,
currentWorktreeBranch,
projectPath: currentProject?.path || null,
sortNewestCardOnTop: defaultSortNewestCardOnTop,
});
// Build columnFeaturesMap for ListView
@@ -1480,11 +1488,6 @@ export function BoardView() {
return map;
}, [pipelineConfig, getColumnFeatures]);
// Use background hook
const { backgroundSettings, backgroundImageStyle } = useBoardBackground({
currentProject,
});
// Find feature for pending plan approval
const pendingApprovalFeature = useMemo(() => {
if (!pendingPlanApproval) return null;
@@ -1802,6 +1805,7 @@ export function BoardView() {
handleViewOutput(feature);
}
}}
sortNewestCardOnTop={defaultSortNewestCardOnTop}
className="transition-opacity duration-200"
/>
) : (