Skip to content

feat(admin-form): lists the admin grows, and multi-selects whose order matters - #2

Open
grtn91 wants to merge 2 commits into
grtn91/request-router-requester-optionsfrom
grtn91/storage-groups
Open

grtn91 wants to merge 2 commits into
grtn91/request-router-requester-optionsfrom
grtn91/storage-groups

Conversation

@grtn91

@grtn91 grtn91 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Stacked on the requester options PR.

Problem

An admin form is a fixed set of fields. A plugin whose settings are a list, such as several named groups of folders, has to show every entry it could hold as its own section.

No issue exists for this contract change yet; CONTRIBUTING asks for one before it goes upstream.

Approach

Two fields on AdminFormSection, and one on AdminFormField:

  • add_group: sections with the same value are the slots of one list.
  • add_label: the text of the button that reveals the next slot. Required with add_group.
  • AdminFormField.ordered: the order of a multi-select's values matters. A host shows the chosen values as a list the admin can put in order. Only valid on a multi-select.

A host shows the first slot, every slot up to the last one that holds a value other than its fields' defaults, and the button while a slot is left. The admin can also remove a slot and reorder slots: two slots trade the values of their fields at the same position in field_keys, so every slot of a list declares the same fields in the same order.

The slots' fields stay ordinary config keys. What a plugin reads does not change, and the list is as long as the sections the plugin declares.

Validation

  • go test ./... and go vet: pass.

Risks

  • Hosts that predate the fields drop them, show every slot as a section and show an ordered multi-select as plain toggles, so the form still works. A Silo host that predates them refuses a bare plugin binary that declares them. Both are described in docs/compatibility.md.
  • A real variable-length list (array values) would be a larger contract change; this one keeps config flat on purpose.

Related PRs

Based on #1. Same feature in the other repos:

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code
  • Model(s): claude-fable-5-2
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

An admin form is a fixed set of fields, so a plugin whose settings are a
list, such as several named groups of folders, had to show every entry
it could ever hold as its own section.

AdminFormSection.add_group marks a section as one slot of a list, and
add_label is the text of the button that reveals the next slot. A host
shows the first slot, every slot up to the last one that holds a value
other than its fields' defaults, and the button while a slot is left.
The admin can also change the order of the slots: two slots trade the
values of their fields at the same position in field_keys, so every
slot of a list declares the same fields in the same order.

The slots' fields stay ordinary config keys, so what a plugin reads does
not change, and the list is as long as the sections it declares.
Manifest validation requires add_label with add_group. Hosts that
predate the fields drop them and show every slot as a section.

AI disclosure: written with Claude Fable 5.2 in Claude Code. go test ./... and
go vet pass locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… matters

A multi-select stores its values in the order they were chosen, and a
host shows the options as a set of toggles. A plugin that reads the
values as a sequence, such as folders to fill one after another, gave
the admin no way to see or change that order.

AdminFormField.ordered marks such a multi-select. A host shows the
chosen values as a list the admin can put in order and stores them in
that order. Manifest validation allows the flag on a multi-select only.
The stored value is the same list either way, and hosts that predate
the flag drop it and show the multi-select as before.

The comment on AdminFormSection.add_group also says that a host lets
the admin remove a slot of a list.

AI disclosure: written with Claude Fable 5.2 in Claude Code. go test ./... and
go vet pass locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@grtn91 grtn91 changed the title feat(admin-form): let sections be the slots of a list the admin grows feat(admin-form): lists the admin grows, and multi-selects whose order matters Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant