Skip to content

fix(tui): calm the Activity feed — revert auto-expand-on-error, demote log noise#13808

Merged
teknium1 merged 2 commits into
mainfrom
bb/tui-activity-triage
Apr 22, 2026
Merged

fix(tui): calm the Activity feed — revert auto-expand-on-error, demote log noise#13808
teknium1 merged 2 commits into
mainfrom
bb/tui-activity-triage

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

Restore the old-CLI contract where only complete failures tint the Activity chevron red. Everything else is still visible for debugging but no longer commandeers attention.

Two small commits:

  1. fix(tui): don't force-open Activity on every error — reverts the auto-expand-on-new-error effect from 93b47d96. The effect overrode the user's chosen detailsMode and visually interrupted every turn. Red/yellow chevron tint stays as the passive signal; click to read, same as Thinking and Tool calls.

  2. fix(tui): demote gateway log-noise from Activity to info tone — reclassifies the noisy sources in createGatewayEventHandler.ts:

    • gateway.stderr → always info (drops the ERRLIKE_RE regex)
    • gateway.protocol_error (both pushes) → info
    • commands.catalog cold-start failure → info
    • approval.request → no Activity entry (the overlay is the signal)

    Kept as error: terminal error event, gateway.start_timeout, gateway-exited, explicit status.update error/warn kinds.

Motivation

The old CLI silently swallowed ~99% of stderr and protocol noise — only complete failures ever surfaced. The new event pipeline surfaced that unfiltered firehose into the Activity feed as error/warn tones, and the auto-expand compounded it into a per-turn attention-grab. This restores the signal-to-noise ratio of the old CLI while keeping the information accessible via the (now-dim) Activity chevron and /logs.

Net effect

Source Before After
gateway.stderr error/warn by regex info
gateway.protocol_error warn (×2) info (×2)
commands.catalog fail warn info
approval.request warn (not pushed)
terminal error event error error (unchanged)
gateway.start_timeout error error (unchanged)
gateway exited error error (unchanged)

In normal operation the Activity chevron stays dim — no eye-grab. Red chevron genuinely means "something broke, worth a click".

Explicitly deferred (not in this branch)

  • Per-section config keys (display.open_thinking/tools/activity) for the "always A+B, never C" mental model. Revisit if source triage doesn't quiet things enough.
  • Opt-in display.auto_expand_errors flag for users who liked the pop-up.

Test plan

  • npm test in ui-tui/ — 24 files, 186 tests, green
  • Added regression test: gateway noise lands as info, approval stays out of Activity, real error event still tints red
  • Manual: run the TUI, trigger stderr noise (e.g. a subprocess warning) — confirm Activity chevron stays dim/closed
  • Manual: kill the gateway mid-turn — confirm Activity chevron tints red, still collapsed by default

Reverts the auto-expand-on-new-error effect added in 93b47d9. The
effect overrode the user's chosen detailsMode and visually interrupted
every turn. Red/yellow chevron tint remains as the passive signal —
click to read, just like Thinking and Tool calls.
Restore the old-CLI contract where only complete failures tint Activity
red. Everything else is still visible for debugging but no longer
commandeers attention.

- gateway.stderr: always tone='info' (drops the ERRLIKE_RE regex)
- gateway.protocol_error: both pushes demoted to 'info'
- commands.catalog cold-start failure: demoted to 'info'
- approval.request: no longer duplicates the overlay into Activity

Kept as 'error': terminal `error` event, gateway.start_timeout,
gateway-exited, explicit status.update kinds.
@OutThisLife OutThisLife requested a review from Copilot April 22, 2026 03:55
@teknium1 teknium1 merged commit 572e27c into main Apr 22, 2026
13 of 14 checks passed
@teknium1 teknium1 deleted the bb/tui-activity-triage branch April 22, 2026 03:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores a calmer TUI Activity feed by removing the auto-expand behavior on new errors and reclassifying several gateway-related events as informational so the Activity chevron only tints red on true failures.

Changes:

  • Revert the “auto-open Activity on new error” behavior in the thinking/progress UI.
  • Demote gateway stderr/protocol noise (and command catalog cold-start failure) to info, and stop emitting an Activity entry for approval.request.
  • Add a regression test covering the new noise classification and approval behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ui-tui/src/components/thinking.tsx Removes the effect that forced Activity open when new errors appear.
ui-tui/src/app/createGatewayEventHandler.ts Reclassifies noisy gateway events to info and omits Activity logging for approvals.
ui-tui/src/tests/createGatewayEventHandler.test.ts Adds coverage ensuring noise is info, approvals don’t enter Activity, and real errors still do.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui-tui/src/__tests__/createGatewayEventHandler.test.ts
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) 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.

4 participants