Skip to content

feat(tui): coalesce repeated idle TUI abort notices#85167

Merged
RomneyDa merged 1 commit into
mainfrom
duplicate-no-active-run
May 22, 2026
Merged

feat(tui): coalesce repeated idle TUI abort notices#85167
RomneyDa merged 1 commit into
mainfrom
duplicate-no-active-run

Conversation

@RomneyDa

@RomneyDa RomneyDa commented May 22, 2026

Copy link
Copy Markdown
Member

Summary

BEFORE

image

AFTER

image
  • Coalesce repeated opt-in TUI system notices by updating the existing chat-log row with an xN suffix.
  • Route the idle Esc abort path through that coalescing option so repeated no active run notices no longer spam the terminal.
  • Add focused TUI coverage and a changelog entry.

Verification

  • pnpm install
  • node scripts/run-vitest.mjs src/tui/components/chat-log.test.ts src/tui/tui-session-actions.test.ts
  • AUTOREVIEW_AUTO_TESTS=0 .agents/skills/autoreview/scripts/autoreview --mode local
  • git diff --check

Real behavior proof

Behavior addressed: Pressing Esc repeatedly in the TUI with no active run now keeps one no active run system row and increments it as x2, x3, etc.

Real environment tested: Local OpenClaw checkout on macOS with Node 22.22.0 and pnpm 11.1.0.

Exact steps or command run after this patch: node scripts/run-vitest.mjs src/tui/components/chat-log.test.ts src/tui/tui-session-actions.test.ts

Evidence after fix: The focused tests cover consecutive repeatable system-message coalescing, ordinary system-message non-coalescing, reset after user content, and the idle abort path passing coalesceConsecutive: true.

Observed result after fix: 2 test files passed, 23 tests passed.

What was not tested: Manual interactive TUI keypress behavior was not live-driven; coverage is through the chat-log rendering and abort action unit tests.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

Workflow note: Future ClawSweeper reviews update this same comment in place.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

Summary
The PR adds opt-in TUI chat-log system-message coalescing, uses it for idle Esc abort notices, adds focused tests, and updates the changelog.

Reproducibility: yes. from source inspection: current main appends no active run on every idle Esc abort, so repeated calls produce repeated rows. I did not drive an interactive TUI in this read-only review.

PR rating
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Summary: Small, well-scoped TUI patch with focused tests, visual proof, and no blocking findings in this review.

What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Real behavior proof
Not applicable: The external proof gate does not apply to this MEMBER/maintainer-labeled PR, though the attached before/after screenshots visibly show the changed TUI row behavior.

Mantis proof suggestion
A short terminal UI proof would directly show the visible idle Esc behavior if maintainers want independent live confirmation. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify that pressing Esc repeatedly in an idle TUI keeps one no active run row with an incrementing xN suffix.

Next step before merge
No automation repair is needed; the remaining action is normal maintainer review, CI, and landing choice for a protected maintainer-labeled PR.

Security
Cleared: The diff is limited to TUI TypeScript, focused tests, and changelog text; I found no concrete security or supply-chain concern.

Review details

Best possible solution:

Land this after normal maintainer review and CI, keeping the coalescing opt-in to the idle abort notice so other TUI system messages remain unchanged.

Do we have a high-confidence way to reproduce the issue?

Yes from source inspection: current main appends no active run on every idle Esc abort, so repeated calls produce repeated rows. I did not drive an interactive TUI in this read-only review.

Is this the best way to solve the issue?

Yes; the PR uses a narrow opt-in coalescing path on the one noisy idle-abort notice and preserves ordinary system-message behavior.

Label changes:

  • add P3: This is a small TUI ergonomics improvement with focused tests and limited blast radius.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The external proof gate does not apply to this MEMBER/maintainer-labeled PR, though the attached before/after screenshots visibly show the changed TUI row behavior.
  • add rating: 🦞 diamond lobster: Current PR rating is 🦞 diamond lobster because proof is 🦞 diamond lobster, patch quality is 🦞 diamond lobster, and Small, well-scoped TUI patch with focused tests, visual proof, and no blocking findings in this review.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external proof gate does not apply to this MEMBER/maintainer-labeled PR, though the attached before/after screenshots visibly show the changed TUI row behavior.

Label justifications:

  • P3: This is a small TUI ergonomics improvement with focused tests and limited blast radius.
  • rating: 🦞 diamond lobster: Current PR rating is 🦞 diamond lobster because proof is 🦞 diamond lobster, patch quality is 🦞 diamond lobster, and Small, well-scoped TUI patch with focused tests, visual proof, and no blocking findings in this review.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The external proof gate does not apply to this MEMBER/maintainer-labeled PR, though the attached before/after screenshots visibly show the changed TUI row behavior.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The external proof gate does not apply to this MEMBER/maintainer-labeled PR, though the attached before/after screenshots visibly show the changed TUI row behavior.

What I checked:

  • Current main behavior: On current main, the idle abort path appends a fresh no active run system message whenever there is no active or pending run. (src/tui/tui-session-actions.ts:400, 60d200f79719)
  • Patch implementation: The PR keeps coalescing opt-in by adding coalesceConsecutive handling to ChatLog.addSystem, updates the existing text node with an xN suffix, and resets the repeatable state when non-system content is appended. (src/tui/components/chat-log.ts:128, f715aa5db9a5)
  • Idle abort route: The PR routes only the no-active-run Esc abort notice through the coalescing option, leaving other system messages on the ordinary append path. (src/tui/tui-session-actions.ts:400, f715aa5db9a5)
  • Focused coverage: New tests cover repeated coalescing, ordinary non-coalesced system messages, reset after user content, and the idle abort action passing coalesceConsecutive: true. (src/tui/components/chat-log.test.ts:18, f715aa5db9a5)
  • Session-action coverage: The session-action test checks that abortActive() calls addSystem("no active run", { coalesceConsecutive: true }) and requests a render when idle. (src/tui/tui-session-actions.test.ts:389, f715aa5db9a5)
  • Visual proof: The PR body includes before/after screenshots; the inspected after screenshot shows a single no active run x35 row where the before screenshot showed repeated duplicate rows. (f715aa5db9a5)

Likely related people:

  • Super Zheng: git blame and git log --follow show the current ChatLog and abortActive TUI surface landing in b77f36fb1cbdc48d9c0a8c02e3e526599547a4d4. (role: introduced behavior; confidence: high; commits: b77f36fb1cbd; files: src/tui/components/chat-log.ts, src/tui/tui-session-actions.ts)
  • medns: The commit that introduced the current TUI chat-log/session-action files lists medns as a co-author in the commit metadata. (role: co-author on relevant surface; confidence: medium; commits: b77f36fb1cbd; files: src/tui/components/chat-log.ts, src/tui/tui-session-actions.ts)
  • odysseus0: The same introducing commit lists odysseus0 as a co-author and reviewed-by route for the current TUI surface. (role: co-author and reviewer on relevant surface; confidence: medium; commits: b77f36fb1cbd; files: src/tui/components/chat-log.ts, src/tui/tui-session-actions.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 60d200f79719.

@RomneyDa RomneyDa changed the title Coalesce repeated idle TUI abort notices feat: coalesce repeated idle TUI abort notices May 22, 2026
@RomneyDa RomneyDa changed the title feat: coalesce repeated idle TUI abort notices feat(tui): coalesce repeated idle TUI abort notices May 22, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels May 22, 2026
@clawsweeper

clawsweeper Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🌱 uncommon Velvet Test Hopper

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🌱 uncommon.
Trait: guards the happy path.
Image traits: location status garden; accessory miniature diff map; palette rose quartz and slate; mood curious; pose curling around a status light; shell brushed metal shell; lighting tiny status-light glow; background small review tokens.
Share on X: post this hatch
Copy: My PR egg hatched a 🌱 uncommon Velvet Test Hopper in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@RomneyDa RomneyDa merged commit c8a35c4 into main May 22, 2026
219 of 230 checks passed
@RomneyDa RomneyDa deleted the duplicate-no-active-run branch May 22, 2026 01:57
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 24, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 24, 2026
galiniliev pushed a commit to galiniliev/openclaw that referenced this pull request May 25, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
SebTardif pushed a commit to SebTardif/openclaw that referenced this pull request May 26, 2026
jameslcowan pushed a commit to jameslcowan/openclaw that referenced this pull request Jun 2, 2026
SYU8384 pushed a commit to SYU8384/openclaw that referenced this pull request Jun 3, 2026
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant