Skip to content

fix(mecatui): stop forcing a screen clear on run completion - #2679

Merged
jbeda merged 3 commits into
mainfrom
fix/mecatui-completion-repaint
Nov 4, 2026
Merged

jbeda merged 3 commits into
mainfrom
fix/mecatui-completion-repaint

Conversation

@jbeda

@jbeda jbeda commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Remove all 13 automatic repaint calls from completion and recovery paths and delete the refreshCmd() helper; keep normal viewport refreshes and Bubble Tea redraws.
  • Preserve the other focus, live-feed, retry, queue, plan, and auth commands in each affected path. No no-op wrapper or new keybinding.
  • Strengthen the real Update(ResultMsg) regression test to inspect returned commands for screen clears and verify the final streamed tail remains in both the viewport and View().
  • Update the pending-clear source-settlement test to expect no repaint command while preserving its queue/continuation guards.
  • Remove an outdated comment referring to an end-of-turn clear.

Related to #2678. Do not close that issue when merging this PR. It is assigned to @jbeda and must remain open until he manually confirms whether long streaming responses still cause an intermittent whole-screen flash.

This is a narrow mitigation/A/B change, not a claim that the reported flicker's root cause is proven. The issue retains the symptoms, investigation timeline, alternative explanations, and next diagnostics if the flash persists.

Verification

  • Regression negative control: the updated completion test fails on the previous implementation with run completion must not force a screen clear.
  • Focused tail-flush, coalescing, incremental Markdown, and rail tests pass after the change.
  • Independent focused review found no issues.
  • GOMAXPROCS=4 task lint — pass.
  • GOMAXPROCS=4 task test — pass.
  • go run ./cmd/mecademo — pass; observed tool call/result, permission ask/approval, and final result.
  • GOMAXPROCS=4 task test:race — pass.

Initial gate attempts exposed an existing test that explicitly required the old repaint (updated in this PR), one server-startup connection timeout (passed immediately in isolation and in the full rerun), and a lint timeout under concurrent gate load (complete rerun passed).

API compatibility

Client-local rendering only. No wire, Go public API, stored-data, API-major, or feature-identifier changes; no coordinated upgrade required.

Manual verification

Run this build, ask for long streaming responses, and observe completion. Confirm that the final conversation remains visible without a whole-screen flash or stale-cell corruption. Report the outcome on #2678; merging this PR alone is not the resolution gate.

Related to #2678. Keep the issue open pending manual confirmation of the intermittent whole-screen flash.

Co-authored-by: Mecatl <[email protected]>
@jbeda
jbeda marked this pull request as ready for review November 4, 2026 15:43
Preserve the remaining completion, recovery, focus, and live-feed commands without an unused refresh wrapper. No new repaint binding.

Co-authored-by: Mecatl <[email protected]>
@jbeda
jbeda merged commit 3bbf5a2 into main Nov 4, 2026
41 checks passed
@jbeda
jbeda deleted the fix/mecatui-completion-repaint branch November 4, 2026 18:09
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Nov 18, 2026
2 tasks
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