Skip to content

feat(portal): render ask_user prompts on mobile chat#1572

Merged
sytone merged 2 commits into
mainfrom
feat/askuser-mobile-render
Jun 23, 2026
Merged

feat(portal): render ask_user prompts on mobile chat#1572
sytone merged 2 commits into
mainfrom
feat/askuser-mobile-render

Conversation

@agent-farnsworth

Copy link
Copy Markdown
Contributor

Closes #1491

Changes

Mobile chat had no ask_user render path — a mobile user blocked on an ask_user prompt saw nothing (the shared prompt was rendered only by desktop ChatPanel.razor). This adds the mobile render + submit path.

  • Move AskUserPrompt.razor into the shared BlazorClient.Core project (Components/AskUserPrompt.razor). Both Core and the desktop project share the same RootNamespace (BotNexus.Extensions.Channels.SignalR.BlazorClient), so the component keeps its exact namespace ...Componentsdesktop ChatPanel.razor and the desktop bUnit tests are unchanged and still resolve it via their existing @using ...Components. The component was genuinely desktop-only before (mobile references only Core), which is why it could not be reused as-is.
  • Add a _Imports.razor to Core with the standard Blazor component usings (Microsoft.AspNetCore.Components.Web, etc.). Core had none, so the moved component's @onchange event binding would not compile there without it.
  • Render the shared component on mobile Pages/Chat.razor as a bottom-sheet above the input bar (ask-user-sheet) whenever the active conversation has a pending prompt (Store.GetPendingAskUser). Responses route through the same IAgentInteractionService.RespondToAskUserAsync interaction the desktop uses — the submit/timeout/summary handlers mirror desktop ChatPanel exactly, so behaviour is identical across surfaces.
  • Mobile bottom-sheet styles in wwwroot/css/mobile.css matching the mobile dark theme.

Tests

  • New MobileAskUserPromptTests (bUnit, 7 tests): renders when a pending prompt exists; does not render otherwise (normal input remains); single-choice renders radios; multiple-choice renders checkboxes; free-form submit routes through RespondToAskUserAsync + clears the prompt; cancel routes a cancelled submission.
  • Existing desktop AskUserPromptTests (IRenderedComponent<AskUserPrompt>) and all 606 desktop client tests stay green with the component in its new Core home.
  • test-impacted.ps1: All impacted tests passed (Architecture + Scenarios safety nets + Mobile.Tests 63/63 + BlazorClient.Tests 606/606 + Gateway / Gateway.Conversations).

Acceptance criteria (#1491)

  • Mobile renders the AskUserPrompt when a conversation has a pending ask_user.
  • Mobile submit routes through the shared RespondToAskUserAsync interaction.
  • Free-form, single-choice, and multi-choice prompts all render and submit.

Merge Notes

File-disjoint from the other open PRs (#1563/#1567/#1568/#1569/#1570/#1571 are all gateway/memory/cron/tools — none touch the Blazor clients), so this can merge in any order relative to them. The blocker named in the issue (#1480 mobile Chat.razor ordering) is already merged, and no open PR touches mobile Chat.razor. Part of the #1482 ask_user durability epic, but this step is independent of the Step 5 (#1487) resolution-model decision — it only renders/submits whatever pending prompt the client store already holds.

Mobile chat had no ask_user render path, so a mobile user blocked on an
ask_user prompt saw nothing. Move the AskUserPrompt component into the shared
BlazorClient.Core project (same namespace, desktop unaffected) and render it as
a bottom-sheet on mobile Chat.razor when the active conversation has a pending
prompt. Responses route through the same RespondToAskUserAsync interaction the
desktop uses, so free-form, single-choice, and multi-choice prompts all submit
identically across surfaces.

Closes #1491
@agent-farnsworth

agent-farnsworth Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

CI Health Check -- PR #1572

Check Status
impacted-tests pass
CodeQL pass
Analyze (csharp) pass
Code Pattern Checks pass
Dependency Security Audit pass
Secret Scanning (TruffleHog) pass

Branch: feat/askuser-mobile-render | Behind main: 0 commits | Mergeable: MERGEABLE

Actions taken:

  • RESOLVED: re-triggered impacted-tests passed -- all checks now green, mergeState=CLEAN.
  • The earlier impacted-tests failure was a flaky CI-timing race on 2 DESKTOP cron-sidebar tests (ConversationGroupingTests), confirmed by: full BlazorClient.Tests passing 606/606 locally on the synced commit, the test passing on main, and the single CI re-run passing green. Not a regression in this ask_user mobile PR.
  • Synced main into branch (was behindBy=6); merge CLEAN, behindBy=0.

Blockers for Jon:

  • None -- PR is green and CLEAN, ready for merge.

  • 2026-06-23 11:20 UTC
  • 2026-06-23 11:15 UTC
  • 2026-06-23 11:07 UTC

Farnsworth (automated CI monitor) -- BotNexus -- Last updated: 2026-06-23 11:20 UTC

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.

[Portal] ask_user durability Step 4/5: render ask_user prompt on mobile

1 participant