Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Switching to a branch without the current page shows no page found screen #17234

Closed
1 task done
akash-codemonk opened this issue Sep 30, 2022 · 3 comments · Fixed by #21894
Closed
1 task done
Assignees
Labels
Bug Something isn't working Git Platform Issues related to the git & the app platform Git Product Issues related to version control product Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage

Comments

@akash-codemonk
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Description

git.mov

Steps To Reproduce

  1. Create an application.
  2. Connect to git.
  3. Create a new branch say release.
  4. Create a new page say Page2. So now this page isn't on master.
  5. Switch branch to master. It shows the page not available screen.

It seems like a frontend issue where we switch the branch but the page remains the same. Seems similar to #11889 . In that issue the branch seems to disappear.

Public Sample App

No response

Version

Cloud - Release - 1.8.5

@akash-codemonk akash-codemonk added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage Git Product Issues related to version control product labels Sep 30, 2022
@akash-codemonk akash-codemonk added the Medium Issues that frustrate users due to poor UX label Sep 30, 2022
@github-actions github-actions bot added the Platform Administration Pod Issues related to platform administration & management label Sep 30, 2022
@akash-codemonk akash-codemonk added High This issue blocks a user from building or impacts a lot of users and removed Medium Issues that frustrate users due to poor UX labels Sep 30, 2022
@mohanarpit
Copy link
Member

mohanarpit commented Sep 30, 2022

Technically, Appsmith is behaving correctly. Since a page is not available on a particular branch, there’s a 404 error. But obviously the experience for a user is not great.

In order to give users a better experience, we need to differentiate between scenarios where a user is switching the branch from inside the application to a user who shouldn't have any information about this application/page accessing the URL. In the former case, we can redirect the user back to the default home page. In the latter, Appsmith should just show a plain 404.

@akash-codemonk akash-codemonk added Medium Issues that frustrate users due to poor UX and removed High This issue blocks a user from building or impacts a lot of users labels Sep 30, 2022
@Richarex
Copy link

This issue is still reproducible. Please refer to the attached video:- https://www.loom.com/share/5ab72c0268a04dca8c2293f520de83c9

@ramsaptami ramsaptami added the Templates Product Issues related to Templates label Oct 17, 2022
@github-actions github-actions bot added the IDE Pod Issues that new developers face while exploring the IDE label Oct 17, 2022
@ramsaptami ramsaptami removed the Templates Product Issues related to Templates label Oct 17, 2022
@github-actions github-actions bot removed the IDE Pod Issues that new developers face while exploring the IDE label Oct 17, 2022
@somangshu somangshu added the Git Platform Issues related to the git & the app platform label Jan 9, 2023
@github-actions github-actions bot removed the Platform Administration Pod Issues related to platform administration & management label Jan 9, 2023
@AnaghHegde
Copy link
Member

@infinitetrooper This is a duplicate of the issue #20883.

hetunandu added a commit that referenced this issue Apr 4, 2023
## Description

After checkout, we will now check if the resource the user was accessing
is available in the incoming branch. Instead of calling the apis to
check this, we will listen to the success action and then handle check
if the current resource is still available in the branch. If not, we
will navigate the user to the home page of the app so that they do not
see a 404 error


> Don't show a 404 error when a resource is not available in the checked
out branch, instead take them to the home page of the app

Fixes #17234
Fixes #20883


Media



## Type of change

- Bug fix (non-breaking change which fixes an issue)


## How Has This Been Tested?

- Manual
   - Have a git connected app
   - Create a new branch 
   - Create a new API/Query/Page on the new branch
   - Switch back to the original branch
- Test: The app should not show 404 error but be navigated to the home
page of the app

- Cypress
Updated the existing cypress tests that avoided the error to make sure
they test the fix instead

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Git Platform Issues related to the git & the app platform Git Product Issues related to version control product Medium Issues that frustrate users due to poor UX Needs Triaging Needs attention from maintainers to triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants