Skip to content

Demote non-actionable report_error! calls in terminal/view.rs#13857

Open
warp-dev-github-integration[bot] wants to merge 3 commits into
masterfrom
factory/demote-terminal-view-report-errors
Open

Demote non-actionable report_error! calls in terminal/view.rs#13857
warp-dev-github-integration[bot] wants to merge 3 commits into
masterfrom
factory/demote-terminal-view-report-errors

Conversation

@warp-dev-github-integration

Copy link
Copy Markdown
Contributor

Description

Audits every report_error! call in app/src/terminal/view.rs to reduce Sentry noise, per .agents/skills/logging-and-error-reporting/SKILL.md. Only report_error! (and panics) create Sentry issues; log::* at Info+ becomes a breadcrumb. Calls that don't represent an actionable engineering problem — network/teardown races, expected fallbacks, gracefully-handled environmental conditions — should be plain logs, not Sentry events.

Demoted 8 calls to log::warn! (nothing for an engineer to fix):

  • persistence ModelEvent channel-send failures (UpdateBlockAgentViewVisibility ×3, UpdateFinishedCommand). A send error means the receiver is gone during app teardown — a race, not a bug.
  • "end_selection dispatched with no pending selection" — a benign UI event-ordering condition (an end without a matching begin).
  • "Cannot insert PR comments: not in a git repository" — an expected environmental precondition.
  • "No working directory found for terminal session" — an expected environmental condition (e.g. remote / not-yet-bootstrapped sessions).

Kept the remaining 13 report_error! calls — they flag genuine problems worth Sentry attention:

  • Invariant violations that shouldn't happen: missing conversation for the usage footer, missing session after a bootstrap notification, cleaning up a conversation that still has other blocks.
  • Settings persistence (set_value) failures (alias expansion, codebase-index speedbump banner ×2, agent-mode setup banner, notifications setting ×2).
  • Unexpected agent-view entry failures (passive code diff ×2, tag-in).
  • A deliberately-captured unknown OS error when requesting notification permissions.

Linked Issue

N/A — requested via the factory-client bug-triage Slack thread (linked below).

Testing

  • ./script/format --check passes.
  • cargo clippy -p warp --all-targets --tests -- -D warnings passes (CARGO_BUILD_JOBS=1).

No new automated test: this is a pure observability/log-level change with no behavioral difference (the error paths still early-return exactly as before), so there is no behavior to assert in a regression test. Not user-visible, so no UI verification applies.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Audit of all report_error! calls in app/src/terminal/view.rs to reduce
Sentry noise, per .agents/skills/logging-and-error-reporting/SKILL.md.
Only report_error! (and panics) create Sentry issues, so calls that don't
represent actionable engineering problems should be plain logs instead.

Demote 8 calls to log::warn! (nothing for an engineer to fix):
- 4x persistence ModelEvent channel-send failures (UpdateBlockAgentViewVisibility
  x3, UpdateFinishedCommand): a send error means the receiver is gone during
  app teardown, a race rather than a bug.
- 2x "end_selection dispatched with no pending selection": a benign
  UI event-ordering condition (end without a matching begin).
- "Cannot insert PR comments: not in a git repository": an expected
  environmental precondition.
- "No working directory found for terminal session": an expected
  environmental condition (e.g. remote / not-yet-bootstrapped sessions).

Keep the remaining 13 report_error! calls: they flag genuine invariant
violations (missing conversation/session that should exist), settings
persistence failures, unexpected agent-view entry failures, and a
deliberately-captured unknown OS permission error.

Co-Authored-By: Warp <agent@warp.dev>
Remove the explanatory comments added alongside the demoted log::warn!
calls, per in-thread review feedback. The log-level changes are unchanged.

Co-Authored-By: Warp <agent@warp.dev>
An end-selection dispatched without a matching begin is an invariant
violation the code handles locally, so log it at error! rather than warn!
(still not a Sentry issue via report_error!). Per in-thread review feedback.

Co-Authored-By: Warp <agent@warp.dev>
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