Session Info: the machine row says where the chat runs (Local, SSH or Cloud)

Merged
TE
4d ago
+63-6

Leo asked (2026-10-31):

"man this stuff I HATE THIS BUILD'S SESSION INFO I HATE THAT TOP BIT IF IT'S A NONLOCAL CHAT THAT'S WHERE WHY IS THERE NOTHING THAT TELLS ME IF IT'S LOCAL OR IF"

What changed

Session Info's first section, Environment, starts with the machine row. Until now that row showed only the machine's name and icon (Studio, build-01), so nothing in words said whether the chat ran on this Mac or somewhere else. The row now ends with a kind word: Local, SSH or Cloud. These are the words the composer's environment picker already uses for each kind (EnvironmentPicker.tsx KIND_LABELS: composer.envLocal, composer.envSSH, composer.cloud), so no new strings or translations were needed.

  • inspector/EnvironmentSection.tsx: MACHINE_KIND_LABELS, plus a row__end span (data-machine-kind) on the machine row. The kind comes from the existing machineOf() (summary hostKind, peer plus peerKinds), so there's no new plumbing.
  • inspector/inspector.css: when a Save link follows the kind word (gallery only; chats hide Save since #28238), the two sit together at the row's end, 8px apart. Without this, two auto margins would split the free space between them.
  • Nothing else changes: no rows removed, no restyle, no title row, and no default changed.

Spec: leo-workspace design/session-info.md (the session-info surface in .github/design-surfaces.json). Its parity table lists "Machine row shows only the machine's name and icon, so local vs remote is not said in words" as the gap. This PR closes that row, and the spec will be updated to match.

Tests

  • test/chat-inspector-environment.test.tsx: new test the machine row says where the chat runs: Local, SSH or Cloud beside the machine's name covers local, an SSH peer, a Cloud peer and a Cloud hostKind. The scratchpad test now expects the kind word too.
  • test/chat-inspector.test.tsx: the local and Cloud machine-row assertions now check the name and the kind word separately.

Risk

Small and confined to one component: one span on one row, read from data the row already uses.

Agent session: agent session

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Session Info's machine row now says in words where the chat runs — Local, SSH, or Cloud — so a chat on this Mac, an SSH machine, or a Cloud host is immediately identifiable.

  • The row ends with a kind word, reusing the environment picker's existing translation keys, so no new strings or plumbing were added.
  • When a Save link follows the kind word (gallery only), the two sit together at the row's end instead of splitting the free space.
  • The base moved inspector/ to session-info/, so the change and its tests live at their new paths.
  • Tests cover Local, SSH, Cloud peer, and Cloud host kinds; existing machine-row assertions now check name and kind separately.