Stained Glass OS

0007. The shell: extend Wine's explorer, add our own panels beside it

Context

The brief left P7 as a time-boxed bake-off between extending Wine's explorer and running ReactOS's under Wine. Research (p7-shell-options.md) turned up one fact that reframes the choice: Wine's explorer implements the real shell, not an imitation of one. systray.c's window class is literally Shell_TrayWnd, and appbar.c answers SHAppBarMessage. Applications look for those by name.

It also turned up that the appearance problem is smaller than it looks: Wine's uxtheme is 8,511 lines including msstyles.c, so it can load Windows visual style files. What looks old is the default theme.

Decision

Option A, with C's ambition layered on top. In David's words:

keep Wine's explorer as the shell process, because that is what makes applications behave, and treat the Windows 10 appearance as (i) a visual-styles theme and (ii) new panels we write ourselves and dock via the AppBar protocol Wine already implements.

So:

ReactOS's explorer is not chosen, but nor is it dismissed: a measurement of what it needs from Wine that Wine does not provide is still worth having, and its file browser is the part most obviously missing from A.

Why this shape and not the others

Writing a shell from scratch means reimplementing Shell_TrayWnd, the tray protocol, AppBars, and the undocumented corners applications depend on — the exact surface A already has working. That is the option that looks cheapest at the start.

Running ReactOS's explorer buys a more complete shell and costs two things: it is feature-incomplete alpha by its maintainers' own description, and it is GPL-2.0-only.

The licensing consequence, which is a good one

ADR 0004 left sg-shell's licence open, pending this bake-off, because ReactOS being GPL-2.0-only would have forced it away from AGPL. This decision settles it, and settles it well:

The AppBar boundary is therefore a licence boundary as well as an architectural one. That is a reason to keep new UI on the far side of it even when bolting something into explorer would be quicker.

Consequences

Not yet

No work starts here until the image is finished and logs in properly. The image currently autologs in — greetd with a hardcoded user and no authentication, debt item D2. A shell with no user to belong to is a demo, so sg-greeter comes first.