feat(tool_call_card): canonical widget Stage 1-4 (:row_and_artifact family)#146
Draft
ty13r wants to merge 2 commits into
Draft
feat(tool_call_card): canonical widget Stage 1-4 (:row_and_artifact family)#146ty13r wants to merge 2 commits into
ty13r wants to merge 2 commits into
Conversation
Co-Authored-By: Codex <codex@openai.com>
Opus Max review P2 fixes: - aria-label now includes status: "Toggle tool call <name> (<status>) details" (both Phoenix.Component and live_ui_adapter HTML paths) - live_ui_adapter article gains id + button gains aria-controls linkage to the details section - BEM `--` modifier convention applied consistently to live_ui_adapter (ash-tool-call-card--<status> and __status-badge--<status>) - Test assertion updated to use ~s|...| sigil since parentheses now appear in the aria-label 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary (DRAFT — Pascal-review required)
Phase 41 PR 41.5 — adds
:tool_call_cardas a NEW canonical widget in the EXISTING:row_and_artifactfamily. Implements Stage 1-4 of the canonical-widget pipeline; Stage 5 (AshUI Screen DSL adoption) deferred to a follow-on PR after Pascal sign-off.Marked DRAFT because: this is a Tier-2 substrate gap proposal (new canonical widget). Pascal-review on family aggregation, BEM conventions, and accessibility shape is required before merge.
Implementation (Stage 1-4)
Stage 1 — UnifiedUi catalog + DSL entity:
packages/unified_ui/lib/unified_ui/widget_components.ex— register:tool_call_cardwithfamily: :row_and_artifactpackages/unified_ui/lib/unified_ui/dsl/entities/widget_components.ex— DSL leaf declarationStage 2 — UnifiedIUR constructor + validation:
packages/unified_iur/lib/unified_iur/widgets/components.ex—tool_call_card/1constructor; added to@row_artifact_kindspackages/unified_iur/lib/unified_iur/validate.ex—:invalid_tool_call_card+:invalid_tool_result_summaryvalidation covering all 14 spec invariantsStage 3 — LiveUi Phoenix.Component:
packages/live_ui/lib/live_ui/widgets/tool_call_card.ex— Phoenix.Component with full canonical contract (required props, stateexpanded?, eventexpand_toggled, optionaltool_result_summarychild)packages/live_ui/lib/live_ui/renderer.ex— dedicated:tool_call_cardclause placed above generic fallbackStage 4 — Adapter routings + family aggregation:
lib/ash_ui/rendering/iur_adapter.ex— canonical IUR conversion pathlib/ash_ui/rendering/live_ui_adapter.ex— string-HTML fallback for non-LiveView contextspackages/live_ui/lib/live_ui/widgets.ex+ newpackages/live_ui/lib/live_ui/widgets/row_and_artifact.ex— family aggregation (new file because no:row_and_artifactaggregator existed yet)Spec ref (ariston-ui)
.spec/specs/canonical_widget_tool_call_card.spec.md— allmustrequirements covered:family_classification(:row_and_artifact)contract(required props + state + event)child_shape(tool_result_summarysub-element)invalid_payloads(14 invariants tested)stage_4_runtime_integration(Phoenix.Component + renderer clause + family aggregation + both adapters + IUR vocab registry + tests at each layer)Test plan
family: :row_and_artifactregistration:tool_call_cardroutes through dedicated clause273 tests pass focused; 74 widget + 86 catalog/validation/adapter via Codex run.
Reviews
--modifier consistency).Deferred P3 follow-ons
:failedrender variant + childerror?: truerendering have minimal assertions; broader coverage in a polish pass.assets/css/widgets/tool_call_card.cssnot yet present (speccss_authoringmarks as planned; deferred perphase_41_planned_verificationexception).paired_result_event_idaccepted by both paths but nodata-paired-result-event-idhook emitted (downstreampagination_pairingmay want this).LiveUi.Widgets.RowAndArtifactaggregator only hasToolCallCard;ThreadCard/ArtifactRowstill inLiveUi.Widgets.Data(legacyfamily: :data). Pascal may want to migrate as a separate alignment commit.Notes for Pascal
family: :row_and_artifactmatching your PresenceDot alignment (a902750). ThreadCard/ArtifactRow still on legacyfamily: :data— flagging for your call.Generated with Claude Code