Skip to content

Catalog schema relaxation: drop source field (per Pascal Discord 2026-05-16)#178

Merged
ty13r merged 1 commit into
mainfrom
claude/drop-source-field-schema-relaxation
May 16, 2026
Merged

Catalog schema relaxation: drop source field (per Pascal Discord 2026-05-16)#178
ty13r merged 1 commit into
mainfrom
claude/drop-source-field-schema-relaxation

Conversation

@ty13r
Copy link
Copy Markdown
Member

@ty13r ty13r commented May 16, 2026

Schema relaxation per Pascal's Discord call 2026-05-16

Drops the source field from the WidgetComponents catalog entirely. Provenance (which AshUi PR a canonical kind originally came from) lives in git history, not in the runtime catalog. Loose pragmatic family coupling preserved.

Why

Authoring canonical kinds directly in UnifiedUi (not via ash_ui upstream PR mapping) means the source field stops being meaningful — the actual dependency chain starts at UnifiedUi. Schema relaxation unblocks shell-primitive authoring (top_strip, mode_nav, sidebar_*, unread_badge, command_palette) without needing to fabricate ash_ui PR numbers.

Changes

File Change
packages/unified-ui/lib/unified_ui/widget_components.ex Drop :source from @type component; delete @type source; strip source: %{...} from all 20 catalog entries; delete source_mapping/0. @moduledoc updated.
packages/unified-ui/lib/unified_ui/reference.ex Delete widget_component_source_mapping/0 (wrapper around source_mapping).
packages/unified-ui/lib/unified_ui/tooling.ex widget_component_catalog/0 no longer includes :source_mapping key.
packages/unified-ui/test/unified_ui/widget_components_catalog_test.exs Delete the "source mapping records every AshUi PR in order" test; strip source_mapping refs from tooling + reference assertions.

Stat: 4 files, 7 insertions, 67 deletions.

Closed in flight per same Pascal call

Verification

  • mix format --check-formatted — clean
  • mix compile --warnings-as-errors — clean
  • unified-ui test suite: 153 tests, 0 failures
  • live_ui test suite: 478 tests, 0 failures

What this unblocks

After this lands, ariston-ui (via The-Metagraph/ariston-ui Wave AshUI-3.3) will open 7 widget-authoring PRs for shell primitives:

  • top_strip, mode_nav, sidebar_shell, sidebar_section, sidebar_item, unread_badge, command_palette

Each: Stage 1 IUR shape (unified_iur) + Stage 2 catalog entry (unified-ui, no source field) + Stage 3 renderer clause (live_ui) + Stage 4 AshUi admission inherits via catalog auto-load.

@pcharbon70 — ready for review whenever convenient. Small focused PR.

Per Pascal's Discord decision 2026-05-16: drop the `source` field from
the WidgetComponents catalog entirely. Provenance (which AshUi PR a
canonical kind originally came from) lives in git history, not in the
runtime catalog. Loose pragmatic family coupling preserved.

Changes:
- `@type component` no longer requires `:source`. Now only `:kind`,
  `:family`, `:summary`, `:aliases`.
- `@type source` deleted (was `:ash_ui` PR mapping shape, no longer
  modeled).
- All 20 existing `@components` entries stripped of `source: %{...}`
  (sed-driven uniform strip; functional equivalent of the original
  catalog with provenance externalized).
- `WidgetComponents.source_mapping/0` deleted.
- `UnifiedUi.Reference.widget_component_source_mapping/0` deleted
  (was a wrapper around `source_mapping/0`).
- `UnifiedUi.Tooling.widget_component_catalog/0` no longer includes
  `source_mapping` key.
- Catalog test: "source mapping records every AshUi PR in order" test
  deleted; tooling-catalog + reference assertions stripped of
  source_mapping references.

Rationale:
- Authoring canonical kinds directly in UnifiedUi (not via ash_ui
  upstream PR mapping) means the source field stops being meaningful.
  The actual dependency chain starts at UnifiedUi.
- Schema relaxation unblocks shell-primitive authoring (top_strip,
  mode_nav, sidebar_*, unread_badge, command_palette) without
  needing to fabricate ash_ui PR numbers.

Closed in flight:
- #168 (top_strip canonical request — closed,
  re-approach via direct authoring)
- #169 (mode_nav canonical request — same)
- #170 (DRAFT source.system widening — closed
  in favor of dropping source entirely)

Verification:
- mix format --check-formatted clean
- mix compile --warnings-as-errors clean
- unified-ui test suite: 153 tests, 0 failures
- live_ui test suite: 478 tests, 0 failures

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ty13r
Copy link
Copy Markdown
Member Author

ty13r commented May 16, 2026

@pcharbon70 — schema relaxation PR per your Discord 2026-05-16 call. Small focused diff (7 insertions / 67 deletions across 4 files; unified-ui 153 tests + live_ui 478 tests all green). Ready for review whenever convenient — this unblocks the 7-widget shell-primitive authoring batch we discussed (top_strip / mode_nav / sidebar_shell / sidebar_section / sidebar_item / unread_badge / command_palette).

@ty13r ty13r merged commit 4bd82b8 into main May 16, 2026
4 of 7 checks passed
@ty13r ty13r deleted the claude/drop-source-field-schema-relaxation branch May 16, 2026 20:25
ty13r added a commit that referenced this pull request May 16, 2026
…nread_badge, command_palette) (#179)

* Add 7 shell-primitive canonical widgets (top_strip, mode_nav, sidebar_*, unread_badge, command_palette)

Per Pascal Discord 2026-05-16 - shell primitives authored directly in UnifiedUi
post catalog schema relaxation (PR #178 drops source field).

All 7 widgets follow the 4-stage canonical pattern:
Stage 1: IUR constructor in unified_iur/widgets/components.ex
Stage 2: catalog entry in unified-ui/widget_components.ex
Stage 3a: renderer clause(s) in live_ui/renderer.ex
Stage 3b: Component module in live_ui/widgets/components/<family>.ex

Per-widget summary:
1. :top_strip        - :layer_shell_and_callout - <header data-live-ui-shell-position="top">
   Key attrs: brand, context, theme, pane_open; children slot (mode_nav)
   Component: LiveUi.Widgets.Components.TopStrip in layer_text.ex

2. :mode_nav         - :form_control_and_composer - <nav role="navigation">
   Key attrs: items list (label/value/shortcut/current?), aria_label; nav_attrs event map
   Component: LiveUi.Widgets.Components.ModeNav in form_control.ex

3. :sidebar_shell    - :layer_shell_and_callout - <nav data-live-ui-shell-position="side">
   Key attrs: collapsed bool; aria-hidden bound to collapsed
   Component: LiveUi.Widgets.Components.SidebarShell in layer_text.ex

4. :sidebar_section  - :layer_shell_and_callout - <section data-live-ui-shell-section>
   Key attrs: label, action_glyph?, action_label?, action_intent?; children (sidebar_items)
   Component: LiveUi.Widgets.Components.SidebarSection in layer_text.ex

5. :sidebar_item     - :layer_shell_and_callout - <li data-live-ui-shell-item> + <button>
   Key attrs: label, selected? (aria-current="page"), item_intent; children (unread_badge)
   Component: LiveUi.Widgets.Components.SidebarItem in layer_text.ex

6. :unread_badge     - :workflow_progress_and_status - <span role="status" data-live-ui-unread-count>
   Key attrs: count int, threshold (default 99, caps display "+"); hidden when count==0
   Component: LiveUi.Widgets.Components.UnreadBadge in row_workflow.ex

7. :command_palette  - :layer_shell_and_callout - <aside role="dialog" data-live-ui-palette-open>
   Key attrs: open bool, items list (id/label/active), filter_intent?, select_intent?
   Component: LiveUi.Widgets.Components.CommandPalette in layer_text.ex
   Note: existing :command_palette renderer clause (Advanced family) guards on
   attributes[:command_palette] key; new Components clause guards on attributes[:component]
   (palette: namespace) - both coexist cleanly.

Tests: packages/live_ui/test/live_ui/widget_components_shell_primitives_test.exs (19 tests)
       packages/unified-ui/test/unified_ui/widget_components_catalog_test.exs (updated)

Quality gate: mix format --check-formatted clean; mix compile --warnings-as-errors clean

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* P1 fix: register 7 shell primitives in dependent packages

Per Opus review of PR #179:
- LiveUi.Widgets.Components.@contracts registry updated for all 7 new
  widgets (mode_nav, unread_badge, top_strip, sidebar_shell,
  sidebar_section, sidebar_item, command_palette) + family module lists
  extended (@form_control, @workflow_progress, @layer_callout)
- unified_iur family-list test assertions extended for the 7 new kinds
  (form_control_kinds, workflow_kinds, layer_callout_kinds)
- unified_iur fixtures component safety fixture extended with 7 new IUR
  elements to satisfy coverage_report().complete? gate
- elm_ui + desktop_ui: 7 native constructors added per package mirroring
  canonical widget shapes; @component_families maps extended; @kinds
  family lists extended to satisfy RuntimeParity.acceptance_criteria()
  required_widget_kinds parity check
- desktop_ui phase_eleven test: @all_iur_kinds updated to include the
  7 new component kinds; @iur_widget_count updated to 83 (accounting for
  command_palette dedup between Operational and Components sections)

P2 bonus fixes:
- Renderer.ex command_palette legacy clause: drop dead = _element binding

Tests verified clean across live_ui (494), unified_iur (140),
elm_ui (119), desktop_ui (317 excl. pre-existing sdl3 compile error).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant