my prefect server setup prefect-metrics.waow.tech
python orchestration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix tangled URLs: link to issues/pulls list page instead of broken rkey URLs

the PDS doesn't store sequential issue numbers — those are appview-only.
rkey-based URLs (e.g. /issues/3mft4plipuu22) render blank pages on tangled.org.
link to the list page until tangled.org exposes a JSON API for issue numbers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

zzstoatzz 63051680 fbeda3e7

+7 -9
+7 -9
packages/mps/src/mps/tangled.py
··· 26 26 parent_uri: str | None = None 27 27 28 28 29 - def _rkey(uri: str) -> str: 30 - """Extract rkey from an at:// URI.""" 31 - return uri.rsplit("/", 1)[-1] 29 + def build_tangled_url(repo_name: str, kind: str) -> str: 30 + """Construct a tangled.org web URL. 32 31 33 - 34 - def build_tangled_url(repo_name: str, kind: str, rkey: str) -> str: 35 - """Construct a tangled.org web URL.""" 32 + Links to the issues/pulls list page — the PDS doesn't store sequential 33 + issue numbers (those are appview-only), so we can't deep-link yet. 34 + """ 36 35 segment = "pulls" if kind == "pr" else "issues" 37 - return f"https://tangled.org/{HANDLE}/{repo_name}/{segment}/{rkey}" 36 + return f"https://tangled.org/{HANDLE}/{repo_name}/{segment}" 38 37 39 38 40 39 def fetch_repo_at_uris(client: httpx.Client) -> dict[str, str]: ··· 104 103 if repo_name is None: 105 104 continue 106 105 107 - rkey = _rkey(uri) 108 106 items.append( 109 107 TangledItem( 110 108 repo=repo_name, 111 109 kind=kind, 112 110 title=value.get("title"), 113 111 body=value.get("body", ""), 114 - url=build_tangled_url(repo_name, kind, rkey), 112 + url=build_tangled_url(repo_name, kind), 115 113 at_uri=uri, 116 114 author_did=DID, 117 115 author_handle=HANDLE,