Skip to content

TW-2940 Widen ios navigation#2941

Open
tddang-linagora wants to merge 1 commit intosprint/march26from
TW-2940/Widen-ios-navigation
Open

TW-2940 Widen ios navigation#2941
tddang-linagora wants to merge 1 commit intosprint/march26from
TW-2940/Widen-ios-navigation

Conversation

@tddang-linagora
Copy link
Collaborator

@tddang-linagora tddang-linagora commented Mar 19, 2026

Ticket

Resolved

Screen.Recording.2026-03-18.at.11.18.26.AM.mov

Summary by CodeRabbit

Release Notes

  • Enhancements
    • Enhanced iOS back gesture navigation with improved swipe-to-go-back functionality. The touch target area for the back gesture has been expanded, making navigation more responsive and reliable across all iOS devices and screen sizes. This improvement provides a smoother and more intuitive navigation experience when moving between screens.

@coderabbitai
Copy link

coderabbitai bot commented Mar 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f4b6535a-87b8-4ca9-a53e-f80e4c3953a7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch TW-2940/Widen-ios-navigation
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@github-actions
Copy link
Contributor

This PR has been deployed to https://linagora.github.io/twake-on-matrix/2941

Copy link

@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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lib/config/go_routes/go_router.dart`:
- Around line 268-276: The back-swipe zone (backGestureWidth: 100) for
TwakeCupertinoPage is being applied unconditionally for
DraftChatAdaptiveScaffold (and the other similar route) which expands the
leading-edge detector on web; guard the backGestureWidth with the responsive
check used elsewhere by only setting backGestureWidth: 100 when
_responsive.isMobile(context) is true (otherwise omit or set null/0), e.g.,
update the pageBuilder returning TwakeCupertinoPage for
DraftChatAdaptiveScaffold (and the other route that also sets backGestureWidth:
100) to compute the width based on _responsive.isMobile(context) so the widened
swipe area is only active on mobile.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7145adff-6bf5-44cb-9ef2-c40584d9229b

📥 Commits

Reviewing files that changed from the base of the PR and between 574496c and 56b4049.

📒 Files selected for processing (2)
  • lib/config/go_routes/go_router.dart
  • lib/widgets/twake_cupertino_page.dart

Comment on lines 268 to 276
pageBuilder: (context, state) {
final extra = state.extra as Map<String, String>;
return CupertinoPage(
return TwakeCupertinoPage(
child: DraftChatAdaptiveScaffold(
key: Key(extra['receiverId'] ?? ''),
state: state,
),
backGestureWidth: 100,
);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Scope the 100px back-swipe zone off web for these two routes.

Lines 270-275 and 543-546 are the only new backGestureWidth: 100 call sites that are not behind _responsive.isMobile(context). Because lib/widgets/twake_cupertino_page.dart Lines 250-258 install a full-height leading-edge detector, these pages now get the widened swipe strip on web too, not just on the mobile flow.

📌 Minimal fix
                 return TwakeCupertinoPage(
                   child: DraftChatAdaptiveScaffold(
                     key: Key(extra['receiverId'] ?? ''),
                     state: state,
                   ),
-                  backGestureWidth: 100,
+                  backGestureWidth: _responsive.isMobile(context) ? 100 : 20,
                 );
-                    return const TwakeCupertinoPage(
-                      child: PinnedMessages(pinnedEvents: []),
-                      backGestureWidth: 100,
+                    return TwakeCupertinoPage(
+                      child: const PinnedMessages(pinnedEvents: []),
+                      backGestureWidth: _responsive.isMobile(context) ? 100 : 20,
                     );

Based on learnings, only web and mobile are supported here, so these unguarded routes also change behavior on a supported web target.

Also applies to: 543-546

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/config/go_routes/go_router.dart` around lines 268 - 276, The back-swipe
zone (backGestureWidth: 100) for TwakeCupertinoPage is being applied
unconditionally for DraftChatAdaptiveScaffold (and the other similar route)
which expands the leading-edge detector on web; guard the backGestureWidth with
the responsive check used elsewhere by only setting backGestureWidth: 100 when
_responsive.isMobile(context) is true (otherwise omit or set null/0), e.g.,
update the pageBuilder returning TwakeCupertinoPage for
DraftChatAdaptiveScaffold (and the other route that also sets backGestureWidth:
100) to compute the width based on _responsive.isMobile(context) so the widened
swipe area is only active on mobile.

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.

2 participants