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:
2026-09-19 21:34:34 -04:00
parent 940f81e6ca
commit 8ac420fe61
83 changed files with 2574 additions and 1190 deletions
+12 -1
View File
@@ -1,7 +1,7 @@
import { describe, expect, it } from 'vitest';
import { inspectConfig, type ConfigLayer } from '../../src/lib/server/fleet/config-inspect.js';
import { composeServerCfg } from '../../src/lib/server/fleet/config-compose.js';
import { changeConfigValue, configWarnings } from '../../src/lib/config-workbench.js';
import { addConfigSetting, changeConfigValue, configWarnings } from '../../src/lib/config-workbench.js';
const base = (text: string): ConfigLayer => ({ text, source: { id: 1, name: 'Base', version: 2, kind: 'baseline' } });
const overlay = (id: number, text: string): ConfigLayer => ({ text, source: { id, name: `Overlay ${id}`, version: 3, kind: 'config' } });
@@ -63,6 +63,17 @@ describe('config source inspection', () => {
});
describe('config settings editor', () => {
it('adds a structured value without altering existing content or line endings', () => {
expect(addConfigSetting('// comment\r\nset x 1', 'sv_hostname', 'Cherry lobby')).toBe('// comment\r\nset x 1\r\nset sv_hostname "Cherry lobby"\r\n');
expect(addConfigSetting('', 'g_inactivity', '0')).toBe('set g_inactivity 0\n');
});
it('rejects duplicate keys, missing values, and multiline assignments', () => {
expect(() => addConfigSetting('set FOO 1', 'foo', '2')).toThrow('already exists');
expect(() => addConfigSetting('', 'bad key', '1')).toThrow('setting name');
expect(() => addConfigSetting('', 'key', '// no value')).toThrow('value');
expect(() => addConfigSetting('', 'key', '1\nset other 2')).toThrow('one line');
});
it('changes only the selected assignment, preserving CRLF, spacing and raw commands', () => {
const text = '// note\r\n set a "1" // original\r\nexec other.cfg\r\nset a 5\n';
expect(changeConfigValue(text, 1, '"2" // changed')).toBe('// note\r\n set a "2" // changed\r\nexec other.cfg\r\nset a 5\n');