Skip to content

Conversation

@radomir9720
Copy link
Contributor

@radomir9720 radomir9720 commented Nov 11, 2025

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

The hyperlink text was mistakenly passed to the onLinkTap callback instead of the actual href. Consequently, when a markdown hyperlink like [google link](https://google.com) was encountered, instead of directing the user to the intended https://google.com, the browser was opened with the text google link itself.

Summary by CodeRabbit

  • Documentation

    • Updated contribution guidelines: added a changelog update subsection, revised testing commands, and removed outdated development workflow/process instructions.
  • Refactor

    • Improved message text handling: refined mention and link detection and fixed link parameter usage so tapped links open the correct URL.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

Removed development workflow guidance in CONTRIBUTING.md and updated message text handling in the Flutter message widget: renamed the onTapLink callback parameter from link to text, adjusted mention detection to use text.startsWith('@'), and switched non-mention link handling to use href for URL actions.

Changes

Cohort / File(s) Summary
Documentation
CONTRIBUTING.md, packages/stream_chat_flutter/CHANGELOG.md
Removed the "Our Process" development-branch/PR guidance from CONTRIBUTING.md; added CHANGELOG note about fixing link text vs href being passed to onLinkTap. Also updated testing guidance in CONTRIBUTING.md to mention melos run test:dart and melos run test:flutter.
Message Text Widget Refactoring
packages/stream_chat_flutter/lib/src/message_widget/message_text.dart
Renamed onTapLink first parameter from link to text; updated mention detection to check text.startsWith('@') and compare against text; for non-mention links, use href (not link) when invoking onLinkTap and when launching URLs.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant UI as MessageText widget
    participant Handler as onTapLink handler
    participant Launcher as URL launcher

    UI->>UI: User taps a link/text
    alt text starts with '@' (mention)
        UI->>Handler: onTapLink(text, ... )  %% mention case passes full text
    else non-mention link
        UI->>Handler: onLinkTap(text, href, ... )  %% pass href for URL actions
        Handler-->>Launcher: request open href
        Launcher-->>Handler: open result
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to all call sites of onTapLink to ensure parameter rename (linktext) is consistent.
  • Verify mention detection change (startsWith + equality checks) handles edge cases (punctuation, whitespace).
  • Confirm href is used consistently for URL launching and that no call sites still expect the previous link value.

Suggested reviewers

  • renefloor
  • xsahil03x

Poem

🐰 A tap, a hop, a gentle fix so spry,
Text renamed and links now fly,
Docs trimmed neat, changelog sings,
Rabbit cheers for tidy things! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main fix: changing onLinkTap to receive link href instead of text, which matches the core change in message_text.dart.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 63fdad1 and 37e06be.

📒 Files selected for processing (2)
  • CONTRIBUTING.md (1 hunks)
  • packages/stream_chat_flutter/CHANGELOG.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/stream_chat_flutter/CHANGELOG.md
🔇 Additional comments (2)
CONTRIBUTING.md (2)

171-173: Both Melos commands are correctly defined in melos.yaml.

The verification confirms that test:dart and test:flutter scripts are properly defined in the project's melos.yaml configuration with appropriate package filters and commands. The CONTRIBUTING.md documentation accurately references these scripts.


163-165: All verification checks passed—no issues found.

The CHANGELOG.md and Testing guidance in the updated CONTRIBUTING.md is accurate and aligned with the actual project structure:

  • CHANGELOG.md Updates: Correctly directs contributors to update per-package CHANGELOGs (5 exist in packages/; no auto-generation pipeline)
  • Testing commands: Both melos run test:dart and melos run test:flutter are valid and properly defined in melos.yaml

The documentation changes are appropriate and require no modifications.


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.

@radomir9720 radomir9720 changed the title fix(ui): link text was passed to the onLinkTap callback instead of link href fix(ui, repo): link text was passed to the onLinkTap callback instead of link href Nov 11, 2025
@radomir9720 radomir9720 changed the title fix(ui, repo): link text was passed to the onLinkTap callback instead of link href fix(ui): link text was passed to the onLinkTap callback instead of link href Nov 11, 2025
@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.99%. Comparing base (8b8e29d) to head (37e06be).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...t_flutter/lib/src/message_widget/message_text.dart 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2437   +/-   ##
=======================================
  Coverage   63.99%   63.99%           
=======================================
  Files         415      415           
  Lines       25949    25949           
=======================================
  Hits        16606    16606           
  Misses       9343     9343           

☔ View full report in Codecov by Sentry.
📢 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 f9d2116 into GetStream:master Nov 11, 2025
19 of 21 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.

2 participants