Skip to content

Feedback dialog submits to non-existent server endpoint#1

Open
Ghvstcode wants to merge 1 commit intomainfrom
feedback-dialog-submits-to-non-existent-server-endpoint
Open

Feedback dialog submits to non-existent server endpoint#1
Ghvstcode wants to merge 1 commit intomainfrom
feedback-dialog-submits-to-non-existent-server-endpoint

Conversation

@Ghvstcode
Copy link
Owner

SUSTN Auto-PR

The feedback feature is wired end-to-end in the frontend — there's a FeedbackDialog component (src/ui/components/sidebar/FeedbackDialog.tsx) that lets users write feedback and attach screenshots, and a useFeedback hook (src/core/api/useFeedback.ts:34) that POSTs to ${config.authServerUrl}/feedback. But the server (server/src/index.ts) only registers three route groups: /auth, /health, and /metrics. There is no /feedback route. Every feedback submission silently fails with a 404.

This is a broken user-facing feature — users can open the dialog, type feedback, and hit send, only for it to disappear into the void with no error feedback.

To fix:

  1. Add a feedback table to the server database schema (server/src/db/schema.ts) with columns for userId, message, category/type, and optional image data.
  2. Create a POST /feedback route in server/src/routes/ that validates the auth token (same pattern as metrics), validates input, and inserts the feedback.
  3. Register the route in server/src/index.ts.
  4. Ensure the frontend properly handles and displays success/failure states to the user after submission.

Branch: feedback-dialog-submits-to-non-existent-server-endpoint

The FeedbackDialog component was submitting to a non-existent
/feedback endpoint, causing every submission to silently fail
with a 404.

- Add feedback_entries table to server database schema with
  userId, message, images (jsonb), and createdAt columns
- Create POST /feedback route with Bearer token auth validation
  (same pattern as /metrics/events) and input validation
- Register the feedback route in the server entry point
- Frontend already handles success (closes dialog) and error
  (displays message) states correctly; no changes needed

Note: run `drizzle-kit generate` to create the migration for
the new feedback_entries table.

SUSTN-Task: b7b1101d-232f-4413-a917-151473ca5109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant