Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Delete awkwardness and 410 error instead of taking user to Workspaces list after deleting the workspace #1955

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

Closed
Tracked by #1939
misskniss opened this issue Jun 1, 2022 · 4 comments · Fixed by #2208
Assignees
Labels
site Area: frontend dashboard
Milestone

Comments

@misskniss
Copy link

Steps to repro:

  1. Create a workspace
  2. Select that workspace from the workspaces list
  3. Select Delete Workspace and confirm
  4. --> User just gets sent to the workspaces list when the workspace is still present and the status says Queued. It should say 'Deleting...
    Queued.png
    Also --> We should keep them on that workspace rather than kicking them all the way out to the main list.
  5. Click on the Workspace --> Status = Deleting,,,
    Correct job status.png.
  6. The Logs show it completes, refreshing the logs page keeps it on the logs page BUT the workspace is technically not there. This is OK.
    Logs confirm job finishes.png
  7. Hit 'Back' in your browser --> User gets this 410 error when they should be take back to the workspaces list.
    410 error deleted workspace.png
@misskniss misskniss added site Area: frontend dashboard nice-to-have labels Jun 1, 2022
@tjcran tjcran added the bug 🐛 label Jun 1, 2022
@ammario ammario changed the title Delete awkwardness and 410 error instead of taking user to Worksapces list after deleting the workspace Delete awkwardness and 410 error instead of taking user to Workspaces list after deleting the workspace Jun 1, 2022
@Kira-Pilot Kira-Pilot self-assigned this Jun 2, 2022
@presleyp
Copy link
Contributor

presleyp commented Jun 2, 2022

@misskniss @Kira-Pilot I wrote a decision ticket about how to handle deleting #1837, where we decided that eventually we want to be able to see a deleted workspace (so no 410 error), but that requires a backend change. So in the meantime I went with the redirection so you don't get the error on the page you're looking at.

@Kira-Pilot
Copy link
Member

@presleyp what I'm hearing is:

  • we should keep the redirect, so I should ignore this comment : "Also --> We should keep them on that workspace rather than kicking them all the way out to the main list."
  • I should fix the status that says Queued instead of Deleting...
  • I should fix the back button. We should route back to the workspaces page.

Does the above AC look good to you?

@presleyp
Copy link
Contributor

presleyp commented Jun 2, 2022

  • add query param to fetch deleted workspace
  • delete any code related to the now-unnecessary redirect
  • consider conditionally rendering parts of the workspace page that don't make sense when deleted?
  • fix "queued" status - should show workspace status which is never that, I think?

You won't see the deleted workspace in your list but that's okay. Back will work.

@misskniss misskniss added this to the Community MVP milestone Jun 3, 2022
Kira-Pilot added a commit that referenced this issue Jun 8, 2022
Kira-Pilot added a commit that referenced this issue Jun 8, 2022
* feat: added include_deleted

relates to #1955

* Update coderd/workspaces.go

defining vars in the scope of conditional

Co-authored-by: Mathias Fredriksson <[email protected]>

* Update coderd/workspaces.go

avoid newline

Co-authored-by: Mathias Fredriksson <[email protected]>

* Update coderd/workspaces.go

Co-authored-by: Mathias Fredriksson <[email protected]>

* PR feedback

* wrote test, added type

* Update coderd/workspaces_test.go

shortening test name

Co-authored-by: Cian Johnston <[email protected]>

* taking out api.ts change for now

* casing

Co-authored-by: Mathias Fredriksson <[email protected]>
Co-authored-by: Cian Johnston <[email protected]>
@Kira-Pilot
Copy link
Member

Just a note: queued status was the result of workspaces list not refreshing and is no longer an issue because we're not redirecting:
Screen Shot 2022-06-09 at 9 29 12 AM

Eventually we should consider making the entire workspaces list realtime, but that is outside the scope of this ticket.

kylecarbs pushed a commit that referenced this issue Jun 10, 2022
* feat: added include_deleted

relates to #1955

* Update coderd/workspaces.go

defining vars in the scope of conditional

Co-authored-by: Mathias Fredriksson <[email protected]>

* Update coderd/workspaces.go

avoid newline

Co-authored-by: Mathias Fredriksson <[email protected]>

* Update coderd/workspaces.go

Co-authored-by: Mathias Fredriksson <[email protected]>

* PR feedback

* wrote test, added type

* Update coderd/workspaces_test.go

shortening test name

Co-authored-by: Cian Johnston <[email protected]>

* taking out api.ts change for now

* casing

Co-authored-by: Mathias Fredriksson <[email protected]>
Co-authored-by: Cian Johnston <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site Area: frontend dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants