Build and read https://loopky.app deck and profile links - #343
Merged
Merged
Conversation
A pubky:// address is plain text in a pubky.app post and in most chat clients. Deck.webUrl and PubkyLinks.profileWebUrl build the https form (/deck/?author=…&id=…, /profile/?pubky=…) the landing site answers, and PubkyLinks.parse reads it back, so a tapped, pasted or scanned web link lands on the same screen a pubky:// one does. The web form is stricter: the account must be a real key, since anyone can hand-edit a URL. Query parameters rather than path segments because the site is static GitHub Pages, where a path route only exists as a 404.html. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jvsena42
added this pull request to stack #346
September 25, 2026 13:10
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.
Step 1 of 3. Adds the https form of Loopky's links and teaches the link parser to read it. Nothing emits the new links yet.
Deck.webUrl→https://loopky.app/deck/?author={pubky}&id={deckId}PubkyLinks.profileWebUrl→https://loopky.app/profile/?pubky={pubky}PubkyLinks.parseaccepts both, including the forms a browser or chat leaves behind:www., no trailing slash, reordered params,#fragment, UTM params, a link inside a sentence. The web form is stricter thanpubky://: the account must be a real key.decodeUriComponentsits next to the existing encoder.Why query params, not a path: the site is static GitHub Pages, where a path route only exists as a
404.htmlserved with status 404.Landing side: jvsena42/loopky.github.io#1 (the pages, plus
assetlinks.json).Tests:
PubkyLinksTestcovers round trips, escaped ids, and look-alike hosts such asloopky.app.evil.testand a loopky link nested inside another URL.🤖 Generated with Claude Code