Repository navigation
Let staff email a listing's maintainers its badges - #50
Merged
Merged
Conversation
Owners can embed a Listed, Reviewed or Benchmarked badge from /my-listings,
but nothing told them so. Staff can now send that suggestion from the tool
page.
- The staff record carries `maintainers`: the work email of every approved
claim on an active account, the rule behind "vendor-maintained". The staff
panel lists them and, only then, shows "Email badge suggestion".
- `POST /catalog/staff/tools/{slug}/badge-suggestion` calls
`staff.send_badge_suggestion`, which queues one `badge_suggestion` email
per maintainer on commit, so no one sees another's address and a retry
cannot resend a sibling. A listing nobody maintains is refused (422).
- The email shows all three badges with what each claims and links to
/my-listings. Mail clients do not render SVG, so it uses fixed PNGs in
public/images/email/, rendered from svg.ts (earned, light theme).
- DEVELOPMENT.md: the email table and the owner-badges section.
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.
Why
Maintainers can embed a Redaction Tools badge (Listed, Reviewed, Benchmarked) from
/my-listings, but nothing tells them it exists. Staff want to suggest it from the tool page.What
StaffToolOut.maintainers: the work email of every approved claim on an active account, the same rule as the public "vendor-maintained" mark.POST /api/v1/catalog/staff/tools/{slug}/badge-suggestion, backed bystaff.send_badge_suggestion(the write goes throughstaff.py, like every other staff write). It queues onebadge_suggestionemail per maintainer on commit: separate messages hide addresses from each other, and a retry cannot resend a sibling. A listing with no maintainers gets a 422StaffError./my-listings.frontend/public/images/email/badge-{listed,reviewed,benchmarked}.pngare 2x renders ofrenderBadge(earned, light theme).DEVELOPMENT.mdnotes they need re-rendering if the badge design changes.make schemaandmake backend-emailsregenerated the contract and the HTML.Tests
/my-listingslink and all three badge images; refused with no maintainers; staff route sends; an owner gets 403.