Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
|
This PR has been deployed to https://linagora.github.io/twake-on-matrix/2941 |
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
lib/config/go_routes/go_router.dartlib/widgets/twake_cupertino_page.dart
| 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, | ||
| ); |
There was a problem hiding this comment.
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.
Ticket
Resolved
Screen.Recording.2026-03-18.at.11.18.26.AM.mov
Summary by CodeRabbit
Release Notes