feat(catalog): allow editing tool listings#107
Merged
Conversation
Signed-off-by: Justin Levine <20596508+jal-co@users.noreply.github.com>
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.
What
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_draftsalongside 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
packages/db/src/schema.tsand migration0035_gifted_lifeguard.sqladd pending tool-edit storage. The large snapshot is generated Drizzle metadata.apps/web/src/lib/tool-listings.tsowns authenticated edit loading/submission and immutable version creation.apps/web/src/lib/tool-review.tsatomically handles initial and edit review decisions with stale-version protection.apps/web/src/lib/review.tsincludes pending edits in the curator queue.apps/web/src/routes/dashboard.tools.edit.$name.tsxandtool-listing-editor.tsxprovide the owner editing experience.Testing
pnpm --filter @modulora/db typecheckpnpm --filter web typecheckpnpm --filter web test(83 passed; credentialed integrations skipped in the default run)pnpm --filter web buildpnpm --filter web build-storybookgit diff --checkdrizzle-kit push --force; confirmedtool_listing_draftsexistsScreenshots
/tmp/tool-editing-story.png