The source has no body tag (issue 1) or defined structure aside from a Modal and that doesn't know its a Modal as it has no associated Framework (issue 2, Bootstrap etc) in its structure.
A partial normally is recognized by the <!-- Wappler include --> comment at the top of the document. When the comment is missing and there is no body tag then it isn't recognized as html and will be opened in code only editor.