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
committed by GitHub
parent 1c0e460dd1
commit 63b0a4fb38
29 changed files with 838 additions and 85 deletions

View File

@@ -92,6 +92,8 @@ export type EventType =
| 'switch:pop'
| 'switch:done'
| 'switch:error'
| 'notification:created';
| 'notification:created'
| 'worktree:deleted'
| 'feature:migrated';
export type EventCallback = (type: EventType, payload: unknown) => void;

View File

@@ -104,6 +104,7 @@ export interface Feature {
planSpec?: PlanSpec;
error?: string;
summary?: string;
createdAt?: string; // ISO timestamp when feature was created
startedAt?: string;
descriptionHistory?: DescriptionHistoryEntry[]; // History of description changes
[key: string]: unknown; // Keep catch-all for extensibility

View File

@@ -1198,6 +1198,10 @@ export interface GlobalSettings {
/** Disable the splash screen overlay on app startup */
disableSplashScreen: boolean;
// Board Card Sorting
/** Default: sort latest card on top in board columns and list view. Per-project setting overrides this. Default: false */
defaultSortNewestCardOnTop?: boolean;
// Server Logging Preferences
/** Log level for the API server (error, warn, info, debug). Default: info */
serverLogLevel?: ServerLogLevel;
@@ -1253,6 +1257,8 @@ export interface GlobalSettings {
opencodeDefaultModel?: OpencodeModelId;
/** Which dynamic OpenCode models are enabled (empty = all discovered) */
enabledDynamicModelIds?: string[];
/** All dynamic model IDs ever seen - used to distinguish new models from explicitly deselected ones */
knownDynamicModelIds?: string[];
// Gemini CLI Settings (global)
/** Which Gemini models are available in feature modal (empty = all) */
@@ -1765,6 +1771,7 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
defaultFeatureModel: { model: 'claude-opus', thinkingLevel: 'adaptive' }, // Use canonical ID with adaptive thinking
muteDoneSound: false,
disableSplashScreen: false,
defaultSortNewestCardOnTop: false,
serverLogLevel: 'info',
enableRequestLogging: true,
showQueryDevtools: true,
@@ -1780,6 +1787,7 @@ export const DEFAULT_GLOBAL_SETTINGS: GlobalSettings = {
enabledOpencodeModels: getAllOpencodeModelIds(), // Returns prefixed IDs
opencodeDefaultModel: DEFAULT_OPENCODE_MODEL, // Already prefixed
enabledDynamicModelIds: [],
knownDynamicModelIds: [],
enabledGeminiModels: getAllGeminiModelIds(), // Returns prefixed IDs
geminiDefaultModel: DEFAULT_GEMINI_MODEL, // Already prefixed
enabledCopilotModels: getAllCopilotModelIds(), // Returns prefixed IDs