aicam opened a new pull request, #5893:
URL: https://github.com/apache/texera/pull/5893

   ### What changes were proposed in this PR?
   
   This PR adds a **user feedback** feature to the dashboard.
   
   - A **"Feedback"** item is added to the left sidebar, immediately after 
**"About"**, and is shown **only to logged-in users**. It routes to 
`/user/feedback` (behind the existing auth guard).
   - The feedback page lets a user **submit a free-text message** and shows a 
**table of their previously submitted feedback** (newest first).
   - The admin user list at `/dashboard/admin/user` gains a **"Feedbacks"** 
column next to **Quota**: a message icon that is **disabled when the user has 
no feedback** and **enabled with the feedback count shown as a badge** when 
they do. Clicking it opens that user's feedback in a modal (the same component 
reused in read-only mode).
   
   Backend:
   - New `feedback` table (added to `sql/texera_ddl.sql`, migration 
`sql/updates/25.sql`, and registered in `sql/changelog.xml`).
   - New `FeedbackResource`:
     - `POST /api/feedback` and `GET /api/feedback` — submit / list own 
feedback (any logged-in user).
     - `GET /api/feedback/counts` and `GET /api/feedback/user?user_id=` — 
per-user counts and per-user listing (**admin only**).
   
   ### Any related issues, documentation, discussions?
   
   _None yet._
   
   ### How was this PR tested?
   
   **Backend unit tests** — `FeedbackResourceSpec` (10 cases, using the 
embedded `MockTexeraDB`): persistence, newest-first ordering, whitespace 
trimming, empty/null rejection, per-user isolation, admin counts, and admin 
per-user listing.
   
   ```
   sbt "WorkflowExecutionService / testOnly 
org.apache.texera.web.resource.FeedbackResourceSpec"
   # Tests: succeeded 10, failed 0
   ```
   
   **Frontend unit tests** — `FeedbackService` (4), `FeedbackComponent` (5, 
both page and admin-modal modes), and the existing `AdminUserComponent` spec 
still passes with the new dependency.
   
   ```
   ng test --watch=false --include="**/feedback*.spec.ts" 
--include="**/admin-user*.spec.ts"
   # Test Files 3 passed (3) | Tests 10 passed (10)
   ```
   
   **Manual end-to-end** (local services + Postgres), logged in as the default 
admin:
   
   ```
   POST /api/feedback            -> 204
   GET  /api/feedback            -> 200  
[{"fid":1,"uid":1,"message":"...","creationTime":...}]
   GET  /api/feedback/counts     -> 200  [{"uid":1,"count":1}]
   GET  /api/feedback/user?...   -> 200
   POST /api/feedback (empty)    -> 400  "feedback message cannot be empty"
   ```
   
   UI flow verified locally: sidebar entry appears only when logged in, submit 
+ own-feedback table work, and the admin column badge/disabled state and modal 
behave as described. _Reviewer note: before/after screenshots of the sidebar 
item, feedback page, and admin column to be attached._
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.8)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to