R Studio Console Questions

I'm contemplating working on a fork of R Studio as a possible side-project this Summer and I'm hoping someone here will have some insight which might either speed me on my way or convince me to not to poke this particular bear.

In short I want to enable R Studio to connect to an R session other than the main console (e.g. an R session in a terminal tab).

I've (admittedly very lightly) skimmed the source on GitHub, but I've yet to determine what powers the Console tab in R Studio.

My first question is where should I look in the source to find how and where the console is instantiated and the R session started?

My second question concerns the environment tab. My hope and assumption is that the code governing the environment tab simply queries the active R session rather than being hard coded to an expected session in the R console. If this is not the case, can you point me in the general direction of the files which control this?

While I know I could re-map all the code-to-console commands to code-to-terminal commands, the issue of the non-updating environment tab remains.

I am quite familiar with R Studio Server and have used it for years to allow myself to do compute-heavy tasks on my Chromebook. My goal is not to simply send code somewhere else and see the results locally (though that's a natural and logical extension).

The impetus for this potential project stems from my frustration with the varyingly limited capabilities of the R Studio console. I discovered while I was toying with custom prompts with the prompt package, that I have a wide variety of capabilities depending on if I'm running R in a Windows Powershell, Windows Command Prompt, a bash shell in the terminal tab, a WSL shell in or out of the terminal tab, or in the R Studio console.

All suggestions or advice is welcome including and especially those encouraging me to find better uses for my time.