feat(environments): draw each environment as the machine it runs on (#9299)
Co-authored-by: Julius Marminge <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
32 files changed
+1222
-84
No files matched your search
@@ -224,6 +224,22 @@ right action without making the transport responsible for process management. Th
|
||||
supervisor owns the resulting disconnect and reconnect like any other involuntary close. See
|
||||
[server-updates.md](./server-updates.md).
|
||||
|
||||
## Machine identity
|
||||
|
||||
Every environment is drawn with one of a fixed set of machine glyphs (`EnvironmentMachineKind` in
|
||||
contracts: server, cloud, desktop, laptop, mac-mini, mac-studio). Two inputs feed it, and the
|
||||
precedence lives in one helper, `resolveEnvironmentMachineKind`, so web and mobile cannot drift:
|
||||
|
||||
1. `settings.environmentIcon`, a nullable server setting the user picks in Settings → Connections.
|
||||
It is server state rather than client state so every device connecting to that server agrees.
|
||||
2. `environment.platform.machine`, detected once at startup by [ServerEnvironmentMachine.ts][machine]
|
||||
(IOKit product name / `hw.model` on macOS, `/sys/class/dmi/id` on Linux with virtualization
|
||||
markers mapped to "cloud"). Absent when there is no signal, so older servers, Windows hosts, and
|
||||
containers decode without it.
|
||||
3. A generic server otherwise.
|
||||
|
||||
Clients treat the field like any other capability: absent means "use the fallback", never "wait".
|
||||
|
||||
## Future work
|
||||
|
||||
These remain unbuilt and are listed to keep the model honest:
|
||||
@@ -237,3 +253,4 @@ These remain unbuilt and are listed to keep the model honest:
|
||||
[authremote]: ../../packages/client-runtime/src/authorization/remote.ts
|
||||
[sshenv]: ../../apps/desktop/src/ssh/DesktopSshEnvironment.ts
|
||||
[sshtunnel]: ../../packages/ssh/src/tunnel.ts
|
||||
[machine]: ../../apps/server/src/environment/ServerEnvironmentMachine.ts
|
||||
@@ -53,6 +53,21 @@ The main sidebar, right panel, and terminal drawer open and close immediately by
|
||||
The duration can be set up to 400 ms. Clicking the preview replays all three panel transitions; at
|
||||
0 ms, it snaps between the same open and closed states.
|
||||
|
||||
## Environment icons
|
||||
|
||||
When you are connected to more than one environment, every thread that lives somewhere other than
|
||||
the machine you are on wears a small icon for that machine at the end of its row: a server, a cloud
|
||||
VM, a desktop, a laptop, a Mac mini, or a Mac Studio. In the hosted web app and the mobile app,
|
||||
where every environment is remote, each row wears its machine so you can tell them apart at a
|
||||
glance. The same icon appears in the thread tooltip, the "Run on" picker, the pull request server
|
||||
filter, and the environment lists under **Settings → Connections**.
|
||||
|
||||
Servers pick the icon themselves from the hardware they run on. A Mac reports its model, a Linux
|
||||
machine reports its chassis type and whether it is a virtual machine, and anything without a usable
|
||||
signal shows a generic server. To override it, open **Settings → Connections** and choose an icon
|
||||
for that environment; **Automatic** goes back to what the server detected. The choice is stored on
|
||||
that server, so every device that connects to it sees the same icon.
|
||||
|
||||
## Environment artwork
|
||||
|
||||
Dev and Nightly environments can identify themselves with artwork at the top of the sidebar and in
|
||||
|
||||
Reference in new issue
Block a user