Skip to content

#155 Polish Production Mobile Agent Conversation - #157

Merged
ananmouaz merged 2 commits into
mainfrom
feat/production-agent-recipe-155
Oct 3, 2026
Merged

ananmouaz merged 2 commits into
mainfrom
feat/production-agent-recipe-155

Conversation

@ananmouaz

Copy link
Copy Markdown
Owner

Closes #155: a production mobile agent conversation recipe, plus the minimal library hooks it needed.

flutter_ai_elements 0.5.0 (defaults keep existing behavior)

  • AiSuggestions(layout: row | list | grid): full-width follow-up rows and a starter grid. The grid drops to one column on narrow screens and at large text sizes. A null onSelected disables the suggestions while a response streams.
  • AiConfirmation(status: awaiting | submitting | approved | denied | expired) with localized status lines. Only awaiting shows buttons. The host still executes and persists the decision.
  • focusNode on AiComposer/AiPromptInput; keyboardDismissBehavior on AiChat/AiConversationView; sentence capitalization in the composer and question fields.
  • AiQuestion shows an answered check. AiMessageBubble no longer leaves gaps for parts a partBuilder hides. AiTask titles wrap at large text sizes.

Demo: demo/lib/production/ (opened from "Production recipe" on the home screen, or run with flutter run -t lib/main_production.dart)

  • The flow: ask → progress → answer and sources → follow-up, with empty, loading, failed/retry and settled states.
  • A run summary built from tool-call state, never from reasoning. Raw tool details sit behind the "More" menu.
  • A source-details sheet, a question that leads to a result card (Add / Edit / Discard), and an approval gate through onToolCalls that expires when the user taps Stop or sends a new message.
  • A header based on Mobbin references (page-colored, centered title, circular actions).
  • Tests: 8 interaction tests, plus 13 golden checks (light, dark, RTL, large text on a 320 pt phone, reduced motion). The goldens are platform-sensitive, so CI does not run them, like the existing demo capture tests.
  • Docs: recipe 13 in docs/recipes.md, with Mobbin attribution that separates what the screenshots show from what we adopted.

Not done: real Android and iOS device checks. AgentDesk has no mobile platforms set up for this project, and the maintainer chose to skip them. The screenshots come from the Flutter test renderer, not from devices. integration_test/screenshots_test.dart now captures recipe frames for a later device run. Streaming raw Markdown is left to #129; Shift+Enter and copy feedback are left to #127.

🤖 Generated with Claude Code

Closes #155

Local checks

  • dart format --output=none --set-exit-if-changed .
  • dart analyze
  • flutter test (packages/flutter_ai_elements, flutter_ai_provider_*), dart test (flutter_ai_core, flutter_ai_client, flutter_ai_mcp, flutter_ai_tools, flutter_ai_voice)
  • cd demo && flutter test test/production_recipe_test.dart test/production_golden_test.dart test/ordering_test.dart

Opened by AgentDesk.

ananmouaz and others added 2 commits October 3, 2026 13:03
Add the composition seams a production mobile agent conversation needed
(#155): AiSuggestions list/grid layouts, AiConfirmation lifecycle status
with localized settled states, focusNode on AiComposer/AiPromptInput,
keyboardDismissBehavior on AiChat/AiConversationView, sentence
capitalization, an answered check on AiQuestion, collapsing gaps for
parts a partBuilder hides, and wrapping AiTask titles. Defaults keep
existing behavior. Approval execution and persistence stay with the host.

Release flutter_ai_elements 0.5.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A minimal production conversation built from existing elements: starter
grid, compact run summary from tool state (not reasoning), answer,
source-details sheet, full-width follow-ups, question -> actionable result
card, an approval gate through onToolCalls, failed run with retry, and a
Mobbin-informed header. Includes interaction tests, local golden checks
(light, dark, RTL, large text on a narrow phone, reduced motion), recipe
docs with Mobbin attribution, and the groundwork record.

Closes #155

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ananmouaz
ananmouaz marked this pull request as ready for review October 3, 2026 11:03
@ananmouaz
ananmouaz merged commit 5a67080 into main Oct 3, 2026
4 checks passed
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.

elements: polish a production mobile agent conversation using Mobbin references

1 participant