Skip to content

feat(store): let publishers update their listing - #43

Merged
ralyodio merged 2 commits into
mainfrom
feat/store-listing-updates
Jul 25, 2026
Merged

feat(store): let publishers update their listing#43
ralyodio merged 2 commits into
mainfrom
feat/store-listing-updates

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The problem

A store listing's copy was write-once. createExtension set name/summary/description, and nothing could change them afterwards — POST /extensions/:id/versions only writes version rows. Every publish refreshed the bundle and left the words untouched.

Live example, coinpay-wallet: it still tells people

This Phase 1 release ships wallet lifecycle + receive/address views. Send and one-click x402 payment approval land in subsequent updates.

while serving a build where both shipped (coinpayportal#189). Its updated_at has been frozen at 2026-07-07 while 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: undefined leaves a column alone, null clears it. The SQL builder is pure and unit-tested.
  • "✎ Edit listing" on the extension page — name, summary, description, homepage, prefilled and saved over the session. No token, no curl. GET /extensions/:slug now reports isOwner for 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 listingView point-free, which would have passed the array index in as viewer. Caught by tsc, now rows.map((row) => listingView(row)).

Verification

tsc --noEmit clean; vitest run src/store → 33/33 (8 new); node --check on the frontend bundle.

🤖 Generated with Claude Code

ralyodio and others added 2 commits July 25, 2026 18:54
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>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit f6115b8 into main Jul 25, 2026
6 checks passed
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