Add forge pipeline polish, simple forge UX, and fleet management upgrades.
Fusion copies prep icon and version info via go-winres; optional Garble obfuscation, Authenticode signing, and dry-run size estimates. Forge Simple mode with smart defaults; fleet roster gets compact expandable cards, filters, bulk commands, per-agent notes/tags, and typed WebSocket payloads.
This commit is contained in:
26
server/web/src/help/forgeSmartDefaults.test.ts
Normal file
26
server/web/src/help/forgeSmartDefaults.test.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { pickBestServerUrl, suggestWorkerName, applySmartForgeDefaults } from './forgeSmartDefaults';
|
||||
import type { BuildRequest } from '../types';
|
||||
|
||||
describe('forgeSmartDefaults', () => {
|
||||
it('suggests next worker-N name', () => {
|
||||
expect(suggestWorkerName([{ worker_name: 'worker-1' } as any])).toBe('worker-2');
|
||||
});
|
||||
|
||||
it('picks LAN url over localhost', () => {
|
||||
expect(
|
||||
pickBestServerUrl('http://localhost:8989', ['http://192.168.1.5:8989'])
|
||||
).toBe('http://192.168.1.5:8989');
|
||||
});
|
||||
|
||||
it('fills worker and process name', () => {
|
||||
const form = applySmartForgeDefaults(
|
||||
{ worker_name: '', server_url: '' } as BuildRequest,
|
||||
{ endpointCandidates: ['http://10.0.0.2:8989'] }
|
||||
);
|
||||
expect(form.worker_name).toMatch(/^worker-/);
|
||||
expect(form.process_name).toBeTruthy();
|
||||
expect(form.server_url).toBe('http://10.0.0.2:8989');
|
||||
expect(form.mining_mode).toBe('idle');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user