The GitHub Actions job "Required Checks" on texera.git/main has failed.
Run started by GitHub user github-merge-queue[bot] (triggered by 
github-merge-queue[bot]).

Head commit for run:
c0700ff24b16fb8779ca57ff161298b42a6556f0 / ali risheh <[email protected]>
feat: add user feedback dashboard and admin review (#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**).

This implements the simple feedback mechanism (Option 2) agreed in the
design discussion.

### Any related issues, documentation, discussions?

Closes #5894

Proposed and agreed in discussion #5759.

### 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._

<img width="1847" height="965" alt="Screenshot from 2026-06-22 14-48-07"
src="https://github.com/user-attachments/assets/aaf972e0-e39f-48aa-af4f-859385867935";
/>
<img width="1847" height="965" alt="Screenshot from 2026-06-22 14-47-40"
src="https://github.com/user-attachments/assets/8d223be0-b196-408b-bb77-4e97d6102807";
/>
<img width="1847" height="965" alt="Screenshot from 2026-06-22 14-47-07"
src="https://github.com/user-attachments/assets/49580b32-8307-43f8-a9b1-65cd6f54577f";
/>


### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.8)

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/28045779386

With regards,
GitHub Actions via GitBox

Reply via email to