Skip to content

fix(ui): press StreamBackButton when its unread badge is tapped - #3025

Merged
xsahil03x merged 2 commits into
masterfrom
fix/back-button-ignore-indicator-tap
Sep 30, 2026
Merged

xsahil03x merged 2 commits into
masterfrom
fix/back-button-ignore-indicator-tap

Conversation

@xsahil03x

@xsahil03x xsahil03x commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Submit a pull request

Linear: FLU-

Github Issue: #

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

StreamBackButton overlays its unreadIndicator on the top-end corner of the button. The overlay absorbed taps, so tapping the unread badge on the channel header (and thread header) back button did nothing.

The indicator is now wrapped in IgnorePointer, so a tap on it presses the button. The unreadIndicator dartdoc states this.

Companion to GetStream/stream-core-flutter#193, which makes the same fix in StreamBadgeNotification's child overlay. The two are independent: StreamBackButton draws its own overlay.

Verified: new test tapping the unread badge presses the button in back_button_test.dart taps the badge's centre and expects onPressed; it fails without the change and passes with it. The other back button tests pass; no visual change.

Screenshots / Videos

N/A — no visual change.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Tapping the unread badge on the back button now activates the button’s action.

The unread indicator is overlaid on top of the button and absorbed taps, so
tapping the badge on the channel and thread header back button did nothing.
The indicator now ignores pointer events.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2a2e6e8e-7247-4422-8eb4-18293a259549

📥 Commits

Reviewing files that changed from the base of the PR and between c41dc79 and 9ef23ea.

📒 Files selected for processing (1)
  • packages/stream_chat_flutter/lib/src/misc/back_button.dart
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/stream_chat_flutter/lib/src/misc/back_button.dart

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

StreamBackButton now ignores pointer events on its unread indicator. Tapping the indicator invokes the button’s callback. A widget test covers this behavior, and the changelog records the fix.

Changes

Back button tap handling

Layer / File(s) Summary
Ignore unread indicator taps
packages/stream_chat_flutter/lib/src/misc/back_button.dart, packages/stream_chat_flutter/test/src/misc/back_button_test.dart, packages/stream_chat_flutter/CHANGELOG.md
The unread indicator is wrapped in IgnorePointer. The documentation and changelog describe the tap behavior. A widget test checks that tapping the indicator invokes the custom callback.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: renefloor

Merge Risk: ⚪ Minimal · up to 9ef23

The change makes unread-badge taps press the back button as intended. No merge-blocking issue was identified; merge after normal checks pass.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: allowing taps on the unread badge to activate the StreamBackButton.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@xsahil03x
xsahil03x enabled auto-merge (squash) September 30, 2026 10:28
@codecov

codecov Bot commented Sep 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.78%. Comparing base (85c7b1f) to head (9ef23ea).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3025   +/-   ##
=======================================
  Coverage   76.78%   76.78%           
=======================================
  Files         448      448           
  Lines       29167    29168    +1     
=======================================
+ Hits        22397    22398    +1     
  Misses       6770     6770           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xsahil03x
xsahil03x merged commit ba3a323 into master Sep 30, 2026
31 checks passed
@xsahil03x
xsahil03x deleted the fix/back-button-ignore-indicator-tap branch September 30, 2026 10:41
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