File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -208,8 +208,10 @@ function validateConfig(config: AutohandConfig, configPath: string): void {
208208 if ( config . ui . theme && typeof config . ui . theme !== 'string' ) {
209209 throw new Error ( `ui.theme must be a string in ${ configPath } ` ) ;
210210 }
211- if ( config . ui . theme && ! themeExists ( config . ui . theme ) ) {
212- throw new Error ( `ui.theme '${ config . ui . theme } ' not found. Use 'dark', 'light', or a custom theme in ~/.autohand/themes/` ) ;
211+ // Theme validation is lenient — unknown themes fall back to dark at init time.
212+ // This avoids crashes when a Ghostty or custom theme was saved but is no longer available.
213+ if ( config . ui . theme && typeof config . ui . theme === 'string' && ! themeExists ( config . ui . theme ) ) {
214+ console . warn ( `Theme '${ config . ui . theme } ' not found — falling back to default.` ) ;
213215 }
214216 if ( config . ui . autoConfirm !== undefined && typeof config . ui . autoConfirm !== 'boolean' ) {
215217 throw new Error ( `ui.autoConfirm must be boolean in ${ configPath } ` ) ;
You can’t perform that action at this time.
0 commit comments