Skip to content

Error message persists after entering valid shortcode on results page #34

@ejones23

Description

@ejones23

Bug Description

When a user enters an invalid shortcode on the results page, an appropriate error message appears. However, if the user then corrects the shortcode to a valid one and submits again, the previous error message remains visible instead of being cleared.

Steps to Reproduce

  1. Navigate to: https://rankedchoices.com/results
  2. Enter a shortcode that doesn't exist in the database (e.g., "badshortcode")
  3. Click "Submit"
    • Error message appears: "Either shortcode is incorrect or no one has voted yet."
  4. Update the shortcode field to one that DOES exist in the database (e.g., "nrj65")
  5. Click "Submit"

Expected Behavior

The error message should disappear when a valid shortcode is submitted and results are successfully loaded.

Actual Behavior

The error message remains visible even after successfully loading results with a valid shortcode.

Environment

  • Browser: Any modern browser
  • Page: /results page
  • User role: Any user

Priority

Medium - UX issue that doesn't break functionality but confuses users

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions