Skip to content

feat(live_ui): add AskSidebar widget Phoenix.Component (Wave 3.7-B Stage-4, DRAFT, Pascal-review REQUIRED)#138

Draft
ty13r wants to merge 2 commits into
mainfrom
claude/widget-ask-sidebar-wave-3-7-b
Draft

feat(live_ui): add AskSidebar widget Phoenix.Component (Wave 3.7-B Stage-4, DRAFT, Pascal-review REQUIRED)#138
ty13r wants to merge 2 commits into
mainfrom
claude/widget-ask-sidebar-wave-3-7-b

Conversation

@ty13r
Copy link
Copy Markdown
Member

@ty13r ty13r commented May 18, 2026

Summary

Wave 3.7-B canonical widget: AskSidebar — the Ask-mode sidebar shell that replaces :sidebar_shell when the operator is in Ask mode.

All 4 stages of the canonical widget pipeline are delivered (Stages 1–3 by parallel agents, Stage 4 by this PR):

  • Stage 1 (IUR constructor): UnifiedIur.Widgets.Components.ask_sidebar/1 + :ask_sidebar added to @layer_callout_kinds — committed in 95b0233 (ThreadCard batch)
  • Stage 2 (catalog entry): %{kind: :ask_sidebar, family: :layer_shell_and_callout, …} in unified_ui/widget_components.ex — committed in 95b0233 (ThreadCard batch)
  • Stage 3 (renderer clause): Dedicated render(%{element: %Element{kind: :ask_sidebar}} = assigns) clause placed ABOVE generic @component_kinds fallback in live_ui/renderer.ex — committed in 931a440 (tree_view extension)
  • Stage 4 (Phoenix.Component): LiveUi.Widgets.AskSidebar module with full render template — this PR

Widget contract

  • Required attrs: :sidebar_id, :on_map_jump_event
  • Optional attrs: :recent_items (list, cap 10), :saved_items (list), :active_item_id, :on_new_saved_event, :on_see_all_event, :empty_recent_label, :empty_saved_label, :blocker_count
  • Root: <aside data-live-ui-widget="ask-sidebar" aria-label="Ask sidebar">
  • Recent rail: <section aria-labelledby="ask-recent-h-{id}"> with relative timestamps + running-status indicator
  • Saved rail: <section aria-labelledby="ask-saved-h-{id}"> with ★ glyph + cadence/last_run_at meta
  • Map jump: <button aria-label="Switch to Map mode"> with optional blocker-count badge

Tests

  • Stage 4 tests: 39 tests, 0 failures (packages/live_ui/test/live_ui/widgets/ask_sidebar_test.exs)
    • Component metadata (4), structural HTML (4), Recent rail (11), Saved rail (7), active item selection (4), Map jump affordance (5), see-all threshold (4)
  • Stage 1 tests: committed in 95b0233 alongside the constructor
  • Pre-existing failures (not caused by this widget): 7 unified_iur Phase-6 coverage gaps, 32 unified_ui parity synchronization failures

Open questions for Pascal review

These 8 questions are flagged in the @moduledoc and gate the transition from DRAFT to ready-to-merge:

  1. Shell-swap vs section composition vs ariston-local? — Top design call. Current draft assumes option (a): new canonical widget swapping for :sidebar_shell.
  2. Mode-switch mechanism: IUR re-render vs LiveView hot-swap?
  3. "See all" overlay: internal vs event-to-host (current draft) vs deferred?
  4. Saved rail filter at 20+ items: renderer threshold, host-supplied value, or v2?
  5. Map jump placement: bottom of scroll vs sticky footer?
  6. Width/position parity with :sidebar_shell: share CSS tokens or distinct?
  7. Empty state for first-time user: combined onboarding vs per-rail labels (current draft).
  8. Bottom identity bar (sb-bottom): part of widget contract or host-injected?

Pre-flight findings

  • Stage 1 constructor: already committed 95b0233
  • Stage 2 catalog entry: already committed 95b0233
  • Stage 3 renderer clause (above @component_kinds fallback): already committed 931a440
  • Stage 4 Phoenix.Component: this PR ✓
  • Pre-existing compile warning in live_ui: LiveUi.Widgets.FileTreeBrowser.component referenced in renderer.ex but Stage-4 module missing — not caused by ask_sidebar, pre-existing from 95b0233

Test plan

  • Pascal reviews 8 open questions and resolves shell-swap/composition design call
  • Once design call resolved: update @moduledoc with decisions, remove open-questions section
  • Smoke: mount AskSidebar in a dev IUR page; confirm Recent/Saved rail render and Map jump fires intent

🤖 Generated with Claude Code

ty13r and others added 2 commits May 18, 2026 15:11
Stage 4 of the canonical ask_sidebar widget pipeline:
- LiveUi.Widgets.AskSidebar Phoenix.Component with full render template
- Recent rail (capped at 10, relative timestamps, running-status indicator)
- Saved rail (★ glyph, cadence or last_run_at meta)
- Map jump affordance with optional blocker-count badge
- Scoped ARIA heading ids, aria-current on active row
- 39 Stage-4 tests (all pass)

Stages 1-3 were pre-committed by parallel Wave 3.7-B agents:
- Stage 1 (IUR constructor): commit 95b0233 (ThreadCard batch)
- Stage 2 (catalog entry): commit 95b0233 (ThreadCard batch)
- Stage 3 (renderer clause): commit 931a440 (tree_view extension)

DRAFT: 8 open questions for Pascal review flagged in @moduledoc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Apply registry-threading discipline per the updated widget skill
(project-ariston PR #62 + memory entry [[new-canonical-widget-needs-
registry-threading]]). Mirrors Pascal's a902750 (PresenceDot) pattern.

Touch points (delta): widgets aggregation (overlay.ex) + both adapters
(iur_adapter + live_ui_adapter) + multi-layer tests (renderer, iur_adapter,
live_ui_adapter).

Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
@ty13r ty13r force-pushed the claude/widget-ask-sidebar-wave-3-7-b branch from 5ebb45b to 32fdeb7 Compare May 18, 2026 20:31
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