Skip to content

fix(transcript): drop punctuation-only assistant text - #763

Open
Erickzao wants to merge 1 commit into
hardbeat920:mainfrom
Erickzao:fix/omp-punctuation-steps
Open

Erickzao wants to merge 1 commit into
hardbeat920:mainfrom
Erickzao:fix/omp-punctuation-steps

Conversation

@Erickzao

@Erickzao Erickzao commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Before: some models send a bare . as a text part between tool calls, and omp passes each one through. The transcript showed a . row before every call. A delegated run's trail used each . as the headline of the group holding the next call, so calls read as <icon> ..

After: assistant text with no letters, digits or symbols never becomes a row or a headline. Real text, numbers and emoji-only replies are unchanged.

How:

  • hasReadableText in transcriptActivity.ts says whether text has anything besides whitespace and punctuation.
  • apply.ts drops a streaming assistant block without readable text when it is sealed by the next block, completed, or stopped with the turn. It is never kept, so it can't reach the transcript, the fold, or a saved session.
  • piSubagentEvents skips text parts without readable text, so a delegated run's trail no longer gets . steps.
  • activityPhaseTitle falls back to the summary of the group's calls when the headline is only punctuation. This covers sessions saved before this change.
  • New tests cover dropping on seal, completion and stop, keeping OK., 42 and 👍, the subagent trail, and the group title.

Why

Fixes #337.

This follows @elijah7x's diagnosis on the issue, which traced the . from omp's text parts into buildActivityPhases and suggested guarding all three paths.

UI

Before, one omp turn whose model sends . before each tool call, the work expanded:

before

After, the same turn:

after

The screenshots use real omp 18.6.1 in a demo project, with a local mock model that sends . before each tool call and delegates to a subagent. omp ran that subagent as a background job, so its trail isn't expanded in the app. The subagent path is covered by the new piSubagents test, built from the message shape omp sent.

Checklist

  • I ran npm run check. It passes in CI on macOS, Ubuntu, and Windows: 4231 web tests, 5 of them new, tsc, cargo fmt, clippy, and 473 to 539 Rust tests depending on the platform. One existing timing test, FilePaneNavigation, failed once on Windows and passed on rerun; this PR doesn't touch it. Locally, the harness and session tests and tsc pass.
  • This PR is small and focused
  • I did not mix unrelated changes

Tested on Windows 11 in the app, before and after the change, with the setup above. macOS and Linux were only checked by CI.

Summary by CodeRabbit

  • Bug Fixes
    • Punctuation-only assistant fragments are no longer shown as completed transcript entries or subagent steps.
    • Activity titles now fall back to relevant tool activity when an assistant summary contains only punctuation.
    • Short messages containing words, numbers, or emoji continue to appear normally.

Some models send a bare "." between tool calls. omp shows each one as a
text part, so the transcript got a "." row before every call, and a
delegated run's trail titled each call's group ".".

An assistant message with no letters, digits or symbols is now dropped
when it is sealed, completed, or the turn stops. Subagent snapshots skip
such parts, and a group whose headline is only punctuation falls back to
the summary of its calls.
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 11f35e18-4d31-4240-b684-f9d3bfbf1dab
📥 Commits

Reviewing files that changed from the base of the PR and between 98da85a and 9a32cad.

📒 Files selected for processing (6)
  • src/features/sessions/model/transcriptActivity.test.ts
  • src/features/sessions/model/transcriptActivity.ts
  • src/integrations/harness/core/apply.test.ts
  • src/integrations/harness/core/apply.ts
  • src/integrations/harness/providers/pi/piSubagents.test.ts
  • src/integrations/harness/providers/pi/piSubagents.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

Assistant text containing only whitespace or punctuation is omitted from activity titles, streaming blocks, and subagent steps. Text containing words, numbers, or emoji remains eligible.

Changes

Assistant text filtering

Layer / File(s) Summary
Readable-text check and activity titles
src/features/sessions/model/transcriptActivity.ts, src/features/sessions/model/transcriptActivity.test.ts
hasReadableText rejects text composed only of whitespace or Unicode punctuation. Activity titles use the check before displaying a prose summary and otherwise retain the existing role-based fallback.
Streaming and subagent text filtering
src/integrations/harness/core/apply.ts, src/integrations/harness/core/apply.test.ts, src/integrations/harness/providers/pi/piSubagents.ts, src/integrations/harness/providers/pi/piSubagents.test.ts
Streaming assistant blocks without readable text are removed during stream sealing, role completion, and stream stopping. Subagent text parts use the same check; thinking parts remain eligible when they contain text. Tests cover punctuation-only and readable short messages.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: hardbeat920

Merge Risk: ⚪ Minimal · up to 9a32c

This change filters punctuation-only assistant text from transcript titles, completed streaming blocks, and assistant-text subagent steps while preserving readable replies and tool calls. No supported material regression remains, so it is ready for normal merge checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #337 reports punctuation dots in tool-call transcripts. apply.ts removes punctuation-only streaming assistant blocks when they are sealed, completed, or stopped. piSubagents.ts omits punctua…
Out of Scope Changes check ✅ Passed All changes support issue #337 by removing punctuation-only transcript rows or delegated-run steps, correcting group titles, or testing that behavior. No unrelated changes are present.
Title check ✅ Passed The title clearly and concisely describes the main change: removing punctuation-only assistant text from the transcript.
Description check ✅ Passed The description covers what changed, why, UI impact with before-and-after screenshots, and the checklist. It also explains the implementation, test coverage, and platform results.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

[Bug]: OMP tool call display as a dot

1 participant