History

feat(environments): draw each environment as the machine it runs on (#9299)

Julius Marminge committed 2 months ago

Commit 0fbb9421 parent d89764132 files · +1222 −84Browse files

Showing the changes to docs (2 of 32 files). Show all

Unified · Split

2 files
  1. docs/internals/remote.md +17 −0
  2. docs/user/thread-sidebar.md +15 −0
docs/internals/remote.md+17−0
@@ -224,6 +224,22 @@ right action without making the transport responsible for process management. Th · 223 unmodified lines
224supervisor owns the resulting disconnect and reconnect like any other involuntary close. See224supervisor owns the resulting disconnect and reconnect like any other involuntary close. See
225[server-updates.md](./server-updates.md).225[server-updates.md](./server-updates.md).
226 226
227## Machine identity
228
229Every environment is drawn with one of a fixed set of machine glyphs (`EnvironmentMachineKind` in
230contracts: server, cloud, desktop, laptop, mac-mini, mac-studio). Two inputs feed it, and the
231precedence lives in one helper, `resolveEnvironmentMachineKind`, so web and mobile cannot drift:
232
2331. `settings.environmentIcon`, a nullable server setting the user picks in Settings → Connections.
234 It is server state rather than client state so every device connecting to that server agrees.
2352. `environment.platform.machine`, detected once at startup by [ServerEnvironmentMachine.ts][machine]
236 (IOKit product name / `hw.model` on macOS, `/sys/class/dmi/id` on Linux with virtualization
237 markers mapped to "cloud"). Absent when there is no signal, so older servers, Windows hosts, and
238 containers decode without it.
2393. A generic server otherwise.
240
241Clients treat the field like any other capability: absent means "use the fallback", never "wait".
242
227## Future work243## Future work
228 244
229These remain unbuilt and are listed to keep the model honest:245These 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: · 7 unmodified lines
237[authremote]: ../../packages/client-runtime/src/authorization/remote.ts253[authremote]: ../../packages/client-runtime/src/authorization/remote.ts
238[sshenv]: ../../apps/desktop/src/ssh/DesktopSshEnvironment.ts254[sshenv]: ../../apps/desktop/src/ssh/DesktopSshEnvironment.ts
239[sshtunnel]: ../../packages/ssh/src/tunnel.ts255[sshtunnel]: ../../packages/ssh/src/tunnel.ts
256[machine]: ../../apps/server/src/environment/ServerEnvironmentMachine.ts
docs/user/thread-sidebar.md+15−0
@@ -53,6 +53,21 @@ The main sidebar, right panel, and terminal drawer open and close immediately by · 52 unmodified lines
53The duration can be set up to 400 ms. Clicking the preview replays all three panel transitions; at53The duration can be set up to 400 ms. Clicking the preview replays all three panel transitions; at
540 ms, it snaps between the same open and closed states.540 ms, it snaps between the same open and closed states.
55 55
56## Environment icons
57
58When you are connected to more than one environment, every thread that lives somewhere other than
59the machine you are on wears a small icon for that machine at the end of its row: a server, a cloud
60VM, a desktop, a laptop, a Mac mini, or a Mac Studio. In the hosted web app and the mobile app,
61where every environment is remote, each row wears its machine so you can tell them apart at a
62glance. The same icon appears in the thread tooltip, the "Run on" picker, the pull request server
63filter, and the environment lists under **Settings → Connections**.
64
65Servers pick the icon themselves from the hardware they run on. A Mac reports its model, a Linux
66machine reports its chassis type and whether it is a virtual machine, and anything without a usable
67signal shows a generic server. To override it, open **Settings → Connections** and choose an icon
68for that environment; **Automatic** goes back to what the server detected. The choice is stored on
69that server, so every device that connects to it sees the same icon.
70
56## Environment artwork71## Environment artwork
57 72
58Dev and Nightly environments can identify themselves with artwork at the top of the sidebar and in73Dev and Nightly environments can identify themselves with artwork at the top of the sidebar and in

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t