Skip to content

fix(plugins): fail delete when no row was removed; render logos unoptimized - #449

Open
deanrie wants to merge 2 commits into
cursor:mainfrom
deanrie:fix/plugin-page-and-delete
Open

deanrie wants to merge 2 commits into
cursor:mainfrom
deanrie:fix/plugin-page-and-delete

Conversation

@deanrie

@deanrie deanrie commented Oct 14, 2026

Copy link
Copy Markdown

Summary

Two small fixes on the plugin detail flow, one commit each, consolidated from #443 and #444 (both closed in favour of this PR; commits carried unchanged).

  1. fix(plugins): fail the delete action when no row was removed (was fix(plugins): fail the delete action when no row was removed #443). deletePluginAction ran .delete().eq("id", id).eq("owner_id", userId) and only checked error. PostgREST does not treat a delete that matched zero rows as an error, so when RLS refuses the delete the UI still shows "Plugin deleted.", navigates home, and the listing stays live (the sequence in Delete shows "Plugin deleted." toast but the plugin stays live #413, Plugin delete reports success but the record persists #429, Deleting or unpublishing a plugin returns 200 but the plugin stays published #438). The delete now ends with .select("id") and throws an ActionError when nothing came back, so the owner sees a real error instead of a false success. Which rows the policy allows to delete is unchanged; the stuck listings still need the backend cleanup, this stops the UI from lying about it.
  2. fix(plugins): render plugin logos unoptimized so any manifest logo host works (was fix(plugins): render plugin logos unoptimized so any manifest logo host works #444). parse.ts turns a relative logo into a raw.githubusercontent.com URL and keeps absolute logos as submitted, but the detail page rendered them through next/image's optimizer, which rejects hosts missing from images.remotePatterns and 500s the whole page; every submission following cursor/plugin-template (relative assets/logo.svg) hit this, and AGENTS.md documented nulling logos in the database as the workaround. PluginLogo now passes unoptimized, matching how PluginCard and PluginLeaderboard already render the same URLs via plain <img>. The AGENTS.md workaround note is removed.

Verification

  • bun install --frozen-lockfile, bunx biome ci . in apps/cursor: clean (the 5 warnings are pre-existing on main), bunx tsc --noEmit: clean.
  • Behaviour checks are as described in the two original PRs.

Fixes #413, #429, #438 (delete path). Refs #439, #440.

@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

@deanrie is attempting to deploy a commit to the Anysphere Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

Delete shows "Plugin deleted." toast but the plugin stays live

1 participant