ADL 47 · Part VI — Handling, localization, and UI declarations

0.6.0 reconciled + 0.5.1 detail

User interface extensions

ADL 0.6.0 reference · Review draft 1 · November 14, 2026.

Contents · Source map · Evidence

The 0.6 edition note

General UI declarations remain here. Journey-specific task inputs, worklists, branch labels, and step projection belong to ADL 53. A concrete uikitten console is an implementation of those ideas, not the definition of every possible client.

A projection must preserve authority at the server boundary. Hiding a button, filtering a worklist, or marking an input read-only does not enforce the underlying operation. Fresh compiler acceptance is recorded separately from browser behavior; no browser suite was rerun for this reference draft.

Retained reference detail

The numbered sections below are carried from 47-user-interface-extensions.md. Their original baseline and evidence remain attached to the source. Statements about “current” or “checked” behavior in this retained text refer to those original observations unless the edition note explicitly updates them. This is a consolidated draft, not a claim of complete re-verification.

47.1 Scope and ownership

A client can derive useful forms and resource views from ADL’s published metadata. It still needs an interaction design, authenticated session, widget implementation, and an explicit policy for incomplete metadata. This chapter shows a bounded client and the inputs it needs. It introduces no normative UI grammar or mandatory frontend framework.

ADL 34 owns opaque field ui preservation. ADL 32 owns generated OpenAPI metadata. ADL 21 owns permission declarations, and ADL 22 owns lifecycle declarations. ADL 46 separates presentation helpers from record responses. This chapter’s examples rely on those contracts; their widget vocabulary is a client agreement.

The reviewed implementation is repository revision 6047660f. The inherited ADL 47 conversion (v0.5.0, retired) contains useful direction but overstates several absences. Schema can retain field permission declarations. Analytics dashboards have their own declaration surface. Studio already contains schema-derived previews. None of those facts ratifies general navigation or layout grammar inside ui.

47.2 Read the appropriate metadata

The domain schema action and generated OpenAPI document are complementary. Neither should be treated as the universal serialization of every native runtime rule.

InputUseful informationBoundary
Domain schemaResources, fields, labels, opaque ui, relationships, permissions, state-machine metadata, validations, features, and collection pathsA source-based projection can retain unsupported declarations; their presence is not evidence that the server implements them
OpenAPI read schemaJSON types/formats, constraints, primary-key and immutable hints, field read rolesIts properties are an API projection; they are not an entitlement-filtered record
OpenAPI input schemaInput properties, required array, field write roles, omitted generated/internal fieldsThe generator shares an input schema between create/update; patch semantics still require operation-specific handling
Enum schemaStored values and available label/color/description extensionsLabels and colors are display data; the transmitted value is the enum key
Current record and sessionActual values, lifecycle position, authenticated identity/rolesThese are runtime inputs; a schema cannot manufacture them

The fixture retrieves schema through adl.domain.schema and OpenAPI through adl.domain.openapi. Their REST management routes are GET /api/v1/domains/{name}/schema and GET /api/v1/domains/{name}/openapi. The evidence uses actual kernel dispatch; it does not claim a separate HTTP transport test. The kernel OpenAPI response places the document under _raw_json; the REST transport is responsible for serving that document without the normal envelope.

For this fixture, resource fields appear in both object and fields in schema. The client prefers fields. Localized requests can rewrite its labels while leaving locale maps in object. Field permissions remain under resources.Entry.permissions.fields, and the OpenAPI generator also supplies x-kalos-read-roles and x-kalos-write-roles on the corresponding properties. The inherited assertion that schema never carries those declarations is too broad for the reviewed implementation.

Use supplied collectionPath where available, together with the generated route contract. Do not derive plural collection paths by adding an s to a resource name. See ADL 26 and ADL 33 for route ownership and parity limits.

47.3 Field hints and client agreements

A supported field-level pass-thru value is an object. Its interior vocabulary is opaque to ADL. The client in this chapter recognizes widget, order, rows, and placeholder; these names are its own convention, not new language requirements.

# Fragment inside domain.resources.Entry.object.
notes:
  type: string
  label: Notes
  ui:
    widget: textarea
    rows: 4
    order: 4
    placeholder: Write a note

The native model retains object-valued ui. The domain schema exposes it; OpenAPI does not automatically include it. An outer array such as ui: [textarea] is outside this supported model contract even if a permissive path retains the original source in schema. ADL 34 documents empty objects, nested values, reuse, export, and restoration in greater detail.

Two projection details affect the example: OpenAPI emits the boolean default as the string "1", so the client uses the typed source-schema default. Its x-enum-descriptions entries contain display labels (Draft, Ready), not the authored Work in progress description. Do not assume every extension name fully describes its current payload. These observations are checked separately from the intended input types.

The client chooses ordinary controls from metadata first: booleans become checkboxes, date/email formats select matching inputs, and enum keys become option values. Its allowlisted textarea hint can select a multiline string control. Unsupported widget names fall back to a basic control. It bounds rows, sorts numeric ordering hints deterministically, and places label and placeholder text through DOM text/attribute APIs. It does not execute metadata as HTML, JavaScript, a component import, or an event handler.

ui.required: false does not cancel a field’s required constraint. ui.permissions: ['*'] does not grant access. The supplied fixture deliberately contains both to test that a tempting presentation hint cannot override the actual schema or server rule.

47.4 A reproducible derived client

The example client is a standalone local HTML artifact generated from recorded native metadata and record responses. It shows a create form, a role selector for illustrating display decisions, and an English/Arabic record preview. The role selector is explicitly a simulation; it creates no authenticated server session.

The form builder follows this sequence:

  1. Resolve the operation’s input schema and any local enum references. Use the source schema for labels, permission declarations, collection metadata, and agreed field hints.
  2. Build controls from types, formats, required constraints, and enum keys. Handle generated fields according to the input schema. Keep immutable and primary-key behavior distinct between create and edit flows.
  3. Apply the example’s simple role-list presentation policy. Withhold restricted fields and disable a form when that role list denies creation. Do not claim to evaluate conditional permissions, ownership chains, or conjunctions.
  4. Collect values without relabelling their keys. Preserve booleans and enum keys; leave actual persistence to a separately authenticated request flow.
  5. Treat a real server response as authoritative. Client validation helps users correct input, but it does not replace request validation or authorization.

The artifact intentionally stops at a displayed request preview. It neither posts records nor advertises a working deployment client. Its companion native sequence separately invokes real create/update/get handlers as admin, editor, and viewer to verify the relevant server boundaries. These are distinct pieces of evidence, both included in the dossier.

For localization, the artifact consumes the schema responses, the unchanged record, and the explicitly identified LocaleRegistry helper result. Direction and native date formatting come from that helper evidence. This does not imply that the management schema response already has the compact helper’s envelope.

47.5 Permission presentation and server authority

OpenAPI role extensions and schema permission declarations can help a client hide a control, show a read-only field, or explain why an action is unavailable. They are not a security boundary. The caller can modify the page or submit a request directly. A UI’s simulated role is never evidence of the server’s principal.

The checked fixture grants viewer read, editor create/update, and admin access to confidential. It makes title required and sku immutable. The native sequence tests a viewer’s forged create, an editor’s missing title, a restricted field write, an immutable-field change, and a valid editor create. It checks both responses and stored rows. Hints that say permissions: ['*'] or required: false remain inert.

A general client also needs the current identity, owner information, record state, operation type, conditional expressions, permission conjunctions, field-security rules, and fresh server decisions. The example intentionally supports only its simple role lists. If a client cannot interpret a permission shape, it should request authoritative capability information or show an unresolved state rather than silently grant a control.

Read-schema properties do not mean every principal receives those properties. Write-only and internal values require special treatment. Avoid putting hidden secret values into the DOM merely because a control is invisible. A client also needs safe response/error rendering, authentication expiry handling, validation messages, and conflict behavior before it becomes an operational editor.

47.6 Missing inputs and existing clients

DecisionAdditional input or implementation needed
Navigation and page layoutProduct-specific routes, grouping, responsive layout, empty/loading states, and accessibility behavior
Relationship selectionAuthorized lookup endpoints, display labels, paging, search, and foreign-key semantics
State transition buttonsCurrent state, schema lifecycle metadata, guards, required inputs, and server transition authorization
Conditional permissionsA matching evaluator or authoritative capability endpoint; the example’s role intersection is insufficient
LocalizationRequested locale, fallback policy, text direction, formatter integration, and translations for the client’s own interface
Rich text, files, and mediaChosen widgets, rendering/sanitization policy, upload workflows, and provider behavior
Editing and persistenceAuthentication, request/response contracts, create-versus-update handling, conflict recovery, and server errors
Dashboard renderingAnalytics declaration metadata, query results, widget mapping, and refresh/error behavior

The repository already contains a concrete Studio resource preview that derives controls and lifecycle displays from a projected model and fabricated records. Its preview controls do not establish live server CRUD or authorization. The dashboard component accepts a widget specification and supplied data. The Studio site preview also uses example data. These are useful existing consumers to inspect, not proof that every opaque ui member has a platform-wide meaning.

ADL 38 owns actual analytics/dashboard declarations. ADL 39 owns template/document output. Broad claims that the platform has no dashboards, no clients, or never produces HTML obscure those separate capabilities.

47.7 Proposed grammar and explicit boundaries

General navigation, modal behavior, component bindings, and page layout inside a domain/resource ui block remain proposed directions. A separately ratified language change would need to specify placement, types, defaults, ownership, composition, export, runtime consumers, accessibility expectations, and errors. This chapter does not smuggle those proposals into accepted ADL syntax.

The complete unsupported-domain-ui.yaml and unsupported-resource-ui.yaml fixtures put a navigation/layout object at those unsupported placements. Strict and permissive parser observations are recorded separately: both native paths accept these two fixtures with unknown-key warnings. The modeller warns with UI_WRONG_LEVEL. A warning and source preservation do not turn an unknown key into a working language feature. The unsupported-ui-shape.yaml fixture records an array-valued field hint and its differing source/model treatment.

The positive example is client-metadata.yaml: a complete domain containing supported native declarations plus an agreed opaque object on selected fields. The native record, independent modeller projection, browser checks, and rendered example dossier are linked from the evidence review. Source paths and hashes identify what was checked. This remains informative client guidance even where the checked metadata contract is supported ADL.