Skip to content

[Bug]: Search on /project with no results breaks back navigation #190

@corps21

Description

@corps21

Give a brief about the bug ✍️

🐛 Bug Description

On the /project route, there is a search input that filters repositories based on the query. If a user enters a search query that doesn't match any results, the app correctly displays a "No repositories found" message.

However, if the user is in this "No repositories found" state and clicks the browser back button, they are redirected to a previous page outside of the /project route, such as the home page (/), instead of returning to the last valid /project state. This breaks the expected navigation flow and leads to a confusing user experience.

📹 Loom Video: Watch the issue in action

What is the expected behavior? 🤔

🔄 Expected Behavior

  • When a search query on the /project route returns no results, the user should stay on the same /project page with a "No repositories found" message.
  • Clicking the browser back button from this state should return the user to the previous /project state (e.g., with a previous query or the default project list), not to another route like the home page.
  • The navigation should preserve the context of the /project route throughout the search interaction.

Provide step by step information to reproduce the bug 📄

🧪 Steps to Reproduce

  1. Navigate to the /project route.
  2. In the search input, enter a query that does not match any repositories.
  3. Observe that the page displays a "No repositories found" message.
  4. Click the browser back button.
  5. Notice that you are redirected to a different page (e.g., home page /) instead of returning to the previous state of the /project route.

Select program in which you are contributing

Other

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions