Samsung Dex is this. I can dock my phone and get a desktop experience. I have Visual Studio Code running now (though code-server[1]) and Ubuntu userland (via Termux/Andronix). Plus all other Android apps running in detached windows.
It's unfortunately not even as useful as it sounds but it is a start. I'm still at the early stages of setting it up for real work.
It's definitely responsive enough; performance is not the problem. It is software availability that the biggest problem -- Android doesn't even really have a decent desktop-class text editor. But email, web browsing, games, etc is all fine; I can multitask all these things in a Dex desktop.
I used DeX (the non-Linux version) while my main laptop was in for repairs, and it got me through. There were even positive surprises, like discovering it supported external hard drives and some of my pro audio gear. I could connect my Focusrite Scarlett USB audio interface which is connected to my JBL 305P studio speakers.
If you're able to do all your work on Android or the web, it would work. But for me there's still a ton of Windows and Mac software I need to get the job done. The other problem is DeX doesn't really work in a laptop form yet, and I like to do work from cafes a lot.
Current iPhone has the power to do so, and can connect via ApplePlay and bluetooth. So the only holdup is software.
Maybe this year's WWDC will show us something closer to that.
I'm holding out hope for this, since they "added" mouse support to iPadOS in 2019. There has to be a reason for that plus Universal apps, plus SwiftUI, right?
2. You don't need AirPlay, you could drive a monitor and keyboard/mouse directly, using an HDMI/USB dongle. But yes, as you said, software is the hold up. The rest is ready.
Maybe they plan to support it for iPadOS devices and either no support or stripped down for iPhone. It’d be cool if we at one point had desktop power in our pockets though. (Yes I know we do to some extent, but it’s still a bit of a stretch for a daily driver.)
Most people who need a desktop OS, want a desktop or notebook that performs faster than a smartphone. Otherwise they can just get an iPad or low end laptop and it won't set you back much more than keyboard + mouse + display. Cloud sync takes care of the rest.
Smartphones are probably pretty close to being powerful enough for 80% of desktop use cases. Having one device that can dock to a "laptop" shell and give me a full screen desktop OS would be amazing.
Why? Writing is much slower than typing and less accurate to boot. There are also a lot of problems to solve for a variant input which have long been settled with keyboard. For example code completion, jumping to the definition, showing errors where they keyboard focus is, etc.
Unless someone were to come out with some kind of massive productivity gain by switching input types, people aren't going to switch and these supplemental technologies will never get built.
I often typo and get corrections from the text editor I used, when I write not-code text.
When I write code, I don’t need to type fast. However, I like to layout things quickly: proper indentation, docstrings, spacing, order/position of functions.