feat(activitypub): emit the actor document's profile-page url - #513
Closed
davidwkeith wants to merge 2 commits into
Closed
davidwkeith wants to merge 2 commits into
davidwkeith wants to merge 2 commits into
Conversation
The actor document never carried a top-level `url`, so every platform's "open original profile" link fell back to the actor `id` — the AS2 JSON document, not a web page. Resolve `ResolvedConfig.url` to `actor.url` or the `baseUrl` root (one actor per `baseUrl`, so the home page is the profile) and emit it via a new `ActorDocumentOptions.url` seam, threaded the same way as the FEP-2c59 `webfinger` back-link. Surfaced by Anglesite/Anglesite#1771. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Owner
Author
|
Reviewed the diff against CONTRIBUTING.md conformance — all good:
Code review — no bugs found, a couple of minor observations:
Nothing here blocks merge — checklist and implementation both look correct and minimal. Generated by Claude Code |
davidwkeith
enabled auto-merge (squash)
September 3, 2026 08:12
…ependent `respondToFollowRequest` goes through the real external DO stub, which arms a genuinely-due alarm the test environment fires on its own schedule. When that alarm won the race it resolved the pending Accept *and* drained it through the test's 202 fetch stub in the same pass, deleting the `delivery` row the 'authorize' test counted (CI: "expected [] to have a length of 1"); the 'reject' test had the same exposure via `pending_accept` → `delivery`. Count the activity wherever the alarm left it: still queued, or already POSTed through the stub. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
5 tasks
Owner
Author
|
Superseded by #514 — identical diff as one commit authored under the account's verified email, so the |
auto-merge was automatically disabled
September 3, 2026 15:58
Pull request was closed
davidwkeith
added a commit
that referenced
this pull request
Sep 3, 2026
The actor document never carried a top-level `url`, so every platform's "open original profile" link fell back to the actor `id` — the AS2 JSON document, not a web page. Resolve `ResolvedConfig.url` to `actor.url` (validated as an absolute URL at startup) or the `baseUrl` root and emit it via a new `ActorDocumentOptions.url` seam, threaded like the FEP-2c59 `webfinger` back-link. Also hardens the two follow-request delivery tests against the real DO alarm draining the queue first. Surfaced by Anglesite/Anglesite#1771. Supersedes #513. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
davidwkeith
added a commit
to Anglesite/Anglesite
that referenced
this pull request
Sep 3, 2026
* feat(#1771): thread AP_ICON into the ActivityPub actor document The served actor had no `icon`, so Mastodon, Misskey, Pixelfed, and Friendica all rendered their placeholder avatar. Thread a site-owned image through as a new `AP_ICON` wrangler var, next to AP_DISPLAY_NAME/ AP_USERNAME: `DeployCoordinator.resolveActivityPubIcon` reads a hand-editable `.site-config` `AP_ICON` override, else defaults to `/apple-touch-icon.png` whenever `public/` ships one (the template always does, and Settings ▸ Website Icon overwrites that exact file in place). `worker.ts` resolves a root-relative value against the serving origin at request time and drops anything non-http(s) or unparseable, matching `resolvePreferredUsername`'s posture for hand-edited config. Icon half of #1771 only — the `url` half is the package seam in davidwkeith/workers#513 and goes live with the @dwk/activitypub bump. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(#1788): require a non-empty apple-touch-icon for the AP_ICON default Review observation on #1788: the default only checked that the file existed, so a 0-byte apple-touch-icon.png (an interrupted icon install) would advertise an avatar every peer fetches and fails to render. Require a non-empty file; a corrupt-but-non-empty file stays undetected since this portable module has no image decoder. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(#1771): consume @dwk/activitypub 1.0.0-beta.5 for the actor url The package (davidwkeith/workers#514, released as 1.0.0-beta.5) now emits the actor document's `url`, defaulting to the baseUrl root, so every platform's "open original profile" lands on the site home page instead of the AS2 JSON. Pin it, regenerate the website-template attributions manifest CI diffs, and assert the served document's `url` in worker.test.ts. workers-version.json's pin map is brought back in line with package.json (it had drifted since #1073; nothing reads it but docs). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.
Summary
The actor document never carried a top-level
url, so every platform's "open original profile" link (Mastodon, Misskey, Pixelfed, Friendica) fell back to the actorid— the AS2 JSON document itself, not a web page. Surfaced by Anglesite's Fediverse interop conformance pass (Anglesite/Anglesite#1771).buildActorDocumentgains anActorDocumentOptions.urlseam and emits it as the actorurl(AS2 §4.1's human-readable representation, distinct fromid), mirroring how the FEP-2c59webfingerback-link is threaded.resolveConfigresolvesResolvedConfig.urltoactor.urlwhen set, else the normalizedbaseUrlroot (https://example.com/) — v1 serves one actor perbaseUrl, so the site's home page is the profile.ActorProfile.urlis the new optional override for a profile that lives elsewhere.Additive and backward-compatible: existing configs get the
baseUrl-root default automatically.Packages affected
@dwk/activitypub
Checklist
spec/packages/and updated them ifbehaviour changed —
spec/packages/activitypub.md▸ "Actor & collections" gains theurlbulletsrc/*.test.ts) —as2.test.ts(emit/omit),config.test.ts(default, trailing-slashbaseUrl,actor.urloverride),index.test.ts(served document carriesurl)pnpm lint && pnpm format:check && pnpm typecheck && pnpm build && pnpm test— lint, format, typecheck, build clean;pnpm test --project @dwk/activitypub376 passed (16 files). The first CI run failed onmastodon-api.test.ts▸respondToFollowRequest(actor, 'authorize') …("expected [] to have a length of 1"), which also failed once locally: the real DO alarm can resolve and drain the queuedAcceptthrough the test's 202 fetch stub before the assertion reads thedeliveryrow. The second commit hardens that test and its 'reject' sibling to count the activity wherever the alarm left it — a test-only change, unrelated to the actor document.pnpm changeset) if this touches a publishablepackage —
.changeset/actor-profile-url.md, minor (new optional field + new emitted property)catalog.json/conformance/status.jsonif this adds a newmountable worker or changes conformance status — not applicable: no new worker, conformance status unchanged
🤖 Generated with Claude Code