On this page

view.part

Intent

An independently selectable portion of a view that can generate a form, presenter, action component, or other UI fragment while retaining view ownership.

Exact selection subject:

yaml
subject: view.part

The current Runtime IR is evidence, not authority. Target improvements needed for a usable template contract are called out explicitly.

Scope envelope

ScopeContext
eachview.part: ViewPartContext
allviews.parts: ViewPartContext[]
collection candidatescollects.group, collects.feature

For collects.<dimension>, the singular collector is added beside the plural selected-subject array. A collector is valid only when ownership is semantically provable.

Context tree

Context pathTypeMeaning / template use
view.part.idstringOpaque stable semantic identity.
view.part.nameNameContextStable semantic identity and finite naming variants.
view.part.descriptionstring|nullHuman semantic description.
view.part.tagsstring[]Semantic classifiers; empty when none.
view.part.explanationsExplanationContext[]Advisory usage/security/implementation notes.
view.part.groupSemanticLinkContext|nullOwning semantic group.
view.part.featureSemanticLinkContext|nullCanonical owning feature, when present.
view.part.viewSemanticLinkContextOwning view.
view.part.kindpresent|collect|invokeStructural variant.
view.part.present.source.portOperationPortLinkContext|nullResolved output port being presented.
view.part.present.source.selectSemanticPathContext[]Selected subpaths.
view.part.present.contextOperationInputBindingContext[]View-context→operation-input bindings of the source operation.
view.part.collect.target.portOperationPortLinkContext|nullResolved input port being collected.
view.part.collect.target.collectSemanticPathContext[]Subpaths collected.
view.part.collect.target.contextContextBindingContext[]View-context values injected into target paths.
view.part.invoke.operationSemanticLinkContext|nullInvoked operation.
view.part.invoke.contextOperationInputBindingContext[]View-context→operation-input bindings.

Usage rules

  • Variant-specific subtrees are null unless active.
  • Resolved port links include index/name/value so UI templates can generate meaningful controls.
  • First-class selection keeps the canonical root view.part.

Runtime IR implications to audit

  • Give view parts stable identity and universal metadata.
  • Operation port naming is required for readable form/action context.
  • Audit whether kind should become a selection filter after proof packs.

Template example — Jinja / form component

jinja
{% if view.part.kind == "collect" %}
export function {{ file.symbol }}() {
  return (
    <form>
      {/* collects {{ render_value(view.part.collect.target.port.value, file.dependencies) }} */}
      <button type="submit">Submit</button>
    </form>
  );
}
{% endif %}

The example uses semantic context only. Any renderType/render_type helper shown is a pack-owned macro/partial consuming the documented TypeContext, not hidden Dryv context.

Audit questions

  • Can a real view.part pack generate code without parsing raw IR storage conventions?
  • Is any field here present only because the current IR happens to store it?
  • Does any nested item need first-class selection of its own?
Search in