FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix webhook history error state by Siteshcodes · Pull Request #289 · textbee/textbee · GitHub

Fix webhook history error state - #289

Open
Siteshcodes wants to merge 2 commits into
textbee:mainfrom
Siteshcodes:fix-webhook-history-error-state
Open

Siteshcodes wants to merge 2 commits into
textbee:mainfrom
Siteshcodes:fix-webhook-history-error-state

Conversation

Siteshcodes commented Aug 5, 2026
edited by coderabbitai Bot
Loading

Copy link
Copy Markdown

Summary

Fixes #277.

Changes

  • Render the shared ErrorState when loading webhook delivery history fails.
  • Preserve the existing loading state.
  • Prevent failed requests from falling through to the table's misleading "No results." state.
  • Follow the existing error handling pattern used in other dashboard components by reusing ErrorState and refetch().

Testing

  • Ran pnpm lint (0 errors; existing project warnings only).
  • Verified loading behavior is unchanged.
  • Verified failed requests now render ErrorState instead of "No results."

Summary by CodeRabbit

  • Bug Fixes
    • Added a clear error state when webhook history fails to load.
    • Users can retry loading webhook history directly from the error message.
    • Preserved existing loading and successfully loaded table views.

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the vernu's projects Team on Vercel.

A member of the Team first needs to authorize it.

coderabbitai Bot commented Aug 5, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

📝 Walkthrough

Walkthrough

Webhook history loading now captures request errors and exposes a retry callback. Failed requests render a webhook delivery error state with retry support. Loading and successful delivery table states remain unchanged.

Changes

Webhook history error handling

Layer / File(s) Summary
Render retryable webhook history errors
web/app/(app)/dashboard/(components)/webhooks-history/index.tsx
The component imports ErrorState, captures the request error and refetch function from useWebhookNotifications, and renders a retryable error state before the delivery table.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: vernu

🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the webhook history error-state fix.
Linked Issues check ✅ Passed The changes read the request error state and render ErrorState with retry behavior instead of showing "No results." [#277]
Out of Scope Changes check ✅ Passed The changes are limited to webhook history error handling and remain within issue #277 scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1 🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

coderabbitai Bot 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
🧹 Nitpick comments (1)
web/app/(app)/dashboard/(components)/webhooks-history/index.tsx (1)

49-69: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add component coverage for the error and retry branch.

Add or update a component test that mocks useWebhookNotifications with an error, asserts the ErrorState title, and verifies that clicking retry calls refetch. Keep coverage for loading and empty delivery states.

This protects the failed-request versus empty-history distinction from regression.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@web/app/`(app)/dashboard/(components)/webhooks-history/index.tsx around lines
49 - 69, Add component-test coverage for the error branch in the webhooks
history component: mock useWebhookNotifications to return an error and refetch,
assert the “Couldn't load webhook deliveries” ErrorState title, and verify
clicking retry invokes refetch. Preserve the existing loading and empty-delivery
state tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@web/app/`(app)/dashboard/(components)/webhooks-history/index.tsx:
- Around line 49-69: Add component-test coverage for the error branch in the
webhooks history component: mock useWebhookNotifications to return an error and
refetch, assert the “Couldn't load webhook deliveries” ErrorState title, and
verify clicking retry invokes refetch. Preserve the existing loading and
empty-delivery state tests.

ℹ️ Review info ⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 91ae4070-0a6f-4acf-9ad4-450eda00057b

📥 Commits

Reviewing files that changed from the base of the PR and between bf0197e and ef94c25.

📒 Files selected for processing (1)
  • web/app/(app)/dashboard/(components)/webhooks-history/index.tsx

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Web: failed webhook history requests render as "No results."

1 participant


Back | FazBrowse Home | New Git URL