WIP: sending method as an explicit choice, kept in payload-kv (superseded: the choice moves to a stored field)

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 22:30:03 +01:00
co-authored by Claude Fable 5.2
parent 68a2555277
commit c6841a1674
34 changed files with 740 additions and 96 deletions
+2 -1
View File
@@ -313,7 +313,8 @@ describe('switched off, and what did not change', () => {
const endpoints = (config: SanitizedConfig) => (config.endpoints ?? []).map((e) => `${e.method} ${e.path}`)
const stored = (fields: Field[]): string[] =>
fields.flatMap((f) => {
if (f.type === 'ui') {return []}
// (a virtual field has no column and no stored value: "Sending method", whose choice is in the key-value store)
if (f.type === 'ui' || ('virtual' in f && f.virtual)) {return []}
if (f.type === 'tabs') {return f.tabs.flatMap((t) => stored(t.fields))}
const own = 'name' in f && f.name ? [`${f.name}:${f.type}${f.type === 'select' ? `(${(f.options as { value: string }[]).map((o) => (typeof o === 'string' ? o : o.value)).join('|')})` : ''}`] : []
return 'fields' in f && Array.isArray(f.fields) ? [...own, ...stored(f.fields).map((n) => ('name' in f && f.name ? `${f.name}.${n}` : n))] : own