#11528: feat(control-ui): configurable page title with hostname default
app: web-ui
gateway
stale
Cluster:
Slack Integration Enhancements
## Problem
When running multiple OpenClaw instances (laptop, server, VM, etc.), all browser tabs show the same title "OpenClaw Control". The only way to distinguish them is by URL, which is not practical.
## Solution
Add a `gateway.controlUi.pageTitle` config option that:
- Defaults to `<hostname> - OpenClaw Control` using `os.hostname()` (so it works out of the box)
- Can be overridden in config to any custom string
- Is injected server-side when serving `index.html` (no client-side changes needed)
- Is HTML-escaped to prevent injection
## Config example
```json
{
"gateway": {
"controlUi": {
"pageTitle": "My Server - OpenClaw Control"
}
}
}
```
If not set, a machine named `MateBook` would show: **MateBook - OpenClaw Control**
## Changes
- `src/config/types.gateway.ts`: Add `pageTitle` to `GatewayControlUiConfig`
- `src/config/zod-schema.ts`: Add to validation schema
- `src/config/schema.ts`: Add labels, descriptions, examples
- `src/gateway/control-ui.ts`: Inject title in `injectControlUiConfig()`, add `os.hostname()` default
## Use case
Running OpenClaw on a MateBook (WSL) and a MacOS VM — need to tell the tabs apart. Currently requires post-install `sed` patching that breaks on every update. This makes it a first-class config option.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
Adds a new `gateway.controlUi.pageTitle` configuration option (with UI schema metadata + zod validation) and wires it into the Control UI index.html server-side injection.
On the gateway side, `injectControlUiConfig()` now computes a default title from `os.hostname()` and attempts to replace the static `<title>` in the served HTML, while still injecting the existing `window.__OPENCLAW_*` globals.
<h3>Confidence Score: 4/5</h3>
- Mostly safe to merge, but there is one functional issue where title injection can be skipped in some scenarios.
- Changes are small and localized, with config/schema updates consistent across types + zod + UI hints. The main concern is the early-return in `injectControlUiConfig()` which can prevent applying the page title when the HTML already contains the injected globals or the function is invoked more than once.
- src/gateway/control-ui.ts
<!-- greptile_other_comments_section -->
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
- Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13))
<!-- /greptile_comment -->
Most Similar PRs
#10991: feat(gateway): add configurable instance name for Control UI title
by Annaxiebot · 2026-02-07
85.3%
#8318: feat(webchat): Add configurable user display name
by vishaltandale00 · 2026-02-03
73.4%
#11663: fix: prevent config page header overlap with settings form
by shogunsea · 2026-02-08
69.7%
#9440: fix(security): warn users when gateway token appears in URLs
by zenchantlive · 2026-02-05
69.1%
#10894: Docs: fix legacy branding, add config reference, expand cron troubl...
by biv0711 · 2026-02-07
68.2%
#12168: feat: integrate Mission Control dashboard into Control UI
by riftagent-git · 2026-02-08
67.9%
#9490: Add Internationalization (i18n) Support
by luuman · 2026-02-05
67.7%
#8203: fix clawdbot references
by anton-roos · 2026-02-03
67.7%
#6512: Claude/setup open claw agent f v sqk
by franelcisco · 2026-02-01
67.5%
#19429: Fix/custom bind host validation
by frudas24 · 2026-02-17
67.1%