#3156·emdash

Docs: SelectElement.optionsRoute (dynamic select options from a plugin route, incl. in repeaters) is undocumented on the docs site and in skills/

Author: cyfaceCreated Sep 16, 2026Updated Sep 16, 2026
Labelsbot:needs-attentionbot:task

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-kit documents select only with a static options array.
  • 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:

typescript
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 (BlockKitRepeaterBlockKitFieldDynamicSelect) and a running dev server.

Steps to reproduce

  1. Search docs.emdashcms.com (or the site's sitemap) for optionsRoute: no page.
  2. Open plugins/creating-plugins/block-kit and skills/creating-plugins/references/block-kit.md: select is documented with a static options array only.
  3. Open packages/blocks/src/types.ts and packages/plugins/forms/src/index.ts: the field exists and is used.
  4. 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 a repeater.

Environment

  • emdash version: 0.38.0 (behaviour present since 0.37.0; packages/blocks/src/types.ts on main at filing time)
  • Node.js version: v24.16.0
  • Runtime: Cloudflare Workers (astro dev locally)
  • OS: macOS

Screenshots

Not applicable.

Logs / error output

bash
# not applicable — documentation gap, no error