Skip to content

Extended profile: a WebID on your own domain works with every profile step (#26) - #29

Merged
nicolasdb merged 3 commits into
mainfrom
claude/extended-profile-26
Nov 27, 2026
Merged

nicolasdb merged 3 commits into
mainfrom
claude/extended-profile-26

Conversation

@nicolasdb

@nicolasdb nicolasdb commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Closes #26 (writers and readers of solid-kit ADR 002's amendment of 2026-11-26). The two "Bring your domain" paths (#27, #28) are not in this PR.

Why

A tier-1 WebID (https://id.openfab.be/profile/card#me) is a static file that no app can write. Because of that, every profile step ("Use this inbox", the name, "May act for you", joining a collective) failed with a NetworkError.

Readers (src/lib/collective.ts)

  • readProfileDocuments / readProfile return the profile plus the documents it links with rdfs:seeAlso or foaf:isPrimaryTopicOf.
    • They follow one level only.
    • They keep only linked documents inside a pim:storage the profile itself declares (prefix match).
    • A linked document that fails to load is skipped.
    • Reads go through read.ts (ADR 007). A profile with no links still costs one request.
  • There is one function per decision: declaresMembership and declaredDelegates. admin.ts uses them in requestFlags, memberState and readersOf, and readPerson reads through the merged profile.
  • readName also uses the merged read.
  • readOwnProfile covers one more case: the profile can't be written and links nothing, but profile/about.ttl exists in your storage. It then also counts that file for you, and flags it as unlinked. This way a step you just saved doesn't look undone. Others never read it until it is linked.

Writers (updateOwnProfile, same signature, now returns { document, linkToAdd })

  1. Fresh GET of the profile. If it answers as writable, the step writes the profile itself.
    • WAC-Allow's user decides when it is there: it must hold write or append. CSS lists PATCH in Allow whatever you may do.
    • Without WAC-Allow, an Allow that lists PATCH or PUT counts as writable.
  2. Otherwise the step writes the linked extended document inside the profile's own storage.
  3. If there is none, it creates profile/about.ttl with If-None-Match: *, then its .acl through acl.ts (setPublicAccess: public Read, owner Read/Write/Control), then writes there. You then shows "Link your extended profile" with the two lines and a copy button.

Network failures become a sentence that names the document, never "Failed to fetch". A static profile with no pim:storage is refused, and the message names the missing line. The write itself is still solid-client's triple-diff PATCH, the same mechanism the profile already used; no If-Match PUT was added.

Two cases are handled for a static card that already holds lines of its own, as OpenFab's does:

  • Name: in the merged read, the extended profile's name wins over the card's. Without this, the name step would never seem to change anything.
  • Remove or leave: removing a delegate or leaving a collective that the card itself declares is refused, with a sentence saying where to remove the line. Before, it would PATCH about.ttl with nothing to remove, report success, and the line would come back on the next read.

You (src/you.ts)

The source panel says when the profile can't be written by apps. Each extended profile is shown below the profile with its address, "Open in Pods" and marked lines. Links outside your storage are listed as not read.

Tests

  • src/lib/profile.test.ts (fake server at ./auth) covers:
    • a writable profile writes the profile;
    • a static profile with a linked about.ttl writes about.ttl;
    • a static profile with no extended doc creates about.ttl and its acl (order and contents pinned) and returns the two lines;
    • no storage is refused;
    • no "Failed to fetch" is shown;
    • membership only in about.ttl counts (readPerson, requestFlags, memberState);
    • a link outside storage is ignored and not fetched;
    • a failing link is skipped, and only one level is followed;
    • an unlinked about.ttl is counted for you only;
    • the name saved in about.ttl wins over the card's;
    • removing a line the card holds is refused.
  • src/onboarding.test.ts adds a You test for the two lines to add. The existing order tests are untouched.

Docs

docs/explanation/membership.md (new section "A profile no app can write"), docs/manual-tests.md (new section "Extended profile · a WebID on your own domain", not yet run), docs/how-to/set-up-a-collective.md (steps 2 and 7), docs/slices.md (Where we are), CHANGELOG.md (Unreleased), CLAUDE.md architecture lines.

Left open

  • ldp:inbox lands in about.ttl. On a static profile, the inbox step writes ldp:inbox to about.ttl, as this task asked. The amendment's example keeps ldp:inbox in the WebID document, and senders outside our apps only look there. Should the inbox step also give an ldp:inbox line to add by hand? That is a follow-up to decide.
  • Unlinked about.ttl and the admin. Until the two lines are in the profile, a collective checking a join from that person sees no org:memberOf. The join message says so.
  • Lines in the static card can't be removed. A line added by hand to the static card can't be removed by the app. Removing a delegate or leaving a collective declared there is refused with a sentence; the source panel shows such a line marked, in the card.

🤖 Generated with Claude Code

nicolasdb and others added 3 commits November 27, 2026 14:48
A tier-1 WebID is a static file no app can write (solid-kit ADR 002,
amendment of 2026-11-26). Profile reads now merge the documents the
profile links with rdfs:seeAlso / foaf:isPrimaryTopicOf inside its own
pim:storage; writes go to the profile only when its GET answers as
writable, else to the linked extended document, else to a new
profile/about.ttl with its own .acl, and the two lines to add are shown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Membership explanation, manual test section, CHANGELOG, CLAUDE.md
architecture lines; a You test for the two lines to add.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…26)

A static card keeps the name it was written with, so the extended
profile's name wins in the merged read. Removing a delegate or a
membership the static card itself holds used to PATCH about.ttl with
nothing to remove and report success; it is now refused, naming where
to remove it. Docs: set-up how-to, slices, manual test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nicolasdb
nicolasdb merged commit c1cc895 into main Nov 27, 2026
10 checks passed
@nicolasdb
nicolasdb deleted the claude/extended-profile-26 branch November 27, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Profiles we cannot write: write to the extended profile, read it too (ADR 002 amendment pts 2-3)

1 participant