Skip to content

fix(telegram): split progress from final replies#732

Open
artemgetmann wants to merge 12 commits into
mainfrom
codex/telegram-progress-ux-v2-20260516
Open

fix(telegram): split progress from final replies#732
artemgetmann wants to merge 12 commits into
mainfrom
codex/telegram-progress-ux-v2-20260516

Conversation

@artemgetmann
Copy link
Copy Markdown
Owner

@artemgetmann artemgetmann commented May 16, 2026

Review Fast Path

  • User path fixed: Telegram progress previews are retained as their own bubble, then the final answer is forced onto a fresh message when streaming exposes any real answer partial before final.
  • Proof: focused tests passed (1 file / 81 tests), expanded targeted suite passed (3 files / 131 tests), git diff --check passed, and pnpm build completed with the known plugin SDK DTS behavior under tsc ... || true.
  • Shared-state footgun removed: this follow-up stays in the isolated progress UX branch/runtime; main Jarvis bot was not touched.
  • Still hurts: final visual acceptance still needs one isolated tester run where Telegram visibly ends with two bot messages from a real streamed partial. Do not merge this as fully UX-accepted until that screenshot/proof exists.

Why This Matters

  • The layout must be deterministic while the words remain model-dependent: progress bubble first, final answer second.
  • The bad Step 1 of N, checkmarks, and per-step separators were model/test-prompt pollution, not a UI convention OpenClaw should create or require.
  • This patch adds natural narration regressions such as I'll check the first page now and Now checking the IANA page, proving OpenClaw can retain normal model progress without fake numbered status text.

Scope Boundary

  • Telegram text progress projection only.
  • No main Jarvis bot testing or runtime changes.
  • No hardcoded final labels like “Here’s what changed.”
  • No OpenClaw-generated Step 1 of N, checkmarks, or per-step separators.
  • The separate “this chat is getting long” warning remains out of scope.
  • Codex backend acceptance is still required after Claude path is accepted.

Verification

  • pnpm exec vitest run extensions/telegram/src/bot-message-dispatch.test.ts --pool=forks --maxWorkers=1 passed: 1 file / 81 tests.
  • pnpm exec vitest run extensions/telegram/src/bot-message-dispatch.test.ts extensions/telegram/src/lane-delivery.test.ts src/infra/telegram-live-runtime-helpers.test.ts --pool=forks --maxWorkers=1 passed: 3 files / 131 tests.
  • git diff --check passed.
  • pnpm build completed; known DTS errors still print under tsc -p tsconfig.plugin-sdk.dts.json || true.
  • Worker finding: OpenClaw does not add Step 1 of N, checkmarks, or separators to model-authored progress narration. Existing examples were model/test-prompt pollution, except separate tool-progress system lines can still use the existing 🔧 tool format.

AI Assistance

  • AI-assisted
  • Testing degree: targeted local proof plus prior isolated tester attempts; fresh manual live two-bubble acceptance still required

Codex added 11 commits May 16, 2026 15:23
- what changed: materialize retained progress narration as its own Telegram bubble and send final answers separately.
- why: progress UX should preserve LLM task narration without polluting the final answer or TTS target.
- behavior/risk: scoped to Telegram text progress projection; live v2 proof is still blocked by provider auth/limits.
- What: materialize retained Telegram progress before sending final answers and strip separator-delimited progress from final text.

- Why: users need deterministic progress bubble + final bubble layout instead of edited or duplicated answer previews.

- Risk: limited to Telegram answer-stream finalization; media and error finals keep the existing safer path.
- What: treat natural multi-paragraph answer partials as retained progress transcripts and restore prior progress when late partials append final text.

- Why: Telegram progress UX must use deterministic two-bubble layout without relying on model-written Step/checkbox narration.

- Risk: limited to answer streaming finalization; no media/error final path or main bot runtime changes.
- What: split glued progress/final headings such as now.Comparison into retained progress plus final answer text.

- Why: live tester showed two bubbles but the progress bubble still contained a smashed final heading.

- Risk: limited to Telegram answer progress/final boundary detection; no main runtime or provider config changes.
- what changed: flush the restored retained progress preview before materializing it and cover the ordering in the glued Comparison regression.

- why: Telegram must freeze the natural progress bubble before sending the separate final answer bubble.

- behavior/risk: low; scoped to finalizing an existing streamed progress preview before final delivery.
- what changed: require streamed answer previews to look like real progress before retaining and splitting them into a separate Telegram bubble.

- why: plain final-answer streaming can start with tiny prefixes like **example, and those must stay part of the final answer instead of becoming a fake progress bubble.

- behavior/risk: low; scoped to Telegram finalization and covered by the live-shaped regression plus the existing focused suite.
- what changed: suppress short title-only answer prefixes like example.com: from creating retained Telegram progress bubbles, while keeping natural progress phrases eligible.

- why: streamed final-answer headings are not useful progress and were leaving useless extra bubbles above the final answer.

- behavior/risk: low; scoped to Telegram answer preview retention and covered by the live-shaped regression plus focused suite.
- what changed: suppress short heading-shaped answer prefixes like example.com: Documentation from creating retained Telegram progress bubbles, while keeping natural progress phrases eligible.

- why: streamed final-answer headings are not useful progress and were leaving useless extra bubbles above the final answer.

- behavior/risk: low; scoped to Telegram answer preview retention and covered by the live-shaped regression plus focused suite.
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.

1 participant