-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
improvementImprovements to existing featuresImprovements to existing featuresrefactorRefactoring codeRefactoring code
Description
Validate settings and auto-recover.
type ValidationRule = {
id: string;
name: string;
severity: "error" | "warning" | "info";
validate: (config: ConfigData) => ValidationIssue[];
fix?: (config: ConfigData) => ConfigData;
};
const validationRules: ValidationRule[] = [
{
id: "unique-button-names",
name: "Unique Button Names",
severity: "error",
validate: (config) => {
/* ... */
},
fix: (config) => {
/* Auto-rename duplicates */
},
},
{
id: "command-security",
name: "Command Security Check",
severity: "warning",
validate: (config) => {
/* Detect dangerous patterns */
},
},
];
Reason: Data Integrity
Current: Runtime error when incorrect settings are entered
Improvement: Validation before saving → Auto-recovery or clear error
- Easier to trace the cause of bugs
- Prevents user data corruption
Metadata
Metadata
Assignees
Labels
improvementImprovements to existing featuresImprovements to existing featuresrefactorRefactoring codeRefactoring code
Projects
Status
Backlog