Docs: SelectElement.optionsRoute (dynamic select options from a plugin route, incl. in repeaters) is undocumented on the docs site and in skills/
Description
Docs-only. SelectElement.optionsRoute — a Block Kit select that populates its options from a plugin route, including inside a repeater — has shipped since 0.37.0 and is used in-tree (packages/plugins/forms/src/index.ts, optionsRoute: "forms/list"), but it is documented nowhere an integrator or an agent would look:
- The docs site: no page mentions it.
plugins/creating-plugins/block-kitdocumentsselectonly with a staticoptionsarray. skills/creating-plugins/references/block-kit.md: same, static options only.- No release note for it.
The only description is the one-line doc comment on the type in packages/blocks/src/types.ts:
export interface SelectElement {
type: "select";
action_id: string;
label: string;
options: Array<{ label: string; value: string }>;
initial_value?: string;
/** Plugin route that returns `{ items: Array<{ id, name }> }` to populate options dynamically */
optionsRoute?: string;
}The silence is not neutral: a reader of the docs concludes a select's options are static. In our project that conclusion was written into a build spec ("a dynamic picker is not buildable"), and the mechanism was only found by reading the admin bundle by hand.
Expected: the Block Kit page and the skills/ reference document optionsRoute — the route path is relative to the plugin (/_emdash/api/plugins/<pluginId>/<optionsRoute>), the request is a POST carrying X-EmDash-Request: 1, the response shape is { items: [{ id, name }] } mapped to { value: id, label: name }, static options is the fallback while the route has not answered, and it works as a repeater sub-field. Verified against @emdash-cms/admin 0.37.0/0.38.0 (BlockKitRepeater → BlockKitField → DynamicSelect) and a running dev server.
Steps to reproduce
- Search docs.emdashcms.com (or the site's sitemap) for
optionsRoute: no page. - Open
plugins/creating-plugins/block-kitandskills/creating-plugins/references/block-kit.md:selectis documented with a staticoptionsarray only. - Open
packages/blocks/src/types.tsandpackages/plugins/forms/src/index.ts: the field exists and is used. - In a plugin, declare
{ type: "select", action_id: "card", label: "Card", options: [], optionsRoute: "cards/list" }with a route returning{ items: [{ id, name }] }: the admin populates the dropdown, including inside arepeater.
Environment
- emdash version: 0.38.0 (behaviour present since 0.37.0;
packages/blocks/src/types.tsonmainat filing time) - Node.js version: v24.16.0
- Runtime: Cloudflare Workers (astro dev locally)
- OS: macOS
Screenshots
Not applicable.
Logs / error output
# not applicable — documentation gap, no errorSource: emdash-cms/emdash