Skip to content

[adm 6] Restore component data binding and event/action binding authoring #121

Description

@artiphishle

Roadmap: #115

Respect the roadmap first and the AGENTS.md file of every repository touched.

Previous roadmap step

[adm 5] (#120) establishes generated APIs and their canonical operation/data-source integration. Combined with [adm 4] (#119), this issue can rely on one normalized operation model for external and generated APIs.

Repository impact

Likely:

  • ankhorage/studio
  • ankhorage/contracts only if canonical binding/action contracts require evolution
  • ankhorage/runtime only if execution contracts are incomplete
  • ankhorage/zora only for missing metadata needed to describe bindable props/events

Do not move runtime execution into Studio or duplicate ZORA metadata.

Goal

Restore the production authoring workflow that binds component properties and events to canonical state/context/data-source operations/actions.

Route and UX

Open binding authoring contextually from the selected component/AppBar established by [adm 1].

The exact canonical route name and node-specific route shape (binding vs bindings, singular/plural) must be chosen after current route/model inspection. Do not duplicate the same binding editor inside Properties and another admin page.

The UI must clearly distinguish:

  • property/data bindings;
  • event/action bindings.

Requirements

Property/data bindings

Use canonical manifest.dataBindings and related contracts.

Support appropriate sources already modeled by the platform, such as:

  • literal;
  • state;
  • context;
  • operation result/response paths.

Derive bindable component properties from injected ZORA metadata. Do not expose arbitrary props simply because they exist.

Event/action bindings

Derive component events and payload fields from ZORA metadata.

Support binding events to canonical actions and data-source operations where contracts allow.

Examples include button press, form submit and collection item events according to current metadata/contracts.

Operations and schema compatibility

  • enumerate canonical external/generated API operations from data sources;
  • expose request inputs and response paths where known;
  • preserve or improve schema/type compatibility checks;
  • provide meaningful invalid/missing-source diagnostics;
  • avoid stringly duplicated endpoint registries in Studio.

Persistence/runtime

Bindings must persist through canonical manifest mutation/persistence and execute through @ankhorage/runtime; Studio only authors them.

Likely files

Studio, non-exhaustive:

src/ui/useStudioAppBarAugmentation.ts
src/ui/admin/*
src/manifestState.ts
src/core/StudioProvider.ts
src/studioAdminRouteModel.ts

Historical reference areas include late PropertiesAdminScreen / DataBindingPanel and PR #284/#355 behavior in ankhorage4, but do not restore duplicate inspector architecture.

Phases

Phase 1 — canonical binding model audit

Confirm contracts/runtime/ZORA metadata capabilities and evolve only owning packages if needed.

Phase 2 — package-neutral authoring model

Implement helpers for bindable prop/event resolution, operation options, response paths and compatibility diagnostics.

Phase 3 — contextual binding UI

Build the single first-class authoring route/surface and contextual AppBar action.

Tests

Cover at minimum:

  • bindable prop/event resolution from metadata;
  • literal/state/context/operation property binding mutations;
  • action/operation event binding mutations;
  • operation/source removal or missing-reference diagnostics;
  • response-path/schema compatibility;
  • correct node-specific route/context resolution;
  • canonical persistence round-trip;
  • no duplicate runtime execution logic.

Acceptance criteria

  1. Selected components can open one canonical binding authoring surface.
  2. Bindable props/events come from ZORA metadata.
  3. Property bindings use canonical manifest contracts.
  4. Event bindings target canonical actions/operations.
  5. External and generated API operations are presented uniformly.
  6. Response paths/schema compatibility are handled meaningfully.
  7. Studio authors bindings; Runtime executes them.
  8. No duplicate binding editor exists in multiple surfaces.
  9. No Studio-owned endpoint/event schema registry duplicates owning packages.
  10. Behavior-focused tests and full validation pass.
  11. No legacy/compatibility/ankhorage4 dependency is introduced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions