Skip to content

fix(ui): enrich link previews for uppercase URL schemes#2844

Merged
xsahil03x merged 1 commit into
v9from
sahil/flu-625-url-enrichment-uppercase-https-v9
Jul 23, 2026
Merged

fix(ui): enrich link previews for uppercase URL schemes#2844
xsahil03x merged 1 commit into
v9from
sahil/flu-625-url-enrichment-uppercase-https-v9

Conversation

@xsahil03x

Copy link
Copy Markdown
Member

Summary

Fixes FLU-625 for the v9 release line. URLs with an uppercase scheme (e.g. HTTPS://example.com) were not enriched into link previews, while lowercase https:// worked.

The composer's URL regex already matched uppercase schemes, but the raw matched text was forwarded to client.enrichUrl(...) verbatim — so the /og endpoint received HTTPS://… and failed to enrich. The fix normalizes the scheme (via Uri.parse, which lowercases it) before enriching, so HTTPS:// behaves the same as https://.

Flutter counterpart to the React (#3226) and Angular (#734) fixes. v10 counterpart: #2843.

Scope

This fixes the composer link-preview enrichment path. Display-side linkification of uppercase schemes in rendered message text lives in stream_core_flutter and is out of scope here.

Testing

Added message_input_url_enrichment_test.dart — asserts enrichUrl is called with the normalized https://example.com for both uppercase and lowercase input. Fails before the fix, passes after.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 46a5bf72-dd7f-4e5d-a630-02953737edd7

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:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sahil/flu-625-url-enrichment-uppercase-https-v9

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.

@xsahil03x
xsahil03x force-pushed the sahil/flu-625-url-enrichment-uppercase-https-v9 branch from 914bfc8 to 6fa1172 Compare July 23, 2026 10:08
@xsahil03x xsahil03x changed the title fix(message_input): recognize uppercase URL schemes for link enrichment fix(ui): enrich link previews for uppercase URL schemes Jul 23, 2026
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (v9@d592483). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff          @@
##             v9    #2844   +/-   ##
=====================================
  Coverage      ?   67.19%           
=====================================
  Files         ?      430           
  Lines         ?    27146           
  Branches      ?        0           
=====================================
  Hits          ?    18242           
  Misses        ?     8904           
  Partials      ?        0           

☔ 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.

Uppercase schemes like `HTTPS://` were detected but forwarded verbatim
to the enrichment endpoint, which failed to return link-preview data.
Normalize the scheme before enriching so `HTTPS://` behaves like
`https://`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xsahil03x
xsahil03x force-pushed the sahil/flu-625-url-enrichment-uppercase-https-v9 branch from 6fa1172 to 5bcd890 Compare July 23, 2026 10:42
@xsahil03x
xsahil03x merged commit b861588 into v9 Jul 23, 2026
24 checks passed
@xsahil03x
xsahil03x deleted the sahil/flu-625-url-enrichment-uppercase-https-v9 branch July 23, 2026 12:38
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