2afd17a9d7
The terminal pane's registry-scoped lookup keys sshConnections with backendScopeKey(connectionId, profile), but the pool's single writer publishes every tunnel under its per-profile bootstrap key with the registry connection stamped on the entry. The lookup can never hit, so a v2 registry SSH terminal pane stays 'pending' forever (#97345). Fall back to the entry stamped with the window's connection id - the same identity match managedSshScopeRole applies to pool entries - and return the writer's actual scope so downstream getSshConnectionState and teardown keep working.