Migrate to the restructured Extensions v2 API - #307
Merged
Conversation
Submissions are no longer a separate resource — an extension exists from creation and review is a state of it, not a parallel record to reconcile. Regenerates the API client against FOSSBilling/api#190's branch preview and updates every caller: - api/client.ts: create/update/withdraw an extension, list/read owner extensions (published + pending_revision + last_review), list revision history, and moderate by extension id + revision id, replacing the submissions endpoints. - extensions-data.ts: new getOwnedExtension adapter splits the owner detail response into published/pendingRevision/lastReview per the API's state table instead of collapsing them into a derived status. - extension-form.ts (renamed from submission-form.ts): payloads no longer carry a developer object; a release is required whenever there's nothing already published to carry through (new extension, or edited after rejection with nothing ever published). - Account pages: /account no longer merges a separate submissions list: one list from /extensions/mine with inline pending/rejected state. The edit page blocks with a banner while a revision is awaiting review, matching the api's one-pending-revision-at-a-time rule. - Moderation: routes move from account/moderate/[id]/ to account/moderate/[id]/[revisionId]/, since revisions are now addressed by extension id + revision id, not a submission id. npm run check, npm run test, and npm run format:check are all clean. npm run api:check currently shows a diff since this was generated from #190's branch preview, not production — re-run it once #190 merges and deploys.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
extensions | 07a1cbd | Commit Preview URL Branch Preview URL |
Aug 08 2026, 02:03 PM |
There was a problem hiding this comment.
All reported issues were addressed across 21 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- extension-form.ts: reject a new release when it duplicates an existing tag (would silently duplicate the entry on approval, since the api replaces the whole releases array verbatim) or when the extension is already at the api's 100-release cap, instead of submitting a payload the api would either mangle or 422 on. - ConfirmDeleteDialog: add an optional formAction so a confirmation dialog can post somewhere other than the current page. - New /account/extensions/[id]/withdraw.ts route + a "Withdraw Extension" danger-zone control on the edit page for extensions that have never been published. Previously withdrawExtension existed on the api client but had no UI control, so a developer whose only extension was pending or rejected-with-nothing-published had no way to clear it and delete their developer profile or account. - account/index.astro: a rejected edit no longer shows a destructive "Rejected" badge when the extension is still live under its previous published content — that only reflects the latest edit attempt, not the extension itself. Live extensions with a rejected edit now show a neutral "Edit rejected" badge instead. npm run check, npm run test (83 passing), and npm run format:check are all clean.
There was a problem hiding this comment.
0 issues found across 6 files (changes from recent commits).
Auto-approved: Migrates frontend to the restructured Extensions v2 API: endpoint renames, schema changes, new endpoints (withdraw, revision history). No new behavioral tradeoffs; the diff shows a systematic, test-covered migration.
Re-trigger cubic
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.
Summary
Submissions are gone as a resource — an extension exists from creation, and review is a state of it rather than a parallel
/submissionscollection to reconcile. This updates the site for FOSSBilling/api#190's restructured contract.POST /submissionsPOST /extensions→ 201POST /submissions(edit)PUT /extensions/{id}→ 202GET /submissions/mineGET /extensions/mine(one list, one cursor)GET /extensions/mine/{id}(owner detail)DELETE /extensions/{id}(withdraw, unpublished only)GET /extensions/{id}/revisions(history)GET /submissions/queueGET /moderation/extensionsPOST /submissions/{id}/approvePOST /extensions/{id}/revisions/{revisionId}/approvePOST /submissions/{id}/rejectPOST /extensions/{id}/revisions/{revisionId}/rejectChanges
openapi/extensions-v2.json+src/lib/api/generated/: regenerated against Lock file maintenance #190's branch preview (npm run api:update).src/lib/api/client.ts: create/update/withdraw an extension, list/read owner extensions, list revision history, and moderate by extension id + revision id — replacing the submissions endpoints.src/lib/extensions-data.ts: newgetOwnedExtensionadapter splits the owner detail response intopublished/pendingRevision/lastReview, matching the three independent state fields described in the API's README, rather than collapsing them into a single derived status.src/lib/extension-form.ts(renamed fromsubmission-form.ts): payloads no longer carry adeveloperobject — the server derives it. A release is required whenever there's nothing already published to carry through (a brand new extension, or one being edited after rejection with nothing ever published).src/components/ExtensionForm.astro(renamed fromExtensionSubmissionForm.astro)./accountreads/extensions/minedirectly and shows pending/rejected state inline per extension, instead of merging a separate submissions list. The edit page shows a banner and withholds the form while a revision is awaiting review, matching the API's one-pending-revision-at-a-time rule.account/moderate/[id]/toaccount/moderate/[id]/[revisionId]/, since revisions are now addressed by extension id + revision id rather than a submission id.