Repository navigation
show terms linked on GitHub, to register and receive names - #22
Merged
Merged
Conversation
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.
The
.simplexv2 deployment sets the name policy's terms to GitHub raw links of one file at one commit with its sha256:https://raw.githubusercontent.com/simplex-chat/simplex-chat/<40-hex commit>/<path>.md#sha256=<64-hex>On
simplex,parseTermsLinkreturns a parsed link only for git.simplex.chat commit links and loopback links (useNameTerms.ts#L15-L34). For a GitHub link it returns nothing, so no text is fetched and no hash is accepted:The v1 name policy that the production build reads (
0xf7054e2f…b823) links both kinds tohttps://git.simplex.chat/simplex-chat/simplex-chat/raw/commit/d94981224a366a433f2d42388effff720419f9fd/docs/NAMES-CONDITIONS.md#sha256=620f9e9b…(generalTermsLink()andcommunityTermsLink(), read on 2026-11-20), so that form remains accepted beside the new one. The webstore and the store service already accept both hosts (simplex-chat/simplex.domainsnames,webapp/src/api.ts,termsLinkandreaderUrl; simplex-chat/simplex-chatnames,StoreService/Names/Contracts.hs,termsLinkParts).Parser —
src/hooks/useNameTerms.tsTERMS_LINKalso matcheshttps://raw.githubusercontent.com/simplex-chat/simplex-chat/<40 lower-case hex>/<path>.md#sha256=<64 lower-case hex>; the path rules and the required sha256 are unchanged.https://git.simplex.chat/simplex-chat/simplex-chat/src/commit/<commit>/<path>for a git.simplex.chat link, as before;https://github.com/simplex-chat/simplex-chat/blob/<commit>/<path>for a GitHub link, as the webstore maps it.What users and admins see
src/components/NameTerms.tsx: the link under the terms reads "View this version", without a host.src/pages/admin.tsx: the placeholder shows the GitHub form; the description names the raw link at a full commit hash on either host.Tests
src/hooks/useNameTerms.test.ts: a GitHub link read with its text URL and GitHub page; refused: a github.com page, a branch, an abbreviated commit, an upper-case commit, another repository, a fork.src/__tests__/pages/admin.test.tsx: the general terms setter sends a GitHub link; both setters shareTermsSettings.Checks (fork CI)
AvatarUpload.test.tsx, which fails the same way onsimplex(fixed by test: fix avatar upload tests for the timeout signal and status check #21).https://github.com/brenzi-agent/simplex-domains-app-v3/actions/runs/44751313797
simplex(branchab/terms-links-github-before, 864d8cb): the GitHub read test and the GitHub admin case fail; the six refusals pass, as every GitHub link is refused onsimplex.https://github.com/brenzi-agent/simplex-domains-app-v3/actions/runs/44751315626
Merge with #19: #19 changes other lines of
NameTerms.tsx,useNameTerms.ts,useNameTerms.test.tsandadmin.tsx; a trial merge of its head 4f1f9b7 into this branch completes without conflicts. With #19 merged first, holders can also renew under GitHub terms, and the title reads "show terms linked on GitHub, to register, receive and renew names".The dApp is deployed from
production, so users get this change whenproductionis moved past its merge.