opt.: add a btn to minimize ai dialog#1004
Conversation
📝 WalkthroughWalkthroughAdds a minimize/maximize toggle to the Ask AI sheet: introduces private Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)lib/view/**/*.dart📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🔇 Additional comments (4)
✏️ Tip: You can disable this entire section by setting Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@lib/view/page/ssh/page/ask_ai.dart`: - Around line 393-399: AnimatedSize is wrapping a FractionallySizedBox with heightFactor, which won't animate because FractionallySizedBox sizes from parent constraints rather than intrinsic size; replace the AnimatedSize+FractionallySizedBox combination by animating the heightFactor directly (e.g., use TweenAnimationBuilder<double> targeting heightFactor) or compute an explicit height and use AnimatedContainer; update the widget that uses AnimatedSize/FractionallySizedBox and heightFactor to either wrap FractionallySizedBox in a TweenAnimationBuilder<double> that rebuilds with the animated heightFactor value or replace it with an AnimatedContainer using an explicit height variable so height transitions animate smoothly. 🧹 Nitpick comments (1)
lib/view/page/ssh/page/ask_ai.dart (1)
412-421: Consider dynamic tooltip based on minimized state.The tooltip is always
libL10n.foldregardless of whether the dialog is minimized or expanded. For better UX, consider using a state-dependent tooltip (e.g., "Expand" when minimized, "Minimize" when expanded).💡 Suggested improvement
IconButton( icon: Icon(_isMinimized ? Icons.unfold_more : Icons.unfold_less), - tooltip: libL10n.fold, + tooltip: _isMinimized ? libL10n.unfold : libL10n.fold, onPressed: () {Note: This assumes
libL10n.unfoldexists. If not, you may need to add a new localization string or use an existing alternative.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
lib/view/page/ssh/page/ask_ai.dart
🧰 Additional context used
📓 Path-based instructions (1)
lib/view/**/*.dart
📄 CodeRabbit inference engine (CLAUDE.md)
lib/view/**/*.dart: Prefer widgets/utilities from fl_lib for common UI (e.g., CustomAppBar, context.showRoundDialog, Input, Btnx.cancelOk)
Prefer using libL10n strings before adding new ones to project l10n
Split UI into build, actions, and utils; use extension on to separate concerns
Files:
lib/view/page/ssh/page/ask_ai.dart
🔇 Additional comments (3)
lib/view/page/ssh/page/ask_ai.dart (3)
87-87: LGTM!The
_isMinimizedstate field is correctly declared and initialized.
426-498: LGTM!The conditional rendering logic correctly shows the full content when expanded and minimal UI when minimized. The collection-if syntax is properly used for conditional widget inclusion.
475-496: LGTM!The input area properly uses
Inputfrom fl_lib as per coding guidelines, handles keyboard insets correctly, and appropriately disables the send button during streaming or when input is empty.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Fixes #1003
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.