Skip to content

fix(desktop): mark truncated group-chat sync payloads - #97468

Closed
686f6c61 wants to merge 1 commit into
NousResearch:mainfrom
686f6c61:fix-97373
Closed

686f6c61 wants to merge 1 commit into
NousResearch:mainfrom
686f6c61:fix-97373

Conversation

@686f6c61

Copy link
Copy Markdown

What does this PR do?

The Desktop group-chat ui_meta projection sliced each message at 1200 characters with no marker, so a receiving client/bot saw a mid-sentence cut and had no way to know the body continued.

Sync text that exceeds the budget now ends with … [truncated] (kept inside the same 1200-char cap) and sets truncated: true on the projected message. The 48KB envelope bound is unchanged.

This does not raise the per-message cap or switch to incremental full-text delivery — that would be a larger sync-protocol change. Receivers at least know the payload was cut.

Related Issue

Fixes #97373

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Security fix
  • Documentation update
  • Tests (adding or improving test coverage)
  • Refactor (no behavior change)
  • New skill (bundled or hub)

Changes Made

  • apps/desktop/src/plugins/hermes-bots/group-chat.ts: compactGroupChatSyncText + stamp truncated
  • apps/desktop/src/plugins/hermes-bots/types.ts: optional truncated on GroupMessage
  • apps/desktop/src/plugins/hermes-bots/group-chat.test.ts: marker + flag on oversized sync lines

How to Test

cd apps/desktop
npx vitest run src/plugins/hermes-bots/group-chat.test.ts
# 41 passed

Not runtime-tested in a live multi-bot room.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run the targeted vitest file above
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: Linux

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

N/A

The ui_meta projection sliced messages at 1200 chars with no
signal that the body continued. Stamp truncated and keep the
marker inside the existing per-message budget.
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks @686f6c61 — the work in this PR has landed on main via:

Your contribution is credited there (cherry-picked authorship / co-author trailer or credit in the PR body; see the linked PR for what was kept and what was trimmed). Closing this one as landed / superseded so the backlog reflects reality. If something in your original diff is still missing on current main, please comment and we'll reopen or follow up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop group chat truncates messages at ~1.1KB before they reach the agent

3 participants