Skip to content

Keep project submission status persisted after failed validation #229

Description

@alexeygrigorev

Parent scope: #56 (preserved cohort project behavior)

User outcome

When a learner's first project submission is rejected by validation, the page must not claim
that a submission was saved. The learner sees the validation errors, the entered form remains
available for correction, and the status stays explicitly Not submitted until a submission is
actually persisted. A persisted submission continues to show Submitted with its saved time and
the update action.

This is a narrow target-native correctness slice. It does not complete #56 or change project
validation, scoring, peer review, or cohort migration behavior.

Scope

  • Expose an explicit persisted-submission boolean from the project-page context rather than using
    the truthiness of a temporary validation object.
  • Use that boolean consistently for the status badge, saved-status text, update/remove affordances,
    and the save/update button label.
  • Preserve the existing invalid-submission form values and validation errors.
  • Refresh the adoption manifest for every candidate-owned copied file whose bytes change.

Non-goals

Acceptance criteria

  • A rejected first submission with no persisted row renders Not submitted and Status: Not
    saved yet
    , with no saved timestamp or update/remove action.
  • The rejected form retains the learner's entered values and validation errors so it can be
    corrected and resubmitted.
  • A persisted submission renders Submitted, its saved timestamp, and Update submission.
  • Desktop and mobile project pages remain readable and have no horizontal overflow in both
    states.
  • Focused Django, core/CI, quality, and browser evidence passes on a current-main candidate;
    the adoption manifest agrees with the changed copied files.

Dependencies

Uses the existing copied project behavior from #30. The later Course → Cohort work in #51/#56
must preserve this explicit persisted-state contract.

Existing evidence to reattach

The preserved candidate in .tmp/project-submission-status-current-20260827 was implemented
before this issue was formally groomed. It is not accepted automatically; it may be reused only
after the normal current-main engineer/tester/PM lifecycle is recorded against this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important follow-upbugSomething isn't workingcoursesArea: coursesfrontendArea: frontendtestingArea: testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions