Skip to content

feat(catalog): allow editing tool listings#107

Merged
jal-co merged 1 commit into
mainfrom
feat/edit-tool-listings
Jul 16, 2026
Merged

feat(catalog): allow editing tool listings#107
jal-co merged 1 commit into
mainfrom
feat/edit-tool-listings

Conversation

@jal-co

@jal-co jal-co commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

What

  • add owner editing for tool/site listings from Dashboard → Listings
  • allow changes to verified URL/domain, title, description, subcategory, external pricing, and carousel images while keeping the slug fixed
  • route every edit through curator review
  • keep the last approved version public until the complete edit is approved
  • retain requested-change and rejected drafts for revision and resubmission

Why

Creators need to maintain external listings without losing their stable Modulora URL or temporarily removing an approved listing from the catalog.

How

Approved edits are stored in tool_listing_drafts alongside an immutable pending component version. Public catalog queries continue reading the approved component row. Curator approval atomically promotes the exact reviewed version, appends its review record, and removes the draft. Requested changes or rejection update only the draft.

Review decisions carry the exact version ID so replacing a pending edit invalidates stale curator tabs. URL/domain and R2 image ownership/existence validation run again on every submission.

Tour

  1. packages/db/src/schema.ts and migration 0035_gifted_lifeguard.sql add pending tool-edit storage. The large snapshot is generated Drizzle metadata.
  2. apps/web/src/lib/tool-listings.ts owns authenticated edit loading/submission and immutable version creation.
  3. apps/web/src/lib/tool-review.ts atomically handles initial and edit review decisions with stale-version protection.
  4. apps/web/src/lib/review.ts includes pending edits in the curator queue.
  5. apps/web/src/routes/dashboard.tools.edit.$name.tsx and tool-listing-editor.tsx provide the owner editing experience.
  6. Dashboard cards expose Edit listing and scoped edit-review states.

Testing

  • pnpm --filter @modulora/db typecheck
  • pnpm --filter web typecheck
  • pnpm --filter web test (83 passed; credentialed integrations skipped in the default run)
  • real Postgres integration: 2/2 passed for atomic approval, concurrent stale review, public-row preservation, requested changes, and durable records
  • pnpm --filter web build
  • pnpm --filter web build-storybook
  • git diff --check
  • drizzle-kit push --force; confirmed tool_listing_drafts exists
  • browser-verified prefilled editor, immutable slug, draft feedback, submit copy, and no horizontal overflow

Screenshots

  • Editing state: /tmp/tool-editing-story.png

Signed-off-by: Justin Levine <20596508+jal-co@users.noreply.github.com>
@jal-co
jal-co requested a review from a team as a code owner July 16, 2026 01:41
@jal-co
jal-co merged commit f094ad8 into main Jul 16, 2026
2 checks passed
@jal-co
jal-co deleted the feat/edit-tool-listings branch July 16, 2026 01:43
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