Skip to content

Commit

Permalink
fix(frontend): Agent output not being re-fetched on each agent output…
Browse files Browse the repository at this point in the history
… dialog opened (#8883)

https://github.com/user-attachments/assets/edd6908e-ecf3-45c2-94d7-3f88de70bb8f

### Changes 🏗️

`fetchBlockResults` should always be triggered when `isOutputOpen` is
true.

### 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:
  <!-- Put your test plan here: -->
  - [ ] ...

<details>
  <summary>Example test plan</summary>
  
  - [ ] 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
</details>

#### 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**)

<details>
  <summary>Examples of configuration changes</summary>

  - Changing ports
  - Adding new services that need to communicate with each other
  - Secrets or environment variable changes
  - New or infrastructure changes such as databases
</details>

Co-authored-by: Nicholas Tindle <[email protected]>
  • Loading branch information
majdyz and ntindle authored Dec 6, 2024
1 parent e290413 commit 9ad9dd9
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,9 @@ export const FlowRunInfo: React.FC<

// Fetch graph and execution data
useEffect(() => {
if (!isOutputOpen || blockOutputs.length > 0) {
return;
}

if (!isOutputOpen) return;
fetchBlockResults();
}, [isOutputOpen, blockOutputs, fetchBlockResults]);
}, [isOutputOpen, fetchBlockResults]);

if (flowRun.graphID != flow.id) {
throw new Error(
Expand Down

0 comments on commit 9ad9dd9

Please sign in to comment.