Skip to content

fix: filter HEARTBEAT_OK and NO_REPLY sentinel messages from chat UI#24

Merged
ngmaloney merged 1 commit into
mainfrom
fix/filter-sentinel-messages
Mar 27, 2026
Merged

fix: filter HEARTBEAT_OK and NO_REPLY sentinel messages from chat UI#24
ngmaloney merged 1 commit into
mainfrom
fix/filter-sentinel-messages

Conversation

@ngmaloney
Copy link
Copy Markdown
Owner

@ngmaloney ngmaloney commented Mar 27, 2026

Summary

Filters agent sentinel responses (HEARTBEAT_OK, NO_REPLY) from the ClawChat message list. These are internal protocol signals — not meaningful conversation — and showing them as chat bubbles is noisy and confusing.

Implementation

  • src/lib/sentinel.tsisSentinelMessage() utility that checks if trimmed text exactly matches a known sentinel. Uses a Set for O(1) lookup and is easily extensible for future blocklist entries.
  • src/components/ChatView.tsx — Filters messages via useMemo before rendering. Raw data is preserved in the hook/cache (filtering happens at the rendering layer per the issue spec).
  • src/test/sentinel.test.ts — 7 unit tests covering exact match, whitespace trimming, partial matches, case sensitivity, and null/empty handling.

Acceptance Criteria

  • HEARTBEAT_OK messages do not appear in the chat UI
  • NO_REPLY messages do not appear in the chat UI
  • ✅ All other messages render as normal
  • ✅ No regression on existing message display (raw data preserved)

Closes #21

Adds rendering-layer filtering so agent sentinel responses (HEARTBEAT_OK,
NO_REPLY) are hidden from the message list. Raw data is preserved in the
hook and cache — only the visual rendering is affected.

- New isSentinelMessage() utility in src/lib/sentinel.ts
- ChatView filters messages via useMemo before rendering
- Unit tests for sentinel detection (7 cases)

Closes #21
@ngmaloney ngmaloney merged commit 2fd2de6 into main Mar 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter agent sentinel messages from chat UI (HEARTBEAT_OK, NO_REPLY)

1 participant