ui(api): regen types + drop perExchangeLingerSeconds from SPA

Follows backend removal of the field (Task 3.1). Typechecker confirms
zero remaining references. The ExchangeMatchForm linger-input is
visually removed in Task 4.4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-22 17:40:43 +02:00
parent 0f6bafae8e
commit 7677df33e5
6 changed files with 5 additions and 21 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2334,8 +2334,6 @@ export interface components {
threshold?: number; threshold?: number;
/** Format: int32 */ /** Format: int32 */
windowSeconds?: number; windowSeconds?: number;
/** Format: int32 */
perExchangeLingerSeconds?: number;
/** @enum {string} */ /** @enum {string} */
readonly kind?: "ROUTE_METRIC" | "EXCHANGE_MATCH" | "AGENT_STATE" | "AGENT_LIFECYCLE" | "DEPLOYMENT_STATE" | "LOG_PATTERN" | "JVM_METRIC"; readonly kind?: "ROUTE_METRIC" | "EXCHANGE_MATCH" | "AGENT_STATE" | "AGENT_LIFECYCLE" | "DEPLOYMENT_STATE" | "LOG_PATTERN" | "JVM_METRIC";
}); });
@@ -2636,6 +2634,7 @@ export interface components {
limit?: number; limit?: number;
sortField?: string; sortField?: string;
sortDir?: string; sortDir?: string;
afterExecutionId?: string;
environment?: string; environment?: string;
}; };
ExecutionSummary: { ExecutionSummary: {

View File

@@ -17,11 +17,10 @@ export function ConditionStep({ form, setForm }: { form: FormState; setForm: (f:
const prev = form.condition as Record<string, unknown>; const prev = form.condition as Record<string, unknown>;
const base: Record<string, unknown> = { kind, scope: prev.scope }; const base: Record<string, unknown> = { kind, scope: prev.scope };
// EXCHANGE_MATCH must carry a fireMode — the backend ctor now rejects null. // EXCHANGE_MATCH must carry a fireMode — the backend ctor now rejects null.
// Seed PER_EXCHANGE + 300s linger so a user can save without touching every // Seed PER_EXCHANGE so a user can save without touching every sub-field
// sub-field (matches what the form's Select displays by default). // (matches what the form's Select displays by default).
if (kind === 'EXCHANGE_MATCH') { if (kind === 'EXCHANGE_MATCH') {
base.fireMode = 'PER_EXCHANGE'; base.fireMode = 'PER_EXCHANGE';
base.perExchangeLingerSeconds = 300;
base.filter = {}; base.filter = {};
} }
if (kind === 'AGENT_LIFECYCLE') { if (kind === 'AGENT_LIFECYCLE') {

View File

@@ -34,15 +34,6 @@ export function ExchangeMatchForm({ form, setForm }: { form: FormState; setForm:
options={STATUSES} options={STATUSES}
/> />
</FormField> </FormField>
{c.fireMode === 'PER_EXCHANGE' && (
<FormField label="Linger seconds (default 300)">
<Input
type="number"
value={(c.perExchangeLingerSeconds as number | undefined) ?? 300}
onChange={(e) => patch({ perExchangeLingerSeconds: Number(e.target.value) })}
/>
</FormField>
)}
{c.fireMode === 'COUNT_IN_WINDOW' && ( {c.fireMode === 'COUNT_IN_WINDOW' && (
<> <>
<FormField label="Threshold (matches)"> <FormField label="Threshold (matches)">

View File

@@ -69,14 +69,13 @@ describe('validateStep', () => {
expect(errs.some((e) => /Window/.test(e))).toBe(true); expect(errs.some((e) => /Window/.test(e))).toBe(true);
}); });
it('passes when EXCHANGE_MATCH PER_EXCHANGE has linger seconds', () => { it('passes when EXCHANGE_MATCH PER_EXCHANGE has a fire mode', () => {
const f = initialForm(); const f = initialForm();
f.conditionKind = 'EXCHANGE_MATCH'; f.conditionKind = 'EXCHANGE_MATCH';
f.condition = { f.condition = {
kind: 'EXCHANGE_MATCH', kind: 'EXCHANGE_MATCH',
scope: {}, scope: {},
fireMode: 'PER_EXCHANGE', fireMode: 'PER_EXCHANGE',
perExchangeLingerSeconds: 300,
} as unknown as typeof f.condition; } as unknown as typeof f.condition;
expect(validateStep('condition', f)).toEqual([]); expect(validateStep('condition', f)).toEqual([]);
}); });

View File

@@ -151,10 +151,6 @@ export function validateStep(step: WizardStep, f: FormState): string[] {
const c = f.condition as Record<string, unknown>; const c = f.condition as Record<string, unknown>;
if (!c.fireMode) { if (!c.fireMode) {
errs.push('Fire mode is required.'); errs.push('Fire mode is required.');
} else if (c.fireMode === 'PER_EXCHANGE') {
if (c.perExchangeLingerSeconds == null) {
errs.push('Linger seconds is required for PER_EXCHANGE.');
}
} else if (c.fireMode === 'COUNT_IN_WINDOW') { } else if (c.fireMode === 'COUNT_IN_WINDOW') {
if (c.threshold == null) errs.push('Threshold is required for COUNT_IN_WINDOW.'); if (c.threshold == null) errs.push('Threshold is required for COUNT_IN_WINDOW.');
if (c.windowSeconds == null) errs.push('Window (seconds) is required for COUNT_IN_WINDOW.'); if (c.windowSeconds == null) errs.push('Window (seconds) is required for COUNT_IN_WINDOW.');