Files
zeekay acaeda400a Eradicate OpenClaw — resolve merge conflicts and finish the rebrand
Three coordinated things:

1. Resolve the committed upstream/main merge conflicts. 94 files were
   sitting with raw <<<<<<< HEAD ... >>>>>>> upstream/main blocks. Every
   conflict had HanzoBot/Bot on HEAD and OpenClaw on upstream. Resolved
   by keeping HEAD everywhere — 540 conflict blocks.

2. Rewrite remaining OpenClaw text refs.
     OPENCLAW   → HANZO_BOT
     OpenClaw   → HanzoBot          (PascalCase type identifiers)
     openclaw   → bot               (codebase convention — botToken,
                                    botUsername etc.; avoids invalid
                                    hyphenated JS identifiers)
     openclaw[_]/openclaw[A-Z] → bot[_]/bot[A-Z]   (compound)
     ai.openclaw.x → ai.hanzo.bot.x  (JVM package path)

3. Delete or rename openclaw-named file paths (116 of them). Dead
   duplicates with a Bot-named canonical from the partial migration:
   deleted. Otherwise renamed.
     ai/openclaw/**           → deleted (ai/hanzo/bot/** canonical)
     Sources/OpenClaw*/       → deleted (Sources/Bot* canonical)
     Tests/OpenClawIPCTests/  → deleted (Tests/BotIPCTests canonical)
     OpenClawKit/             → deleted (BotKit canonical)
     openclaw-tools.*.ts      → deleted (bot-tools.*.ts canonical)
     openclaw-root.ts etc.    → deleted (bot-root.ts canonical)
     types.openclaw.ts        → deleted (types.bot.ts canonical)
     extensions/*/openclaw.plugin.json → renamed hanzo-bot.plugin.json
     docs/start/openclaw.md   → renamed hanzo-bot.md (+ zh-CN)
     docs/assets/openclaw-*.png, whatsapp-openclaw*.jpg → deleted
     scripts/.../openclaw-*   → deleted (bot/hanzo-bot parallels)
     openclaw.mjs             → deleted (hanzo-bot.mjs is package.bin)

Then patched 65 broken JS/TS import strings where hanzo-bot had ended
up inside an import path ('./types.hanzo-bot.js' → './types.bot.js'
etc., since the on-disk filename uses the brand-neutral bot- prefix).

Pre-existing lint debt cleaned up to get oxlint --type-aware to 0/0:
removed the dead i18n test that referenced a path no longer existing;
defined the missing DIDConfig and WalletConfig types in types.base.ts
(they were imported but never declared); dropped unused imports;
collapsed redundant type assertion and a tautological meta.bot lookup
that the openclaw→bot rename made redundant.

The a2ui.bundle.js generated artifact is kept at its pre-rebrand
contents — it gets regenerated by 'pnpm canvas:a2ui:bundle' from
sources I cannot rebuild in this commit; the source side is clean.

Verified: 0 occurrences of openclaw (case-insensitive) in tree source
content, 0 file or directory paths with openclaw in the name; oxlint
--type-aware src test reports 0/0.
2026-05-11 17:56:29 -07:00

3.0 KiB
Raw Permalink Blame History

summary, read_when, title
summary read_when title
Menu bar status logic and what is surfaced to users
Tweaking mac menu UI or status logic
Menu Bar

Menu Bar Status Logic

What is shown

  • We surface the current agent work state in the menu bar icon and in the first status row of the menu.
  • Health status is hidden while work is active; it returns when all sessions are idle.
  • The “Nodes” block in the menu lists devices only (paired nodes via node.list), not client/presence entries.
  • A “Usage” section appears under Context when provider usage snapshots are available.

State model

  • Sessions: events arrive with runId (per-run) plus sessionKey in the payload. The “main” session is the key main; if absent, we fall back to the most recently updated session.
  • Priority: main always wins. If main is active, its state is shown immediately. If main is idle, the most recently active non‑main session is shown. We do not flip‑flop mid‑activity; we only switch when the current session goes idle or main becomes active.
  • Activity kinds:
    • job: high‑level command execution (state: started|streaming|done|error).
    • tool: phase: start|result with toolName and meta/args.

IconState enum (Swift)

  • idle
  • workingMain(ActivityKind)
  • workingOther(ActivityKind)
  • overridden(ActivityKind) (debug override)

ActivityKind → glyph

  • exec → 💻
  • read → 📄
  • write → ✍️
  • edit → 📝
  • attach → 📎
  • default → 🛠️

Visual mapping

  • idle: normal critter.
  • workingMain: badge with glyph, full tint, leg “working” animation.
  • workingOther: badge with glyph, muted tint, no scurry.
  • overridden: uses the chosen glyph/tint regardless of activity.

Status row text (menu)

  • While work is active: <Session role> · <activity label>
    • Examples: Main · exec: pnpm test, Other · read: apps/macos/Sources/HanzoBot/AppState.swift.
  • When idle: falls back to the health summary.

Event ingestion

  • Source: control‑channel agent events (ControlChannel.handleAgentEvent).
  • Parsed fields:
    • stream: "job" with data.state for start/stop.
    • stream: "tool" with data.phase, name, optional meta/args.
  • Labels:
    • exec: first line of args.command.
    • read/write: shortened path.
    • edit: path plus inferred change kind from meta/diff counts.
    • fallback: tool name.

Debug override

  • Settings ▸ Debug ▸ “Icon override” picker:
    • System (auto) (default)
    • Working: main (per tool kind)
    • Working: other (per tool kind)
    • Idle
  • Stored via @AppStorage("iconOverride"); mapped to IconState.overridden.

Testing checklist

  • Trigger main session job: verify icon switches immediately and status row shows main label.
  • Trigger non‑main session job while main idle: icon/status shows non‑main; stays stable until it finishes.
  • Start main while other active: icon flips to main instantly.
  • Rapid tool bursts: ensure badge does not flicker (TTL grace on tool results).
  • Health row reappears once all sessions idle.