[CSM Portal] Proxy saved list filters through the BFF - #1885
2003dinijay wants to merge 2 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: wso2-open-operations/cs-tools/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesSaved filter views
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Client
participant UsersHandler
participant CustomerEntityClient
Client->>UsersHandler: Send authenticated saved-filter-view request
UsersHandler->>UsersHandler: Validate query parameters or JSON body
UsersHandler->>CustomerEntityClient: Delegate operation
CustomerEntityClient-->>UsersHandler: Return entity response or error
UsersHandler-->>Client: Return response or mapped error
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change adds authenticated saved-filter-view operations through the BFF, including listing, saving, deleting, and reordering. The supplied implementation and tests show the expected validation, authentication, forwarding, and error handling, so it is mergeable. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. (1 skipped: 1 unsupported.) Full details: Description checkExplanation The description explains the BFF proxy changes and lists a test plan, but it omits most required template sections, including purpose, goals, release note, documentation, security checks, test environment, and learning.
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
|
Passthrough GET/PUT/DELETE/reorder on /users/me/saved-filter-views so the webapp never talks to entity-service directly.
e7dfec9 to
2134932
Compare
| route("GET /users/me", handler.PermAuthenticated, usersHandler.GetMe) | ||
| route("PATCH /users/me", handler.PermAuthenticated, usersHandler.PatchMe) | ||
| route("GET /users/me/saved-filter-views", handler.PermAuthenticated, usersHandler.ListSavedFilterViews) | ||
| route("PUT /users/me/saved-filter-views", handler.PermAuthenticated, usersHandler.SaveSavedFilterView) |
There was a problem hiding this comment.
Can't we have a PATCH instead of a PUT in here?
There was a problem hiding this comment.
Yes — switched this to PATCH to match the rest of the BFF (and entity-service). Save is now PATCH /users/me/saved-filter-views on the BFF route, the entity client, OpenAPI, and tests.
Summary
/users/me/saved-filter-views(list / save / delete / reorder) on the CSM BFF and forwards to entity-service.Test plan
GET /users/me/saved-filter-views?listKey=casesthrough the BFF after login returns 200