Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(blocks): Add webhook block status indicator #8838

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Nov 28, 2024

Demo

2024-11-28.23.27.Arc.mp4

Changes 🏗️

  • feat(frontend): Add webhook status indicator on CustomNode

    • Add webhookId to frontend node data model
  • fix(backend): Fix webhook ping endpoint

    • Remove provider path parameter
    • Fix return values and error handling
    • Fix WebhooksManager.trigger_ping(..)
      • Add credentials parameter
      • Fix usage of credentials
    • Fix .data.integrations.wait_for_webhook_event(..)
      • Add AsyncRedisEventBus.wait_for_event(..)
  • feat(frontend): Add BackendAPIProvider + useBackendAPI

  • feat(frontend): Improve layout of node header

    Before:
    image
    After:
    image

  • refactor(backend): Clean up .data.integrations

  • refactor(backend): Fix naming in .data.queue for understandability

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • Add webhook block, save -> gray indicator
    • Add necessary info to webhook block, save -> green indicator
    • Remove necessary info, save -> gray indicator

@Pwuts Pwuts requested a review from a team as a code owner November 28, 2024 22:40
@Pwuts Pwuts requested review from aarushik93 and majdyz and removed request for a team November 28, 2024 22:40
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Nov 28, 2024
Copy link

netlify bot commented Nov 28, 2024

Deploy Preview for auto-gpt-docs-dev ready!

Name Link
🔨 Latest commit 130c89c
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/6750e26b2e7e6c0008ef79e0
😎 Deploy Preview https://deploy-preview-8838--auto-gpt-docs-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added size/xl documentation Improvements or additions to documentation platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end platform/blocks and removed conflicts Automatically applied to PRs with merge conflicts size/xl labels Nov 28, 2024
Copy link

netlify bot commented Nov 28, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit 130c89c
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6750e26bd01d53000806c337
😎 Deploy Preview https://deploy-preview-8838--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

- refactor stuff in `backend.data.queue` for understandability
- clean up and update `backend.data.integrations`
- add `AsyncRedisEventBus.wait_for_event(..)`
- add `credentials` parameter to `WebhooksManager.trigger_ping(..)`
- fix `GithubWebhooksManager.trigger_ping(..)`
- remove `provider` path parameter from webhook ping endpoint
- fix webhook ping endpoint return values and error handling
- add webhook status indicator dot
- fix updating of `node.data.webhookId` when the new value is `undefined`
- fix layout of node header
@Pwuts Pwuts force-pushed the reinier/open-2078-implement-status-indicator-for-webhook-triggered-nodes branch from 2e4ed0c to 592828a Compare November 28, 2024 23:06
@github-actions github-actions bot added size/l and removed documentation Improvements or additions to documentation platform/blocks labels Nov 28, 2024
@@ -104,6 +107,7 @@ export function CustomNode({
>();
const isInitialSetup = useRef(true);
const flowContext = useContext(FlowContext);
const api = useBackendAPI();
Copy link
Member Author

Choose a reason for hiding this comment

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

This is how I want all API usage to look eventually. I just didn't want to do all the refactoring in this PR, so that will come later.

@Pwuts Pwuts changed the title feat(platform): Add webhook block status indicator feat(blocks): Add webhook block status indicator Nov 28, 2024
@Pwuts Pwuts enabled auto-merge November 28, 2024 23:28
@Pwuts Pwuts disabled auto-merge December 2, 2024 11:06
@Pwuts Pwuts enabled auto-merge December 2, 2024 11:07
@Pwuts Pwuts added this pull request to the merge queue Dec 5, 2024
Merged via the queue into dev with commit 64f5e60 Dec 5, 2024
22 checks passed
@Pwuts Pwuts deleted the reinier/open-2078-implement-status-indicator-for-webhook-triggered-nodes branch December 5, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end size/l
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants