feat(store): let publishers update their listing - #43
Merged
Conversation
A listing's text was write-once. createExtension set name/summary/ description, and nothing could change them afterwards — POST /extensions/:id/versions only writes version rows. So every listing kept describing whatever the extension did the day it was created while the bundle underneath it kept updating. That is exactly what happened to coinpay-wallet: the store still tells people "send and one-click x402 payment approval land in subsequent updates" while serving a build where both shipped. Adds: - db.updateExtension + buildExtensionUpdate (pure, tested) — a patch touches only the fields it names; undefined leaves a column alone, null clears it. - PATCH /api/store/extensions/:id for the owner, via browser session or CI publisher token. Re-mirrors the listing to the git registry so the public trail matches what the store serves. - publish-extension.sh grows an optional LISTING=<file> step, so copy can live in the extension's own repo and sync on every publish. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The PATCH endpoint alone still meant "mint a CI token in devtools, then curl" to fix a stale description — not a way to update your extension. Owners now get an "✎ Edit listing" button on the extension page: name, summary, description and homepage, prefilled and saved over the browser session. GET /extensions/:slug reports isOwner for the signed-in viewer so the button only shows for yours; the CI token path still works for publishing pipelines. Also fixes a bug this introduced: the browse route mapped listingView point-free, which would have passed the array index in as the viewer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
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.
The problem
A store listing's copy was write-once.
createExtensionset name/summary/description, and nothing could change them afterwards —POST /extensions/:id/versionsonly writes version rows. Every publish refreshed the bundle and left the words untouched.Live example, coinpay-wallet: it still tells people
while serving a build where both shipped (coinpayportal#189). Its
updated_athas been frozen at2026-07-07while the bundle is current.What this adds
PATCH /api/store/extensions/:id— owner only, via browser session or CI publisher token. Re-mirrors to the git registry so the public trail matches what the store serves.db.updateExtension+buildExtensionUpdate— a patch touches only the fields it names:undefinedleaves a column alone,nullclears it. The SQL builder is pure and unit-tested.GET /extensions/:slugnow reportsisOwnerfor the signed-in viewer, so the button only appears on your own listings.publish-extension.sh LISTING=<file>— optional copy sync on publish, so the text can live in the extension's own repo (see coinpayportal#198).Note
Also fixes a bug introduced here: the browse route mapped
listingViewpoint-free, which would have passed the array index in asviewer. Caught bytsc, nowrows.map((row) => listingView(row)).Verification
tsc --noEmitclean;vitest run src/store→ 33/33 (8 new);node --checkon the frontend bundle.🤖 Generated with Claude Code