<!-- source-hash: 4303371bd78ed68ce85468361247ddc3 -->
Determines whether a URL is cross-origin by checking for an explicit host, used to drive new-tab navigation decisions in chat and link rendering.

## Key Components

### `isCrossOriginUrl(url)`
- **Input:** `string | null | undefined`
- **Returns:** `boolean` — `true` if the URL has an explicit host (absolute or protocol-relative), `false` for relative paths or falsy values

## Logic

```text
null / undefined / ""  → false
/relative/path         → false  (same-origin by convention)
//protocol-relative    → true   (explicit host)
https://example.com    → true   (explicit host)
http://example.com     → true   (explicit host)
```

## Usage Example

```typescript
import { isCrossOriginUrl } from './is-cross-origin-url'

isCrossOriginUrl('/support')                  // false — same-origin
isCrossOriginUrl('//cdn.example.com/file.js') // true  — cross-origin
isCrossOriginUrl('https://flamingo.run')      // true  — cross-origin
isCrossOriginUrl(null)                        // false — falsy guard
```

## Design Notes

- **SSR-deterministic:** avoids `window.location` comparison, which previously caused React hydration mismatches when SSR (no `window`) and client produced different results for the same URL
- **Convention-based:** same-origin navigation within the app always uses relative paths; any URL with a host is treated as external regardless of the actual deployment origin
- **Scope:** only handles the fallback case in `decideNewTab`; absolute same-platform URLs are caught earlier by the `targetPlatform !== currentSource` branch and never reach this function