RHIDP-14310: add saved prompts endpoints to intelligent-assistant backend - #4076
Conversation
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
PR Summary by QodoAdd saved-prompts proxy routes + RBAC permission to intelligent-assistant backend
AI Description
Diagram
High-Level Assessment
Files changed (12)
|
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
84eb51e to
80cfb99
Compare
Code Review by Qodo
Context used✅ Compliance rules (platform):
11 rules✅ Cross-repo context Explored:
repo: redhat-developer/rhdh-local (sha: 2ae9e8c8) Explored:
repo: redhat-developer/rhdh (sha: ddfe8d07) Not relevant to this PR:
redhat-developer/rhdh-chart Not relevant to this PR:
redhat-developer/rhdh-operator 1. Unsanitized proxy errors
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4076 +/- ##
==========================================
+ Coverage 57.87% 57.91% +0.04%
==========================================
Files 2393 2394 +1
Lines 95985 96098 +113
Branches 26803 26830 +27
==========================================
+ Hits 55551 55657 +106
- Misses 38940 38947 +7
Partials 1494 1494
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
Qodo review calls out potential issues that are not introduced in this PR. The changes in this PR match the conventions used by the pre-existing routes. |
The findings are attached to code introduced by this PR, even though the underlying proxy behavior follows existing conventions:
If these behaviors are intentional and consistent with the established route design, they can be treated as accepted risks. I have not dismissed them because that requires an explicit dismissal request. |
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
|
The code duplication can be cleaned up / refactored as a separate PR, no need to touch other endpoints in this PR. |
JslYoon
left a comment
There was a problem hiding this comment.
Code review
No issues found. Checked for bugs and CLAUDE.md compliance.
Summary: Adds /v1/saved-prompts CRUD endpoints (GET config, GET list, POST create, DELETE) to the intelligent-assistant backend, proxying to LCORE. Includes a new lightspeedSavedPromptsManagePermission, shared type definitions in the common package, MSW fixtures, and 9 router tests covering success paths and error relay (403, 409, 422, 400, 500). README updated with RBAC example. Changeset included.
The implementation closely follows the existing /v1/feedback and /v2/conversations patterns — apiProxy for GET/DELETE, custom handler for POST with user_id injection, handleLCSFetchError for upstream error relay. SKIP_USER_ID_ENDPOINTS correctly excludes only the config endpoint. Test coverage is thorough.
🤖 Generated with Claude Code
- If this code review was useful, please react with 👍. Otherwise, react with 👎.
|
/lgtm |
…kend (redhat-developer#4076) * add types for saved prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add saved prompts config to user id skip set Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * prepare msw for saved prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add saved prompts endpoints to router Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add router tests for saved prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * update readme to include new saved prompts rbac Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add changeset Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add test for catching 5xx on saved-prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> --------- Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
…kend (redhat-developer#4076) * add types for saved prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add saved prompts config to user id skip set Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * prepare msw for saved prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add saved prompts endpoints to router Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add router tests for saved prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * update readme to include new saved prompts rbac Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add changeset Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> * add test for catching 5xx on saved-prompts Signed-off-by: Jordan Dubrick <jdubrick@redhat.com> --------- Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>


Hey, I just made a Pull Request!
/v1/saved-promptsendpoints to the intelligent-assistant backend routerhttps://redhat.atlassian.net/browse/RHIDP-14310
✔️ Checklist