← Back to PRs

#20047: fix(googlechat): typing indicator shows 'OpenClaw' instead of agent identity.name

by xinhuagu open 2026-02-18 13:03 View on GitHub →
channel: googlechat channel: matrix size: XS trusted-contributor
## Problem The Google Chat typing indicator always shows "OpenClaw is typing..." even when the agent has `identity.name` configured. This is because `resolveBotDisplayName()` checks `agent.name` but skips `agent.identity.name` — the standard way users configure their agent's display name. ## Root Cause `resolveBotDisplayName()` fallback chain was: 1. Account config name 2. `agent.name` 3. `"OpenClaw"` Missing: `agent.identity.name` (from `agents.list[].identity.name`) ## Fix Insert `identity.name` as step 2 in the fallback chain, before `agent.name`: 1. Account config name 2. **`agent.identity.name`** ← added 3. `agent.name` 4. `"OpenClaw"` ## Changes | File | Change | |------|--------| | `extensions/googlechat/src/monitor.ts` | Check `identity.name` before `name` in `resolveBotDisplayName()` | Closes #18580 <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR contains two fixes: 1. **Google Chat typing indicator fix**: Adds `agent.identity.name` to the `resolveBotDisplayName()` fallback chain so the typing indicator respects the agent's configured identity name instead of always showing "OpenClaw is typing...". The fallback chain is now: account config name → `identity.name` → `agent.name` → "OpenClaw". 2. **Matrix message drop fix**: Changes `startupGraceMs` from `0` to `30_000` (30 seconds) to prevent silent message drops when the Matrix homeserver clock is behind the gateway. Also adds verbose logging for dropped pre-startup and old events to aid debugging. - Both fixes are minimal, well-scoped, and follow existing codebase patterns. - The `identity.name` access pattern matches usage across the rest of the codebase (`src/infra/outbound/identity.ts`, `src/channels/plugins/outbound/slack.ts`, etc.). - The 30s grace period is conservative relative to the gateway health monitor's 60s default. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge — the changes are minimal, well-scoped bug fixes with no architectural risk. - Both changes are small, targeted fixes. The googlechat change adds one additional fallback check using a well-established pattern. The matrix change adjusts a timing constant to a reasonable value and adds diagnostic logging. No new dependencies, no behavioral regressions, and the changes are consistent with existing codebase patterns. - No files require special attention. <sub>Last reviewed commit: f88ada1</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs