> Linux cgroups is an established sandboxing technology. It has the potential to do what you want but currently needs more work to make it simple.

I'm extremely familiar with cgroups, and no, it really doesn't have anything remotely suitable for interposing application UI elements, nor is it a good fit for intercepting HTTPS requests unless you're prepared to run a proxy that MITMs all requests and you overcome the certificate pinning many applications do. (And the most obvious ways of doing that tend to lower security.)

Browsers are a nearly unique environment in this regard, in which myriad applications are built to let the environment (the browser) handle both the network access and the UI rendering for them. It is a path-dependent marvel of history that we have such a popular platform that gives as much control to users as it does.

> You have to install extensions to get that.

And the Linux kernel alone doesn't do what you want either, you need userspace frameworks for that. The browser provides the necessary APIs to intercept requests, and extensions use those to implement all sorts of useful functionality. "You need an extension" is not a counterargument when the extensions already exist and other frameworks need the equivalent as well.

> If you have to customize your "user agent" then I suggest that customization belongs at the OS level.

As mentioned above, OS sandboxing is substantially worse than browser sandboxing for the purposes I care about, and does not solve the problems I have. In a browser, both the UI and the network access is handled by a user-agent that can be adversarial to the application.

Oh, and the best up-and-coming solution that offers anywhere close to the same thing? WebAssembly components running outside the browser, where you can say to a component "I won't give you raw network access, but if you hand me network requests I'll hand you results".

> in the case of Windows or macOS, you're just running someone else's game

You'll get no argument from me on that point. But that doesn't hold for an Open Source OS and browser.

> I want this in the OS and the reason it doesn't yet exist is because there are so many web developers who build terrible web apps instead of learning computer science to build a (terrible) native application and ask for the same restrictions in the OS instead of a browser.

People who have different preferences and values than you do are not stupid. People who don't care about the windmill you've chosen to tilt at are not ignorant.

Capability systems have been researched and developed for decades, in many different forms. They could, in theory, be used to solve the problem you care about, given sufficient capabilities and substantially different application design to integrate such capabilities. That has both practical implementation challenges nearly on par with "write a new OS" or "write a new web browser", and also has practical adoption challenges of convincing people to write applications for it when many native applications are trying to get more capabilities that the user may not want them to have.

Despite all that, there are people working on many aspects of that problem. The fact that people don't immediately go "let me drop everything I care about that works for me and prioritize working on your approach" suggests that you either need to do more work on developing it yourself (because nobody will ever care about your exact preferences more than you do yourself) or learn to pitch it to people who don't already agree with you.

> I want what you want, but I want it at the OS level.

See the previous paragraph: Feel free to write it then. When you've built something that's anywhere close to the capabilities of a web browser, I look forward to trying it, and I'm sure many other people will too. I hope you succeed.