Skip to content

Commit

Permalink
Merge pull request #5174 from systeminit/revert/aggressive-window-rel…
Browse files Browse the repository at this point in the history
…oading

Revert: aggressive window reloading
  • Loading branch information
fnichol authored Dec 20, 2024
2 parents dbe8ee1 + c3a4e00 commit e643595
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/web/src/components/InsetApprovalModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ import {
IconNames,
themeClasses,
} from "@si/vue-lib/design-system";
import { computed, onMounted, ref } from "vue";
import { computed, ref } from "vue";
import clsx from "clsx";
import { useRoute, useRouter } from "vue-router";
import { useChangeSetsStore } from "@/store/change_sets.store";
Expand All @@ -133,6 +133,15 @@ const applyingChangeSet = ref(false);
const route = useRoute();
const router = useRouter();
/*
This is breaking on the happy path of applying a change set :)
1. the selected change set is <SHA-NOT-HEAD>
2. we apply the changeset, and set its status to applied
3. we push the router change to head, but the URL has not changed yet
4. WorkspaceModelAndView re-renders
5. Which re-mounts this component
6. selectedChangeSet is the <SHA-NOT-HEAD> b/c the url has not changed
7. and its status is applied
onMounted(() => {
if (mode.value === "error") {
try {
Expand All @@ -146,6 +155,7 @@ onMounted(() => {
window.location.href = `/w/${route.params.workspacePk}/head`;
}
});
*/
const mode = computed(() => {
if (
Expand Down

0 comments on commit e643595

Please sign in to comment.