Repository navigation
Conversation
When no tag fits, the tag popover offers to suggest the filter text as a new tag. The suggestion is stored in the tags table as a pending row with who suggested it and when, and it goes on the product straight away: product saves accept pending tags, and its chip is marked pending. Suggestions are lowercased and limited to 40 letters, digits, spaces or hyphens, and each person may have at most five pending at once. A new admin page, /admin/tags, lists pending tags with the products carrying them. Approve adds a tag to the list everyone picks from. Merge replaces it with an approved tag on every product that carries it. Reject takes it off those products. Both merge and reject delete the pending row. The app now writes to the tags table, so the Vercel role's grant on it becomes read-write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Claude finished @alukach's task in 20s —— View job ✅ No blocking issues — safe to merge. I read the diff for Worth fixing (non-blocking)
Simplify (ponytail)
DocsThe description names the docs change (docs.source.coop#40). It says why 💰 Estimated review cost: $0.17 · 0m20s · 6 turns |
This branch was successfully deployed
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.
People can suggest a tag the list doesn't have, straight from the product form's tag picker, and admins review suggestions on a new admin page. Stacked on #647.
How it works
ocean acidificationisn't stuck withocean.suggestTagstores the tag insc-{stage}-tagsas a row withpending: true,suggested_byandsuggested_at. The chip is amber and labelled pending, and saving the product accepts it, becauseparseTagsnow treats pending tags as known./admin/tags, which lists each pending tag, who suggested it, and the products carrying it. Each decision is a plain form post toreviewTag:Guardrails
reviewTagchecks itself rather than relying on the/adminlayout.Decisions worth a second look
?tags=search filter before review. Hiding them would mean an extra read on every public page, and a pending tag is text the product's owner wrote, like its title and description, so it adds no new way to abuse the site.sc-{stage}-tagsbecomes read-write./admin/tags. Add a pending count to the admin nav, or a Slack message, if suggestions start sitting unreviewed.ponytail:comment). That's fine while the queue is short and there are a few hundred products.clean-tags.tsafter this ships would drop pending tags from products, because they aren't in its corpus. It's meant to run once, at rollout, before any suggestions exist.Stories
On this branch's Storybook deploy:
.storybook/preview.tsxmocks the newsrc/lib/actions/tags.tsmodule.Docs
docs/using-source/create-a-data-product.mdtold people to email hello@source.coop for a missing tag. Updated in docs.source.coop#40, stacked on Repository settings #39.public/llms.txtdoesn't mention tags, and this adds no public endpoint. Tags have no bearing on the data-proxy ADRs (authorization, credentials, federation).Testing
npm run type-check.npm run lintreports nothing in the changed files.src/lib/actions/tags.test.tscoverssuggestTagnormalizing and storing a tag, returning an existing tag unchanged, refusing logged-out visitors, refusing malformed tags, and enforcing the per-person cap. It coversreviewTagrefusing non-admins, approve, merge (including deduplication and refusing a target that isn't approved), and reject.products.test.tsadds a case where a product saves with a pending tag.TagPicker.test.tsxadds suggesting a tag (it is added and marked pending), a refused suggestion showing its reason, and an existing tag not being offered for suggestion.🤖 Generated with Claude Code