Improve operational UX, recovery flows, and action safety
Implement the approved UX review across Fleet, Betas, Library, deployments, and Settings. Add reviewed promotion and reconciliation plans, atomic queued-removal cancellation, recoverable beta drafts and launch inputs, accessible controls, and mobile improvements. Validated with 473 tests, a clean typecheck, production build, and isolated desktop/mobile browser walkthroughs. Include the review and implementation coverage notes.
This commit is contained in:
@@ -45,6 +45,17 @@ export function changeConfigValue(text: string, index: number, value: string): s
|
||||
return parts.join('');
|
||||
}
|
||||
|
||||
/** Add one assignment without changing existing commands or line endings. */
|
||||
export function addConfigSetting(text: string, key: string, value: string): string {
|
||||
key = key.trim(); value = value.trim();
|
||||
if (!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key)) throw new Error('Use a setting name containing letters, numbers, and underscores.');
|
||||
if (!value || /[\r\n]/.test(value) || value.startsWith('//')) throw new Error('Enter a value on one line.');
|
||||
if (configLines(text).some(entry => entry.key.toLowerCase() === key.toLowerCase())) throw new Error('This setting already exists. Find it above to edit its value.');
|
||||
const newline = text.includes('\r\n') ? '\r\n' : '\n';
|
||||
const formatted = /\s/.test(value) && !value.startsWith('"') ? JSON.stringify(value) : value;
|
||||
return text + (text && !text.endsWith('\n') ? newline : '') + `set ${key} ${formatted}` + newline;
|
||||
}
|
||||
|
||||
export function configWarnings(text: string, overlay: boolean): string[] {
|
||||
const warnings: string[] = [];
|
||||
const seen = new Map<string, number>();
|
||||
|
||||
Reference in New Issue
Block a user