Phase 2 of #4098: the workspace becomes a first-class object that
survives membership changes.
- Close/detach no longer dissolves a workspace at <=1 member. The
workspace entity (and its id) survives with its remaining members,
even at zero, where it keeps an empty split root placeholder that
renders as an empty workspace tab.
- Focus handoff after member loss resolves to the most-recently-active
surviving member (AI chat updatedAt via the AI session store), never
positionally to remainingSessionIds[0]; with no recency signal focus
is cleared and the pane renderer uses its display default.
- session restore: drop the empty-workspace skip. Workspaces closed to
zero members persist an empty root and come back after restart with
the same id, so their AI chats re-link. Roots that prune to null
because their member sessions cannot be restored are still dropped.
- applyCloseSessionToSessions no longer orphans the survivor; the
dissolved-workspace tab-order replacement machinery is removed.
Surface the remote file owner in the SFTP list and tree, using the
existing toggleable column menu. Parse the username from SFTP longname
or ls output, then fall back to uid when a name is unavailable.
Closes#3073
Codex P2: resolveWorkspaceTabLabel treated any workspace whose title equals
"Workspace" as an untouched default and replaced it with a host label — so a
workspace a user renamed to "Workspace" (or a snippet named "Workspace")
lost its chosen name.
Add an explicit Workspace.autoTitle flag. It is authoritative when present:
- set false on user rename, snippet-created, named "New Workspace", and any
createWorkspaceFromTargets call given an explicit name;
- absent/true means the tab may derive a host label.
Legacy workspaces without the flag fall back to the old default-title string
check, so already-open default splits still get host labels and previously
renamed workspaces keep their names.
- domain/models/workspace.ts: add autoTitle field.
- domain/workspace.ts: thread autoTitle through createWorkspaceFromSessionIds.
- application/state/useSessionState.ts: mark rename / snippet / named
creation paths as explicit; createWorkspaceFromTargets takes an optional
name and only marks custom when one is given.
- domain/sessionTabTitle.ts: derive only when autoTitle (with legacy string
fallback); tests for explicit "Workspace" name and explicit auto-title.