feat(ratings): proxy the "didn't use it" feedback endpoints [Rating page for assets (My Downloads)] - #49
Merged
Merged
Conversation
Three new local endpoints backing the add-on's "Didn't use it" control
(server API: enums/not-used-reasons + assets/{id}/didnt-use):
- POST /ratings/get_not_used_reasons - the shared reason choices
- POST /ratings/get_didnt_use - the user's flag state for one asset
- POST /ratings/send_didnt_use - set (optional reason, optional
replace_rating which deletes the user's score ratings after the UI
warned about the swap) or clear the flag
Error responses hand the add-on the server's detail sentence instead of
the raw JSON body - the add-on shows it inline under the control.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
@copilot resolve the merge conflicts in this pull request |
Tweekazoid
added a commit
to BlenderKit/Blendkit
that referenced
this pull request
Sep 1, 2026
… for assets (My Downloads)] (#2292) * feat(ratings): "Didn't use it" feedback in the rating UI The My downloads page's "I didn't use this asset" flag, now also in the add-on - a dropdown at the bottom of every ratings UI (fast-rate popup, sidebar panel, asset detail): - One menu for every state: pick a reason to flag (choices are the server's shared admin-managed set, fetched once per session), the current reason wears a checkmark, undo lives at the bottom. - Rating and flag are mutually exclusive (server-enforced). A rated asset's menu warns "This replaces your rating"; the pick then deletes the scores server-side (replace_rating) and the cleared numbers are remembered session-locally - the hint over the disabled rating rows names them and "Undo - restore my rating" re-rates, which also drops the flag server-side. Rating a flagged asset clears the flag, locally mirrored. - Server refusals (undownloaded asset, conflicts) land as red text inline under the control - the corner report overlay is out of the popup's sight. The server's detail sentence is extracted even from a Client that passes the raw JSON body through. - handle_get_rating_task now skips unknown rating types (historic competition/nodevember votes) instead of crashing the task timer. bk_client submodule bumped to the endpoints' commit (BlenderKit/bk_client#49). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(ratings): update "Didn't use it" text to "I didn't use this asset" for clarity --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Tweekazoid <miki.hons@gmail.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
Local proxy endpoints for the add-on's new "Didn't use it" feedback control, backed by the server API shipped in Blendkit-server#3674:
POST /ratings/get_not_used_reasons→GET /api/v1/enums/not-used-reasons/— the shared, admin-managed reason choices.POST /ratings/get_didnt_use→GET /api/v1/assets/{id}/didnt-use— the user's flag state for one asset.POST /ratings/send_didnt_use→PUT/DELETEon the same — set the flag (optionalreason_id; optionalreplace_rating, which deletes the user's quality/working-hours ratings after the UI warned that the pick replaces them) or clear it.All three follow the existing
SendRatingtask pattern (task channel,getHeaders,ParseFailedHTTPResponse). The send error path parses the response body and forwards the server'sdetailsentence instead of the raw JSON — the add-on renders it inline under the control.apispec entries added;
docs/API.md+docs/openapi.jsonregenerated viago generate ./....Testing
go build,go vet,go test ./...green; exercised end-to-end against devel through the add-on branch (BlenderKit/blenderkitclaude/didnt-use) — flag set/change/undo, replace-rating flow, and the 403/409 error sentences.🤖 Generated with Claude Code