Skip to content

IUR hydration: expand_list_repeat doesn't expand repeat-marked children for :artifact_row or custom:* widget types #114

Description

@ty13r

Context

Discovered during Wave AshUI-3.9 Item 2 dispatch (2026-05-17/18). After applying the validator allow-list extension in PR #113 (which unblocks compile-time), the same 5 DSL Screen LiveViews in ariston-ui still have 14 of 38 tests failing with content-rendering errors (e.g., "expected 3 block sections, found 0").

Current behavior

AshUI.LiveView.IURHydration.expand_list_repeat/1 (at packages/live_ui/lib/ash_ui/live_view/iur_hydration.ex:142 in the vendored package) only expands repeat-marked children when the destination Element's widget type is "list_repeat":

def expand_list_repeat(%{"type" => "list_repeat", ...} = node, ...) do
  # ... clones template per row ...
end

For Elements with type :artifact_row or type "custom:*", the repeat-marked metadata is present on the node (via metadata.composition.repeat) but the IURHydration pipeline never clones the template node per row → the destination renders as a single template instance with no fan-out.

Desired behavior

Extend hydration (either by widening expand_list_repeat/1's match arm or by adding a new helper expand_template_repeat/1) to handle repeat expansion for :artifact_row and "custom:*" widget types, driven by the same metadata.composition.repeat field that compile_node helpers in the LiveViews already populate correctly.

Affected tests

In ariston-ui:

  • test/ariston_ui_web/live/manuscript_live_test.exs — 3 tests (DocBlockTemplate)
  • test/ariston_ui_web/live/swimlane_screen_live_test.exs — 4 tests (4 lane card templates)
  • test/ariston_ui_web/live/research_page_screen_live_test.exs — 3 tests (ResearchDocRow)
  • test/ariston_ui_web/live/conversation_screen_live_test.exs — 2 tests (ConversationMessageRow + ConversationProposalRow)
  • test/ariston_ui_web/live/document_chat_workspace_screen_live_test.exs — 2 tests (DocBlock + ChatMessageRow + ProposalRow)

Total: 14 tests blocked on this gap.

Why this is a design call (not a mechanical fix)

Extending hydration shape touches the IUR composition model:

  • Pascal-architect decision on whether to extend expand_list_repeat, add a new helper, or refactor the dispatch model entirely
  • Implications for how metadata.composition.repeat is interpreted across widget families
  • Whether the compile_node LiveView injection pattern (which bypasses BindingEvaluator for the repeat case) stays as-is or gets folded into the new hydration path

Cross-references

  • ariston-ui docs/iur-missing-list-binding-sizing.md (merged via PR #385) — sizing investigation
  • ash_ui PR fix(ash_ui validations): trust custom:* opaque widget types in :list binding allow-list #113 — validator allow-list extension (this issue's first-half companion)
  • Wave AshUI-3.9 Item 2 dispatch report — substrate-gap discovery + escalation
  • Related Issue: The-Metagraph/metagraph-connectors#42 (subfamily threading consumer-side gap) — shape similarity (provider wired, consumer not yet)

Labels: design-required, pascal-coordination, wave-ashui-3.9-spillover

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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