Skip to content

Conversation

@Quwaysim
Copy link
Contributor

@Quwaysim Quwaysim commented Oct 13, 2025

Description

Fixes: #720. Bottom Sheet Safe Area Padding for 3-Button Navigation on Android and GrapheneOS.

Problem

Bottom sheets were not properly accounting for device safe areas (home indicator on iOS, 3-button navigation on Android), causing content to be partially covered or cut off at the bottom.

Issues:

  • No consistent handling of safe area across different bottom sheets
  • Manual padding adjustments scattered across multiple screens

Solution

1. Simplified Bottom Sheet Padding Calculation

/// Calculate bottom padding for safe area
/// - When keyboard is open: 8.h padding
/// - When keyboard is closed: device safe area (home indicator) + 8.h padding
static double _calculateSafeAreaPadding(BuildContext context) {
  final keyboardHeight = MediaQuery.viewInsetsOf(context).bottom;
  final safeAreaBottom = MediaQuery.viewPaddingOf(context).bottom;
  
  return keyboardHeight > 0 
      ? 8.h
      : safeAreaBottom + 8.h;
}

2. Cleaned Up Individual Screens

Removed manual safe area workarounds from:

  • [start_chat_bottom_sheet.dart] - Removed SafeArea(bottom: false) wrapper
  • [new_group_chat_sheet.dart] - Removed manual Padding(bottom: 16.h)
  • [group_chat_details_sheet.dart] - Removed manual Gap(16.h)
  • [switch_profile_bottom_sheet.dart] - Removed manual Gap(28.h)
  • [edit_profile_screen.dart] - Removed SafeArea(bottom: false) and manual padding
  • [edit_group_screen.dart] - Removed SafeArea(bottom: false) and manual Gap(36.h)
  • [create_profile_screen.dart] - Simplified keyboard-aware padding

Behavior

Keyboard Closed:

  • Bottom padding = Safe area (e.g., 34px on iPhone) + 8px
  • Ensures buttons sit above home indicator/navigation bar

Keyboard Open:

  • Bottom padding = 8px
  • Keyboard already provides spacing, so minimal padding needed

Testing

✅ Verified on devices with:

  • iPhone home indicator (34px safe area)
  • Android 3-button navigation
  • Android gesture navigation
  • Keyboard open/closed states

Benefits

  • ✅ Consistent safe area handling across all bottom sheets
  • ✅ No more manual padding adjustments needed
  • ✅ Proper behavior on all Android/iOS navigation modes

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore
  • 🧪 Tests

Checklist

  • Run just precommit to ensure that formatting and linting are correct
  • Run just check-flutter-coverage to ensure that flutter coverage rules are passing
  • Updated the CHANGELOG.md file with your changes (if they affect the user experience)

Summary by CodeRabbit

  • Bug Fixes

    • Fixed start chat button being cut off in bottom sheets.
    • Improved bottom-sheet safe-area and keyboard handling to avoid overlapping content.
  • UI/UX Improvements

    • Reduced and standardized bottom/top spacing across chat, profile, and settings screens.
    • Reflowed group/new-chat sheets; moved paste action into the search row.
    • Preserved pre-selected profiles and normalized search input handling.
  • Documentation

    • Cleaned up changelog entry formatting.

@Quwaysim Quwaysim linked an issue Oct 13, 2025 that may be closed by this pull request
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Walkthrough

Multiple UI screens and bottom-sheet padding and spacing were adjusted: SafeArea bottom insets re-enabled, several vertical gaps reduced, WnBottomSheet’s padding helper renamed and made keyboard-aware (returns 16.h when keyboard visible, else safeAreaBottom+16.h), and new-group-chat sheet layout and paste/npub normalization reflowed.

Changes

Cohort / File(s) Summary
Bottom sheet padding helper
lib/ui/core/ui/wn_bottom_sheet.dart
Renamed _calculateBottomPadding_calculateSafeAreaPadding(BuildContext) and changed logic: returns 16.h when keyboard is visible; otherwise returns device safe area bottom + 16.h. Updated call sites and docs.
SafeArea / spacing adjustments
lib/ui/chat/chat_info/edit_group_screen.dart, lib/ui/settings/network/network_screen.dart, lib/ui/settings/profile/edit_profile_screen.dart
Re-enabled SafeArea bottom insets (removed bottom: false). Reduced action-area gap (36.h16.h) and adjusted vertical paddings: edit_profile_screen.dart changed symmetric vertical padding → top-only and lower section bottom padding → fixed 16.h.
Screen padding and small spacing tweaks
lib/ui/auth_flow/create_profile_screen.dart, lib/ui/settings/profile/switch_profile_bottom_sheet.dart, lib/ui/user_profile_list/group_chat_details_sheet.dart
Removed top Scaffold padding in create_profile_screen and reduced multiline-field gap (32.h16.h); removed Gap(28.h) in switch_profile_bottom_sheet; removed Gap(16.h) after action button in group_chat_details_sheet.
New group chat sheet reflow & input normalization
lib/ui/user_profile_list/new_group_chat_sheet.dart
Reflowed layout: search field and paste button combined in one Row; loading/error moved into an Expanded pane with a centered error and “Go back” action; paste preserves clipboard behavior and normalizes npub input (strip whitespace, update controller/caret); initState seeds _selectedUserProfiles; continue action closes sheet then conditionally shows GroupChatDetailsSheet using parent context.
Changelog
CHANGELOG.md
Added Unreleased → Fixed entry: "Fixed start chat button cut off (and other bottom sheets)." and removed an extra empty line.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant User
    participant OS as System (keyboard)
    participant Sheet as WnBottomSheet
    participant Safe as SafeArea

    Note over User,OS: Open sheet or focus input
    User->>Sheet: open()/focusInput()
    OS->>Sheet: keyboard visibility change
    alt keyboard visible
        Sheet->>Sheet: _calculateSafeAreaPadding(context) -> 16.h
        Sheet->>Safe: apply bottom padding = 16.h
    else keyboard hidden
        Sheet->>Safe: query safeAreaBottom
        Sheet->>Sheet: _calculateSafeAreaPadding(context) -> safeAreaBottom + 16.h
        Sheet->>Safe: apply bottom padding = safeAreaBottom + 16.h
    end
Loading
sequenceDiagram
    autonumber
    participant User
    participant UI as NewGroupChatSheet
    participant Clipboard
    participant State

    User->>UI: type into search
    UI->>UI: _onSearchChanged(input)
    alt input starts with "npub" and contains whitespace
        UI->>UI: normalize (strip whitespace) & update controller/caret
    end
    User->>UI: tap paste
    UI->>Clipboard: readClipboard()
    Clipboard-->>UI: pasteText
    UI->>UI: normalize pasted npub (if present) and update search controller
    UI->>State: initState seeds _selectedUserProfiles from widget.preSelectedUserProfiles
    User->>UI: tap Continue (with selection)
    UI->>UI: Navigator.pop()
    UI->>State: optionally show GroupChatDetailsSheet using parent context
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • erskingardner
  • codeswot
  • untreu2

Poem

🐰 I nudged the sheets to make things right,
Sixteen hops when keyboards come to light,
Pasted npubs now tidy, caret true,
No more buttons hiding from view,
Hooray — snug sheets for me and you! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Adjust bottom padding and gaps across multiple UI screens" directly describes the primary changes documented in the raw summary. The changeset includes modifications to vertical spacing, SafeArea padding adjustments, and gap reductions across multiple UI files (create_profile_screen.dart, edit_group_screen.dart, edit_profile_screen.dart, and others), making the title both specific and accurate. The title is concise and avoids vague terminology, clearly communicating the main focus of the changes without requiring detailed file-level inspection.
Linked Issues Check ✅ Passed The pull request addresses issue #720 ("OS 3-button Navigation Partially Covers Start Chat Button") by standardizing bottom-sheet and screen safe-area padding to prevent system UI from overlaying content. The changes include introducing a helper method _calculateSafeAreaPadding(BuildContext) in wn_bottom_sheet.dart that applies keyboard-aware padding logic, removing manual safe-area workarounds from multiple UI files, and updating the CHANGELOG to document the fix. These modifications align with the core objective of ensuring safe-area insets are properly accounted for across the affected screens, directly addressing the reported issue.
Out of Scope Changes Check ✅ Passed All documented changes in the pull request are directly related to the stated objective of fixing issue #720. The modifications across create_profile_screen.dart, edit_group_screen.dart, edit_profile_screen.dart, switch_profile_bottom_sheet.dart, group_chat_details_sheet.dart, network_screen.dart, new_group_chat_sheet.dart, and wn_bottom_sheet.dart all focus on adjusting safe-area padding, removing manual workarounds, and standardizing spacing behavior. The more structural changes in new_group_chat_sheet.dart (such as error UI refactoring) appear to be necessary adaptations to properly implement the safe-area padding fix. The CHANGELOG update is also appropriate documentation for this bug fix.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 720-os-3-button-navigation-partially-covers-start-chat-button

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e30c54e and f4d2f6a.

📒 Files selected for processing (1)
  • lib/ui/core/ui/wn_bottom_sheet.dart (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/ui/core/ui/wn_bottom_sheet.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Flutter CI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@josefinalliende josefinalliende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in my iPhone and left some small comments related to cases then keyboard is open in some screens. Not sure if they make sense, would like to hear @vladimir-krstic 🧑‍🎨 🎨 opinion 😅

Haven't tested in android, I need to buy one cause the one I had is useless 😞

Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 24.h),
padding: EdgeInsets.only(top: 24.h),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke the spacing between the button and the about you text field. Here's how it looked in master and hw it looks now. I guess when the keyboard is open it should stay symmetric?

master this branch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a design for that screen of Edit Profile in Figma with the keyboard open 🤔 so not 100% sure if master was ok, but I personally like it a bit more. @vladimir-krstic ho much spacing should be 1) between the About you text field and the save button when the keyboard is open 2) between the save button and the keyboard?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I noticed this textfield touching the floating button before eventually auto-scrolling up.
With the space there, it looks awkward to me. The textfield looks abruptly cut off. Maybe I should have added a fade there like I did in login? (I'd prefer to do that in a different PR if we're doing it).

For the space between the floating buttons and the keyboard, I used 8.h.

Let's hear @vladimir-krstic's opinion on both.
Your other comments on other screens are similar so I'm not going to respond directly to them @josefinalliende. We'll decide here. Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the fade is a good idea, lets wait for vlad's opinion.

label: 'shared.save'.tr(),
),
Gap(36.h),
Gap(8.h),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found this issue (but this also happened in master) that in the edit group screen there is no spacing between the last texts field and the button.

padding: EdgeInsets.only(
left: 24.w,
right: 24.w,
top: 16.h,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The transition in master when the keyboard open felt a bit smoother due to this top spacing. Here some videos

Master behaviour (there is always a space that then grows)

master-behaviour-create-profile.MP4

This branch behaviour (the is no space for a moment then it grows)

this.branch.MP4

@vladimir-krstic
Copy link

Sorry, I've missed this one. Adding fade under the button definitely would make it much better. And bottom spacing, one between button and keyboard should be something like it is now, maybe a bit more, I guess you have it at 12px here, 16px looks a bit better in designs. Like this: https://www.figma.com/design/dGJqv6m6pchdcwxJEwxxzB/White-Noise---Design-System?node-id=3722-45745&t=xKFCdBrkii6PK8Vs-1

@josefinalliende
Copy link
Contributor

Sorry, I've missed this one. Adding fade under the button definitely would make it much better. And bottom spacing, one between button and keyboard should be something like it is now, maybe a bit more, I guess you have it at 12px here, 16px looks a bit better in designs. Like this: https://www.figma.com/design/dGJqv6m6pchdcwxJEwxxzB/White-Noise---Design-System?node-id=3722-45745&t=xKFCdBrkii6PK8Vs-1

thanks @vladimir-krstic !! So @Quwaysim maybe the fade can be a separate issue for another PR as you said. And in this PR just change the spacing from 12px to 16px WDYT?

@Quwaysim Quwaysim closed this Oct 17, 2025
@Quwaysim Quwaysim force-pushed the 720-os-3-button-navigation-partially-covers-start-chat-button branch from a9e4e32 to 370c55c Compare October 17, 2025 15:48
@Quwaysim Quwaysim reopened this Oct 17, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
CHANGELOG.md (1)

38-41: Duplicate “### Security” heading.

There are two consecutive “### Security” sections; remove one.

Apply this diff:

-### Security
-
-### Security
+### Security
🧹 Nitpick comments (4)
lib/ui/core/ui/wn_bottom_sheet.dart (2)

119-127: Use a named constant and update spacing to 16px as per design feedback.

Replace magic 8.h with a constant (16px requested in PR comments) to keep spacing consistent and adjustable.

Apply this diff:

   /// Calculate bottom padding for safe area
-  /// - When keyboard is open: 8.h padding
-  /// - When keyboard is closed: device safe area (home indicator) + 8.h padding
+  /// - When keyboard is open: 16.h padding
+  /// - When keyboard is closed: device safe area (home indicator) + 16.h padding
+  static const double _kExtraBottomPadding = 16.0;
   static double _calculateSafeAreaPadding(BuildContext context) {
-    final keyboardHeight = MediaQuery.viewInsetsOf(context).bottom;
-    final safeAreaBottom = MediaQuery.viewPaddingOf(context).bottom;
-
-    return keyboardHeight > 0 ? 8.h : safeAreaBottom + 8.h;
+    final double extra = _kExtraBottomPadding.h;
+    final double keyboardHeight = MediaQuery.viewInsetsOf(context).bottom;
+    final double safeAreaBottom = MediaQuery.viewPaddingOf(context).bottom;
+    return keyboardHeight > 0 ? extra : safeAreaBottom + extra;
   }

If 16px is not final, centralizing it still helps future tweaks.


41-45: Avoid double overlay tint (barrier + custom faded scrim).

You’re drawing an animated scrim in buildTransitions and also returning a non‑transparent barrierColor, which yields a darker-than-intended background.

Option A (keep custom fade): make the modal barrier transparent.

-  Color get barrierColor => Colors.black.withValues(alpha: 0.3);
+  Color get barrierColor => Colors.transparent;

Option B (use default barrier fade): remove the custom faded Container and rely on barrierColor. Pick one for consistent visuals.

Also applies to: 82-89

lib/ui/user_profile_list/new_group_chat_sheet.dart (1)

233-239: Use design-system button for consistency.

Prefer WnFilledButton (or the project’s standard) over ElevatedButton in bottom sheets for visual consistency.

-                        ElevatedButton(
-                          onPressed: () {
+                        WnFilledButton(
+                          onPressed: () {
                             // Navigate back - contacts should be loaded by new_chat_bottom_sheet
                             Navigator.of(context).pop();
                           },
-                          child: Text('shared.goBack'.tr()),
+                          label: 'shared.goBack'.tr(),
                         ),
CHANGELOG.md (1)

36-36: Reference the PR for traceability.

Link the fix to this PR.

-- Fixed start chat button cut off (and other bottom sheets).
+- Fixed start chat button cut off (and other bottom sheets). [#723]
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f972ca and a9e4e32.

📒 Files selected for processing (8)
  • CHANGELOG.md (1 hunks)
  • lib/ui/auth_flow/create_profile_screen.dart (1 hunks)
  • lib/ui/chat/chat_info/edit_group_screen.dart (1 hunks)
  • lib/ui/core/ui/wn_bottom_sheet.dart (2 hunks)
  • lib/ui/settings/profile/edit_profile_screen.dart (2 hunks)
  • lib/ui/settings/profile/switch_profile_bottom_sheet.dart (0 hunks)
  • lib/ui/user_profile_list/group_chat_details_sheet.dart (0 hunks)
  • lib/ui/user_profile_list/new_group_chat_sheet.dart (1 hunks)
💤 Files with no reviewable changes (2)
  • lib/ui/settings/profile/switch_profile_bottom_sheet.dart
  • lib/ui/user_profile_list/group_chat_details_sheet.dart
🚧 Files skipped from review as they are similar to previous changes (3)
  • lib/ui/chat/chat_info/edit_group_screen.dart
  • lib/ui/settings/profile/edit_profile_screen.dart
  • lib/ui/auth_flow/create_profile_screen.dart
🧰 Additional context used
📓 Path-based instructions (3)
**/*.dart

📄 CodeRabbit inference engine (.cursor/rules/flutter.mdc)

**/*.dart: Always declare the type of each variable and function (parameters and return value)
Avoid using dynamic and Object without justification
Create necessary types instead of overusing primitives or dynamic
One export per file
Use PascalCase for classes
Use camelCase for variables, functions, and methods
Avoid magic numbers and define constants
Start each function name with a verb
Use verbs for boolean variables (e.g., isLoading, hasError, canDelete)
Write short functions with a single purpose (under ~20 instructions)
Name functions with a verb plus context; for booleans use isX/hasX/canX; for void use executeX/saveX
Avoid deep nesting via early returns and extraction to utility functions
Use higher-order functions (map, where/filter, reduce) to avoid nesting
Use arrow functions for simple functions (under ~3 statements); use named functions otherwise
Use default parameter values instead of null checks
Reduce function parameters using RO-RO: pass/return parameter objects with declared types
Maintain a single level of abstraction within functions
Encapsulate data in composite types; avoid overusing primitives
Prefer validating data within classes rather than in functions
Prefer immutability; use final for runtime constants and const for compile-time constants
Use const constructors and const literals where possible
Follow SOLID principles
Prefer composition over inheritance
Declare interfaces (abstract classes) to define contracts
Write small classes with a single purpose (under ~200 instructions, <10 public methods, <10 properties)
Use exceptions for unexpected errors
Only catch exceptions to fix expected problems or add context; otherwise use a global handler

Files:

  • lib/ui/core/ui/wn_bottom_sheet.dart
  • lib/ui/user_profile_list/new_group_chat_sheet.dart
lib/**/*.dart

📄 CodeRabbit inference engine (.cursor/rules/flutter.mdc)

lib/**/*.dart: Use flutter_rust_bridge to access core app functionality
Use Riverpod for state management; prefer StreamProviders for Rust API streams; use keepAlive if needed
Use freezed to model/manage UI states
Controllers should expose methods as inputs and update UI state that drives the UI
Use AutoRoute for navigation and use extras to pass data between pages
Use Dart extensions to manage reusable code
Use ThemeData to manage themes
Use AppLocalizations for translations
Use constants to manage constant values
Avoid deeply nested widget trees; aim for a flatter widget structure for performance and readability
Break down large widgets into smaller, focused, reusable components
Keep the widget tree shallow to simplify state management and data flow
Utilize const constructors and const widgets wherever possible to reduce rebuilds

Files:

  • lib/ui/core/ui/wn_bottom_sheet.dart
  • lib/ui/user_profile_list/new_group_chat_sheet.dart
**/*.md

📄 CodeRabbit inference engine (.cursor/rules/whitenoise.mdc)

**/*.md: NIPs (Nostr Implementation Possibilities) are numbered like NIP-XX where XX are two capitalized hexadecimal digits, e.g., NIP-01 and NIP-C7.
To read a specific NIP, construct the NIP URL following this template: https://raw.githubusercontent.com/nostr-protocol/nips/refs/heads/master/{nip}.md (replace {nip} in the URL template with the relevant NIP name, e.g., 07 for NIP-07, or C7 for NIP-C7).
To read the definition of a specific kind, construct a URL following this template: https://nostrbook.dev/kinds/{kind}.md (replace {kind} in the template with the kind number, e.g., https://nostrbook.dev/kinds/0.md for kind 0).

Files:

  • CHANGELOG.md
🧠 Learnings (1)
📚 Learning: 2025-09-16T07:24:07.489Z
Learnt from: Quwaysim
PR: parres-hq/whitenoise_flutter#642
File: lib/ui/contact_list/new_chat_bottom_sheet.dart:324-336
Timestamp: 2025-09-16T07:24:07.489Z
Learning: In the whitenoise_flutter project, the user Quwaysim prefers to handle security improvements incrementally across different PRs rather than bundling them all together. Input trimming for search functionality was handled in PR #613, and private key security measures are planned for PR #505.

Applied to files:

  • CHANGELOG.md
🪛 GitHub Actions: CI
lib/ui/core/ui/wn_bottom_sheet.dart

[error] 128-128: Flutter analyze reported dead_code in lib/ui/core/ui/wn_bottom_sheet.dart:128:5. (dead_code).

🪛 LanguageTool
CHANGELOG.md

[style] ~36-~36: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ty in auth screens (iOS and Android). - Fixed start chat button cut off (and other bo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Flutter CI

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
lib/ui/user_profile_list/new_group_chat_sheet.dart (1)

210-244: Consider using WnButton for UI consistency.

The error state implementation is solid with proper loading, error display, and recovery action. However, the "Go back" button uses ElevatedButton while the rest of the app uses custom Wn*Button components.

Consider this change for consistency:

-                        ElevatedButton(
-                          onPressed: () {
-                            // Navigate back - contacts should be loaded by new_chat_bottom_sheet
-                            Navigator.of(context).pop();
-                          },
-                          child: Text('shared.goBack'.tr()),
-                        ),
+                        WnFilledButton(
+                          onPressed: () {
+                            // Navigate back - contacts should be loaded by new_chat_bottom_sheet
+                            Navigator.of(context).pop();
+                          },
+                          label: 'shared.goBack'.tr(),
+                        ),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c02f3d8 and e30c54e.

📒 Files selected for processing (1)
  • lib/ui/user_profile_list/new_group_chat_sheet.dart (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.dart

📄 CodeRabbit inference engine (.cursor/rules/flutter.mdc)

**/*.dart: Always declare the type of each variable and function (parameters and return value)
Avoid using dynamic and Object without justification
Create necessary types instead of overusing primitives or dynamic
One export per file
Use PascalCase for classes
Use camelCase for variables, functions, and methods
Avoid magic numbers and define constants
Start each function name with a verb
Use verbs for boolean variables (e.g., isLoading, hasError, canDelete)
Write short functions with a single purpose (under ~20 instructions)
Name functions with a verb plus context; for booleans use isX/hasX/canX; for void use executeX/saveX
Avoid deep nesting via early returns and extraction to utility functions
Use higher-order functions (map, where/filter, reduce) to avoid nesting
Use arrow functions for simple functions (under ~3 statements); use named functions otherwise
Use default parameter values instead of null checks
Reduce function parameters using RO-RO: pass/return parameter objects with declared types
Maintain a single level of abstraction within functions
Encapsulate data in composite types; avoid overusing primitives
Prefer validating data within classes rather than in functions
Prefer immutability; use final for runtime constants and const for compile-time constants
Use const constructors and const literals where possible
Follow SOLID principles
Prefer composition over inheritance
Declare interfaces (abstract classes) to define contracts
Write small classes with a single purpose (under ~200 instructions, <10 public methods, <10 properties)
Use exceptions for unexpected errors
Only catch exceptions to fix expected problems or add context; otherwise use a global handler

Files:

  • lib/ui/user_profile_list/new_group_chat_sheet.dart
lib/**/*.dart

📄 CodeRabbit inference engine (.cursor/rules/flutter.mdc)

lib/**/*.dart: Use flutter_rust_bridge to access core app functionality
Use Riverpod for state management; prefer StreamProviders for Rust API streams; use keepAlive if needed
Use freezed to model/manage UI states
Controllers should expose methods as inputs and update UI state that drives the UI
Use AutoRoute for navigation and use extras to pass data between pages
Use Dart extensions to manage reusable code
Use ThemeData to manage themes
Use AppLocalizations for translations
Use constants to manage constant values
Avoid deeply nested widget trees; aim for a flatter widget structure for performance and readability
Break down large widgets into smaller, focused, reusable components
Keep the widget tree shallow to simplify state management and data flow
Utilize const constructors and const widgets wherever possible to reduce rebuilds

Files:

  • lib/ui/user_profile_list/new_group_chat_sheet.dart
🧠 Learnings (1)
📚 Learning: 2025-09-15T20:51:15.316Z
Learnt from: Quwaysim
PR: parres-hq/whitenoise_flutter#639
File: lib/ui/auth_flow/login_screen.dart:140-165
Timestamp: 2025-09-15T20:51:15.316Z
Learning: In the whitenoise_flutter codebase, prefer simple context.pop() for back actions rather than more complex Navigator.maybePop() with fallback logic, as indicated by the maintainer Quwaysim.

Applied to files:

  • lib/ui/user_profile_list/new_group_chat_sheet.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Flutter CI
🔇 Additional comments (2)
lib/ui/user_profile_list/new_group_chat_sheet.dart (2)

174-209: UI restructuring looks clean.

The consolidation of the search field and paste button into a single row simplifies the layout and maintains proper functionality.


245-262: ****

Safe-area padding is already properly applied. The WnBottomSheet.show() method has useSafeArea = true as its default parameter (line 142 in wn_bottom_sheet.dart), which automatically applies the _calculateSafeAreaPadding helper to the entire sheet content (line 189). Since new_group_chat_sheet.dart calls WnBottomSheet.show() without explicitly overriding this parameter (lines 35-45), the safe-area padding is enabled by default and applies to all content within the sheet, including the continue button at lines 245-262. No additional padding implementation is needed in this file.

Likely an incorrect or invalid review comment.

@untreu2 untreu2 mentioned this pull request Oct 17, 2025
11 tasks
Copy link
Contributor

@josefinalliende josefinalliende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM

@Quwaysim Quwaysim merged commit 95b1219 into master Oct 22, 2025
2 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.

OS 3-button Navigation Partially Covers Start Chat Button

4 participants