Skip to content

Agent chat hang feedback + Sentry error reporting#91

Merged
zinkh merged 2 commits into
mainfrom
claude/agent-hanging-feedback-4b32a7
Jul 19, 2026
Merged

Agent chat hang feedback + Sentry error reporting#91
zinkh merged 2 commits into
mainfrom
claude/agent-hanging-feedback-4b32a7

Conversation

@zinkh

@zinkh zinkh commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • The AI "Agents" chat panel showed only bouncing dots while waiting on a Gemini reply, with no indication of what was happening and no way to cancel a hung request. The loading indicator now escalates through "thinking" → "still working" → "taking longer than usual" based on elapsed time, exposes a cancel button after 8s, and both client (60s) and server (55s) enforce hard timeouts so a stuck request always resolves with a clear message instead of hanging indefinitely.
  • Added Sentry error reporting (backend via @sentry/node, frontend via @sentry/react) so failures — especially in the two Gemini-backed endpoints (agent chat, suggest-articles) — are actually visible after the fact, instead of only existing as console.error lines that scroll off the DigitalOcean log buffer. Fully opt-in via SENTRY_DSN / VITE_SENTRY_DSN; no-ops with those unset.

Test plan

  • npm run lint (tsc --noEmit) passes clean
  • Verified server boots cleanly with tsx --import ./instrument.ts server.ts and a test Sentry DSN, confirming the Express auto-instrumentation warning is resolved
  • Manually exercised the --import preload ordering fix against a throwing Express route to confirm setupExpressErrorHandler attaches correctly
  • Manual UI verification of the chat cancel/timeout flow (no dev environment with a live Gemini key available in this session)

🤖 Generated with Claude Code

https://claude.ai/code/session_01FSWUNtUJkZ2p7ciNoNCKLH


Generated by Claude Code

claude added 2 commits July 19, 2026 06:32
The agent chat panel showed only bouncing dots with no indication of
what was happening or any way out if the Gemini call ran long. Now the
loading indicator escalates through "thinking" -> "still working" ->
"taking longer than usual" messages based on elapsed time, exposes a
cancel button after 8s, and both client (60s) and server (55s) enforce
hard timeouts so a stuck request always resolves with a clear message
instead of hanging indefinitely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FSWUNtUJkZ2p7ciNoNCKLH
…ontend

console.error/warn calls were the only error signal (see the earlier AI-logs
discussion), invisible once they scroll off Cloud Run/DigitalOcean's log
buffer. Sentry now captures them automatically via captureConsoleIntegration
on both sides, plus richer tagged captures for the two Gemini-backed
endpoints (agent chat, suggest-articles) that were the original ask.

Backend init lives in instrument.ts, preloaded via `--import` (tsx/Node
--import flag) rather than called from server.ts's own body — under ESM,
server.ts's imports (express included) are all resolved before any of its
top-level code runs, so Sentry.init() from inside server.ts is always too
late for the Express auto-instrumentation to patch express at import time.

Fully opt-in: unset SENTRY_DSN / VITE_SENTRY_DSN (both added to
.env.example) disables reporting entirely, matching local dev today.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FSWUNtUJkZ2p7ciNoNCKLH
@zinkh
zinkh merged commit a6b8e9b into main Jul 19, 2026
1 check passed
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.

2 participants