Skip to content

feat(identity): give accounts a switch for indexing and liked Skills - #244

Merged
harlan-zw merged 2 commits into
mainfrom
feat/privacy-consent
Sep 22, 2026
Merged

harlan-zw merged 2 commits into
mainfrom
feat/privacy-consent

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

❓ Type of change

  • 👌 Enhancement

📚 Description

Two things took data public with no way to close them. Both now have a switch. Both switches are on by default, because skilld.dev is early and the registry grows on indexed Skills.

  • Repository indexing. Sign-in still scans the account's public repositories for SKILL.md and indexes what it finds. Those files are already public on GitHub, and indexing them is how the catalog grows. The onboarding step now says so, and "Add Skills from your public repositories" in /me turns it off. POST /api/me/repos/scan refuses with a 403 when it is off, so one switch decides for both paths.
  • Liked Skills. /@login/liked stays public, which is how it already worked, so no shared link breaks. "Show liked Skills on your profile" in /me closes it. A closed list answers 404 to everyone except its owner, the same answer as a missing account, so a visitor cannot learn which accounts closed theirs. The profile shows the Liked link only to viewers who can open it, and the owner of a closed list sees "Only you can see your liked Skills".

Migration 0121 adds both columns with a default of 1, so no existing account changes behaviour when it lands.

flowchart TD
  A["GitHub sign-in"] -->|"first sign-in"| B{"users.repo_indexing"}
  B -->|"1, the default"| C["scanOwnedRepos in waitUntil"]
  B -->|"0"| D["no scan"]
  E["POST /api/me/repos/scan"] --> B
  F["/@login/liked"] --> G{"users.likes_public"}
  G -->|"1, the default"| H["public list"]
  G -->|"0, viewer is owner"| I["owner-only list"]
  G -->|"0, anyone else"| J["404, same as a missing account"]
  K["/me privacy switches"] -->|"PATCH /api/me/privacy"| B
  K --> G
Loading

Notes for a reviewer:

  • The privacy patch takes one switch or both, and an empty body is a 400. Turning one off cannot silently reset the other.
  • A /me scan runs in the request, not in waitUntil, so an account with many Skill repositories waits on a spinner with a note that the check can take a minute. Sign-in still scans in the background.
  • Turning indexing off stops future scans. Skills already indexed stay, because GitHub is their source and discovery would find them again. The prompt says that.
  • Merge order: chore(analytics): keep anonymous usage aggregates, drop the visitor trail #240 takes migration 0119 and feat(identity): count email clicks as daily aggregates #243 takes 0120, so this one is 0121. Renumber if it lands first.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-zw

Copy link
Copy Markdown
Collaborator Author

Checked by hand in the running dev app, since CI cannot cover it:

  • Onboarding shows the prompt, and nothing runs until the click. The local account has no GitHub token, so the scan returned 401, and the prompt offered a new sign-in.
  • The switch in /me saved both ways. The owner saw the Liked link, the private note on the profile, and the note on /liked.
  • A signed-out curl got 404 from /api/likes/by-user/:login, /visibility, and /@login/liked. The profile HTML had no /liked link.
Onboarding prompt After click (no local token)
Onboarding prompt After click
Settings: off Settings: on
Privacy switch off Privacy switch on
Profile, owner of private list /liked, owner of private list
Profile owner note Liked owner note

@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 16, 2026
@harlan-github-agent

harlan-github-agent Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-09-22 07:10 UTC.

GitHub merged this pull request.

No material findings were recorded.

9ec9cc3b-ffcd-451f-9c9a-b57433c52c92

@harlan-github-agent harlan-github-agent Bot added harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 16, 2026
harlan-zw added a commit that referenced this pull request Sep 16, 2026
The page described the site after #240 and #241 only. #242, #243, #244,
and #246 change CLI token labels, email click counts, like visibility,
repository indexing, and image loading, and D1 recovery keeps deleted rows
for up to 30 days.
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 16, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 22, 2026
harlan-zw added a commit that referenced this pull request Sep 22, 2026
The page described the site after #240 and #241 only. #242, #243, #244,
and #246 change CLI token labels, email click counts, like visibility,
repository indexing, and image loading, and D1 recovery keeps deleted rows
for up to 30 days.
Sign-in scanned a new account's public repositories and added every
SKILL.md to the registry without asking. The onboarding page now asks
first, and one click runs the same scan.

The /@login/liked list was public for every account with no way to
turn it off. It is now private unless the owner turns it on in /me.
Migration 0119 keeps existing accounts private, since they never
consented either.
Both settings are on by default and the account can turn either off.

Sign-in still scans the account's public repositories for SKILL.md and
indexes what it finds, because that is how the registry grows and the files
are already public on GitHub. `repo_indexing` turns it off, and the scan
endpoint then refuses too, so one switch decides.

The liked list stays public, which is how it already worked, and
`likes_public` closes it. A closed list answers 404 to everyone but its
owner, the same answer as a missing account. No shared link breaks on
migration.

The onboarding prompt is now a notice with a way out rather than a question.
@harlan-zw harlan-zw changed the title feat(identity): ask before indexing repositories and hide likes feat(identity): give accounts a switch for indexing and liked Skills Sep 22, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 22, 2026
@harlan-github-agent harlan-github-agent Bot added the harlan-agent-ready The automated Review passed every gate on this head commit. label Sep 22, 2026
@harlan-zw
harlan-zw merged commit 5422390 into main Sep 22, 2026
6 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Sep 22, 2026
@harlan-zw
harlan-zw deleted the feat/privacy-consent branch September 22, 2026 07:21
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.

1 participant