Repository navigation
Conversation
link_detection.json and link_metadata.json come from orchestrator c7ba7f4. The classifier fails on the five web vectors until LinkCard.Web lands. The detection vector test now lists every failing vector, not the first.
*example.com/foo* underlined the closing * as part of the link. A trailing *, _ or ~ is now dropped once when the same marker directly precedes the link. Patterns.WEB_URL also backed off before a * or ~ that was followed by a space, which NSDataDetector keeps, so a path is extended over them first. All link_detection.json vectors pass.
Nothing depends on it, and web link previews use their own fetcher held to the Phase 2 fetch rules instead of its jsoup one.
HttpUrl decodes https://ex%61mple.com/ to example.com and would fetch it, while iOS keeps the escape. Both apps now refuse such a host.
A message whose text is only its web link, once the card resolves, draws as the card alone in the bubble's corners for its place in the run. The link text is hidden and the panel fill is the surface. Loading, empty, failed and tap-to-load states keep the text bubble, and a held answer that expires and comes back empty returns to it. "Only the link" shares splitAroundLinkCard's rule through LinkCard.isAloneIn. The Edited marker follows the bare Flipcash card placement.
The whole cash card was one combinedClickable with a double-tap handler, so the Claim pill waited out the double-tap window like the card body. The pill is now its own click target that does what the card tap does for a claimable voucher; the rest of the card keeps the double-tap reaction.
bmc08gt
force-pushed
the
feat/web-link-previews
branch
from
October 8, 2026 23:09
1f13e44 to
6415719
Compare
Copies link_metadata.json from orchestrator test/web-address-ranges (7cb34f0), which adds 13 address rows for the D14 ranges. The local range tests now keep only the block edges and Java's mapped-address forms that the fixture rows leave out.
nhl.com's preview image is opaque and almost the chat's own colour, so a bare card's top half read as part of the chat. A bare web card and its placeholder now draw the bare group card's outline (1dp, white at 10%) over the image. A card inside a bubble keeps the bubble as its edge and draws none.
… drop the redirects-shared-4 override The fixture now caches only the original key when the shared redirect budget runs out during the home-page fallback, which is what the lookup already does.
…arries a secret https://flipcash.com/ showed no preview because every non-card link on a Flipcash host was kept as plain text. Links on flipcash.com and www.flipcash.com now fall through to a web card. A first path segment of login, verify, c or cash never does: the router matches those paths on any host, so flipcash.com/login/e=<seed> would otherwise be fetched with the seed in its path. Neither does a link with a fragment. The app hosts are unchanged. link_detection.json is synced from orchestrator #45 (b9627fe).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rich-link spec Phase 2 for Android. An outside
httpslink in a chat message now gets a preview card, built from the page's<head>, drawn inside the bubble under the text. Members of a group and anyone in a DM see it automatically. Non-members of a group get a "Show preview · " chip first, so viewing a group they haven't joined never makes a request to a site they didn't choose. iOS is doing the same work in parallel, and both apps are held to the sharedlink_detection.jsonandlink_metadata.jsonfixtures from the orchestrator.What changed
LinkCard.Webjoins the Flipcash card types. A message gets one card: the first Flipcash card in text order, otherwise the first eligible web link. The chat detector now drops a closing*,_or~when the same marker opens the link, so it passes every detection vector.WebLinkLookupmakes the page request on a pinned OkHttp client: no cookies, no cache, no proxy, no automatic redirects, andPublicOnlyDnsrefusing private and special-use addresses on every hop. The body is capped at 512 KiB uncompressed, there are at most 4 requests per page, and one lookup gets 10 s in total.WebPageParserreads the head, and the fixture's 20pagesvectors pass.web:<cacheKey>rows, so no schema change). Failures are never stored.FeatureFlag.WebLinkPreviewsis on by default and not launched, so staff can turn it off. When it's off, there's no web card, chip, prefetch or image fetch.libs:opengraph, which nothing used.The fetcher had a red-team pass before it was wired in. It found a system proxy bypassing the address check, unfiltered NAT64, 6to4 and special-use ranges, escaped hosts in redirects, and a per-request timeout that let one lookup hold a slot for about 40 s. Each fix has a test that fails without it.
Parity decisions
Agreed with the iOS session; the iOS PR lists the same items.
</heador<body(case-insensitive), including a marker split across two reads; with neither, the 1 MiB cap applies.https://<final host>/, unless the final path is already/with no query. 410, 429, other 4xx and 2xx non-HTML give None; 5xx fails.Known differences (accepted)
Sibling iOS PR: code-payments/code-ios-app#1025