Repository navigation
feat: share an item from the meta row - #237
Merged
Merged
Conversation
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
August 29, 2026 12:16
5b0eb92 to
eb15585
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
August 29, 2026 12:19
a25b1ea to
5c97d92
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
August 29, 2026 13:13
ebfd1bc to
f7d80bb
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
August 29, 2026 13:17
5c97d92 to
3fca45e
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
August 29, 2026 13:27
f7d80bb to
c52938b
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
August 29, 2026 13:27
3fca45e to
1a47010
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
August 29, 2026 13:45
c52938b to
5c1ad50
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
August 29, 2026 13:47
1a47010 to
67dd732
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
August 29, 2026 14:05
5c1ad50 to
a160b4a
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
August 29, 2026 14:05
67dd732 to
a50ba63
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
August 29, 2026 18:11
a160b4a to
b04e134
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
August 29, 2026 18:12
a50ba63 to
2ef5a32
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
August 29, 2026 20:03
b04e134 to
bb8e7fe
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
August 29, 2026 20:13
2ef5a32 to
a20ba97
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
September 1, 2026 23:12
bb8e7fe to
7026195
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
September 1, 2026 23:13
a20ba97 to
84d014b
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
September 2, 2026 04:22
7026195 to
f37041f
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
September 2, 2026 04:22
84d014b to
ad78bb4
Compare
therealsama
force-pushed
the
feat/mobile-touch-feel
branch
from
September 2, 2026 04:45
f37041f to
4d30236
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
September 2, 2026 04:47
ad78bb4 to
8a26914
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
September 6, 2026 13:19
8a26914 to
ae4e063
Compare
therealsama
force-pushed
the
feat/native-share-sheet
branch
2 times, most recently
from
October 3, 2026 23:47
7129006 to
3d5ae33
Compare
`navigator.share` was unused, so the only way to lift a link out of the swipe feed was the iOS long-press callout, which hands over the article or a third-party URL and never this app's own link to the item. A share control in ItemArticle's meta row covers both the desktop detail page and the mobile panel from one insertion. Where there is no share sheet (desktop Firefox), the URL goes to the clipboard instead, and because a silent copy has no system confirmation the label reports it. A press while an earlier share is still pending falls through to the clipboard too, since browsers have left a dismissed share pending for good. The long-press callout stays on the headline and prose links: the share control carries the item's own link, not the article or the third-party URLs in the text.
therealsama
force-pushed
the
feat/native-share-sheet
branch
from
October 3, 2026 23:52
51bd9b0 to
78e5fd2
Compare
therealsama
enabled auto-merge
October 4, 2026 02:08
kplachkov
approved these changes
Oct 4, 2026
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.
Why
navigator.sharewas never wired up, so the only way to lift a link out of theswipe feed was the iOS long-press callout — and that hands over the article or a
third-party URL, never this app's own link to the item. There was no in-app
route to that link on any platform.
What
ItemArticle's meta row.ItemArticleismounted by both
ItemDetail(desktop) andFullScreenItem(mobile swipe), soone insertion covers both surfaces.
location.originandBASE_URLso preview deploys and local runs share their own URL.clipboard. The share sheet is its own confirmation, but a copy is silent, so
only that path reports back, via the label plus a live region.
a button that cannot act.
itself two seconds after being pressed.
clipboard. Browsers have left a dismissed share pending for good, and the
rejection (
InvalidStateError) comes before the click's activation is used,so the copy still works and the button never goes dead.
control carries the item's own link, not the article the headline points to or
the third-party URLs in
.comment-content(the story body and every commentbody), so on iOS the callout is still the only route to those.
The capability matrix lives in
src/utils/share.tsrather than the component,since it is most of the complexity and is worth testing without rendering.
Notably, a dismissed share sheet arrives as an
AbortError, so it has to be toldapart from a real fault before the clipboard fallback kicks in — otherwise
backing out of the sheet would silently copy instead.
Known limitations
fallback can be refused in Firefox and Safari, which require activation to
write. The button then stays silent rather than claim a copy.
AbortErroras a dismissal,so on such a system the button does nothing.
/#/item/…links unfurl as the generic HackerTok card, since hashroutes aren't crawlable. Recipients see the headline only where the target
uses
title.Test plan
src/utils/share.test.ts— the full capability matrix: sheet preferred,dismissal distinguished from failure, fallthrough to clipboard on other errors,
clipboard-only platforms, a refused copy reported as unavailable rather than
claimed as success.
src/components/ShareButton.test.tsx— hidden without capabilities, stableaccessible name, payload, a later press still copying when an earlier share
never settles, silence after a successful share, visible and announced
confirmation on copy, revert after 2s, no timer left past unmount.
e2e/share.spec.ts— both APIs installed as recorders before boot (the sheetis OS chrome Playwright cannot see, and clipboard access needs per-browser
permission grants), asserting the exact shared URL on the desktop detail page
and inside the swipe viewer, the copy path with its announcement, and that no
control renders on a platform with neither route. The swipe test runs with a
narrow viewport and
hasTouch, so the viewer mounts in the desktop projectstoo. 16 tests across all four projects.
Commands run locally:
The full lint, unit and e2e suites run in CI.