Repository navigation
feat(web): creator dashboard with visibility, soft delete and restore - #162
Merged
Merged
Conversation
…tore
Owners get /dashboard listing their packages, release history (including
quarantined releases), personal kits, and actions: change visibility
(private/unlisted/public, public needs session approval), yank, soft delete
with a 30-day restore window, and restore. Publishing stays CLI-only.
- contracts: add the unlisted visibility; only private is protected
- migration 0022: deleted_at on packages and personal_kits, append-only
package_audit table
- deleted packages and kits are hidden from every read path; publishing to
a deleted package answers 409 package.deleted, reusing a deleted kit name
answers 409 kit.deleted
- POST /api/v1/packages/:scope/:slug/{visibility,delete,restore} and kit
delete/restore, owner or admin only, audited, same-origin checked
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… owner-proof Unlisted packages are readable anonymously by name, so moving a package out of private now needs a signed-in web session and approve: true, like a change to public; the dashboard shows the same two-step approval for it. An owner can no longer restore a package or kit the admin deleted: restore reads the latest delete in package_audit and refuses with 403 restore.admin_deleted, re-checked inside the guarded batch. Release state changes and promotions also re-check that the package is not deleted, and the delete dialog says new requests stop being served instead of implying existing copies disappear. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 tasks
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.
Part of #107.
What
A creator dashboard at
/dashboard(navbar link, session only) where an owner manages what they publish:private,unlisted(new) andpublic.approve: true. API keys get403 visibility.approval_required.410 restore_window_expired; the tombstone stays and nothing is hard-purged.release-auth.ts). Releases are free; there is no pricing UI.API
POST /api/v1/packages/:scope/:slug/visibilitywith{from,to,approve?}. It is a compare-and-set, so a stalefromanswers409 visibility_conflict.POST /api/v1/packages/:scope/:slug/deleteand/restore, and the same pair for kits under/api/v1/kits/:scope/:name/.Who may call them:
package_audittable.Deleted packages and kits are hidden from every read path, including download URLs already minted. Publishing to a deleted package answers
409 package.deleted, and reusing a deleted kit name answers409 kit.deleted.Migration
0022_creator_dashboardis additive. Rollback SQL is in the file header. Apply it to remote D1 before deploying, because the new code readsdeleted_aton every release, library and kit query.Known limits
--visibility unlisteduntil the next CLI release. Until then, owners can switch a package to unlisted from the dashboard.Tests
pnpm typecheckpasses.pnpm exec vitest run: 149 files, 2773 passed, 3 skipped. This includes 42 new tests underapps/web/tests/creator/.🤖 Generated with Claude Code