# UI Whatsynaptor

This plugin keeps the shipped OpenClaw Control UI intact and injects a small branding layer on top.

## Behavior

- Does not replace `dist/control-ui` bundles.
- Injects one stylesheet and one script into `dist/control-ui/index.html`.
- Serves branding assets from plugin HTTP routes.
- Removes the old legacy `ui-patcher` runtime block if it exists.
- Cleans up its injector block on plugin stop so disabling the plugin does not leave stale asset references behind.
- If the OpenClaw install is read-only to the current process, logs a warning and continues without mutating the global Control UI files.

## What It Can Change

- Browser tab title
- Sidebar brand text
- Sidebar logo
- Topbar background video
- Startup loader video
- Favicon
- Accent colors
- Display/body fonts
- Extra CSS overrides
- Visible `OpenClaw` wordmarks

## What It Intentionally Does Not Change

- Upstream HTML structure
- Upstream JS bundles
- Chat composer behavior
- Sessions/tools/channels panel logic
- New UI features shipped by later OpenClaw releases

## Example Config

```json
{
  "plugins": {
    "entries": {
      "ui-whatsynaptor": {
        "enabled": true,
        "config": {
          "enabled": true,
          "appName": "OpenClaw Custom",
          "browserTitle": "OpenClaw Custom Control",
          "sidebarTitle": "OpenClaw Custom",
          "sidebarEyebrow": "Control",
          "logoUrl": "/plugins/ui-whatsynaptor/assets/brand-logo-uBqNKeuY.gif",
          "topbarVideoUrl": "",
          "startupVideoUrl": "",
          "accentColor": "#5da78b",
          "accentHover": "#74b89d",
          "accentGlow": "rgba(93, 167, 139, 0.26)",
          "fontBody": "\"Manrope\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif",
          "fontDisplay": "\"Saira\", \"Manrope\", sans-serif",
          "replaceWordmark": true
        }
      }
    }
  }
}
```

## Install

```bash
./scripts/install-ui-whatsynaptor.sh
```

If the installed Control UI `index.html` is read-only, the installer prompts before running `sudo chmod a+rw ...`.
You can also run the printed command in another terminal, then choose retry in the installer.

Optional state/profile examples:

```bash
./scripts/install-ui-whatsynaptor.sh --profile dev
./scripts/install-ui-whatsynaptor.sh --state-dir /data/.openclaw
OPENCLAW_STATE_DIR=/data/.openclaw ./scripts/install-ui-whatsynaptor.sh
```
