Skip to content

[Bug]: Interview experience form confirms moderation without saving the submission #935

Description

@nyxsky404

Bug Description

The Interview Experiences form tells contributors that their story has been submitted for review, but the current implementation only adds it to React state for the open page session.

Steps to Reproduce

  1. Open Interview Experiences.
  2. Submit a valid experience.
  3. Open the User tab and confirm the new card appears.
  4. Refresh the page or reopen it in another browser.

Expected Behavior

A success message should be shown only after the experience is saved for review. Submitted content should persist across reloads and have a clear pending/approved state.

Actual Behavior

The form prevents default submission, waits 600 ms, creates an object with Date.now(), and calls the parent setUserExperiences state setter. No API request or persistence occurs. Refreshing removes the card even though the confirmation says it was submitted for review.

Severity

Medium

Screenshots / Screen Recording

Not applicable; the session-only behavior is directly reproducible.

Browser

Any modern browser.

Operating System

Any.

Additional Context

Current main reproduces this in frontend/src/pages/InterviewExperiences/InterviewExperiences.jsx: handleSubmit uses a timeout and the page initialises userExperiences with an empty array. A proper fix needs a persisted submission resource and a UI that distinguishes pending user submissions from approved community content. Tests should cover successful persistence, reload, failure/retry, pending visibility, and approval/rejection states.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions