Repository navigation
fix(navigation): slide departing chat routes across the full viewport - #226
Conversation
iebb
left a comment
There was a problem hiding this comment.
Reviewed bed06f3 against current master f311e34. The change distinguishes a departing chat route from arrival while preserving interactive swipe scrims, reduced motion, and desktop in-place behavior. All 34 focused route, pointer, opacity/compositing, motion, and shell tests pass. Both ordinary pop and actual phone-header-back regression tests independently fail on unchanged master at 8.52px movement after 90ms, then pass with the full-viewport exit. The previous route remains undimmed and pop frames add no opacity layer.
Independently reviewed the actual production diff and affected entry points. The completed contribution template is present; classification is compliant/unchanged, with no Section 1.4 feature or required exception guard. No authentication, protocol/native, storage-schema, release/deployment, or official-build flag path changes. Credential-free snapshots use secrets_example.dart only. The combined intended master tree 6202d9cf8812ed9ca91a39422039a4cfbcee0102 passes all 3,449 unit/widget tests (one existing skip), formatting of 999 files with zero changes, full analysis, 8 locales x 3830 keys / 9 generated locale assets, visible-string and registration checks, and explicit false/true/invalid build-flag tests. Current exact-head Quality is green. Platform evidence here is shared Flutter layout/navigation/selection testing, not native-device QA; no Telegram, real account, deployment, or store action was used.
Change
On compact/mobile layouts, popping a conversation route (
AppChatPageRoute) via the header back button or programmaticNavigator.pop()previously ran the arrival transition in reverse: a 4.5% horizontal shift (Offset(0.045, 0)) at full opacity (_EntranceFadepins departing alpha to1.0so no offscreenOpacityLayeris composited during the return transition). Because the conversation slid only ~17.5 px over 240 ms while staying 100% opaque, it barely nudged to the right before vanishing abruptly on the final frame.A departing
AppChatPageRoute(animation.status == AnimationStatus.reverse || animation.status == AnimationStatus.dismissedas well as an active full-page back swipe) now slides across the full viewport width (Offset(1, 0)toOffset.zero) withAppMotion.standard.flippeddeceleration in the reverse direction, matching the full-width exit motion used when committing an interactive back swipe while keeping non-gesture pops free of any scrim/opacity layer. Desktop in-place navigation and reduced-motion behavior remain unchanged.Affected files (
git show --statonbed06f3f):lib/app/app_navigator.dart(+15 / -10)test/full_page_back_swipe_test.dart(+9 / -3)test/main_tab_motion_test.dart(+46 / -0)Telegram API Terms classification
Follow the contribution and agentic review rules. Select exactly one classification and explain it below.
This is an agentic source-code review classification. Every store version must remain compliant with applicable Telegram API Terms; the guarded-source exception does not apply to store distribution or review.
allowTelegramTosViolations(I_DONT_FUCKING_CARE_ABOUT_TOS), disabled in official builds, and available only in an explicitly enabled self-build.Reason and affected Telegram behavior:
Client-only UI route transition adjustment in
AppChatPageRoute.buildTransitions(lib/app/app_navigator.dart). No TDLib requests, Telegram API calls, privacy/presence behavior, or message handling are modified.Basic checks (every PR)
Check each item after verification. If a check is inapplicable, explain why in the evidence below before checking it.
dart format --output=none --set-exit-if-changed lib test integration_test test_driver.flutter analyze.flutter test --concurrency=4.Commands, results, platform/build/UI evidence, and reasons for inapplicable checks:
~/.cache/dart3122/bin/dart format --output=none --set-exit-if-changed lib/app/app_navigator.dart test/full_page_back_swipe_test.dart test/main_tab_motion_test.dart→Formatted 3 files (0 changed)/tmp/flutter-3.44.2/bin/flutter analyze lib/app/app_navigator.dart test/full_page_back_swipe_test.dart test/main_tab_motion_test.dart→No issues found!python3 tool/check_l10n_strings.py→No visible UI string literals outside lib/l10n.python3 translations/tools/check.py→8 locales x 3829 keys (11 counted): OKpython3 translations/tools/gen_assets.py --check→9 locale assets are up to datepython3 tool/gen_registration_anchors.py --check→ exit 0/tmp/flutter-3.44.2/bin/flutter test --no-pub -j 1 test/full_page_back_swipe_test.dart test/chat_route_pop_opacity_test.dart test/app_chat_navigator_test.dart test/app_motion_test.dart test/main_tab_motion_test.dart→00:41 +34: All tests passed!):test/full_page_back_swipe_test.dart:ordinary pop slides the conversation across the full viewport(fails pre-fix at 90 ms withActual: <8.517952611297368>vsgreaterThan(180); passes post-fix and verifies the revealed previous route is undimmed).test/main_tab_motion_test.dart:phone chat back button slides the conversation out across the viewport(pumpsMainSplitRootViewon a 390×844 phone viewport, opens aChatViewroute, taps the header back button, assertsmidPopLeft > 180 && midPopLeft < 390at 90 ms — failing pre-fix at8.52— and verifies the route completes back toChatListView).test/chat_route_pop_opacity_test.dart:a conversation fades in but leaves without an opacity layer(verifies zero< 255OpacityLayers across all 8 pop frames).Section 1.4 exception checks
Complete every item for an exception. For a compliant/unchanged PR, write
Not applicablehere.Not applicable
--dart-define=I_DONT_FUCKING_CARE_ABOUT_TOS=false, the feature is absent and ordinary Telegram behavior remains intact.--dart-define=I_DONT_FUCKING_CARE_ABOUT_TOS=true, the feature works through the guarded entry points in a self-build; I included relevant test and build/UI evidence.falseand have no option that enables it. All store versions remain compliant with applicable Telegram API Terms.Guard locations and evidence for each flag variant:
Not applicable
Agentic reviewer confirmation
Agentic code reviewer only: record this confirmation in the PR review or check these boxes before approval.