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

fix(frontend): Monitor Page got all the request doubled on each page refresh #8727

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Nov 20, 2024

All requests executed by the monitor page on the first load were always doubled, this made the page load the data twice.

This was caused by the explicit page refresh on each Supabase auth state change: https://github.com/Significant-Gravitas/AutoGPT/pull/7655/files#diff-f0d8e7150741c7f5a883b2b37e86155e03d04807c5d8971d5b7e5c9817cc4b98R35

Changes 🏗️

Avoid refreshing the page on each auth state change event, only refresh on the SIGNED_OUT event.

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:
    • ...
Example test plan
  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

For configuration changes:

  • .env.example is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
  • Changing ports
  • Adding new services that need to communicate with each other
  • Secrets or environment variable changes
  • New or infrastructure changes such as databases

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

State Management
Verify that moving the page refresh to only trigger on SIGNED_OUT doesn't break other auth state change scenarios that may have required a refresh

@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end size/s labels Nov 20, 2024
Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 072d465
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/673d56757ebce9000814e551

Copy link
Contributor

@aarushik93 aarushik93 left a comment

Choose a reason for hiding this comment

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

nice, thanks!

@aarushik93 aarushik93 merged commit 5fa5b71 into dev Nov 20, 2024
15 checks passed
@aarushik93 aarushik93 deleted the zamilmajdy/open-2052-monitor-page-got-all-the-request-doubled-on-each-page-access branch November 20, 2024 10:43
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 Review effort [1-5]: 1 size/s
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants